nx 13.8.8 → 13.9.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/bin/nx.d.ts +1 -0
  2. package/bin/nx.js +78 -1
  3. package/bin/nx.js.map +1 -1
  4. package/package.json +19 -2
  5. package/src/cli/decorate-cli.d.ts +1 -0
  6. package/src/cli/decorate-cli.js +19 -0
  7. package/src/cli/decorate-cli.js.map +1 -0
  8. package/src/cli/find-workspace-root.d.ts +8 -0
  9. package/src/cli/find-workspace-root.js +25 -0
  10. package/src/cli/find-workspace-root.js.map +1 -0
  11. package/src/cli/index.d.ts +3 -0
  12. package/src/cli/index.js +74 -0
  13. package/src/cli/index.js.map +1 -0
  14. package/src/cli/init-local.d.ts +2 -0
  15. package/src/cli/init-local.js +109 -0
  16. package/src/cli/init-local.js.map +1 -0
  17. package/src/cli/is_ci.d.ts +1 -0
  18. package/src/cli/is_ci.js +20 -0
  19. package/src/cli/is_ci.js.map +1 -0
  20. package/src/cli/output.d.ts +58 -0
  21. package/src/cli/output.js +129 -0
  22. package/src/cli/output.js.map +1 -0
  23. package/src/cli/parse-run-one-options.d.ts +6 -0
  24. package/src/cli/parse-run-one-options.js +139 -0
  25. package/src/cli/parse-run-one-options.js.map +1 -0
  26. package/src/cli/run-cli.d.ts +1 -0
  27. package/src/cli/run-cli.js +69 -0
  28. package/src/cli/run-cli.js.map +1 -0
  29. package/src/cli/workspace.d.ts +4 -0
  30. package/src/cli/workspace.js +3 -0
  31. package/src/cli/workspace.js.map +1 -0
  32. package/src/commands/generate.d.ts +15 -0
  33. package/src/commands/generate.js +170 -0
  34. package/src/commands/generate.js.map +1 -0
  35. package/src/commands/help.d.ts +1 -0
  36. package/src/commands/help.js +34 -0
  37. package/src/commands/help.js.map +1 -0
  38. package/src/commands/migrate.d.ts +77 -0
  39. package/src/commands/migrate.js +584 -0
  40. package/src/commands/migrate.js.map +1 -0
  41. package/src/commands/ngcli-adapter.d.ts +111 -0
  42. package/src/commands/ngcli-adapter.js +940 -0
  43. package/src/commands/ngcli-adapter.js.map +1 -0
  44. package/src/commands/run.d.ts +51 -0
  45. package/src/commands/run.js +224 -0
  46. package/src/commands/run.js.map +1 -0
  47. package/src/compat/compat.d.ts +1 -0
  48. package/src/compat/compat.js +86 -0
  49. package/src/compat/compat.js.map +1 -0
  50. package/src/shared/logger.d.ts +11 -0
  51. package/src/shared/logger.js +48 -0
  52. package/src/shared/logger.js.map +1 -0
  53. package/src/shared/nx-plugin.d.ts +18 -0
  54. package/src/shared/nx-plugin.js +53 -0
  55. package/src/shared/nx-plugin.js.map +1 -0
  56. package/src/shared/nx.d.ts +110 -0
  57. package/src/shared/nx.js +3 -0
  58. package/src/shared/nx.js.map +1 -0
  59. package/src/shared/package-json.d.ts +28 -0
  60. package/src/shared/package-json.js +10 -0
  61. package/src/shared/package-json.js.map +1 -0
  62. package/src/shared/package-manager.d.ts +32 -0
  63. package/src/shared/package-manager.js +83 -0
  64. package/src/shared/package-manager.js.map +1 -0
  65. package/src/shared/params.d.ts +113 -0
  66. package/src/shared/params.js +587 -0
  67. package/src/shared/params.js.map +1 -0
  68. package/src/shared/print-help.d.ts +2 -0
  69. package/src/shared/print-help.js +32 -0
  70. package/src/shared/print-help.js.map +1 -0
  71. package/src/shared/project-graph.d.ts +135 -0
  72. package/src/shared/project-graph.js +22 -0
  73. package/src/shared/project-graph.js.map +1 -0
  74. package/src/shared/tasks.d.ts +82 -0
  75. package/src/shared/tasks.js +3 -0
  76. package/src/shared/tasks.js.map +1 -0
  77. package/src/shared/tree.d.ts +115 -0
  78. package/src/shared/tree.js +259 -0
  79. package/src/shared/tree.js.map +1 -0
  80. package/src/shared/workspace.d.ts +257 -0
  81. package/src/shared/workspace.js +522 -0
  82. package/src/shared/workspace.js.map +1 -0
  83. package/src/utils/app-root.d.ts +2 -0
  84. package/src/utils/app-root.js +30 -0
  85. package/src/utils/app-root.js.map +1 -0
  86. package/src/utils/fileutils.d.ts +31 -0
  87. package/src/utils/fileutils.js +45 -0
  88. package/src/utils/fileutils.js.map +1 -0
  89. package/src/utils/json.d.ts +39 -0
  90. package/src/utils/json.js +48 -0
  91. package/src/utils/json.js.map +1 -0
  92. package/src/utils/object-sort.d.ts +1 -0
  93. package/src/utils/object-sort.js +12 -0
  94. package/src/utils/object-sort.js.map +1 -0
  95. package/src/utils/register.d.ts +9 -0
  96. package/src/utils/register.js +36 -0
  97. package/src/utils/register.js.map +1 -0
  98. package/src/utils/split-target.d.ts +1 -0
  99. package/src/utils/split-target.js +26 -0
  100. package/src/utils/split-target.js.map +1 -0
