With this change we automate the generation of `@angular/cli/lib/config/schema.json`. While on paper we could use quicktype for this. Quicktype doesn't handle `patternProperties` and `oneOf` that well.
How does this works?
Relative `$ref` will be resolved and inlined as part of the root schema definitions.
Example
```json
"@schematics/angular:enum": {
"$ref": "../../../../schematics/angular/enum/schema.json"
},
```
Will be parsed and transformed to
```json
"@schematics/angular:enum": {
"$ref": "#/definitions/SchematicsAngularEnumSchema"
},
"definitions: {
"SchematicsAngularEnumSchema": {
"title": "Angular Enum Options Schema",
"type": "object",
"description": "Generates a new, generic enum definition for the given or default project.",
"properties": {...}
}
}
```
This commit makes a few minor changes to enable syncing the CLI repository
into google3.
1. mark pkg_tar and pkg_npm as external
2. remove dependencies (marked as comment) which are stale in google3
3. remove TS files generated from JSON schema in BUILD files since these
files are compiled and added to the g3 codebase at sync time
4. Some minor typing changes
5. Remove duplicate licenses
6. mark dependencies which are not available in g3 as external
7. Immediately type the result of JSON.parse() as required by g3 linter.
Otherwise, the type defaults to `any`.
Contains fixes related to the symlink behaviour inside of bazel. Without it, webpack needs to be configured to be aware of symlinks and preserve the paths.
This PR changes ts_json_schema to not create a ts_library rule for the json schema, and instead let consuming ts_libraries use and compile the resulting .ts files themselves.
This is needed in order to maintain the module_name of the consuming libraries on the .ts files resulting from json compilation.
When using the CLI and a property is deprecated we emit a warning by using the `x-deprecated` field. However API consumers have no way to know that a property is deprecated at the moment.
This converts `x-deprecated` to `@deprecated` comments
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`
The tests verify that the output of the rule is the same as the input, and will
error if not (with a call to action). The binary produces the golden output.
We have to check the result of the transformation into git because internally
we cannot synchronize quicktype into google3.
Using --devkit=/absolute/path/to/devkit/repo the e2e tests will now
run with the devkit passed in. It will build the devkit first, then
change the package.json to use the proper devkit tgz.