258 Commits

Author SHA1 Message Date
Charles Lyding
263231ea56 refactor(@angular-devkit/core): move existing workspace API under experimental
This API is already experimental.  The move allows for the new stable API to use the "workspace" directory structure and to also better signify that the existing API is in fact experimental and subject to change or removal.
2019-03-06 11:34:05 -08:00
Alex Eagle
4e262f966f build: Update to latest bazel rules 2019-03-06 11:27:48 -08:00
Hans Larsen
041907d551 feat(@angular-devkit/core): add factories for workspace
It makes it easier instead of always copy-pasting the same findUp code
to get the workspace file.
2019-03-05 11:14:59 -08:00
Renovate Bot
b80a281342 build: update ajv to version 6.10.0 2019-03-04 09:35:46 -08:00
Alan Agius
ae13974f1d build: update to rxjs 6.4 2019-02-26 08:33:48 -08:00
Renovate Bot
86dbf22225 build: update ajv to version 6.9.2 2019-02-26 08:33:15 -08:00
Hans Larsen
1aa1b47f90 feat(@angular-devkit/core): remove Log messages from Job API
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.
2019-02-19 13:51:29 -08:00
Hans Larsen
0f0f289bf7 fix(@angular-devkit/core): fix true schemas post transform step
Also tighten the types a bit, and add a test that failed before and works now.
2019-02-19 13:51:29 -08:00
Hans Larsen
7023255c3d feat(@angular-devkit/core): jobs should re-log instead of forwarding
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.
2019-02-19 13:51:29 -08:00
Hans Larsen
81967900d0 feat(@angular-devkit/core): logger.log() should keep own metadata
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.
2019-02-19 13:51:29 -08:00
Hans Larsen
d856f8f8f8 feat(@angular-devkit/core): export terminal capabilities 2019-02-19 13:51:29 -08:00
Renovate Bot
d5144c3bf3 build: update chokidar to version 2.1.2 2019-02-19 10:15:18 -08:00
Alex Eagle
9f33253f36 refactor: use vendored supports-color 2019-02-18 18:44:56 -08:00
Alex Eagle
fae77e9257 build: vendor chalk/supports-color in third_party
Also requires vendoring its single dependency
2019-02-18 18:44:56 -08:00
Charles Lyding
d849834445 feat(@angular-devkit/core): support console logger color customization 2019-02-15 08:01:41 -08:00
Hans Larsen
889c2549d1 fix(@angular-devkit/core): remove static initialization using process object
It does not work in a browser.
2019-02-14 11:54:56 -08:00
Renovate Bot
17388866a5 build: update ajv to version 6.9.1 2019-02-13 15:22:06 -08:00
Hans Larsen
e2bebe9871 test: add a test for deferred jobs
Just one more bit of coverage.
2019-02-07 15:57:48 -08:00
Hans Larsen
c4798b69d6 refactor(@angular-devkit/core): move core/node experimental files to own directory
It's just cleaner that way.
2019-02-07 15:57:48 -08:00
Hans Larsen
445946515d refactor(@angular-devkit/core): set JobStrategy type arguments default 2019-02-07 15:57:48 -08:00
Hans Larsen
988835d024 feat(@angular-devkit/core): add a reuse JobStrategy
It allows a job to be reused if it's still running. This includes redirecting
the inputs to the new job.
2019-02-07 15:57:48 -08:00
Hans Larsen
4571197326 feat(@angular-devkit/core): add a fallback registry
Its get method goes through an array of registries and return the first
one found.
2019-02-07 15:57:48 -08:00
Hans Larsen
c461ed5960 feat(@angular-devkit/core): createJobFactory does not have to have options
It matches the other factories.
2019-02-07 15:57:48 -08:00
Hans Larsen
0e6384b8c4 fix(@angular-devkit/core): Properly subscribe/unsubscribe to observables
This has been a source of headaches when debugging the Architect jobs.
We keep all subscriptions now and unsubscribe them when the result is
done.
2019-02-07 15:57:48 -08:00
Hans Larsen
ef93ff8c78 refactor(@angular-devkit/core): Type JobHandlerContext properly
The input field is not an unknown JsonValue, the type is part of the
generic. It's validated by the scheduler.
2019-02-07 15:57:48 -08:00
Hans Larsen
ca31640505 refactor(@angular-devkit/core): change the job context scheduler to generic
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.
2019-02-07 15:57:48 -08:00
Hans Larsen
5f73b17f7a refactor(@angular-devkit/core): add invalid argument exception class
Before we were (wrongly) using the InboundMessage exception class. This was
an oversight. This commit introduces a new InvalidArgument exception for this
special case.
2019-02-07 15:57:48 -08:00
Renovate Bot
be79d2a662 build: update chokidar to version 2.1.0 (#13599) 2019-02-07 08:24:05 -08:00
Renovate Bot
0496b514ad build: update ajv to version 6.8.1 (#13583) 2019-02-05 21:15:36 -08:00
Alan Agius
2ed1719eaa fix(@angular-devkit/core): remove colors for info messages
Rely on the terminal to provide the color for info messages

fixes #13497
2019-01-23 10:37:51 -08:00
Mikel Ward
7d15c5dd02 fix(@angular-devkit/core): Make default and info log messages use default colors
Previously, we set the color to white, which is (nearly) invisible on
terminals with a white background.

Fixes #13439.
2019-01-15 17:10:22 -08:00
Renovate Bot
83bbfec54b build: update ajv to version 6.7.0 2019-01-15 14:19:07 -08:00
Filipe Silva
5a847298e5 ci: use puppeteer 2019-01-14 12:57:13 -08:00
Filipe Silva
3a70eb73c4 ci: add windows buildkite 2019-01-14 12:57:13 -08:00
Renovate Bot
5a02a83d56 build: update ajv to version 6.6.2 2018-12-19 14:02:07 -08:00
Hans
a3a657f7e7 feat(@angular-devkit/core): Jobs API added
See the README for more details about usage.
2018-12-14 10:55:04 -08:00
Hans
c89a0420d5 feat(@angular-devkit/core): add DeepReadonly<> and Readwrite<> types
Readwrite removes readonly, while DeepReadonly recursively sets it. A ReadonlyArray
should be used if the type is an array, but that is too much of a change to our API
(JsonValue includes JsonArray but then we would need a ReadonlyJsonValue, and same
for object, which has deep roots in our API).

We should fix this in a further refactor at some point.
2018-12-14 10:55:04 -08:00
Hans
64781f64d7 refactor(@angular-devkit/core): UnknownException should still extend Base 2018-12-14 10:55:04 -08:00
Hans
3a28d4c142 feat(@angular-devkit/core): add a new JsonSchema type
A Schema is either an Object or a boolean. We could reduce JsonSchema scope further
by adding properties, but a schema is a really complex type so its not worth the
effort.
2018-12-14 10:55:04 -08:00
Hans
7567e8e6a0 feat(@angular-devkit/core): add next() to Logger
It allows to pass through LogEntry which was not possible before.
2018-12-14 10:55:04 -08:00
Hans
6bf80edf54 ci: add golden-api file for core/node
This is necessary as we introduce namespaces in jobs.
2018-12-14 10:55:04 -08:00
Michael O'Keefe
db0fc7759b feat(@angular/cli): Added support for multiselect list prompt (#13031)
* feat(@angular/cli): Added support for multiselect list prompt

* If multiselect option is true use the checkbox
   inquirer prompt type, otherwise use list.

* feat(@angular-devkit/core): Added support for multiselect list prompt

* Added multiselect to PromptDefinition interface and usages
2018-11-30 12:01:57 -08:00
Alan Agius
717b02f533 ci: add ts api guardian (#12010)
* refactor: fix `import` and `export` paths to work with classic resolution

`ts-api-guardian` only support classic module resolution which means that we need to specify `index` so that the resolution works.

* build: add `npm_package` to packages

* build: add ts-api-guardian to repo

* test: add api golden files

* refactor: use proper namespace instead of alias export

* refactor: use proper namspace einstead of alias export

* build: add `_golden_api` files

At the moment ts api guardian doesn't support aliased symbols as namespaces, this is a workaround to still have namespaced symbols in the final golden file.

* build: update angular archive for workspace

* test: fix reference to `TestHost` to use namespace

* refactor: create `fs` namespace instead of aliased export

* test: update api golden file for `@angular-devkit/core/node`
2018-11-30 11:53:54 -08:00
Alan Agius
a2aba2866c fix(@angular-devkit/core): handle drive only paths in windows
When normalized path will not have a trailing slash, and at the moment the RegExp for drive needs to match `\c\`

Fixes #12670
2018-11-14 12:42:13 -08:00
Alan Agius
bd4dc38359 refactor: use createConsoleLogger and remove duplicate code (#12787) 2018-11-08 10:30:41 -08:00
vikerman
df4ee8c491
fix(@angular-devkit/core): fix 'this' check (#12873) 2018-11-06 20:44:06 -08:00
Keen Yee Liau
d3e1149bdf build: add missing transitive deps for typescript (#12881)
add `strict_checks = False` for building inside Google.
2018-11-06 20:40:03 -08:00
Keen Yee Liau
db78228fc4 build: add external block for tsconfig in test targets (#12879) 2018-11-06 11:12:21 -08:00
Alan Agius
6e0b60df32 fix(@angular/cli): errors and warnings are hard to read in windows cmd (#12767)
* fix(@angular-devkit/core): errors and warnings are hard to read in windows cmd

Closes #12755

* fix(@angular/cli): errors and warnings are hard to read in windows cmd

Closes #12755
2018-10-31 21:03:03 -07:00
Keen Yee Liau
a3b05a0283 build: Use fine-grained node_module deps
This commit updates the BUILD files to specify fine-grained node_module deps
by replacing "@typings" comments with actual @npm node module.

Moved tools/bazel.rc -> .bazelrc

Removed "jasmine" typings from base tsconfig.json

Added @bazel/karma to devDependencies, needed for `ts_web_test`
2018-10-31 20:56:27 -07:00