84 Commits

Author SHA1 Message Date
Hans Larsen
e9ee58a89e refactor(@angular/cli): move analytics constants to devkit core
They need to be shared with builders and schematics.
2019-03-28 13:28:41 -07:00
Charles Lyding
e41e10d313 feat(@angular/cli): support stable architect API 2019-03-27 16:33:39 -07:00
Hans Larsen
6e5095b134 feat(@angular/cli): allows analytics sharing with a third party
Documentation can be seen at https://next.angular.io/cli/usage-analytics-gathering
2019-03-26 10:07:30 -07:00
Hans Larsen
c840fcb529 fix(@angular/cli): dont force a prompt on non-interactive terminals
For some reason we were forcing the prompt on postinstall, breaking CI.
2019-03-25 12:37:05 -07:00
Hans Larsen
696272bd40 fix(@angular/cli): if no global config file found, analytics can be null
This happens if there is no file at all (otherwise it would be undefined). This was
causing an exception and returning false instead of undefined, preventing the
prompt. Now we return undefined in this case.

To be clear, this is because getWorkspace returns null, and the logic makes
analyticsConfig null in this case.
2019-03-25 12:37:05 -07:00
Alan
75abc79e37 fix(@angular/cli): fix import path for TimingOptions
Fixes #13978
2019-03-25 11:21:05 -07:00
Hans Larsen
0a1d4298ec build: remove DO_NOT_SUBMIT tags from messaging
This is conditional to https://github.com/angular/angular/pull/29382 being
submitted.
2019-03-20 15:08:07 -07:00
Hans Larsen
2e58fb33ca feat(@angular/cli): add custom implementation for analytics for commands
Some commands (like schematics) need to have custom reporting for
analytics. Schematics and Architect commands need to verify if the
schematic/architect builder run is in the safelist, for example.
2019-03-20 15:08:07 -07:00
Hans Larsen
1cbd915c26 feat(@angular/cli): add support for analytics command proper
To add/remove/prompt about the analytics configuration.
2019-03-20 15:08:07 -07:00
Hans Larsen
cf5cf19bb5 feat(@angular/cli): add analytic support to commands and command-runner
This is only reporting commands and their flags right now, and not
schematics or project analytics.
2019-03-20 15:08:07 -07:00
Alan Agius
71c6cc506e refactor: add allowAdditionalArgs to be able to bypass extra params validations (#13556) 2019-02-05 21:13:45 -08:00
Alan Agius
f8e873b645 fix(@angular/cli): schematics commands should fail on unknown options
When an addition argument is parsed the schematic commands should fail with an error.

Fixes #12549
2019-01-30 11:41:42 -08:00
cexbrayat
3684df8aca fix(@angular/cli): remove redundant period in deprecation warning
As `parser.ts` currently always adds a period at the end of the warning message and the `x-deprecated` messages also have one, this removes the always added one to avoid a double period in the warning message.

Fixes:

    Option "styleext" is deprecated: Use "style" instead..

to:

    Option "styleext" is deprecated: Use "style" instead.
2018-12-14 10:43:40 -08:00
Charles Lyding
f066e99e3a feat(@angular/cli): initial minimal BEP support 2018-12-11 11:58:05 -08:00
Alan Agius
31783140b8 fix(@angular/cli): show full path to project definition when already exists
Fixes #13138
2018-12-06 11:50:08 -08:00
Alan Agius
45b6df511f fix(@angular-devkit/build-angular): lint non human readable formatters produces invalid output
fixes #12674
2018-12-06 11:24:27 -08:00
Michael Nahkies
7d88182935 fix(@angular/cli): pass arguments to all targets
When running a command with args against multiple targets, all targets
should be given the args. As parseArguments was mutating the passed args
array this wasn't the case. Fix by not mutating the array.

This was especially noticeable when using the `ng lint --fix` command
on a newly generated project, as files in the app target would be fixed,
but e2e target would be only be linted (with no fix)

Possibly closes #10657, #10656, #11005
2018-12-06 11:21:23 -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
Hans Larsen
3e9705f31b feat(@angular/cli): add warning for overriding flags in arguments
Fixes #12948
2018-11-19 17:20:34 -08:00
Alan Agius
d2a29afd48 fix(@angular/cli): handle case senstive aliases
Closes #12780
2018-11-15 17:09:54 -08:00
Charles Lyding
5e7f995001 fix(@angular/cli): improve architect command project parsing 2018-11-15 17:09:30 -08:00
clydin
43aabb4be6 fix(@schematics/update): improve npmrc discovery (#12871)
* fix(@schematics/update): improve npmrc discovery

* feat(@angular/cli): support yarnrc options during update when using yarn
2018-11-14 10:30:00 -08:00
Hans Larsen
456614828f feat(@angular/cli): allow flags to have deprecation
The feature comes from the "x-deprecated" field in schemas (any schema that is used
to parse arguments), and can be a boolean or a string.

The parser now takes a logger and will warn users when encountering a deprecated
option. These options will also appear in JSON help.
2018-11-14 10:29:07 -08:00
Alan Agius
bd4dc38359 refactor: use createConsoleLogger and remove duplicate code (#12787) 2018-11-08 10:30:41 -08:00
Alan Agius
131f55518c fix(@angular/cli): support all single dashes prefixed arguments (#12783)
Fixes #12771
2018-11-06 22:43:14 -08:00
clydin
5e354d17f1 feat(@angular/cli): autodetect default package manager (#12753) 2018-11-06 22:00:40 -08:00
Filipe Silva
eef66f0f65 fix(@angular/cli): error out when command json is invalid 2018-11-01 08:26:28 -07:00
Alan Agius
2bb26f197b fix(@ngtools/webpack): print error message on new line (#12764)
* fix(@ngtools/webpack): print error message on new line

* fix(@angular/cli): change logger from `warning` to `fatal` for unkown options
2018-10-31 21:02:25 -07:00
Charles Lyding
5af69ba43b refactor(@angular/cli): remove rxjs direct dependency 2018-10-31 14:53:56 -07:00
Alan Agius
0dc4c40dd3 fix(@angular/cli): multiline help descriptions are not aligned 2018-10-23 12:00:30 -07:00
Hans Larsen
aa25a33448 feat(@angular/cli): show project being linted
Fixes #11231
2018-09-27 13:20:19 -04:00
Charles Lyding
5d8af57112 feat(@angular/cli): add --defaults option to ng new
Any option with a default value will not be prompted (if a prompt is defined) and the default will be used instead.

Closes #12084
2018-09-27 12:58:43 -04:00
Hans Larsen
5faf0cb535 fix(@angular/cli): numerical flags should not give 0 if empty
And numerical positional flags will be ignored.

If the value is an empty string, a number conversion would give 0. It is unexpected
from the user standpoint ("--num=" has the user expect a string value).
2018-09-27 12:46:15 -04:00
Hans Larsen
4daa299558 fix(@angular/cli): allow -a=value arguments
If a flag is followed by an equal sign, just treat it as a long name. So
the example above would translate to --a=value, while -abc=123 would be
"-a -b -c=123".

Fixes #12308
2018-09-27 12:46:15 -04:00
Hans Larsen
78a6fabb4a fix(@angular/cli): allow empty string arguments 2018-09-27 12:46:15 -04:00
Charles Lyding
91cf2d7b9f fix(@angular/cli): allow global config command outside project
Fixes #12296
2018-09-25 17:05:15 -04:00
Alan Agius
43fff130a5 fix(@angular/cli): cannot use same target name in when having multiple projects (#12327)
Closes #12320
2018-09-21 12:27:11 -07:00
Hans
0b959d1233 * fix(@angular/cli): remove helpJson and help-json mentions (#12331)
* fix(@angular/cli): remove helpJson and help-json mentions

* ci: use proper --help=json for creating snapshot
2018-09-20 14:45:09 -07:00
Hans
97576ecd13 fix(@angular/cli): do not show stack on argument parse error 2018-09-19 13:02:40 -07:00
Hans
f7f5b28dae feat(@angular/cli): if parsing comes accross an obvious error throw it
We accumulate errors this way, and throw only once at the end, with messages for
all errors.
2018-09-19 13:02:40 -07:00
Hans
b02a7e5f9b fix(@angular/cli): on error finding files, show warning
This should not prevent execution, but is useful to know.
2018-09-19 13:02:40 -07:00
Hans
fcbc7db54f feat(@angular/cli): remove --help-json and add format to help
--help now accepts a value which can be a boolean or a string. If the value
is not understood we simply show a message to the user that it was invalid.
2018-09-19 13:02:40 -07:00
Hans
7d782a3f5e feat(@angular/cli): add support for parsing enums
Options can now contain enumerations of values.
2018-09-19 13:02:40 -07:00
Hans
34818b0346 feat(@angular/cli): add subcommand to options
SubCommands are not tied to the option that triggers them. They
contain a subset of a CommandDescription interface, with at least
a short and long description and usage notes. These are generated
from the subcommand schema (e.g. schematics in case of generate).
2018-09-19 13:02:40 -07:00
Hans
6622aa9d1a refactor(@angular/cli): remove command type
It was really unused.
2018-09-19 13:02:40 -07:00
Hans
86d803e80a docs(@angular/cli): add comments for Command interface 2018-09-19 13:02:40 -07:00
Hans
3bb6548d15 feat(@angular/cli): add usage notes to help JSON 2018-09-19 13:02:40 -07:00
Charles Lyding
c12d3ee329 refactor(@angular/cli): correct implicit returns 2018-09-19 11:32:39 -07:00
Charles Lyding
6cfb72acc2 fix(@angular/cli): support --version option 2018-09-19 09:31:13 -07:00
Hans
af96ccfb65 fix(@angular/cli): fix support for hidden options
They were showing when they should have been hidden.
2018-09-14 21:29:31 -07:00