Remove the manually maintained schema.d.ts from the browser builder, and use
the Schema JSON file to generate it. This had a lot of repercussions around
the whole build-angular code base and the different interfaces that were
manually kept.
Previously, all loaders either needed to be in the workspace's node modules directory or a node modules directory directly within the build angular package. A package manager can potentially hoist a loader to a node modules location inbetween the two and causing loader resolution to fail. This change causes webpack to check all intermediate node modules directories in addition to the initial two locations.
If a system wants to have logging it should multiplex it itself on a channel.
Also changed the previous Architect commits to remove usage of Logs and move
to a "log" channel.
Move the entire Architect CLI to use the new API, and report progress using
a progress bar for each worker currently executing. Shows log at the end
of the execution.
This is meant to be used as a debugging tool to help people move their builders
to the new API.
Four builders were added;
- true, always succeed
- false, always fails
- concat, runs all targets or builders in succession
- allOf, runs all targets or builders in parallel
The new API has been described in this design doc:
https://docs.google.com/document/d/1SpN_2XEooI9_CPjqspAcNEBjVY874OWPZqOenjuF0qo/view
This first drafts add support for the API (given some deep imports). It is
still in draft mode but is committed to make it available to people to
start testing and moving their own builders.
This API rebuilds (not backward compatible) the Architect API package. To
use it people will need to import "@angular-devkit/architect/src/index2"
to start using it. A reference builder will be added in the next commit.
There are 2 pieces missing from this commit that will be added in the
same PR; 1) the architect-host and CLI to test, and 2) a reference
builder moved from the old API to the new one. These will be part of
the same PR.
Finally, there are missing tests in this package, but everything tested
manually and automatically works so far. Test coverage will be added
before the package is considered finished.
Due to a desire to keep architect, our tests and the scope of this PR
limited and keep the two APIs separated, every clashing files will
have a "2" suffix added to it. Once all builders have been moved and
we are sure everything works, all those files will be moved to their
final destination and the old API will be removed, in one PR.
Current behaviour is to have logs forwarded, but this is flawed because on the
job side the logger is actually re-created. This allows logs to be actually part
of the caller side logging infrastructure.
It was possible to overwrite the metadata of the logger itself (name, path)
when calling "log()". This should not happen. If there is a need to overwrite
the loggers metadata itself one should use "next()" and construct or forward
their own log entry.
BREAKING CHANGE:
Root relative URLs are a standardized method to reference a resource path from the root of a host. The previous behavior of the Angular CLI prevented this from occuring and resulted in an inability to reference stylesheet assets in this manner. The initial reason for this behavior is no longer present in the internal implementation of the Angular CLI. Therefore, this now unnecessary and non-standard behavior is being phased out. If an application currently relies on this behavior, a compatibility option `rebaseRootRelativeCssUrls` has been provided for the 8.x release cycle to facilitate transition away from this non-standard and limiting behavior. The recommended method to transition is to use relative paths within the source stylesheet. This allows the build system to process and generate a full URL for the asset.
That scheduler is really an any scheduler and would need to be typed
appropriately. There could be multiple schedulers that this job is
part of and it is impossible to ensure the scheduler is a more specific
type than unknown.
Note: This was wrongly typed before.
Context: JsonValue is the JSON equivalent of the unknown TS type.