@@ -0,0 +1,111 @@
1
+ import { logging, Path, PathFragment, virtualFs } from '@angular-devkit/core';
2
+ import { GenerateOptions } from './generate';
3
+ import { Tree } from '../shared/tree';
4
+ import { RawWorkspaceJsonConfiguration, WorkspaceJsonConfiguration } from '../shared/workspace';
5
+ import { FileBuffer } from '@angular-devkit/core/src/virtual-fs/host/interface';
6
+ import { Observable } from 'rxjs';
7
+ import { NxJsonConfiguration } from '../shared/nx';
8
+ export declare function scheduleTarget(root: string, opts: {
9
+ project: string;
10
+ target: string;
11
+ configuration: string;
12
+ runOptions: any;
13
+ executor: string;
14
+ }, verbose: boolean): Promise<Observable<import('@angular-devkit/architect').BuilderOutput>>;
15
+ export declare class NxScopedHost extends virtualFs.ScopedHost<any> {
16
+ protected __nxInMemoryWorkspace: WorkspaceJsonConfiguration | null;
17
+ constructor(root: Path);
18
+ protected __readWorkspaceConfiguration: (configFileName: ChangeContext['actualConfigFileName'], overrides?: {
19
+ workspace?: Observable<RawWorkspaceJsonConfiguration>;
20
+ nx?: Observable<NxJsonConfiguration>;
21
+ }) => Observable<FileBuffer>;
22
+ read(path: Path): Observable<FileBuffer>;
23
+ write(path: Path, content: FileBuffer): Observable<void>;
24
+ isFile(path: Path): Observable<boolean>;
25
+ exists(path: Path): Observable<boolean>;
26
+ workspaceConfigName(): Promise<string>;
27
+ protected context(path: string): Observable<ChangeContext>;
28
+ private writeWorkspaceConfiguration;
29
+ private __saveNxJsonProps;
30
+ private writeWorkspaceConfigFiles;
31
+ protected resolveInlineProjectConfigurations(config: RawWorkspaceJsonConfiguration): Observable<WorkspaceJsonConfiguration>;
32
+ }
33
+ declare type ConfigFilePath = ('/angular.json' | '/workspace.json') & {
34
+ __PRIVATE_DEVKIT_PATH: void;
35
+ };
36
+ declare type ChangeContext = {
37
+ isWorkspaceConfig: boolean;
38
+ actualConfigFileName: ConfigFilePath | null;
39
+ isNewFormat: boolean;
40
+ };
41
+ /**
42
+ * This host contains the workaround needed to run Angular migrations
43
+ */
44
+ export declare class NxScopedHostForMigrations extends NxScopedHost {
45
+ constructor(root: Path);
46
+ read(path: Path): Observable<FileBuffer>;
47
+ write(path: Path, content: FileBuffer): Observable<void>;
48
+ }
49
+ export declare class NxScopeHostUsedForWrappedSchematics extends NxScopedHost {
50
+ private readonly host;
51
+ constructor(root: Path, host: Tree);
52
+ read(path: Path): Observable<FileBuffer>;
53
+ exists(path: Path): Observable<boolean>;
54
+ isDirectory(path: Path): Observable<boolean>;
55
+ isFile(path: Path): Observable<boolean>;
56
+ list(path: Path): Observable<PathFragment[]>;
57
+ }
58
+ export declare function generate(root: string, opts: GenerateOptions, verbose: boolean): Promise<number>;
59
+ export declare function runMigration(root: string, packageName: string, migrationName: string, isVerbose: boolean): Promise<any>;
60
+ /**
61
+ * By default, Angular Devkit schematic collections will be resolved using the Node resolution.
62
+ * This doesn't work if you are testing schematics that refer to other schematics in the
63
+ * same repo.
64
+ *
65
+ * This function can can be used to override the resolution behaviour.
66
+ *
67
+ * Example:
68
+ *
69
+ * ```typescript
70
+ * overrideCollectionResolutionForTesting({
71
+ * '@nrwl/workspace': path.join(__dirname, '../../../../workspace/generators.json'),
72
+ * '@nrwl/angular': path.join(__dirname, '../../../../angular/generators.json'),
73
+ * '@nrwl/linter': path.join(__dirname, '../../../../linter/generators.json')
74
+ * });
75
+ *
76
+ * ```
77
+ */
78
+ export declare function overrideCollectionResolutionForTesting(collections: {
79
+ [name: string]: string;
80
+ }): void;
81
+ /**
82
+ * If you have an Nx Devkit generator invoking the wrapped Angular Devkit schematic,
83
+ * and you don't want the Angular Devkit schematic to run, you can mock it up using this function.
84
+ *
85
+ * Unfortunately, there are some edge cases in the Nx-Angular devkit integration that
86
+ * can be seen in the unit tests context. This function is useful for handling that as well.
87
+ *
88
+ * In this case, you can mock it up.
89
+ *
90
+ * Example:
91
+ *
92
+ * ```typescript
93
+ * mockSchematicsForTesting({
94
+ * 'mycollection:myschematic': (tree, params) => {
95
+ * tree.write('README.md');
96
+ * }
97
+ * });
98
+ *
99
+ * ```
100
+ */
101
+ export declare function mockSchematicsForTesting(schematics: {
102
+ [name: string]: (host: Tree, generatorOptions: {
103
+ [k: string]: any;
104
+ }) => Promise<void>;
105
+ }): void;
106
+ export declare function wrapAngularDevkitSchematic(collectionName: string, generatorName: string): (host: Tree, generatorOptions: {
107
+ [k: string]: any;
108
+ }) => Promise<any>;
109
+ export declare function invokeNew(root: string, opts: GenerateOptions, verbose: boolean): Promise<number>;
110
+ export declare const getLogger: (isVerbose?: boolean) => logging.Logger;
111
+ export {};