Compare commits

..

16 Commits

Author SHA1 Message Date
Max Kless c6bf6414ce feat(graph): write nx-console e2e tests for the new tooltip functionality 2023-08-09 16:45:58 +02:00
Max Kless 395c3562d0 cleanup(graph): remove unused var 2023-08-09 10:26:15 +02:00
Max Kless 5a2ea09d9b cleanup(graph): improve graph e2e test 2023-08-09 10:02:41 +02:00
Max Kless 9c5873c9fa fix(graph): adjust implementation to upstream changes 2023-08-09 09:50:19 +02:00
Max Kless 47d4eb8eb8 feat(graph): add e2e test to test expanded task inputs 2023-08-09 09:29:23 +02:00
Max Kless ad9344152f feat(graph): add task tooltip e2e test 2023-08-09 09:29:23 +02:00
Max Kless 491966b6e3 feat(graph): expand task inputs and display them in the UI 2023-08-09 09:29:20 +02:00
Jonathan Cammisuli cda123802f fix(core): update test to use ProjectGraphBuilder + createTaskGraph 2023-08-08 20:59:17 -04:00
Jonathan Cammisuli 9690aea0a8 fix(core): change the way we gather inputs for the graph view 2023-08-08 14:55:09 -04:00
FrozenPandaz 6a1164f7ae chore(core): update unit tests 2023-08-08 14:50:13 -04:00
Jonathan Cammisuli 0ce7acdf77 fix(core): change the way we gather inputs for the graph view 2023-08-08 14:16:59 -04:00
Jonathan Cammisuli 137ba06499 fix(core): revert changes to run-command 2023-08-08 11:27:07 -04:00
Jonathan Cammisuli 5df932b108 fix(core): review changes 2023-08-07 14:11:40 -04:00
Jonathan Cammisuli 62e75edd24 fix(core): update unit test 2023-08-07 14:11:40 -04:00
Jonathan Cammisuli 2145117b24 feat(core): add task inputs to task graph for graph view 2023-08-07 14:11:40 -04:00
Jonathan Cammisuli a42cabccf9 feat(core): gather task inputs 2023-08-07 14:11:39 -04:00
492 changed files with 28394 additions and 14715 deletions
+2
View File
@@ -208,8 +208,10 @@ jobs:
executor: macos
environment:
NX_E2E_CI_CACHE_KEY: e2e-circleci-macos
NX_DAEMON: 'false' # TODO: set to true after #18410
NX_PERF_LOGGING: 'false'
SELECTED_PM: 'npm' # explicitly define npm for macOS tests
NX_SKIP_NX_CACHE: 'true' # TODO: Remove after #18410
steps:
- run:
name: Set dynamic nx run variable
+1 -1
View File
@@ -414,7 +414,7 @@ jobs:
npm_config_registry: http://localhost:4872
YARN_REGISTRY: http://localhost:4872
NX_CACHE_DIRECTORY: 'tmp'
NX_E2E_SKIP_CLEANUP: 'true'
NX_E2E_SKIP_BUILD_CLEANUP: 'true'
NX_E2E_RUN_E2E: 'true'
NX_E2E_VERBOSE_LOGGING: 'true'
NX_PERF_LOGGING: 'false'
+1 -1
View File
@@ -302,7 +302,7 @@ jobs:
SELECTED_PM: ${{ matrix.package_manager }}
npm_config_registry: http://localhost:4872
NX_CACHE_DIRECTORY: 'tmp'
NX_E2E_SKIP_CLEANUP: 'true'
NX_E2E_SKIP_BUILD_CLEANUP: 'true'
NX_E2E_RUN_E2E: 'true'
NX_E2E_VERBOSE_LOGGING: 'true'
NX_PERF_LOGGING: 'false'
-6
View File
@@ -19,10 +19,7 @@ jest.debug.config.js
/graph/client/src/assets/generated-task-graphs
/nx-dev/nx-dev/public/documentation
/nx-dev/nx-dev/public/images/open-graph
# Issues scraper creates these files, stored by github's cache
/scripts/issues-scraper/cached
# Lerna creates this
CHANGELOG.md
@@ -37,6 +34,3 @@ CHANGELOG.md
.bashrc
*.node
# Fix for issue when working on the repo in a dev container
.pnpm-store
+1 -1
View File
@@ -343,7 +343,7 @@ Including the issue number that the PR relates to also helps with tracking.
```plain
feat(angular): add an option to generate lazy-loadable modules
`nx generate lib mylib --lazy` provisions the mylib project in .eslintrc.json
`nx generate lib mylib --lazy` provisions the mylib project in tslint.json
Closes #157
```
Generated
-10
View File
@@ -1353,7 +1353,6 @@ dependencies = [
"napi-build",
"napi-derive",
"once_cell",
"os_type",
"rayon",
"regex",
"swc_common",
@@ -1379,15 +1378,6 @@ version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "os_type"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e24d44c0eea30167516ed8f6daca4b5e3eebcde1bde1e4e6e08b809fb02c7ba5"
dependencies = [
"regex",
]
[[package]]
name = "overload"
version = "0.1.1"
+1 -1
View File
@@ -139,7 +139,7 @@ Package manager to use
Type: `string`
Customizes the initial content of your workspace. Default presets include: ["apps", "empty", "core", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset
Customizes the initial content of your workspace. Default presets include: ["apps", "empty", "core", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/plugins/recipes/create-preset
### routing
@@ -1,3 +0,0 @@
# Type alias: AdditionalSharedConfig
Ƭ **AdditionalSharedConfig**: (`string` \| [libraryName: string, sharedConfig: SharedLibraryConfig] \| { `libraryName`: `string` ; `sharedConfig`: [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig) })[]
-20
View File
@@ -1,20 +0,0 @@
# Enumeration: ChangeType
## Table of contents
### Enumeration Members
- [Delete](../../devkit/documents/ChangeType#delete)
- [Insert](../../devkit/documents/ChangeType#insert)
## Enumeration Members
### Delete
**Delete** = `"Delete"`
---
### Insert
**Insert** = `"Insert"`
@@ -1,20 +0,0 @@
# Type alias: CreateDependencies
Ƭ **CreateDependencies**: (`context`: [`CreateDependenciesContext`](../../devkit/documents/CreateDependenciesContext)) => [`ProjectGraphDependencyWithFile`](../../devkit/documents/ProjectGraphDependencyWithFile)[] \| `Promise`<[`ProjectGraphDependencyWithFile`](../../devkit/documents/ProjectGraphDependencyWithFile)[]\>
#### Type declaration
▸ (`context`): [`ProjectGraphDependencyWithFile`](../../devkit/documents/ProjectGraphDependencyWithFile)[] \| `Promise`<[`ProjectGraphDependencyWithFile`](../../devkit/documents/ProjectGraphDependencyWithFile)[]\>
A function which parses files in the workspace to create dependencies in the [ProjectGraph](../../devkit/documents/ProjectGraph)
Use [validateDependency](../../devkit/documents/validateDependency) to validate dependencies
##### Parameters
| Name | Type |
| :-------- | :------------------------------------------------------------------------------ |
| `context` | [`CreateDependenciesContext`](../../devkit/documents/CreateDependenciesContext) |
##### Returns
[`ProjectGraphDependencyWithFile`](../../devkit/documents/ProjectGraphDependencyWithFile)[] \| `Promise`<[`ProjectGraphDependencyWithFile`](../../devkit/documents/ProjectGraphDependencyWithFile)[]\>
@@ -1,53 +0,0 @@
# Interface: CreateDependenciesContext
Context for [CreateDependencies](../../devkit/documents/CreateDependencies)
## Table of contents
### Properties
- [fileMap](../../devkit/documents/CreateDependenciesContext#filemap)
- [filesToProcess](../../devkit/documents/CreateDependenciesContext#filestoprocess)
- [graph](../../devkit/documents/CreateDependenciesContext#graph)
- [nxJsonConfiguration](../../devkit/documents/CreateDependenciesContext#nxjsonconfiguration)
- [projectsConfigurations](../../devkit/documents/CreateDependenciesContext#projectsconfigurations)
## Properties
### fileMap
`Readonly` **fileMap**: [`ProjectFileMap`](../../devkit/documents/ProjectFileMap)
All files in the workspace
---
### filesToProcess
`Readonly` **filesToProcess**: [`ProjectFileMap`](../../devkit/documents/ProjectFileMap)
Files changes since last invocation
---
### graph
`Readonly` **graph**: [`ProjectGraph`](../../devkit/documents/ProjectGraph)
The current project graph,
---
### nxJsonConfiguration
`Readonly` **nxJsonConfiguration**: [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)<`string`[] \| `"*"`\>
The `nx.json` configuration from the workspace
---
### projectsConfigurations
`Readonly` **projectsConfigurations**: [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations)
The configuration of each project in the workspace
-5
View File
@@ -1,5 +0,0 @@
# Type alias: CreateNodes
Ƭ **CreateNodes**: [projectFilePattern: string, createNodesFunction: CreateNodesFunction]
A pair of file patterns and [CreateNodesFunction](../../devkit/documents/CreateNodesFunction)
@@ -1,22 +0,0 @@
# Interface: CreateNodesContext
Context for [CreateNodesFunction](../../devkit/documents/CreateNodesFunction)
## Table of contents
### Properties
- [nxJsonConfiguration](../../devkit/documents/CreateNodesContext#nxjsonconfiguration)
- [workspaceRoot](../../devkit/documents/CreateNodesContext#workspaceroot)
## Properties
### nxJsonConfiguration
`Readonly` **nxJsonConfiguration**: [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)<`string`[] \| `"*"`\>
---
### workspaceRoot
`Readonly` **workspaceRoot**: `string`
@@ -1,26 +0,0 @@
# Type alias: CreateNodesFunction
Ƭ **CreateNodesFunction**: (`projectConfigurationFile`: `string`, `context`: [`CreateNodesContext`](../../devkit/documents/CreateNodesContext)) => { `externalNodes?`: `Record`<`string`, [`ProjectGraphExternalNode`](../../devkit/documents/ProjectGraphExternalNode)\> ; `projects?`: `Record`<`string`, [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration)\> }
#### Type declaration
▸ (`projectConfigurationFile`, `context`): `Object`
A function which parses a configuration file into a set of nodes.
Used for creating nodes for the [ProjectGraph](../../devkit/documents/ProjectGraph)
##### Parameters
| Name | Type |
| :------------------------- | :---------------------------------------------------------------- |
| `projectConfigurationFile` | `string` |
| `context` | [`CreateNodesContext`](../../devkit/documents/CreateNodesContext) |
##### Returns
`Object`
| Name | Type |
| :--------------- | :------------------------------------------------------------------------------------------------- |
| `externalNodes?` | `Record`<`string`, [`ProjectGraphExternalNode`](../../devkit/documents/ProjectGraphExternalNode)\> |
| `projects?` | `Record`<`string`, [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration)\> |
-18
View File
@@ -1,18 +0,0 @@
# Type alias: CustomHasher
Ƭ **CustomHasher**: (`task`: [`Task`](../../devkit/documents/Task), `context`: [`HasherContext`](../../devkit/documents/HasherContext)) => `Promise`<[`Hash`](../../devkit/documents/Hash)\>
#### Type declaration
▸ (`task`, `context`): `Promise`<[`Hash`](../../devkit/documents/Hash)\>
##### Parameters
| Name | Type |
| :-------- | :------------------------------------------------------ |
| `task` | [`Task`](../../devkit/documents/Task) |
| `context` | [`HasherContext`](../../devkit/documents/HasherContext) |
##### Returns
`Promise`<[`Hash`](../../devkit/documents/Hash)\>
@@ -1,69 +0,0 @@
# Interface: DefaultTasksRunnerOptions
## Table of contents
### Properties
- [cacheDirectory](../../devkit/documents/DefaultTasksRunnerOptions#cachedirectory)
- [cacheableOperations](../../devkit/documents/DefaultTasksRunnerOptions#cacheableoperations)
- [cacheableTargets](../../devkit/documents/DefaultTasksRunnerOptions#cacheabletargets)
- [captureStderr](../../devkit/documents/DefaultTasksRunnerOptions#capturestderr)
- [lifeCycle](../../devkit/documents/DefaultTasksRunnerOptions#lifecycle)
- [parallel](../../devkit/documents/DefaultTasksRunnerOptions#parallel)
- [remoteCache](../../devkit/documents/DefaultTasksRunnerOptions#remotecache)
- [runtimeCacheInputs](../../devkit/documents/DefaultTasksRunnerOptions#runtimecacheinputs)
- [skipNxCache](../../devkit/documents/DefaultTasksRunnerOptions#skipnxcache)
## Properties
### cacheDirectory
`Optional` **cacheDirectory**: `string`
---
### cacheableOperations
`Optional` **cacheableOperations**: `string`[]
---
### cacheableTargets
`Optional` **cacheableTargets**: `string`[]
---
### captureStderr
`Optional` **captureStderr**: `boolean`
---
### lifeCycle
**lifeCycle**: `LifeCycle`
---
### parallel
`Optional` **parallel**: `number`
---
### remoteCache
`Optional` **remoteCache**: [`RemoteCache`](../../devkit/documents/RemoteCache)
---
### runtimeCacheInputs
`Optional` **runtimeCacheInputs**: `string`[]
---
### skipNxCache
`Optional` **skipNxCache**: `boolean`
-35
View File
@@ -1,35 +0,0 @@
# Enumeration: DependencyType
Type of dependency between projects
## Table of contents
### Enumeration Members
- [dynamic](../../devkit/documents/DependencyType#dynamic)
- [implicit](../../devkit/documents/DependencyType#implicit)
- [static](../../devkit/documents/DependencyType#static)
## Enumeration Members
### dynamic
**dynamic** = `"dynamic"`
Dynamic dependencies are brought in by the module at run time
---
### implicit
**implicit** = `"implicit"`
Implicit dependencies are inferred
---
### static
**static** = `"static"`
Static dependencies are tied to the loading of the module
-26
View File
@@ -1,26 +0,0 @@
# Type alias: Executor<T\>
Ƭ **Executor**<`T`\>: (`options`: `T`, `context`: [`ExecutorContext`](../../devkit/documents/ExecutorContext)) => `Promise`<{ `success`: `boolean` }\> \| `AsyncIterableIterator`<{ `success`: `boolean` }\>
#### Type parameters
| Name | Type |
| :--- | :---- |
| `T` | `any` |
#### Type declaration
▸ (`options`, `context`): `Promise`<{ `success`: `boolean` }\> \| `AsyncIterableIterator`<{ `success`: `boolean` }\>
Implementation of a target of a project
##### Parameters
| Name | Type |
| :-------- | :---------------------------------------------------------- |
| `options` | `T` |
| `context` | [`ExecutorContext`](../../devkit/documents/ExecutorContext) |
##### Returns
`Promise`<{ `success`: `boolean` }\> \| `AsyncIterableIterator`<{ `success`: `boolean` }\>
-126
View File
@@ -1,126 +0,0 @@
# Interface: ExecutorContext
Context that is passed into an executor
## Table of contents
### Properties
- [configurationName](../../devkit/documents/ExecutorContext#configurationname)
- [cwd](../../devkit/documents/ExecutorContext#cwd)
- [isVerbose](../../devkit/documents/ExecutorContext#isverbose)
- [nxJsonConfiguration](../../devkit/documents/ExecutorContext#nxjsonconfiguration)
- [projectGraph](../../devkit/documents/ExecutorContext#projectgraph)
- [projectName](../../devkit/documents/ExecutorContext#projectname)
- [projectsConfigurations](../../devkit/documents/ExecutorContext#projectsconfigurations)
- [root](../../devkit/documents/ExecutorContext#root)
- [target](../../devkit/documents/ExecutorContext#target)
- [targetName](../../devkit/documents/ExecutorContext#targetname)
- [taskGraph](../../devkit/documents/ExecutorContext#taskgraph)
- [workspace](../../devkit/documents/ExecutorContext#workspace)
## Properties
### configurationName
`Optional` **configurationName**: `string`
The name of the configuration being executed
---
### cwd
**cwd**: `string`
The current working directory
---
### isVerbose
**isVerbose**: `boolean`
Enable verbose logging
---
### nxJsonConfiguration
`Optional` **nxJsonConfiguration**: [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)<`string`[] \| `"*"`\>
The contents of nx.json.
@todo(vsavkin): mark this as required for v17
---
### projectGraph
`Optional` **projectGraph**: [`ProjectGraph`](../../devkit/documents/ProjectGraph)
A snapshot of the project graph as
it existed when the Nx command was kicked off
@todo(vsavkin) mark this required for v17
---
### projectName
`Optional` **projectName**: `string`
The name of the project being executed on
---
### projectsConfigurations
`Optional` **projectsConfigurations**: [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations)
Projects config
@todo(vsavkin): mark this as required for v17
---
### root
**root**: `string`
The root of the workspace
---
### target
`Optional` **target**: [`TargetConfiguration`](../../devkit/documents/TargetConfiguration)<`any`\>
The configuration of the target being executed
---
### targetName
`Optional` **targetName**: `string`
The name of the target being executed
---
### taskGraph
`Optional` **taskGraph**: [`TaskGraph`](../../devkit/documents/TaskGraph)
A snapshot of the task graph as
it existed when the Nx command was kicked off
---
### workspace
`Optional` **workspace**: [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations) & [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)<`string`[] \| `"*"`\>
Deprecated. Use projectsConfigurations or nxJsonConfiguration
The full workspace configuration
@todo(vsavkin): remove after v17
-20
View File
@@ -1,20 +0,0 @@
# Interface: ExecutorsJson
## Table of contents
### Properties
- [builders](../../devkit/documents/ExecutorsJson#builders)
- [executors](../../devkit/documents/ExecutorsJson#executors)
## Properties
### builders
`Optional` **builders**: `Record`<`string`, `ExecutorsJsonEntry`\>
---
### executors
`Optional` **executors**: `Record`<`string`, `ExecutorsJsonEntry`\>
-44
View File
@@ -1,44 +0,0 @@
# Interface: FileChange
Description of a file change in the Nx virtual file system/
## Table of contents
### Properties
- [content](../../devkit/documents/FileChange#content)
- [options](../../devkit/documents/FileChange#options)
- [path](../../devkit/documents/FileChange#path)
- [type](../../devkit/documents/FileChange#type)
## Properties
### content
**content**: `Buffer`
The content of the file or null in case of delete.
---
### options
`Optional` **options**: `TreeWriteOptions`
Options to set on the file being created or updated.
---
### path
**path**: `string`
Path relative to the workspace root
---
### type
**type**: `"CREATE"` \| `"DELETE"` \| `"UPDATE"`
Type of change: 'CREATE' | 'DELETE' | 'UPDATE'
-29
View File
@@ -1,29 +0,0 @@
# Interface: FileData
Some metadata about a file
## Table of contents
### Properties
- [deps](../../devkit/documents/FileData#deps)
- [file](../../devkit/documents/FileData#file)
- [hash](../../devkit/documents/FileData#hash)
## Properties
### deps
`Optional` **deps**: (`string` \| [`string`, `string`])[]
---
### file
**file**: `string`
---
### hash
**hash**: `string`
-26
View File
@@ -1,26 +0,0 @@
# Type alias: Generator<T\>
Ƭ **Generator**<`T`\>: (`tree`: `any`, `schema`: `T`) => `void` \| [`GeneratorCallback`](../../devkit/documents/GeneratorCallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../devkit/documents/GeneratorCallback)\>
#### Type parameters
| Name | Type |
| :--- | :-------- |
| `T` | `unknown` |
#### Type declaration
▸ (`tree`, `schema`): `void` \| [`GeneratorCallback`](../../devkit/documents/GeneratorCallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../devkit/documents/GeneratorCallback)\>
A function that schedules updates to the filesystem to be done atomically
##### Parameters
| Name | Type |
| :------- | :---- |
| `tree` | `any` |
| `schema` | `T` |
##### Returns
`void` \| [`GeneratorCallback`](../../devkit/documents/GeneratorCallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../devkit/documents/GeneratorCallback)\>
@@ -1,13 +0,0 @@
# Type alias: GeneratorCallback
Ƭ **GeneratorCallback**: () => `void` \| `Promise`<`void`\>
#### Type declaration
▸ (): `void` \| `Promise`<`void`\>
A callback function that is executed after changes are made to the file system
##### Returns
`void` \| `Promise`<`void`\>
-27
View File
@@ -1,27 +0,0 @@
# Interface: GeneratorsJson
## Table of contents
### Properties
- [extends](../../devkit/documents/GeneratorsJson#extends)
- [generators](../../devkit/documents/GeneratorsJson#generators)
- [schematics](../../devkit/documents/GeneratorsJson#schematics)
## Properties
### extends
`Optional` **extends**: `string`
---
### generators
`Optional` **generators**: `Record`<`string`, `GeneratorsJsonEntry`\>
---
### schematics
`Optional` **schematics**: `Record`<`string`, `GeneratorsJsonEntry`\>
-31
View File
@@ -1,31 +0,0 @@
# Interface: Hash
A data structure returned by the default hasher.
## Table of contents
### Properties
- [details](../../devkit/documents/Hash#details)
- [value](../../devkit/documents/Hash#value)
## Properties
### details
**details**: `Object`
#### Type declaration
| Name | Type |
| :-------------- | :---------------------------------- |
| `command` | `string` |
| `implicitDeps?` | { `[fileName: string]`: `string`; } |
| `nodes` | { `[name: string]`: `string`; } |
| `runtime?` | { `[input: string]`: `string`; } |
---
### value
**value**: `string`
-3
View File
@@ -1,3 +0,0 @@
# Type alias: Hasher
Ƭ **Hasher**: [`TaskHasher`](../../devkit/documents/TaskHasher)
-41
View File
@@ -1,41 +0,0 @@
# Interface: HasherContext
## Table of contents
### Properties
- [hasher](../../devkit/documents/HasherContext#hasher)
- [nxJsonConfiguration](../../devkit/documents/HasherContext#nxjsonconfiguration)
- [projectGraph](../../devkit/documents/HasherContext#projectgraph)
- [projectsConfigurations](../../devkit/documents/HasherContext#projectsconfigurations)
- [taskGraph](../../devkit/documents/HasherContext#taskgraph)
## Properties
### hasher
**hasher**: [`TaskHasher`](../../devkit/documents/TaskHasher)
---
### nxJsonConfiguration
**nxJsonConfiguration**: [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)<`string`[] \| `"*"`\>
---
### projectGraph
**projectGraph**: [`ProjectGraph`](../../devkit/documents/ProjectGraph)
---
### projectsConfigurations
**projectsConfigurations**: [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations)
---
### taskGraph
**taskGraph**: [`TaskGraph`](../../devkit/documents/TaskGraph)
@@ -1,13 +0,0 @@
# Type alias: ImplicitDependencyEntry<T\>
Ƭ **ImplicitDependencyEntry**<`T`\>: `Object`
#### Type parameters
| Name | Type |
| :--- | :------------------ |
| `T` | `"*"` \| `string`[] |
#### Index signature
▪ [key: `string`]: `T` \| [`ImplicitJsonSubsetDependency`](../../devkit/documents/ImplicitJsonSubsetDependency)<`T`\>
@@ -1,11 +0,0 @@
# Interface: ImplicitJsonSubsetDependency<T\>
## Type parameters
| Name | Type |
| :--- | :------------------ |
| `T` | `"*"` \| `string`[] |
## Indexable
▪ [key: `string`]: `T` \| [`ImplicitJsonSubsetDependency`](../../devkit/documents/ImplicitJsonSubsetDependency)<`T`\>
-70
View File
@@ -1,70 +0,0 @@
# Interface: JsonParseOptions
## Hierarchy
- `ParseOptions`
**`JsonParseOptions`**
## Table of contents
### Properties
- [allowEmptyContent](../../devkit/documents/JsonParseOptions#allowemptycontent)
- [allowTrailingComma](../../devkit/documents/JsonParseOptions#allowtrailingcomma)
- [disallowComments](../../devkit/documents/JsonParseOptions#disallowcomments)
- [expectComments](../../devkit/documents/JsonParseOptions#expectcomments)
## Properties
### allowEmptyContent
`Optional` **allowEmptyContent**: `boolean`
#### Inherited from
ParseOptions.allowEmptyContent
---
### allowTrailingComma
`Optional` **allowTrailingComma**: `boolean`
Allow trailing commas in the JSON content
#### Overrides
ParseOptions.allowTrailingComma
---
### disallowComments
`Optional` **disallowComments**: `boolean`
Disallow javascript-style
**`Default`**
```ts
false;
```
#### Overrides
ParseOptions.disallowComments
---
### expectComments
`Optional` **expectComments**: `boolean`
Expect JSON with javascript-style
**`Default`**
```ts
false;
```
@@ -1,21 +0,0 @@
# Interface: JsonSerializeOptions
## Table of contents
### Properties
- [spaces](../../devkit/documents/JsonSerializeOptions#spaces)
## Properties
### spaces
`Optional` **spaces**: `number`
the whitespaces to add as indentation to make the output more readable.
**`Default`**
```ts
2;
```
-56
View File
@@ -1,56 +0,0 @@
# Interface: MigrationsJson
## Table of contents
### Properties
- [collection](../../devkit/documents/MigrationsJson#collection)
- [generators](../../devkit/documents/MigrationsJson#generators)
- [name](../../devkit/documents/MigrationsJson#name)
- [packageJsonUpdates](../../devkit/documents/MigrationsJson#packagejsonupdates)
- [schematics](../../devkit/documents/MigrationsJson#schematics)
- [version](../../devkit/documents/MigrationsJson#version)
## Properties
### collection
`Optional` **collection**: `string`
---
### generators
`Optional` **generators**: `Object`
#### Index signature
▪ [name: `string`]: `MigrationsJsonEntry`
---
### name
`Optional` **name**: `string`
---
### packageJsonUpdates
`Optional` **packageJsonUpdates**: `PackageJsonUpdates`
---
### schematics
`Optional` **schematics**: `Object`
#### Index signature
▪ [name: `string`]: `MigrationsJsonEntry`
---
### version
`Optional` **version**: `string`
@@ -1,48 +0,0 @@
# Interface: ModuleFederationConfig
## Table of contents
### Properties
- [additionalShared](../../devkit/documents/ModuleFederationConfig#additionalshared)
- [exposes](../../devkit/documents/ModuleFederationConfig#exposes)
- [library](../../devkit/documents/ModuleFederationConfig#library)
- [name](../../devkit/documents/ModuleFederationConfig#name)
- [remotes](../../devkit/documents/ModuleFederationConfig#remotes)
- [shared](../../devkit/documents/ModuleFederationConfig#shared)
## Properties
### additionalShared
`Optional` **additionalShared**: [`AdditionalSharedConfig`](../../devkit/documents/AdditionalSharedConfig)
---
### exposes
`Optional` **exposes**: `Record`<`string`, `string`\>
---
### library
`Optional` **library**: [`ModuleFederationLibrary`](../../devkit/documents/ModuleFederationLibrary)
---
### name
**name**: `string`
---
### remotes
`Optional` **remotes**: [`Remotes`](../../devkit/documents/Remotes)
---
### shared
`Optional` **shared**: [`SharedFunction`](../../devkit/documents/SharedFunction)
@@ -1,10 +0,0 @@
# Type alias: ModuleFederationLibrary
Ƭ **ModuleFederationLibrary**: `Object`
#### Type declaration
| Name | Type |
| :----- | :------- |
| `name` | `string` |
| `type` | `string` |
-7
View File
@@ -1,7 +0,0 @@
# Variable: NX_VERSION
`Const` **NX_VERSION**: `string`
**`Description`**
The version of Nx used by the workspace. Returns null if no version is found.
-15
View File
@@ -1,15 +0,0 @@
# Interface: NxAffectedConfig
## Table of contents
### Properties
- [defaultBase](../../devkit/documents/NxAffectedConfig#defaultbase)
## Properties
### defaultBase
`Optional` **defaultBase**: `string`
Default based branch used by affected commands.
@@ -1,199 +0,0 @@
# Interface: NxJsonConfiguration<T\>
Nx.json configuration
@note: when adding properties here add them to `allowedWorkspaceExtensions` in adapter/compat.ts
## Type parameters
| Name | Type |
| :--- | :------------------ |
| `T` | `"*"` \| `string`[] |
## Hierarchy
- **`NxJsonConfiguration`**
↳ [`Workspace`](../../devkit/documents/Workspace)
## Table of contents
### Properties
- [affected](../../devkit/documents/NxJsonConfiguration#affected)
- [cli](../../devkit/documents/NxJsonConfiguration#cli)
- [defaultProject](../../devkit/documents/NxJsonConfiguration#defaultproject)
- [extends](../../devkit/documents/NxJsonConfiguration#extends)
- [generators](../../devkit/documents/NxJsonConfiguration#generators)
- [implicitDependencies](../../devkit/documents/NxJsonConfiguration#implicitdependencies)
- [installation](../../devkit/documents/NxJsonConfiguration#installation)
- [namedInputs](../../devkit/documents/NxJsonConfiguration#namedinputs)
- [npmScope](../../devkit/documents/NxJsonConfiguration#npmscope)
- [plugins](../../devkit/documents/NxJsonConfiguration#plugins)
- [pluginsConfig](../../devkit/documents/NxJsonConfiguration#pluginsconfig)
- [targetDefaults](../../devkit/documents/NxJsonConfiguration#targetdefaults)
- [tasksRunnerOptions](../../devkit/documents/NxJsonConfiguration#tasksrunneroptions)
- [workspaceLayout](../../devkit/documents/NxJsonConfiguration#workspacelayout)
## Properties
### affected
`Optional` **affected**: [`NxAffectedConfig`](../../devkit/documents/NxAffectedConfig)
Default options for `nx affected`
---
### cli
`Optional` **cli**: `Object`
Default generator collection. It is used when no collection is provided.
#### Type declaration
| Name | Type | Description |
| :-------------------- | :-------------------------------------------------------- | :--------------------------------------------------------------------- |
| `defaultCollection?` | `string` | **`Deprecated`** - defaultCollection is deprecated and will be removed |
| `defaultProjectName?` | `string` | - |
| `packageManager?` | [`PackageManager`](../../devkit/documents/PackageManager) | - |
---
### defaultProject
`Optional` **defaultProject**: `string`
Default project. When project isn't provided, the default project
will be used. Convenient for small workspaces with one main application.
---
### extends
`Optional` **extends**: `string`
Optional (additional) Nx.json configuration file which becomes a base for this one
---
### generators
`Optional` **generators**: `Object`
List of default values used by generators.
These defaults are global. They are used when no other defaults are configured.
Example:
```
{
"@nx/react": {
"library": {
"style": "scss"
}
}
}
```
#### Index signature
▪ [collectionName: `string`]: { `[generatorName: string]`: `any`; }
---
### implicitDependencies
`Optional` **implicitDependencies**: [`ImplicitDependencyEntry`](../../devkit/documents/ImplicitDependencyEntry)<`T`\>
Map of files to projects that implicitly depend on them
**`Deprecated`**
use [namedInputs](../../devkit/documents/Workspace#namedinputs) instead. For more information see https://nx.dev/deprecated/global-implicit-dependencies#global-implicit-dependencies
---
### installation
`Optional` **installation**: `NxInstallationConfiguration`
Configures the Nx installation for a repo. Useful for maintaining a separate
set of dependencies for Nx + Plugins compared to the base package.json, but also
useful for workspaces that don't have a root package.json + node_modules.
---
### namedInputs
`Optional` **namedInputs**: `Object`
Named inputs targets can refer to reduce duplication
#### Index signature
▪ [inputName: `string`]: (`string` \| `InputDefinition`)[]
---
### npmScope
`Optional` **npmScope**: `string`
**`Deprecated`**
This is inferred from the package.json in the workspace root. Please use getNpmScope instead.
NPM Scope that the workspace uses
---
### plugins
`Optional` **plugins**: `string`[]
Plugins for extending the project graph
---
### pluginsConfig
`Optional` **pluginsConfig**: `Record`<`string`, `unknown`\>
Configuration for Nx Plugins
---
### targetDefaults
`Optional` **targetDefaults**: `TargetDefaults`
Dependencies between different target names across all projects
---
### tasksRunnerOptions
`Optional` **tasksRunnerOptions**: `Object`
Available Task Runners
#### Index signature
▪ [tasksRunnerName: `string`]: { `options?`: `any` ; `runner`: `string` }
---
### workspaceLayout
`Optional` **workspaceLayout**: `Object`
Where new apps + libs should be placed
#### Type declaration
| Name | Type |
| :-------- | :------- |
| `appsDir` | `string` |
| `libsDir` | `string` |
-5
View File
@@ -1,5 +0,0 @@
# Type alias: NxPlugin
Ƭ **NxPlugin**: [`NxPluginV1`](../../devkit/documents/NxPluginV1) \| [`NxPluginV2`](../../devkit/documents/NxPluginV2)
A plugin for Nx
-16
View File
@@ -1,16 +0,0 @@
# Type alias: NxPluginV1
Ƭ **NxPluginV1**: `Object`
**`Deprecated`**
Use [NxPluginV2](../../devkit/documents/NxPluginV2) instead. This will be removed in Nx 18
#### Type declaration
| Name | Type | Description |
| :------------------------ | :------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | `string` | - |
| `processProjectGraph?` | `ProjectGraphProcessor` | **`Deprecated`** Use [CreateNodes](../../devkit/documents/CreateNodes) and [CreateDependencies](../../devkit/documents/CreateDependencies) instead. This will be removed in Nx 18 |
| `projectFilePatterns?` | `string`[] | A glob pattern to search for non-standard project files. @example: ["*.csproj", "pom.xml"] **`Deprecated`** Use [CreateNodes](../../devkit/documents/CreateNodes) instead. This will be removed in Nx 18 |
| `registerProjectTargets?` | [`ProjectTargetConfigurator`](../../devkit/documents/ProjectTargetConfigurator) | **`Deprecated`** Add targets to the projects inside of [CreateNodes](../../devkit/documents/CreateNodes) instead. This will be removed in Nx 18 |
-13
View File
@@ -1,13 +0,0 @@
# Type alias: NxPluginV2
Ƭ **NxPluginV2**: `Object`
A plugin for Nx which creates nodes and dependencies for the [ProjectGraph](../../devkit/documents/ProjectGraph)
#### Type declaration
| Name | Type | Description |
| :-------------------- | :---------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
| `createDependencies?` | [`CreateDependencies`](../../devkit/documents/CreateDependencies) | Provides a function to analyze files to create dependencies for the [ProjectGraph](../../devkit/documents/ProjectGraph) |
| `createNodes?` | [`CreateNodes`](../../devkit/documents/CreateNodes) | Provides a file pattern and function that retrieves configuration info from those files. e.g. { '\*_/_.csproj': buildProjectsFromCsProjFile } |
| `name` | `string` | - |
-3
View File
@@ -1,3 +0,0 @@
# Type alias: PackageManager
Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"`
@@ -1,117 +0,0 @@
# Interface: ProjectConfiguration
Project configuration
@note: when adding properties here add them to `allowedProjectExtensions` in adapter/compat.ts
## Table of contents
### Properties
- [generators](../../devkit/documents/ProjectConfiguration#generators)
- [implicitDependencies](../../devkit/documents/ProjectConfiguration#implicitdependencies)
- [name](../../devkit/documents/ProjectConfiguration#name)
- [namedInputs](../../devkit/documents/ProjectConfiguration#namedinputs)
- [projectType](../../devkit/documents/ProjectConfiguration#projecttype)
- [root](../../devkit/documents/ProjectConfiguration#root)
- [sourceRoot](../../devkit/documents/ProjectConfiguration#sourceroot)
- [tags](../../devkit/documents/ProjectConfiguration#tags)
- [targets](../../devkit/documents/ProjectConfiguration#targets)
## Properties
### generators
`Optional` **generators**: `Object`
List of default values used by generators.
These defaults are project specific.
Example:
```
{
"@nx/react": {
"library": {
"style": "scss"
}
}
}
```
#### Index signature
▪ [collectionName: `string`]: { `[generatorName: string]`: `any`; }
---
### implicitDependencies
`Optional` **implicitDependencies**: `string`[]
List of projects which are added as a dependency
---
### name
`Optional` **name**: `string`
Project's name. Optional if specified in workspace.json
---
### namedInputs
`Optional` **namedInputs**: `Object`
Named inputs targets can refer to reduce duplication
#### Index signature
▪ [inputName: `string`]: (`string` \| `InputDefinition`)[]
---
### projectType
`Optional` **projectType**: [`ProjectType`](../../devkit/documents/ProjectType)
Project type
---
### root
**root**: `string`
Project's location relative to the root of the workspace
---
### sourceRoot
`Optional` **sourceRoot**: `string`
The location of project's sources relative to the root of the workspace
---
### tags
`Optional` **tags**: `string`[]
List of tags used by enforce-module-boundaries / project graph
---
### targets
`Optional` **targets**: `Object`
Project's targets
#### Index signature
▪ [targetName: `string`]: [`TargetConfiguration`](../../devkit/documents/TargetConfiguration)
-7
View File
@@ -1,7 +0,0 @@
# Interface: ProjectFileMap
A list of files separated by the project they belong to
## Indexable
▪ [projectName: `string`]: [`FileData`](../../devkit/documents/FileData)[]
-36
View File
@@ -1,36 +0,0 @@
# Interface: ProjectGraph
A Graph of projects in the workspace and dependencies between them
## Table of contents
### Properties
- [dependencies](../../devkit/documents/ProjectGraph#dependencies)
- [externalNodes](../../devkit/documents/ProjectGraph#externalnodes)
- [nodes](../../devkit/documents/ProjectGraph#nodes)
- [version](../../devkit/documents/ProjectGraph#version)
## Properties
### dependencies
**dependencies**: `Record`<`string`, [`ProjectGraphDependency`](../../devkit/documents/ProjectGraphDependency)[]\>
---
### externalNodes
`Optional` **externalNodes**: `Record`<`string`, [`ProjectGraphExternalNode`](../../devkit/documents/ProjectGraphExternalNode)\>
---
### nodes
**nodes**: `Record`<`string`, [`ProjectGraphProjectNode`](../../devkit/documents/ProjectGraphProjectNode)\>
---
### version
`Optional` **version**: `string`
@@ -1,341 +0,0 @@
# Class: ProjectGraphBuilder
A class which builds up a project graph
**`Deprecated`**
The ProjectGraphProcessor has been deprecated. Use a [CreateNodes](../../devkit/documents/CreateNodes) and/or a [CreateDependencies](../../devkit/documents/CreateDependencies) instead. This will be removed in Nx 18.
## Table of contents
### Constructors
- [constructor](../../devkit/documents/ProjectGraphBuilder#constructor)
### Properties
- [fileMap](../../devkit/documents/ProjectGraphBuilder#filemap)
- [graph](../../devkit/documents/ProjectGraphBuilder#graph)
- [removedEdges](../../devkit/documents/ProjectGraphBuilder#removededges)
### Methods
- [addDependency](../../devkit/documents/ProjectGraphBuilder#adddependency)
- [addDynamicDependency](../../devkit/documents/ProjectGraphBuilder#adddynamicdependency)
- [addExplicitDependency](../../devkit/documents/ProjectGraphBuilder#addexplicitdependency)
- [addExternalNode](../../devkit/documents/ProjectGraphBuilder#addexternalnode)
- [addImplicitDependency](../../devkit/documents/ProjectGraphBuilder#addimplicitdependency)
- [addNode](../../devkit/documents/ProjectGraphBuilder#addnode)
- [addStaticDependency](../../devkit/documents/ProjectGraphBuilder#addstaticdependency)
- [calculateAlreadySetTargetDeps](../../devkit/documents/ProjectGraphBuilder#calculatealreadysettargetdeps)
- [calculateTargetDepsFromFiles](../../devkit/documents/ProjectGraphBuilder#calculatetargetdepsfromfiles)
- [getUpdatedProjectGraph](../../devkit/documents/ProjectGraphBuilder#getupdatedprojectgraph)
- [mergeProjectGraph](../../devkit/documents/ProjectGraphBuilder#mergeprojectgraph)
- [removeDependenciesWithNode](../../devkit/documents/ProjectGraphBuilder#removedependencieswithnode)
- [removeDependency](../../devkit/documents/ProjectGraphBuilder#removedependency)
- [removeNode](../../devkit/documents/ProjectGraphBuilder#removenode)
- [setVersion](../../devkit/documents/ProjectGraphBuilder#setversion)
## Constructors
### constructor
**new ProjectGraphBuilder**(`graph?`, `fileMap?`)
#### Parameters
| Name | Type |
| :--------- | :-------------------------------------------------------- |
| `graph?` | [`ProjectGraph`](../../devkit/documents/ProjectGraph) |
| `fileMap?` | [`ProjectFileMap`](../../devkit/documents/ProjectFileMap) |
## Properties
### fileMap
`Private` `Readonly` **fileMap**: [`ProjectFileMap`](../../devkit/documents/ProjectFileMap)
---
### graph
`Readonly` **graph**: [`ProjectGraph`](../../devkit/documents/ProjectGraph)
---
### removedEdges
`Readonly` **removedEdges**: `Object` = `{}`
#### Index signature
▪ [source: `string`]: `Set`<`string`\>
## Methods
### addDependency
**addDependency**(`source`, `target`, `type`, `sourceFile?`): `void`
#### Parameters
| Name | Type |
| :------------ | :-------------------------------------------------------- |
| `source` | `string` |
| `target` | `string` |
| `type` | [`DependencyType`](../../devkit/documents/DependencyType) |
| `sourceFile?` | `string` |
#### Returns
`void`
---
### addDynamicDependency
**addDynamicDependency**(`sourceProjectName`, `targetProjectName`, `sourceProjectFile`): `void`
Adds dynamic dependency from source project to target project
#### Parameters
| Name | Type |
| :------------------ | :------- |
| `sourceProjectName` | `string` |
| `targetProjectName` | `string` |
| `sourceProjectFile` | `string` |
#### Returns
`void`
---
### addExplicitDependency
**addExplicitDependency**(`sourceProjectName`, `sourceProjectFile`, `targetProjectName`): `void`
Add an explicit dependency from a file in source project to target project
**`Deprecated`**
this method will be removed in v17. Use [addStaticDependency](../../devkit/documents/ProjectGraphBuilder#addstaticdependency) or [addDynamicDependency](../../devkit/documents/ProjectGraphBuilder#adddynamicdependency) instead
#### Parameters
| Name | Type |
| :------------------ | :------- |
| `sourceProjectName` | `string` |
| `sourceProjectFile` | `string` |
| `targetProjectName` | `string` |
#### Returns
`void`
---
### addExternalNode
**addExternalNode**(`node`): `void`
Adds a external node to the project graph
#### Parameters
| Name | Type |
| :----- | :---------------------------------------------------------------------------- |
| `node` | [`ProjectGraphExternalNode`](../../devkit/documents/ProjectGraphExternalNode) |
#### Returns
`void`
---
### addImplicitDependency
**addImplicitDependency**(`sourceProjectName`, `targetProjectName`): `void`
Adds implicit dependency from source project to target project
#### Parameters
| Name | Type |
| :------------------ | :------- |
| `sourceProjectName` | `string` |
| `targetProjectName` | `string` |
#### Returns
`void`
---
### addNode
**addNode**(`node`): `void`
Adds a project node to the project graph
#### Parameters
| Name | Type |
| :----- | :-------------------------------------------------------------------------- |
| `node` | [`ProjectGraphProjectNode`](../../devkit/documents/ProjectGraphProjectNode) |
#### Returns
`void`
---
### addStaticDependency
**addStaticDependency**(`sourceProjectName`, `targetProjectName`, `sourceProjectFile?`): `void`
Adds static dependency from source project to target project
#### Parameters
| Name | Type |
| :------------------- | :------- |
| `sourceProjectName` | `string` |
| `targetProjectName` | `string` |
| `sourceProjectFile?` | `string` |
#### Returns
`void`
---
### calculateAlreadySetTargetDeps
`Private` **calculateAlreadySetTargetDeps**(`sourceProject`): `Map`<`string`, `Map`<`string`, [`ProjectGraphDependency`](../../devkit/documents/ProjectGraphDependency)\>\>
#### Parameters
| Name | Type |
| :-------------- | :------- |
| `sourceProject` | `string` |
#### Returns
`Map`<`string`, `Map`<`string`, [`ProjectGraphDependency`](../../devkit/documents/ProjectGraphDependency)\>\>
---
### calculateTargetDepsFromFiles
`Private` **calculateTargetDepsFromFiles**(`sourceProject`): `Map`<`string`, `Set`<`string`\>\>
#### Parameters
| Name | Type |
| :-------------- | :------- |
| `sourceProject` | `string` |
#### Returns
`Map`<`string`, `Set`<`string`\>\>
---
### getUpdatedProjectGraph
**getUpdatedProjectGraph**(): [`ProjectGraph`](../../devkit/documents/ProjectGraph)
#### Returns
[`ProjectGraph`](../../devkit/documents/ProjectGraph)
---
### mergeProjectGraph
**mergeProjectGraph**(`p`): `void`
Merges the nodes and dependencies of p into the built project graph.
#### Parameters
| Name | Type |
| :--- | :---------------------------------------------------- |
| `p` | [`ProjectGraph`](../../devkit/documents/ProjectGraph) |
#### Returns
`void`
---
### removeDependenciesWithNode
`Private` **removeDependenciesWithNode**(`name`): `void`
#### Parameters
| Name | Type |
| :----- | :------- |
| `name` | `string` |
#### Returns
`void`
---
### removeDependency
**removeDependency**(`sourceProjectName`, `targetProjectName`): `void`
Removes a dependency from source project to target project
#### Parameters
| Name | Type |
| :------------------ | :------- |
| `sourceProjectName` | `string` |
| `targetProjectName` | `string` |
#### Returns
`void`
---
### removeNode
**removeNode**(`name`): `void`
Removes a node and all of its dependency edges from the graph
#### Parameters
| Name | Type |
| :----- | :------- |
| `name` | `string` |
#### Returns
`void`
---
### setVersion
**setVersion**(`version`): `void`
Set version of the project graph
#### Parameters
| Name | Type |
| :-------- | :------- |
| `version` | `string` |
#### Returns
`void`
@@ -1,33 +0,0 @@
# Interface: ProjectGraphDependency
A dependency between two projects
## Table of contents
### Properties
- [source](../../devkit/documents/ProjectGraphDependency#source)
- [target](../../devkit/documents/ProjectGraphDependency#target)
- [type](../../devkit/documents/ProjectGraphDependency#type)
## Properties
### source
**source**: `string`
The project importing the other
---
### target
**target**: `string`
The project being imported by the other
---
### type
**type**: `string`
@@ -1,45 +0,0 @@
# Interface: ProjectGraphDependencyWithFile
A [ProjectGraph](../../devkit/documents/ProjectGraph) dependency between 2 projects
Optional: Specifies a file from where the dependency is made
## Table of contents
### Properties
- [dependencyType](../../devkit/documents/ProjectGraphDependencyWithFile#dependencytype)
- [source](../../devkit/documents/ProjectGraphDependencyWithFile#source)
- [sourceFile](../../devkit/documents/ProjectGraphDependencyWithFile#sourcefile)
- [target](../../devkit/documents/ProjectGraphDependencyWithFile#target)
## Properties
### dependencyType
**dependencyType**: [`DependencyType`](../../devkit/documents/DependencyType)
The type of dependency
---
### source
**source**: `string`
The name of a [ProjectGraphProjectNode](../../devkit/documents/ProjectGraphProjectNode) or [ProjectGraphExternalNode](../../devkit/documents/ProjectGraphExternalNode) depending on the target project
---
### sourceFile
`Optional` **sourceFile**: `string`
The path of a file (relative from the workspace root) where the dependency is made
---
### target
**target**: `string`
The name of a [ProjectGraphProjectNode](../../devkit/documents/ProjectGraphProjectNode) or [ProjectGraphExternalNode](../../devkit/documents/ProjectGraphExternalNode) that the source project depends on
@@ -1,44 +0,0 @@
# Interface: ProjectGraphExternalNode
A node describing an external dependency
`name` has as form of:
- `npm:packageName` for root dependencies or
- `npm:packageName@version` for nested transitive dependencies
This is vital for our node discovery to always point to root dependencies,
while allowing tracking of the full tree of different nested versions
## Table of contents
### Properties
- [data](../../devkit/documents/ProjectGraphExternalNode#data)
- [name](../../devkit/documents/ProjectGraphExternalNode#name)
- [type](../../devkit/documents/ProjectGraphExternalNode#type)
## Properties
### data
**data**: `Object`
#### Type declaration
| Name | Type |
| :------------ | :------- |
| `hash?` | `string` |
| `packageName` | `string` |
| `version` | `string` |
---
### name
**name**: \`npm:${string}\`
---
### type
**type**: `"npm"`
@@ -1,7 +0,0 @@
# Type alias: ProjectGraphNode
Ƭ **ProjectGraphNode**: [`ProjectGraphProjectNode`](../../devkit/documents/ProjectGraphProjectNode) \| [`ProjectGraphExternalNode`](../../devkit/documents/ProjectGraphExternalNode)
**`Deprecated`**
this type will be removed in v16. Use [ProjectGraphProjectNode](../../devkit/documents/ProjectGraphProjectNode) or [ProjectGraphExternalNode](../../devkit/documents/ProjectGraphExternalNode) instead
@@ -1,57 +0,0 @@
# Interface: ProjectGraphProcessorContext
Additional information to be used to process a project graph
**`Deprecated`**
The ProjectGraphProcessor is deprecated. This will be removed in Nx 18.
## Table of contents
### Properties
- [fileMap](../../devkit/documents/ProjectGraphProcessorContext#filemap)
- [filesToProcess](../../devkit/documents/ProjectGraphProcessorContext#filestoprocess)
- [nxJsonConfiguration](../../devkit/documents/ProjectGraphProcessorContext#nxjsonconfiguration)
- [projectsConfigurations](../../devkit/documents/ProjectGraphProcessorContext#projectsconfigurations)
- [workspace](../../devkit/documents/ProjectGraphProcessorContext#workspace)
## Properties
### fileMap
**fileMap**: [`ProjectFileMap`](../../devkit/documents/ProjectFileMap)
All files in the workspace
---
### filesToProcess
**filesToProcess**: [`ProjectFileMap`](../../devkit/documents/ProjectFileMap)
Files changes since last invocation
---
### nxJsonConfiguration
**nxJsonConfiguration**: [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)<`string`[] \| `"*"`\>
---
### projectsConfigurations
**projectsConfigurations**: [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations)
---
### workspace
**workspace**: [`Workspace`](../../devkit/documents/Workspace)
Workspace information such as projects and configuration
**`Deprecated`**
use [projectsConfigurations](../../devkit/documents/ProjectGraphProcessorContext#projectsconfigurations) or [nxJsonConfiguration](../../devkit/documents/ProjectGraphProcessorContext#nxjsonconfiguration) instead
@@ -1,31 +0,0 @@
# Interface: ProjectGraphProjectNode
A node describing a project in a workspace
## Table of contents
### Properties
- [data](../../devkit/documents/ProjectGraphProjectNode#data)
- [name](../../devkit/documents/ProjectGraphProjectNode#name)
- [type](../../devkit/documents/ProjectGraphProjectNode#type)
## Properties
### data
**data**: [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration) & { `description?`: `string` }
Additional metadata about a project
---
### name
**name**: `string`
---
### type
**type**: `"app"` \| `"e2e"` \| `"lib"`
@@ -1,21 +0,0 @@
# Type alias: ProjectTargetConfigurator
Ƭ **ProjectTargetConfigurator**: (`file`: `string`) => `Record`<`string`, [`TargetConfiguration`](../../devkit/documents/TargetConfiguration)\>
#### Type declaration
▸ (`file`): `Record`<`string`, [`TargetConfiguration`](../../devkit/documents/TargetConfiguration)\>
**`Deprecated`**
Add targets to the projects in a [CreateNodes](../../devkit/documents/CreateNodes) function instead. This will be removed in Nx 18
##### Parameters
| Name | Type |
| :----- | :------- |
| `file` | `string` |
##### Returns
`Record`<`string`, [`TargetConfiguration`](../../devkit/documents/TargetConfiguration)\>
-5
View File
@@ -1,5 +0,0 @@
# Type alias: ProjectType
Ƭ **ProjectType**: `"library"` \| `"application"`
Type of project supported
@@ -1,37 +0,0 @@
# Interface: ProjectsConfigurations
Projects Configurations
@note: when adding properties here add them to `allowedWorkspaceExtensions` in adapter/compat.ts
## Hierarchy
- **`ProjectsConfigurations`**
↳ [`Workspace`](../../devkit/documents/Workspace)
## Table of contents
### Properties
- [projects](../../devkit/documents/ProjectsConfigurations#projects)
- [version](../../devkit/documents/ProjectsConfigurations#version)
## Properties
### projects
**projects**: `Object`
Projects' projects
#### Index signature
▪ [projectName: `string`]: [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration)
---
### version
**version**: `number`
Version of the configuration format
-171
View File
@@ -1,171 +0,0 @@
# @nx/devkit
The Nx Devkit is the underlying technology used to customize Nx to support
different technologies and custom use-cases. It contains many utility
functions for reading and writing files, updating configuration,
working with Abstract Syntax Trees(ASTs), and more.
As with most things in Nx, the core of Nx Devkit is very simple.
It only uses language primitives and immutable objects
(the tree being the only exception).
## Table of contents
### Enumerations
- [ChangeType](../../devkit/documents/ChangeType)
- [DependencyType](../../devkit/documents/DependencyType)
### Classes
- [ProjectGraphBuilder](../../devkit/documents/ProjectGraphBuilder)
- [Workspaces](../../devkit/documents/Workspaces)
### Interfaces
- [CreateDependenciesContext](../../devkit/documents/CreateDependenciesContext)
- [CreateNodesContext](../../devkit/documents/CreateNodesContext)
- [DefaultTasksRunnerOptions](../../devkit/documents/DefaultTasksRunnerOptions)
- [ExecutorContext](../../devkit/documents/ExecutorContext)
- [ExecutorsJson](../../devkit/documents/ExecutorsJson)
- [FileChange](../../devkit/documents/FileChange)
- [FileData](../../devkit/documents/FileData)
- [GeneratorsJson](../../devkit/documents/GeneratorsJson)
- [Hash](../../devkit/documents/Hash)
- [HasherContext](../../devkit/documents/HasherContext)
- [ImplicitJsonSubsetDependency](../../devkit/documents/ImplicitJsonSubsetDependency)
- [JsonParseOptions](../../devkit/documents/JsonParseOptions)
- [JsonSerializeOptions](../../devkit/documents/JsonSerializeOptions)
- [MigrationsJson](../../devkit/documents/MigrationsJson)
- [ModuleFederationConfig](../../devkit/documents/ModuleFederationConfig)
- [NxAffectedConfig](../../devkit/documents/NxAffectedConfig)
- [NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration)
- [ProjectConfiguration](../../devkit/documents/ProjectConfiguration)
- [ProjectFileMap](../../devkit/documents/ProjectFileMap)
- [ProjectGraph](../../devkit/documents/ProjectGraph)
- [ProjectGraphDependency](../../devkit/documents/ProjectGraphDependency)
- [ProjectGraphDependencyWithFile](../../devkit/documents/ProjectGraphDependencyWithFile)
- [ProjectGraphExternalNode](../../devkit/documents/ProjectGraphExternalNode)
- [ProjectGraphProcessorContext](../../devkit/documents/ProjectGraphProcessorContext)
- [ProjectGraphProjectNode](../../devkit/documents/ProjectGraphProjectNode)
- [ProjectsConfigurations](../../devkit/documents/ProjectsConfigurations)
- [RemoteCache](../../devkit/documents/RemoteCache)
- [SharedLibraryConfig](../../devkit/documents/SharedLibraryConfig)
- [StringDeletion](../../devkit/documents/StringDeletion)
- [StringInsertion](../../devkit/documents/StringInsertion)
- [Target](../../devkit/documents/Target)
- [TargetConfiguration](../../devkit/documents/TargetConfiguration)
- [TargetDependencyConfig](../../devkit/documents/TargetDependencyConfig)
- [Task](../../devkit/documents/Task)
- [TaskGraph](../../devkit/documents/TaskGraph)
- [TaskHasher](../../devkit/documents/TaskHasher)
- [Tree](../../devkit/documents/Tree)
- [Workspace](../../devkit/documents/Workspace)
### Type Aliases
- [AdditionalSharedConfig](../../devkit/documents/AdditionalSharedConfig)
- [CreateDependencies](../../devkit/documents/CreateDependencies)
- [CreateNodes](../../devkit/documents/CreateNodes)
- [CreateNodesFunction](../../devkit/documents/CreateNodesFunction)
- [CustomHasher](../../devkit/documents/CustomHasher)
- [Executor](../../devkit/documents/Executor)
- [Generator](../../devkit/documents/Generator)
- [GeneratorCallback](../../devkit/documents/GeneratorCallback)
- [Hasher](../../devkit/documents/Hasher)
- [ImplicitDependencyEntry](../../devkit/documents/ImplicitDependencyEntry)
- [ModuleFederationLibrary](../../devkit/documents/ModuleFederationLibrary)
- [NxPlugin](../../devkit/documents/NxPlugin)
- [NxPluginV1](../../devkit/documents/NxPluginV1)
- [NxPluginV2](../../devkit/documents/NxPluginV2)
- [PackageManager](../../devkit/documents/PackageManager)
- [ProjectGraphNode](../../devkit/documents/ProjectGraphNode)
- [ProjectTargetConfigurator](../../devkit/documents/ProjectTargetConfigurator)
- [ProjectType](../../devkit/documents/ProjectType)
- [Remotes](../../devkit/documents/Remotes)
- [SharedFunction](../../devkit/documents/SharedFunction)
- [SharedWorkspaceLibraryConfig](../../devkit/documents/SharedWorkspaceLibraryConfig)
- [StringChange](../../devkit/documents/StringChange)
- [TaskGraphExecutor](../../devkit/documents/TaskGraphExecutor)
- [WorkspaceConfiguration](../../devkit/documents/WorkspaceConfiguration)
- [WorkspaceJsonConfiguration](../../devkit/documents/WorkspaceJsonConfiguration)
- [WorkspaceLibrary](../../devkit/documents/WorkspaceLibrary)
- [WorkspaceLibrarySecondaryEntryPoint](../../devkit/documents/WorkspaceLibrarySecondaryEntryPoint)
### Variables
- [NX_VERSION](../../devkit/documents/NX_VERSION)
- [appRootPath](../../devkit/documents/appRootPath)
- [cacheDir](../../devkit/documents/cacheDir)
- [logger](../../devkit/documents/logger)
- [output](../../devkit/documents/output)
- [workspaceRoot](../../devkit/documents/workspaceRoot)
### Functions
- [addDependenciesToPackageJson](../../devkit/documents/addDependenciesToPackageJson)
- [addProjectConfiguration](../../devkit/documents/addProjectConfiguration)
- [applyAdditionalShared](../../devkit/documents/applyAdditionalShared)
- [applyChangesToString](../../devkit/documents/applyChangesToString)
- [applySharedFunction](../../devkit/documents/applySharedFunction)
- [convertNxExecutor](../../devkit/documents/convertNxExecutor)
- [convertNxGenerator](../../devkit/documents/convertNxGenerator)
- [createProjectFileMapUsingProjectGraph](../../devkit/documents/createProjectFileMapUsingProjectGraph)
- [createProjectGraphAsync](../../devkit/documents/createProjectGraphAsync)
- [defaultTasksRunner](../../devkit/documents/defaultTasksRunner)
- [detectPackageManager](../../devkit/documents/detectPackageManager)
- [ensurePackage](../../devkit/documents/ensurePackage)
- [extractLayoutDirectory](../../devkit/documents/extractLayoutDirectory)
- [formatFiles](../../devkit/documents/formatFiles)
- [generateFiles](../../devkit/documents/generateFiles)
- [getDependentPackagesForProject](../../devkit/documents/getDependentPackagesForProject)
- [getNpmPackageSharedConfig](../../devkit/documents/getNpmPackageSharedConfig)
- [getOutputsForTargetAndConfiguration](../../devkit/documents/getOutputsForTargetAndConfiguration)
- [getPackageManagerCommand](../../devkit/documents/getPackageManagerCommand)
- [getPackageManagerVersion](../../devkit/documents/getPackageManagerVersion)
- [getProjects](../../devkit/documents/getProjects)
- [getWorkspaceLayout](../../devkit/documents/getWorkspaceLayout)
- [getWorkspacePath](../../devkit/documents/getWorkspacePath)
- [hashArray](../../devkit/documents/hashArray)
- [installPackagesTask](../../devkit/documents/installPackagesTask)
- [isStandaloneProject](../../devkit/documents/isStandaloneProject)
- [joinPathFragments](../../devkit/documents/joinPathFragments)
- [mapRemotes](../../devkit/documents/mapRemotes)
- [mapRemotesForSSR](../../devkit/documents/mapRemotesForSSR)
- [moveFilesToNewDirectory](../../devkit/documents/moveFilesToNewDirectory)
- [names](../../devkit/documents/names)
- [normalizePath](../../devkit/documents/normalizePath)
- [offsetFromRoot](../../devkit/documents/offsetFromRoot)
- [parseJson](../../devkit/documents/parseJson)
- [parseTargetString](../../devkit/documents/parseTargetString)
- [readCachedProjectGraph](../../devkit/documents/readCachedProjectGraph)
- [readJson](../../devkit/documents/readJson)
- [readJsonFile](../../devkit/documents/readJsonFile)
- [readNxJson](../../devkit/documents/readNxJson)
- [readProjectConfiguration](../../devkit/documents/readProjectConfiguration)
- [readProjectsConfigurationFromProjectGraph](../../devkit/documents/readProjectsConfigurationFromProjectGraph)
- [readRootPackageJson](../../devkit/documents/readRootPackageJson)
- [readTargetOptions](../../devkit/documents/readTargetOptions)
- [readWorkspaceConfiguration](../../devkit/documents/readWorkspaceConfiguration)
- [removeDependenciesFromPackageJson](../../devkit/documents/removeDependenciesFromPackageJson)
- [removeProjectConfiguration](../../devkit/documents/removeProjectConfiguration)
- [reverse](../../devkit/documents/reverse)
- [runExecutor](../../devkit/documents/runExecutor)
- [runTasksInSerial](../../devkit/documents/runTasksInSerial)
- [serializeJson](../../devkit/documents/serializeJson)
- [sharePackages](../../devkit/documents/sharePackages)
- [shareWorkspaceLibraries](../../devkit/documents/shareWorkspaceLibraries)
- [stripIndents](../../devkit/documents/stripIndents)
- [stripJsonComments](../../devkit/documents/stripJsonComments)
- [targetToTargetString](../../devkit/documents/targetToTargetString)
- [toJS](../../devkit/documents/toJS)
- [updateJson](../../devkit/documents/updateJson)
- [updateNxJson](../../devkit/documents/updateNxJson)
- [updateProjectConfiguration](../../devkit/documents/updateProjectConfiguration)
- [updateTsConfigsToJs](../../devkit/documents/updateTsConfigsToJs)
- [updateWorkspaceConfiguration](../../devkit/documents/updateWorkspaceConfiguration)
- [validateDependency](../../devkit/documents/validateDependency)
- [visitNotIgnoredFiles](../../devkit/documents/visitNotIgnoredFiles)
- [workspaceLayout](../../devkit/documents/workspaceLayout)
- [writeJson](../../devkit/documents/writeJson)
- [writeJsonFile](../../devkit/documents/writeJsonFile)
-50
View File
@@ -1,50 +0,0 @@
# Interface: RemoteCache
## Table of contents
### Properties
- [retrieve](../../devkit/documents/RemoteCache#retrieve)
- [store](../../devkit/documents/RemoteCache#store)
## Properties
### retrieve
**retrieve**: (`hash`: `string`, `cacheDirectory`: `string`) => `Promise`<`boolean`\>
#### Type declaration
▸ (`hash`, `cacheDirectory`): `Promise`<`boolean`\>
##### Parameters
| Name | Type |
| :--------------- | :------- |
| `hash` | `string` |
| `cacheDirectory` | `string` |
##### Returns
`Promise`<`boolean`\>
---
### store
**store**: (`hash`: `string`, `cacheDirectory`: `string`) => `Promise`<`boolean`\>
#### Type declaration
▸ (`hash`, `cacheDirectory`): `Promise`<`boolean`\>
##### Parameters
| Name | Type |
| :--------------- | :------- |
| `hash` | `string` |
| `cacheDirectory` | `string` |
##### Returns
`Promise`<`boolean`\>
-3
View File
@@ -1,3 +0,0 @@
# Type alias: Remotes
Ƭ **Remotes**: `string`[] \| [remoteName: string, remoteUrl: string][]
-18
View File
@@ -1,18 +0,0 @@
# Type alias: SharedFunction
Ƭ **SharedFunction**: (`libraryName`: `string`, `sharedConfig`: [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig)) => `undefined` \| `false` \| [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig)
#### Type declaration
▸ (`libraryName`, `sharedConfig`): `undefined` \| `false` \| [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig)
##### Parameters
| Name | Type |
| :------------- | :------------------------------------------------------------------ |
| `libraryName` | `string` |
| `sharedConfig` | [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig) |
##### Returns
`undefined` \| `false` \| [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig)
@@ -1,34 +0,0 @@
# Interface: SharedLibraryConfig
## Table of contents
### Properties
- [eager](../../devkit/documents/SharedLibraryConfig#eager)
- [requiredVersion](../../devkit/documents/SharedLibraryConfig#requiredversion)
- [singleton](../../devkit/documents/SharedLibraryConfig#singleton)
- [strictVersion](../../devkit/documents/SharedLibraryConfig#strictversion)
## Properties
### eager
`Optional` **eager**: `boolean`
---
### requiredVersion
`Optional` **requiredVersion**: `string` \| `false`
---
### singleton
`Optional` **singleton**: `boolean`
---
### strictVersion
`Optional` **strictVersion**: `boolean`
@@ -1,11 +0,0 @@
# Type alias: SharedWorkspaceLibraryConfig
Ƭ **SharedWorkspaceLibraryConfig**: `Object`
#### Type declaration
| Name | Type |
| :--------------------- | :---------------------------------------------------------------------------------------------------------------- |
| `getAliases` | () => `Record`<`string`, `string`\> |
| `getLibraries` | (`eager?`: `boolean`) => `Record`<`string`, [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig)\> |
| `getReplacementPlugin` | () => `NormalModuleReplacementPlugin` |
-5
View File
@@ -1,5 +0,0 @@
# Type alias: StringChange
Ƭ **StringChange**: [`StringInsertion`](../../devkit/documents/StringInsertion) \| [`StringDeletion`](../../devkit/documents/StringDeletion)
A change to be made to a string
-31
View File
@@ -1,31 +0,0 @@
# Interface: StringDeletion
## Table of contents
### Properties
- [length](../../devkit/documents/StringDeletion#length)
- [start](../../devkit/documents/StringDeletion#start)
- [type](../../devkit/documents/StringDeletion#type)
## Properties
### length
**length**: `number`
Number of characters to delete
---
### start
**start**: `number`
Place in the original text to start deleting characters
---
### type
**type**: [`Delete`](../../devkit/documents/ChangeType#delete)
-31
View File
@@ -1,31 +0,0 @@
# Interface: StringInsertion
## Table of contents
### Properties
- [index](../../devkit/documents/StringInsertion#index)
- [text](../../devkit/documents/StringInsertion#text)
- [type](../../devkit/documents/StringInsertion#type)
## Properties
### index
**index**: `number`
Place in the original text to insert new text
---
### text
**text**: `string`
Text to insert into the original text
---
### type
**type**: [`Insert`](../../devkit/documents/ChangeType#insert)
-27
View File
@@ -1,27 +0,0 @@
# Interface: Target
## Table of contents
### Properties
- [configuration](../../devkit/documents/Target#configuration)
- [project](../../devkit/documents/Target#project)
- [target](../../devkit/documents/Target#target)
## Properties
### configuration
`Optional` **configuration**: `string`
---
### project
**project**: `string`
---
### target
**target**: `string`
@@ -1,93 +0,0 @@
# Interface: TargetConfiguration<T\>
Target's configuration
## Type parameters
| Name | Type |
| :--- | :---- |
| `T` | `any` |
## Table of contents
### Properties
- [command](../../devkit/documents/TargetConfiguration#command)
- [configurations](../../devkit/documents/TargetConfiguration#configurations)
- [defaultConfiguration](../../devkit/documents/TargetConfiguration#defaultconfiguration)
- [dependsOn](../../devkit/documents/TargetConfiguration#dependson)
- [executor](../../devkit/documents/TargetConfiguration#executor)
- [inputs](../../devkit/documents/TargetConfiguration#inputs)
- [options](../../devkit/documents/TargetConfiguration#options)
- [outputs](../../devkit/documents/TargetConfiguration#outputs)
## Properties
### command
`Optional` **command**: `string`
Used as a shorthand for nx:run-commands, a command to run.
---
### configurations
`Optional` **configurations**: `Object`
Sets of options
#### Index signature
▪ [config: `string`]: `any`
---
### defaultConfiguration
`Optional` **defaultConfiguration**: `string`
A default named configuration to use when a target configuration is not provided.
---
### dependsOn
`Optional` **dependsOn**: (`string` \| [`TargetDependencyConfig`](../../devkit/documents/TargetDependencyConfig))[]
This describes other targets that a target depends on.
---
### executor
`Optional` **executor**: `string`
The executor/builder used to implement the target.
Example: '@nx/rollup:rollup'
---
### inputs
`Optional` **inputs**: (`string` \| `InputDefinition`)[]
This describes filesets, runtime dependencies and other inputs that a target depends on.
---
### options
`Optional` **options**: `T`
Target's options. They are passed in to the executor.
---
### outputs
`Optional` **outputs**: `string`[]
List of the target's outputs. The outputs will be cached by the Nx computation
caching engine.
@@ -1,45 +0,0 @@
# Interface: TargetDependencyConfig
## Table of contents
### Properties
- [dependencies](../../devkit/documents/TargetDependencyConfig#dependencies)
- [params](../../devkit/documents/TargetDependencyConfig#params)
- [projects](../../devkit/documents/TargetDependencyConfig#projects)
- [target](../../devkit/documents/TargetDependencyConfig#target)
## Properties
### dependencies
`Optional` **dependencies**: `boolean`
If true, the target will be executed for each project that this project depends on.
Should not be specified together with `projects`.
---
### params
`Optional` **params**: `"ignore"` \| `"forward"`
Configuration for params handling.
---
### projects
`Optional` **projects**: `string` \| `string`[]
A list of projects that have `target`.
Should not be specified together with `dependencies`.
---
### target
**target**: `string`
The name of the target to run. If `projects` and `dependencies` are not specified,
the target will be executed for the same project the the current target is running on`.
-97
View File
@@ -1,97 +0,0 @@
# Interface: Task
A representation of the invocation of an Executor
## Table of contents
### Properties
- [endTime](../../devkit/documents/Task#endtime)
- [hash](../../devkit/documents/Task#hash)
- [hashDetails](../../devkit/documents/Task#hashdetails)
- [id](../../devkit/documents/Task#id)
- [overrides](../../devkit/documents/Task#overrides)
- [projectRoot](../../devkit/documents/Task#projectroot)
- [startTime](../../devkit/documents/Task#starttime)
- [target](../../devkit/documents/Task#target)
## Properties
### endTime
`Optional` **endTime**: `number`
Unix timestamp of when a Batch Task ends
---
### hash
`Optional` **hash**: `string`
Hash of the task which is used for caching.
---
### hashDetails
`Optional` **hashDetails**: `Object`
Details about the composition of the hash
#### Type declaration
| Name | Type | Description |
| :-------------- | :---------------------------------- | :------------------------------------------------------------- |
| `command` | `string` | Command of the task |
| `implicitDeps?` | { `[fileName: string]`: `string`; } | Hashes of implicit dependencies which are included in the hash |
| `nodes` | { `[name: string]`: `string`; } | Hashes of inputs used in the hash |
| `runtime?` | { `[input: string]`: `string`; } | Hash of the runtime environment which the task was executed |
---
### id
**id**: `string`
Unique ID
---
### overrides
**overrides**: `any`
Overrides for the configured options of the target
---
### projectRoot
`Optional` **projectRoot**: `string`
Root of the project the task belongs to
---
### startTime
`Optional` **startTime**: `number`
Unix timestamp of when a Batch Task starts
---
### target
**target**: `Object`
Details about which project, target, and configuration to run.
#### Type declaration
| Name | Type | Description |
| :--------------- | :------- | :----------------------------------------------------- |
| `configuration?` | `string` | The configuration of the target which the task invokes |
| `project` | `string` | The project for which the task belongs to |
| `target` | `string` | The target name which the task should invoke |
-35
View File
@@ -1,35 +0,0 @@
# Interface: TaskGraph
Graph of Tasks to be executed
## Table of contents
### Properties
- [dependencies](../../devkit/documents/TaskGraph#dependencies)
- [roots](../../devkit/documents/TaskGraph#roots)
- [tasks](../../devkit/documents/TaskGraph#tasks)
## Properties
### dependencies
**dependencies**: `Record`<`string`, `string`[]\>
Map of Task IDs to IDs of tasks which the task depends on
---
### roots
**roots**: `string`[]
IDs of Tasks which do not have any dependencies and are thus ready to execute immediately
---
### tasks
**tasks**: `Record`<`string`, [`Task`](../../devkit/documents/Task)\>
Map of Task IDs to Tasks
@@ -1,28 +0,0 @@
# Type alias: TaskGraphExecutor<T\>
Ƭ **TaskGraphExecutor**<`T`\>: (`taskGraph`: [`TaskGraph`](../../devkit/documents/TaskGraph), `options`: `Record`<`string`, `T`\>, `overrides`: `T`, `context`: [`ExecutorContext`](../../devkit/documents/ExecutorContext)) => `Promise`<`BatchExecutorResult` \| `AsyncIterableIterator`<`BatchExecutorTaskResult`\>\>
#### Type parameters
| Name | Type |
| :--- | :---- |
| `T` | `any` |
#### Type declaration
▸ (`taskGraph`, `options`, `overrides`, `context`): `Promise`<`BatchExecutorResult` \| `AsyncIterableIterator`<`BatchExecutorTaskResult`\>\>
Implementation of a target of a project that handles multiple projects to be batched
##### Parameters
| Name | Type |
| :---------- | :---------------------------------------------------------- |
| `taskGraph` | [`TaskGraph`](../../devkit/documents/TaskGraph) |
| `options` | `Record`<`string`, `T`\> |
| `overrides` | `T` |
| `context` | [`ExecutorContext`](../../devkit/documents/ExecutorContext) |
##### Returns
`Promise`<`BatchExecutorResult` \| `AsyncIterableIterator`<`BatchExecutorTaskResult`\>\>
-74
View File
@@ -1,74 +0,0 @@
# Interface: TaskHasher
## Table of contents
### Methods
- [hashTask](../../devkit/documents/TaskHasher#hashtask)
- [hashTasks](../../devkit/documents/TaskHasher#hashtasks)
## Methods
### hashTask
**hashTask**(`task`): `Promise`<[`Hash`](../../devkit/documents/Hash)\>
**`Deprecated`**
use hashTask(task:Task, taskGraph: TaskGraph)
#### Parameters
| Name | Type |
| :----- | :------------------------------------ |
| `task` | [`Task`](../../devkit/documents/Task) |
#### Returns
`Promise`<[`Hash`](../../devkit/documents/Hash)\>
**hashTask**(`task`, `taskGraph`): `Promise`<[`Hash`](../../devkit/documents/Hash)\>
#### Parameters
| Name | Type |
| :---------- | :---------------------------------------------- |
| `task` | [`Task`](../../devkit/documents/Task) |
| `taskGraph` | [`TaskGraph`](../../devkit/documents/TaskGraph) |
#### Returns
`Promise`<[`Hash`](../../devkit/documents/Hash)\>
---
### hashTasks
**hashTasks**(`tasks`): `Promise`<[`Hash`](../../devkit/documents/Hash)[]\>
**`Deprecated`**
use hashTasks(tasks:Task[], taskGraph: TaskGraph)
#### Parameters
| Name | Type |
| :------ | :-------------------------------------- |
| `tasks` | [`Task`](../../devkit/documents/Task)[] |
#### Returns
`Promise`<[`Hash`](../../devkit/documents/Hash)[]\>
**hashTasks**(`tasks`, `taskGraph`): `Promise`<[`Hash`](../../devkit/documents/Hash)[]\>
#### Parameters
| Name | Type |
| :---------- | :---------------------------------------------- |
| `tasks` | [`Task`](../../devkit/documents/Task)[] |
| `taskGraph` | [`TaskGraph`](../../devkit/documents/TaskGraph) |
#### Returns
`Promise`<[`Hash`](../../devkit/documents/Hash)[]\>
-204
View File
@@ -1,204 +0,0 @@
# Interface: Tree
Virtual file system tree.
## Table of contents
### Properties
- [root](../../devkit/documents/Tree#root)
### Methods
- [changePermissions](../../devkit/documents/Tree#changepermissions)
- [children](../../devkit/documents/Tree#children)
- [delete](../../devkit/documents/Tree#delete)
- [exists](../../devkit/documents/Tree#exists)
- [isFile](../../devkit/documents/Tree#isfile)
- [listChanges](../../devkit/documents/Tree#listchanges)
- [read](../../devkit/documents/Tree#read)
- [rename](../../devkit/documents/Tree#rename)
- [write](../../devkit/documents/Tree#write)
## Properties
### root
**root**: `string`
Root of the workspace. All paths are relative to this.
## Methods
### changePermissions
**changePermissions**(`filePath`, `mode`): `void`
Changes permissions of a file.
#### Parameters
| Name | Type | Description |
| :--------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `filePath` | `string` | A path to a file. |
| `mode` | `Mode` | The permission to be granted on the file, given as a string (e.g `755`) or octal integer (e.g `0o755`). See https://nodejs.org/api/fs.html#fs_file_modes. |
#### Returns
`void`
---
### children
**children**(`dirPath`): `string`[]
Returns the list of children of a folder.
#### Parameters
| Name | Type |
| :-------- | :------- |
| `dirPath` | `string` |
#### Returns
`string`[]
---
### delete
**delete**(`filePath`): `void`
Delete the file.
#### Parameters
| Name | Type |
| :--------- | :------- |
| `filePath` | `string` |
#### Returns
`void`
---
### exists
**exists**(`filePath`): `boolean`
Check if a file exists.
#### Parameters
| Name | Type |
| :--------- | :------- |
| `filePath` | `string` |
#### Returns
`boolean`
---
### isFile
**isFile**(`filePath`): `boolean`
Check if this is a file or not.
#### Parameters
| Name | Type |
| :--------- | :------- |
| `filePath` | `string` |
#### Returns
`boolean`
---
### listChanges
**listChanges**(): [`FileChange`](../../devkit/documents/FileChange)[]
Returns the list of currently recorded changes.
#### Returns
[`FileChange`](../../devkit/documents/FileChange)[]
---
### read
**read**(`filePath`): `Buffer`
Read the contents of a file.
#### Parameters
| Name | Type | Description |
| :--------- | :------- | :---------------- |
| `filePath` | `string` | A path to a file. |
#### Returns
`Buffer`
**read**(`filePath`, `encoding`): `string`
Read the contents of a file as string.
#### Parameters
| Name | Type | Description |
| :--------- | :--------------- | :-------------------------- |
| `filePath` | `string` | A path to a file. |
| `encoding` | `BufferEncoding` | the encoding for the result |
#### Returns
`string`
---
### rename
**rename**(`from`, `to`): `void`
Rename the file or the folder.
#### Parameters
| Name | Type |
| :----- | :------- |
| `from` | `string` |
| `to` | `string` |
#### Returns
`void`
---
### write
**write**(`filePath`, `content`, `options?`): `void`
Update the contents of a file or create a new file.
#### Parameters
| Name | Type |
| :--------- | :------------------- |
| `filePath` | `string` |
| `content` | `string` \| `Buffer` |
| `options?` | `TreeWriteOptions` |
#### Returns
`void`
-277
View File
@@ -1,277 +0,0 @@
# Interface: Workspace
**`Deprecated`**
use ProjectsConfigurations or NxJsonConfiguration
## Hierarchy
- [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations)
- [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)
**`Workspace`**
## Table of contents
### Properties
- [affected](../../devkit/documents/Workspace#affected)
- [cli](../../devkit/documents/Workspace#cli)
- [defaultProject](../../devkit/documents/Workspace#defaultproject)
- [extends](../../devkit/documents/Workspace#extends)
- [generators](../../devkit/documents/Workspace#generators)
- [implicitDependencies](../../devkit/documents/Workspace#implicitdependencies)
- [installation](../../devkit/documents/Workspace#installation)
- [namedInputs](../../devkit/documents/Workspace#namedinputs)
- [npmScope](../../devkit/documents/Workspace#npmscope)
- [plugins](../../devkit/documents/Workspace#plugins)
- [pluginsConfig](../../devkit/documents/Workspace#pluginsconfig)
- [projects](../../devkit/documents/Workspace#projects)
- [targetDefaults](../../devkit/documents/Workspace#targetdefaults)
- [tasksRunnerOptions](../../devkit/documents/Workspace#tasksrunneroptions)
- [version](../../devkit/documents/Workspace#version)
- [workspaceLayout](../../devkit/documents/Workspace#workspacelayout)
## Properties
### affected
`Optional` **affected**: [`NxAffectedConfig`](../../devkit/documents/NxAffectedConfig)
Default options for `nx affected`
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[affected](../../devkit/documents/NxJsonConfiguration#affected)
---
### cli
`Optional` **cli**: `Object`
Default generator collection. It is used when no collection is provided.
#### Type declaration
| Name | Type | Description |
| :-------------------- | :-------------------------------------------------------- | :--------------------------------------------------------------------- |
| `defaultCollection?` | `string` | **`Deprecated`** - defaultCollection is deprecated and will be removed |
| `defaultProjectName?` | `string` | - |
| `packageManager?` | [`PackageManager`](../../devkit/documents/PackageManager) | - |
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[cli](../../devkit/documents/NxJsonConfiguration#cli)
---
### defaultProject
`Optional` **defaultProject**: `string`
Default project. When project isn't provided, the default project
will be used. Convenient for small workspaces with one main application.
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[defaultProject](../../devkit/documents/NxJsonConfiguration#defaultproject)
---
### extends
`Optional` **extends**: `string`
Optional (additional) Nx.json configuration file which becomes a base for this one
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[extends](../../devkit/documents/NxJsonConfiguration#extends)
---
### generators
`Optional` **generators**: `Object`
List of default values used by generators.
These defaults are global. They are used when no other defaults are configured.
Example:
```
{
"@nx/react": {
"library": {
"style": "scss"
}
}
}
```
#### Index signature
▪ [collectionName: `string`]: { `[generatorName: string]`: `any`; }
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[generators](../../devkit/documents/NxJsonConfiguration#generators)
---
### implicitDependencies
`Optional` **implicitDependencies**: [`ImplicitDependencyEntry`](../../devkit/documents/ImplicitDependencyEntry)<`string`[] \| `"*"`\>
Map of files to projects that implicitly depend on them
**`Deprecated`**
use [namedInputs](../../devkit/documents/Workspace#namedinputs) instead. For more information see https://nx.dev/deprecated/global-implicit-dependencies#global-implicit-dependencies
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[implicitDependencies](../../devkit/documents/NxJsonConfiguration#implicitdependencies)
---
### installation
`Optional` **installation**: `NxInstallationConfiguration`
Configures the Nx installation for a repo. Useful for maintaining a separate
set of dependencies for Nx + Plugins compared to the base package.json, but also
useful for workspaces that don't have a root package.json + node_modules.
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[installation](../../devkit/documents/NxJsonConfiguration#installation)
---
### namedInputs
`Optional` **namedInputs**: `Object`
Named inputs targets can refer to reduce duplication
#### Index signature
▪ [inputName: `string`]: (`string` \| `InputDefinition`)[]
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[namedInputs](../../devkit/documents/NxJsonConfiguration#namedinputs)
---
### npmScope
`Optional` **npmScope**: `string`
**`Deprecated`**
This is inferred from the package.json in the workspace root. Please use getNpmScope instead.
NPM Scope that the workspace uses
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[npmScope](../../devkit/documents/NxJsonConfiguration#npmscope)
---
### plugins
`Optional` **plugins**: `string`[]
Plugins for extending the project graph
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[plugins](../../devkit/documents/NxJsonConfiguration#plugins)
---
### pluginsConfig
`Optional` **pluginsConfig**: `Record`<`string`, `unknown`\>
Configuration for Nx Plugins
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[pluginsConfig](../../devkit/documents/NxJsonConfiguration#pluginsconfig)
---
### projects
**projects**: `Record`<`string`, [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration)\>
Projects' projects
#### Overrides
[ProjectsConfigurations](../../devkit/documents/ProjectsConfigurations).[projects](../../devkit/documents/ProjectsConfigurations#projects)
---
### targetDefaults
`Optional` **targetDefaults**: `TargetDefaults`
Dependencies between different target names across all projects
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[targetDefaults](../../devkit/documents/NxJsonConfiguration#targetdefaults)
---
### tasksRunnerOptions
`Optional` **tasksRunnerOptions**: `Object`
Available Task Runners
#### Index signature
▪ [tasksRunnerName: `string`]: { `options?`: `any` ; `runner`: `string` }
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[tasksRunnerOptions](../../devkit/documents/NxJsonConfiguration#tasksrunneroptions)
---
### version
**version**: `number`
Version of the configuration format
#### Inherited from
[ProjectsConfigurations](../../devkit/documents/ProjectsConfigurations).[version](../../devkit/documents/ProjectsConfigurations#version)
---
### workspaceLayout
`Optional` **workspaceLayout**: `Object`
Where new apps + libs should be placed
#### Type declaration
| Name | Type |
| :-------- | :------- |
| `appsDir` | `string` |
| `libsDir` | `string` |
#### Inherited from
[NxJsonConfiguration](../../devkit/documents/NxJsonConfiguration).[workspaceLayout](../../devkit/documents/NxJsonConfiguration#workspacelayout)
@@ -1,7 +0,0 @@
# Type alias: WorkspaceConfiguration
Ƭ **WorkspaceConfiguration**: `Omit`<[`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations), `"projects"`\> & `Partial`<[`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)\>
**`Deprecated`**
using NxJsonConfiguration
@@ -1,7 +0,0 @@
# Type alias: WorkspaceJsonConfiguration
Ƭ **WorkspaceJsonConfiguration**: [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations)
**`Deprecated`**
use ProjectsConfigurations
-11
View File
@@ -1,11 +0,0 @@
# Type alias: WorkspaceLibrary
Ƭ **WorkspaceLibrary**: `Object`
#### Type declaration
| Name | Type |
| :---------- | :---------------------- |
| `importKey` | `string` \| `undefined` |
| `name` | `string` |
| `root` | `string` |
@@ -1,10 +0,0 @@
# Type alias: WorkspaceLibrarySecondaryEntryPoint
Ƭ **WorkspaceLibrarySecondaryEntryPoint**: `Object`
#### Type declaration
| Name | Type |
| :----- | :------- |
| `name` | `string` |
| `path` | `string` |
-51
View File
@@ -1,51 +0,0 @@
# Class: Workspaces
**`Deprecated`**
This will be removed in v18. Use [readProjectsConfigurationFromProjectGraph](../../devkit/documents/readProjectsConfigurationFromProjectGraph) instead.
## Table of contents
### Constructors
- [constructor](../../devkit/documents/Workspaces#constructor)
### Properties
- [root](../../devkit/documents/Workspaces#root)
### Methods
- [readWorkspaceConfiguration](../../devkit/documents/Workspaces#readworkspaceconfiguration)
## Constructors
### constructor
**new Workspaces**(`root`)
#### Parameters
| Name | Type |
| :----- | :------- |
| `root` | `string` |
## Properties
### root
`Private` **root**: `string`
## Methods
### readWorkspaceConfiguration
**readWorkspaceConfiguration**(): [`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations) & [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)<`string`[] \| `"*"`\>
**`Deprecated`**
Use [readProjectsConfigurationFromProjectGraph](../../devkit/documents/readProjectsConfigurationFromProjectGraph) instead.
#### Returns
[`ProjectsConfigurations`](../../devkit/documents/ProjectsConfigurations) & [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)<`string`[] \| `"*"`\>
@@ -1,28 +0,0 @@
# Function: addDependenciesToPackageJson
**addDependenciesToPackageJson**(`tree`, `dependencies`, `devDependencies`, `packageJsonPath?`): [`GeneratorCallback`](../../devkit/documents/GeneratorCallback)
Add Dependencies and Dev Dependencies to package.json
For example:
```typescript
addDependenciesToPackageJson(tree, { react: 'latest' }, { jest: 'latest' });
```
This will **add** `react` and `jest` to the dependencies and devDependencies sections of package.json respectively.
#### Parameters
| Name | Type | Description |
| :----------------- | :------------------------------------ | :---------------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/documents/Tree) | Tree representing file system to modify |
| `dependencies` | `Record`<`string`, `string`\> | Dependencies to be added to the dependencies section of package.json |
| `devDependencies` | `Record`<`string`, `string`\> | Dependencies to be added to the devDependencies section of package.json |
| `packageJsonPath?` | `string` | Path to package.json |
#### Returns
[`GeneratorCallback`](../../devkit/documents/GeneratorCallback)
Callback to install dependencies only if necessary, no-op otherwise
@@ -1,18 +0,0 @@
# Function: addProjectConfiguration
**addProjectConfiguration**(`tree`, `projectName`, `projectConfiguration`, `standalone?`): `void`
Adds project configuration to the Nx workspace.
#### Parameters
| Name | Type | Default value | Description |
| :--------------------- | :-------------------------------------------------------------------- | :------------ | :---------------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/documents/Tree) | `undefined` | the file system tree |
| `projectName` | `string` | `undefined` | unique name. Often directories are part of the name (e.g., mydir-mylib) |
| `projectConfiguration` | [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration) | `undefined` | project configuration |
| `standalone` | `boolean` | `true` | whether the project is configured in workspace.json or not |
#### Returns
`void`
-9
View File
@@ -1,9 +0,0 @@
# Variable: appRootPath
`Const` **appRootPath**: `string` = `workspaceRoot`
The root of the workspace.
**`Deprecated`**
use workspaceRoot instead
@@ -1,22 +0,0 @@
# Function: applyAdditionalShared
**applyAdditionalShared**(`sharedConfig`, `additionalShared`, `projectGraph`): `void`
Add additional dependencies to the shared package that may not have been
discovered by the project graph.
This can be useful for applications that use a Dependency Injection system
that expects certain Singleton values to be present in the shared injection
hierarchy.
#### Parameters
| Name | Type | Description |
| :----------------- | :--------------------------------------------------------------------------------------- | :--------------------------------- |
| `sharedConfig` | `Record`<`string`, [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig)\> | The original Shared Config |
| `additionalShared` | [`AdditionalSharedConfig`](../../devkit/documents/AdditionalSharedConfig) | The additional dependencies to add |
| `projectGraph` | [`ProjectGraph`](../../devkit/documents/ProjectGraph) | The Nx project graph |
#### Returns
`void`
@@ -1,44 +0,0 @@
# Function: applyChangesToString
**applyChangesToString**(`text`, `changes`): `string`
Applies a list of changes to a string's original value.
This is useful when working with ASTs.
For Example, to rename a property in a method's options:
```typescript
const code = `bootstrap({
target: document.querySelector('#app')
})`;
const indexOfPropertyName = 13; // Usually determined by analyzing an AST.
const updatedCode = applyChangesToString(code, [
{
type: ChangeType.Insert,
index: indexOfPropertyName,
text: 'element',
},
{
type: ChangeType.Delete,
start: indexOfPropertyName,
length: 6,
},
]);
bootstrap({
element: document.querySelector('#app'),
});
```
#### Parameters
| Name | Type |
| :-------- | :------------------------------------------------------ |
| `text` | `string` |
| `changes` | [`StringChange`](../../devkit/documents/StringChange)[] |
#### Returns
`string`
@@ -1,17 +0,0 @@
# Function: applySharedFunction
**applySharedFunction**(`sharedConfig`, `sharedFn`): `void`
Apply a custom function provided by the user that will modify the Shared Config
of the dependencies for the Module Federation build.
#### Parameters
| Name | Type | Description |
| :------------- | :--------------------------------------------------------------------------------------- | :---------------------------------------- |
| `sharedConfig` | `Record`<`string`, [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig)\> | The original Shared Config to be modified |
| `sharedFn` | [`SharedFunction`](../../devkit/documents/SharedFunction) | The custom function to run |
#### Returns
`void`
-5
View File
@@ -1,5 +0,0 @@
# Variable: cacheDir
`Const` **cacheDir**: `string`
Path to the directory where Nx stores its cache and daemon-related files.
@@ -1,17 +0,0 @@
# Function: convertNxExecutor
**convertNxExecutor**(`executor`): `any`
Convert an Nx Executor into an Angular Devkit Builder
Use this to expose a compatible Angular Builder
#### Parameters
| Name | Type |
| :--------- | :-------------------------------------------- |
| `executor` | [`Executor`](../../devkit/documents/Executor) |
#### Returns
`any`
@@ -1,47 +0,0 @@
# Function: convertNxGenerator
**convertNxGenerator**<`T`\>(`generator`, `skipWritingConfigInOldFormat?`): (`generatorOptions`: `T`) => (`tree`: `any`, `context`: `any`) => `Promise`<`any`\>
Convert an Nx Generator into an Angular Devkit Schematic.
#### Type parameters
| Name | Type |
| :--- | :---- |
| `T` | `any` |
#### Parameters
| Name | Type | Description |
| :------------------------------ | :---------------------------------------------------- | :---------------------------------------------------------- |
| `generator` | [`Generator`](../../devkit/documents/Generator)<`T`\> | The Nx generator to convert to an Angular Devkit Schematic. |
| `skipWritingConfigInOldFormat?` | `boolean` | - |
#### Returns
`fn`
▸ (`generatorOptions`): (`tree`: `any`, `context`: `any`) => `Promise`<`any`\>
##### Parameters
| Name | Type |
| :----------------- | :--- |
| `generatorOptions` | `T` |
##### Returns
`fn`
▸ (`tree`, `context`): `Promise`<`any`\>
##### Parameters
| Name | Type |
| :-------- | :---- |
| `tree` | `any` |
| `context` | `any` |
##### Returns
`Promise`<`any`\>
@@ -1,13 +0,0 @@
# Function: createProjectFileMapUsingProjectGraph
**createProjectFileMapUsingProjectGraph**(`graph`): `Promise`<[`ProjectFileMap`](../../devkit/documents/ProjectFileMap)\>
#### Parameters
| Name | Type |
| :------ | :---------------------------------------------------- |
| `graph` | [`ProjectGraph`](../../devkit/documents/ProjectGraph) |
#### Returns
`Promise`<[`ProjectFileMap`](../../devkit/documents/ProjectFileMap)\>
@@ -1,37 +0,0 @@
# Function: createProjectGraphAsync
**createProjectGraphAsync**(`opts?`): `Promise`<[`ProjectGraph`](../../devkit/documents/ProjectGraph)\>
Computes and returns a ProjectGraph.
Nx will compute the graph either in a daemon process or in the current process.
Nx will compute it in the current process if:
- The process is running in CI (CI env variable is to true or other common variables used by CI providers are set).
- It is running in the docker container.
- The daemon process is disabled because of the previous error when starting the daemon.
- `NX_DAEMON` is set to `false`.
- `useDaemonProcess` is set to false in the options of the tasks runner inside `nx.json`
`NX_DAEMON` env variable takes precedence:
- If it is set to true, the daemon will always be used.
- If it is set to false, the graph will always be computed in the current process.
Tip: If you want to debug project graph creation, run your command with NX_DAEMON=false.
Nx uses two layers of caching: the information about explicit dependencies stored on the disk and the information
stored in the daemon process. To reset both run: `nx reset`.
#### Parameters
| Name | Type |
| :------------------------ | :-------- |
| `opts` | `Object` |
| `opts.exitOnError` | `boolean` |
| `opts.resetDaemonClient?` | `boolean` |
#### Returns
`Promise`<[`ProjectGraph`](../../devkit/documents/ProjectGraph)\>
@@ -1,26 +0,0 @@
# Function: defaultTasksRunner
**defaultTasksRunner**(`tasks`, `options`, `context?`): `any`
`any | Promise<{ [id: string]: TaskStatus }>`
will change to Promise<{ [id: string]: TaskStatus }> after Nx 15 is released.
#### Parameters
| Name | Type |
| :--------------------------- | :---------------------------------------------------------------------------------------- |
| `tasks` | [`Task`](../../devkit/documents/Task)[] |
| `options` | [`DefaultTasksRunnerOptions`](../../devkit/documents/DefaultTasksRunnerOptions) |
| `context?` | `Object` |
| `context.daemon?` | `DaemonClient` |
| `context.hasher?` | [`TaskHasher`](../../devkit/documents/TaskHasher) |
| `context.initiatingProject?` | `string` |
| `context.nxArgs` | `NxArgs` |
| `context.nxJson` | [`NxJsonConfiguration`](../../devkit/documents/NxJsonConfiguration)<`string`[] \| `"*"`\> |
| `context.projectGraph` | [`ProjectGraph`](../../devkit/documents/ProjectGraph) |
| `context.target?` | `string` |
| `context.taskGraph?` | [`TaskGraph`](../../devkit/documents/TaskGraph) |
#### Returns
`any`
@@ -1,15 +0,0 @@
# Function: detectPackageManager
**detectPackageManager**(`dir?`): [`PackageManager`](../../devkit/documents/PackageManager)
Detects which package manager is used in the workspace based on the lock file.
#### Parameters
| Name | Type | Default value |
| :---- | :------- | :------------ |
| `dir` | `string` | `''` |
#### Returns
[`PackageManager`](../../devkit/documents/PackageManager)
-62
View File
@@ -1,62 +0,0 @@
# Function: ensurePackage
**ensurePackage**(`tree`, `pkg`, `requiredVersion`, `options?`): `void`
**`Deprecated`**
Use the other function signature without a Tree
Use a package that has not been installed as a dependency.
For example:
```typescript
ensurePackage(tree, '@nx/jest', nxVersion);
```
This install the @nx/jest@<nxVersion> and return the module
When running with --dryRun, the function will throw when dependencies are missing.
Returns null for ESM dependencies. Import them with a dynamic import instead.
#### Parameters
| Name | Type | Description |
| :------------------------ | :------------------------------------ | :----------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/documents/Tree) | the file system tree |
| `pkg` | `string` | the package to check (e.g. @nx/jest) |
| `requiredVersion` | `string` | the version or semver range to check (e.g. ~1.0.0, >=1.0.0 <2.0.0) |
| `options?` | `Object` | - |
| `options.dev?` | `boolean` | - |
| `options.throwOnMissing?` | `boolean` | - |
#### Returns
`void`
**ensurePackage**<`T`\>(`pkg`, `version`): `T`
Ensure that dependencies and devDependencies from package.json are installed at the required versions.
Returns null for ESM dependencies. Import them with a dynamic import instead.
For example:
```typescript
ensurePackage('@nx/jest', nxVersion);
```
#### Type parameters
| Name | Type |
| :--- | :------------------------ |
| `T` | extends `unknown` = `any` |
#### Parameters
| Name | Type | Description |
| :-------- | :------- | :---------------------------------------------------------- |
| `pkg` | `string` | the package to install and require |
| `version` | `string` | the version to install if the package doesn't exist already |
#### Returns
`T`
@@ -1,20 +0,0 @@
# Function: extractLayoutDirectory
**extractLayoutDirectory**(`directory`): `Object`
Experimental
#### Parameters
| Name | Type |
| :---------- | :------- |
| `directory` | `string` |
#### Returns
`Object`
| Name | Type |
| :----------------- | :------- |
| `layoutDirectory` | `string` |
| `projectDirectory` | `string` |
-15
View File
@@ -1,15 +0,0 @@
# Function: formatFiles
**formatFiles**(`tree`): `Promise`<`void`\>
Formats all the created or updated files using Prettier
#### Parameters
| Name | Type | Description |
| :----- | :------------------------------------ | :------------------- |
| `tree` | [`Tree`](../../devkit/documents/Tree) | the file system tree |
#### Returns
`Promise`<`void`\>
-38
View File
@@ -1,38 +0,0 @@
# Function: generateFiles
**generateFiles**(`tree`, `srcFolder`, `target`, `substitutions`): `void`
Generates a folder of files based on provided templates.
While doing so it performs two substitutions:
- Substitutes segments of file names surrounded by \_\_
- Uses ejs to substitute values in templates
Examples:
```typescript
generateFiles(tree, path.join(__dirname, 'files'), './tools/scripts', {
tmpl: '',
name: 'myscript',
});
```
This command will take all the files from the `files` directory next to the place where the command is invoked from.
It will replace all `__tmpl__` with '' and all `__name__` with 'myscript' in the file names, and will replace all
`<%= name %>` with `myscript` in the files themselves.
`tmpl: ''` is a common pattern. With it you can name files like this: `index.ts__tmpl__`, so your editor
doesn't get confused about incorrect TypeScript files.
#### Parameters
| Name | Type | Description |
| :-------------- | :------------------------------------ | :-------------------------------------------- |
| `tree` | [`Tree`](../../devkit/documents/Tree) | the file system tree |
| `srcFolder` | `string` | the source folder of files (absolute path) |
| `target` | `string` | the target folder (relative to the tree root) |
| `substitutions` | `Object` | an object of key-value pairs |
#### Returns
`void`
@@ -1,19 +0,0 @@
# Function: getDependentPackagesForProject
**getDependentPackagesForProject**(`projectGraph`, `name`): `Object`
#### Parameters
| Name | Type |
| :------------- | :---------------------------------------------------- |
| `projectGraph` | [`ProjectGraph`](../../devkit/documents/ProjectGraph) |
| `name` | `string` |
#### Returns
`Object`
| Name | Type |
| :------------------- | :-------------------------------------------------------------- |
| `npmPackages` | `string`[] |
| `workspaceLibraries` | [`WorkspaceLibrary`](../../devkit/documents/WorkspaceLibrary)[] |
@@ -1,17 +0,0 @@
# Function: getNpmPackageSharedConfig
**getNpmPackageSharedConfig**(`pkgName`, `version`): [`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig) \| `undefined`
Build the Module Federation Share Config for a specific package and the
specified version of that package.
#### Parameters
| Name | Type | Description |
| :-------- | :------- | :----------------------------------------------------------------------------- |
| `pkgName` | `string` | Name of the package to share |
| `version` | `string` | Version of the package to require by other apps in the Module Federation setup |
#### Returns
[`SharedLibraryConfig`](../../devkit/documents/SharedLibraryConfig) \| `undefined`
@@ -1,16 +0,0 @@
# Function: getOutputsForTargetAndConfiguration
**getOutputsForTargetAndConfiguration**(`task`, `node`): `string`[]
Returns the list of outputs that will be cached.
#### Parameters
| Name | Type | Description |
| :----- | :-------------------------------------------------------------------------- | :-------------------------------------------------------- |
| `task` | `Pick`<[`Task`](../../devkit/documents/Task), `"overrides"` \| `"target"`\> | target + overrides |
| `node` | [`ProjectGraphProjectNode`](../../devkit/documents/ProjectGraphProjectNode) | ProjectGraphProjectNode object that the task runs against |
#### Returns
`string`[]
@@ -1,24 +0,0 @@
# Function: getPackageManagerCommand
**getPackageManagerCommand**(`packageManager?`, `root?`): `PackageManagerCommands`
Returns commands for the package manager used in the workspace.
By default, the package manager is derived based on the lock file,
but it can also be passed in explicitly.
Example:
```javascript
execSync(`${getPackageManagerCommand().addDev} my-dev-package`);
```
#### Parameters
| Name | Type | Default value | Description |
| :--------------- | :-------------------------------------------------------- | :-------------- | :------------------------------------------------------------------------------------------ |
| `packageManager` | [`PackageManager`](../../devkit/documents/PackageManager) | `undefined` | The package manager to use. If not provided, it will be detected based on the lock file. |
| `root` | `string` | `workspaceRoot` | The directory the commands will be ran inside of. Defaults to the current workspace's root. |
#### Returns
`PackageManagerCommands`
@@ -1,18 +0,0 @@
# Function: getPackageManagerVersion
**getPackageManagerVersion**(`packageManager?`, `cwd?`): `string`
Returns the version of the package manager used in the workspace.
By default, the package manager is derived based on the lock file,
but it can also be passed in explicitly.
#### Parameters
| Name | Type |
| :--------------- | :-------------------------------------------------------- |
| `packageManager` | [`PackageManager`](../../devkit/documents/PackageManager) |
| `cwd` | `string` |
#### Returns
`string`

Some files were not shown because too many files have changed in this diff Show More