docs(misc): add custom runners migration doc
This commit is contained in:
parent
567a3f7ce7
commit
ca89f14eb3
@ -3983,6 +3983,14 @@
|
|||||||
"id": "powerpack",
|
"id": "powerpack",
|
||||||
"isExternal": false,
|
"isExternal": false,
|
||||||
"children": [
|
"children": [
|
||||||
|
{
|
||||||
|
"name": "Free Licenses & Trials",
|
||||||
|
"path": "/nx-enterprise/powerpack/free-licenses-and-trials",
|
||||||
|
"id": "free-licenses-and-trials",
|
||||||
|
"isExternal": false,
|
||||||
|
"children": [],
|
||||||
|
"disableCollapsible": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Run Language-Agnostic Conformance Rules",
|
"name": "Run Language-Agnostic Conformance Rules",
|
||||||
"path": "/nx-enterprise/powerpack/conformance",
|
"path": "/nx-enterprise/powerpack/conformance",
|
||||||
@ -4027,6 +4035,14 @@
|
|||||||
"id": "powerpack",
|
"id": "powerpack",
|
||||||
"isExternal": false,
|
"isExternal": false,
|
||||||
"children": [
|
"children": [
|
||||||
|
{
|
||||||
|
"name": "Free Licenses & Trials",
|
||||||
|
"path": "/nx-enterprise/powerpack/free-licenses-and-trials",
|
||||||
|
"id": "free-licenses-and-trials",
|
||||||
|
"isExternal": false,
|
||||||
|
"children": [],
|
||||||
|
"disableCollapsible": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Run Language-Agnostic Conformance Rules",
|
"name": "Run Language-Agnostic Conformance Rules",
|
||||||
"path": "/nx-enterprise/powerpack/conformance",
|
"path": "/nx-enterprise/powerpack/conformance",
|
||||||
@ -4054,6 +4070,14 @@
|
|||||||
],
|
],
|
||||||
"disableCollapsible": false
|
"disableCollapsible": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Free Licenses & Trials",
|
||||||
|
"path": "/nx-enterprise/powerpack/free-licenses-and-trials",
|
||||||
|
"id": "free-licenses-and-trials",
|
||||||
|
"isExternal": false,
|
||||||
|
"children": [],
|
||||||
|
"disableCollapsible": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Run Language-Agnostic Conformance Rules",
|
"name": "Run Language-Agnostic Conformance Rules",
|
||||||
"path": "/nx-enterprise/powerpack/conformance",
|
"path": "/nx-enterprise/powerpack/conformance",
|
||||||
@ -4883,6 +4907,14 @@
|
|||||||
"children": [],
|
"children": [],
|
||||||
"disableCollapsible": false
|
"disableCollapsible": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Custom Tasks Runner",
|
||||||
|
"path": "/deprecated/custom-tasks-runner",
|
||||||
|
"id": "custom-tasks-runner",
|
||||||
|
"isExternal": false,
|
||||||
|
"children": [],
|
||||||
|
"disableCollapsible": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Workspace Executors",
|
"name": "Workspace Executors",
|
||||||
"path": "/deprecated/workspace-executors",
|
"path": "/deprecated/workspace-executors",
|
||||||
@ -5006,6 +5038,14 @@
|
|||||||
"children": [],
|
"children": [],
|
||||||
"disableCollapsible": false
|
"disableCollapsible": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Custom Tasks Runner",
|
||||||
|
"path": "/deprecated/custom-tasks-runner",
|
||||||
|
"id": "custom-tasks-runner",
|
||||||
|
"isExternal": false,
|
||||||
|
"children": [],
|
||||||
|
"disableCollapsible": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Workspace Executors",
|
"name": "Workspace Executors",
|
||||||
"path": "/deprecated/workspace-executors",
|
"path": "/deprecated/workspace-executors",
|
||||||
|
|||||||
@ -5457,6 +5457,17 @@
|
|||||||
"mediaImage": "",
|
"mediaImage": "",
|
||||||
"file": "shared/features/powerpack/index",
|
"file": "shared/features/powerpack/index",
|
||||||
"itemList": [
|
"itemList": [
|
||||||
|
{
|
||||||
|
"id": "free-licenses-and-trials",
|
||||||
|
"name": "Free Licenses & Trials",
|
||||||
|
"description": "",
|
||||||
|
"mediaImage": "",
|
||||||
|
"file": "shared/features/powerpack/free-licenses-and-trials",
|
||||||
|
"itemList": [],
|
||||||
|
"isExternal": false,
|
||||||
|
"path": "/nx-enterprise/powerpack/free-licenses-and-trials",
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "conformance",
|
"id": "conformance",
|
||||||
"name": "Run Language-Agnostic Conformance Rules",
|
"name": "Run Language-Agnostic Conformance Rules",
|
||||||
@ -5518,6 +5529,17 @@
|
|||||||
"mediaImage": "",
|
"mediaImage": "",
|
||||||
"file": "shared/features/powerpack/index",
|
"file": "shared/features/powerpack/index",
|
||||||
"itemList": [
|
"itemList": [
|
||||||
|
{
|
||||||
|
"id": "free-licenses-and-trials",
|
||||||
|
"name": "Free Licenses & Trials",
|
||||||
|
"description": "",
|
||||||
|
"mediaImage": "",
|
||||||
|
"file": "shared/features/powerpack/free-licenses-and-trials",
|
||||||
|
"itemList": [],
|
||||||
|
"isExternal": false,
|
||||||
|
"path": "/nx-enterprise/powerpack/free-licenses-and-trials",
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "conformance",
|
"id": "conformance",
|
||||||
"name": "Run Language-Agnostic Conformance Rules",
|
"name": "Run Language-Agnostic Conformance Rules",
|
||||||
@ -5556,6 +5578,17 @@
|
|||||||
"path": "/nx-enterprise/powerpack",
|
"path": "/nx-enterprise/powerpack",
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
|
"/nx-enterprise/powerpack/free-licenses-and-trials": {
|
||||||
|
"id": "free-licenses-and-trials",
|
||||||
|
"name": "Free Licenses & Trials",
|
||||||
|
"description": "",
|
||||||
|
"mediaImage": "",
|
||||||
|
"file": "shared/features/powerpack/free-licenses-and-trials",
|
||||||
|
"itemList": [],
|
||||||
|
"isExternal": false,
|
||||||
|
"path": "/nx-enterprise/powerpack/free-licenses-and-trials",
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
"/nx-enterprise/powerpack/conformance": {
|
"/nx-enterprise/powerpack/conformance": {
|
||||||
"id": "conformance",
|
"id": "conformance",
|
||||||
"name": "Run Language-Agnostic Conformance Rules",
|
"name": "Run Language-Agnostic Conformance Rules",
|
||||||
@ -6692,6 +6725,17 @@
|
|||||||
"path": "/deprecated/legacy-cache",
|
"path": "/deprecated/legacy-cache",
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "custom-tasks-runner",
|
||||||
|
"name": "Custom Tasks Runner",
|
||||||
|
"description": "",
|
||||||
|
"mediaImage": "",
|
||||||
|
"file": "shared/deprecated/custom-tasks-runner",
|
||||||
|
"itemList": [],
|
||||||
|
"isExternal": false,
|
||||||
|
"path": "/deprecated/custom-tasks-runner",
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "workspace-executors",
|
"id": "workspace-executors",
|
||||||
"name": "Workspace Executors",
|
"name": "Workspace Executors",
|
||||||
@ -6862,6 +6906,17 @@
|
|||||||
"path": "/deprecated/legacy-cache",
|
"path": "/deprecated/legacy-cache",
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
|
"/deprecated/custom-tasks-runner": {
|
||||||
|
"id": "custom-tasks-runner",
|
||||||
|
"name": "Custom Tasks Runner",
|
||||||
|
"description": "",
|
||||||
|
"mediaImage": "",
|
||||||
|
"file": "shared/deprecated/custom-tasks-runner",
|
||||||
|
"itemList": [],
|
||||||
|
"isExternal": false,
|
||||||
|
"path": "/deprecated/custom-tasks-runner",
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
"/deprecated/workspace-executors": {
|
"/deprecated/workspace-executors": {
|
||||||
"id": "workspace-executors",
|
"id": "workspace-executors",
|
||||||
"name": "Workspace Executors",
|
"name": "Workspace Executors",
|
||||||
|
|||||||
@ -1124,6 +1124,11 @@
|
|||||||
"description": "Nx Powerpack is a suite of paid extensions for the Nx CLI specifically designed for enterprises.",
|
"description": "Nx Powerpack is a suite of paid extensions for the Nx CLI specifically designed for enterprises.",
|
||||||
"file": "shared/features/powerpack/index",
|
"file": "shared/features/powerpack/index",
|
||||||
"itemList": [
|
"itemList": [
|
||||||
|
{
|
||||||
|
"name": "Free Licenses & Trials",
|
||||||
|
"id": "free-licenses-and-trials",
|
||||||
|
"file": "shared/features/powerpack/free-licenses-and-trials"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Run Language-Agnostic Conformance Rules",
|
"name": "Run Language-Agnostic Conformance Rules",
|
||||||
"description": "Write and apply rules for your Nx workspace",
|
"description": "Write and apply rules for your Nx workspace",
|
||||||
@ -1416,6 +1421,11 @@
|
|||||||
"id": "legacy-cache",
|
"id": "legacy-cache",
|
||||||
"file": "shared/deprecated/legacy-cache"
|
"file": "shared/deprecated/legacy-cache"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Custom Tasks Runner",
|
||||||
|
"id": "custom-tasks-runner",
|
||||||
|
"file": "shared/deprecated/custom-tasks-runner"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Workspace Executors",
|
"name": "Workspace Executors",
|
||||||
"id": "workspace-executors",
|
"id": "workspace-executors",
|
||||||
|
|||||||
238
docs/shared/deprecated/custom-tasks-runner.md
Normal file
238
docs/shared/deprecated/custom-tasks-runner.md
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
# Deprecating Custom Tasks Runner
|
||||||
|
|
||||||
|
The Nx core has been migrated to Rust. However, the Custom Tasks Runner API is not compatible with this rewrite because it allows modifications to the lifecycle of the Nx command execution, which could break important invariants that Nx depends on.
|
||||||
|
|
||||||
|
The custom task runners API was created many years ago and has not been supported for several years. It was developed before we introduced a formal method for extending Nx through plugins. The new API leverages the plugins API for better performance and functionality.
|
||||||
|
|
||||||
|
## The preTasksExecution and postTasksExecution hooks
|
||||||
|
|
||||||
|
### Custom Tasks Runner Version
|
||||||
|
|
||||||
|
Let’s imagine that you have implemented a custom task runner as follows:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
function serializeTasksResults(taskResults: { [taskId: string]: TaskResult }) {
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
||||||
|
function validateEnv() {
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function customTasksRunner(tasks, options, context) {
|
||||||
|
if (process.env.QA_ENV) {
|
||||||
|
process.env.NX_SKIP_NX_CACHE = 'true';
|
||||||
|
}
|
||||||
|
if (!validateEnv()) {
|
||||||
|
throw new Error('Env is not set up correctly');
|
||||||
|
}
|
||||||
|
const allTaskResults = {};
|
||||||
|
const lifeCyle = {
|
||||||
|
endTasks(taskResults) {
|
||||||
|
taskResults.forEach((tr) => {
|
||||||
|
allTaskResults[tr.task.id] = tr;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const ret = await defaultTasksRunner(
|
||||||
|
tasks,
|
||||||
|
{ ...options, lifeCyle },
|
||||||
|
context
|
||||||
|
);
|
||||||
|
if (options.reportAnalytics) {
|
||||||
|
await fetch(process.env.DATACAT_API, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
body: serializeTasksResults(allTaskResults),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
And let's imagine you configured it in `nx.json` as follows:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tasksRunnerOptions": {
|
||||||
|
"default": {
|
||||||
|
"runner": "npm-package-with-custom-tasks-runner",
|
||||||
|
"options": {
|
||||||
|
"reportAnalytics": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### New API
|
||||||
|
|
||||||
|
The new API includes `preTasksExecution` and `postTasksExecution` hooks that plugins can register. These hooks do not affect task execution and cannot violate any invariants.
|
||||||
|
|
||||||
|
The custom task runner above can be implemented as follows:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
function serializeTasksResults(taskResults: { [taskId: string]: TaskResult }) {
|
||||||
|
// task results contain timings and status information useful for gathering analytics
|
||||||
|
}
|
||||||
|
|
||||||
|
function validateEnv() {
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
||||||
|
// context contains workspaceRoot and nx.json configuration
|
||||||
|
export async function preTasksExecution(options: any, context) {
|
||||||
|
if (process.env.QA_ENV) {
|
||||||
|
process.env.NX_SKIP_NX_CACHE = 'true';
|
||||||
|
}
|
||||||
|
if (!validateEnv()) {
|
||||||
|
throw new Error('Env is not set up correctly');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// context contains workspaceRoot, nx.json configuration, and task results
|
||||||
|
export async function postTasksExecution(options: any, context) {
|
||||||
|
if (options.reportAnalytics) {
|
||||||
|
await fetch(process.env.DATACAT_API, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
body: serializeTasksResults(context.taskResults),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Because it's a regular plugin, it can be configured as follows in `nx.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"plugin": "npm-package-with-the-plugin",
|
||||||
|
"options": {
|
||||||
|
"reportAnalytics": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
As with all plugin hooks, the `preTasksExecution` and `postTasksExecution` hooks must be exported so that they load properly when the "npm-package-with-the-plugin" is initialized.
|
||||||
|
|
||||||
|
### Multiple Tasks Runners
|
||||||
|
|
||||||
|
You can implement multiple tasks runners using the new hooks.
|
||||||
|
|
||||||
|
Imagine you have the following `nx.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tasksRunnerOptions": {
|
||||||
|
"a": {
|
||||||
|
"runner": "package-a"
|
||||||
|
},
|
||||||
|
"b": {
|
||||||
|
"runner": "package-b"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
You can replace it with two plugins:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"plugin": "package-a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"plugin": "package-b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Simple add a condition to your hooks as follows:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
export async function preTasksExecution() {
|
||||||
|
if (process.env.RUNNER != 'a') return;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function postTasksExecution(options, tasksResults) {
|
||||||
|
if (process.env.RUNNER != 'a') return;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then choose which hooks ot use by setting the RUNNER env variable.
|
||||||
|
|
||||||
|
### Passing Options
|
||||||
|
|
||||||
|
You can no longer augment options passed in to the default tasks runner, so instead you need to set env variables in the `preTasksExecution` hook.
|
||||||
|
|
||||||
|
### Composing Plugins
|
||||||
|
|
||||||
|
Implementing hooks in plugins offers several advantages. It allows multiple plugins to be loaded simultaneously, enabling a clean separation of concerns.
|
||||||
|
|
||||||
|
### Keeping State Across Command Invocations
|
||||||
|
|
||||||
|
By default, every plugin initiates a long-running process, allowing you to maintain state across command invocations, which can be very useful for advanced analytics.
|
||||||
|
|
||||||
|
## Self-Hosted Remote Cache
|
||||||
|
|
||||||
|
The `preTasksExecution` and `postTasksExecution` hooks cannot modify the execution of tasks, making it impossible to use them for implementing a remote cache. Instead, you should [install and activate one of the Nx Powerpack packages](/nx-enterprise/activate-powerpack). Nx Powerpack does not make requests to external APIs, nor does it collect or send any data. **Additionally, it offers more security and prevents cache poisoning, unlike DIY solutions.**
|
||||||
|
|
||||||
|
We recognize that many organizations have been using DIY remote cache solutions. Therefore, we have made the migration to Nx Powerpack as streamlined as possible.
|
||||||
|
|
||||||
|
{% call-to-action title="Get a License and Activate Powerpack" icon="nx" description="Unlock all the features of the Nx CLI" url="/nx-enterprise/activate-powerpack" /%}
|
||||||
|
|
||||||
|
### Example Configuration Change
|
||||||
|
|
||||||
|
Enabling a Nx Powerpack plugin will configure it in `nx.json`. The specific modification depends on your repository’s configuration. The following is one example, where a custom tasks runner configuration in `nx.json` will be removed:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tasksRunnerOptions": {
|
||||||
|
"default": {
|
||||||
|
"runner": "@nx-aws-plugin/nx-aws-cache",
|
||||||
|
"options": {
|
||||||
|
"awsAccessKeyId": "key",
|
||||||
|
"awsSecretAccessKey": "secret",
|
||||||
|
"awsForcePathStyle": true,
|
||||||
|
"awsEndpoint": "http://custom",
|
||||||
|
"awsBucket": "my-bucket",
|
||||||
|
"awsRegion": "eu-central-1",
|
||||||
|
"encryptionFileKey": "key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
And replaced with:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"s3": {
|
||||||
|
"accessKeyId": "key",
|
||||||
|
"secretAccessKey": "secret",
|
||||||
|
"forcePathStyle": true,
|
||||||
|
"endpoint": "http://custom",
|
||||||
|
"bucket": "my-bucket",
|
||||||
|
"region": "eu-central-1",
|
||||||
|
"encryptionFileKey": "key",
|
||||||
|
"localMode": "read-write"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The API documentation for each plugin describes the available options.
|
||||||
|
|
||||||
|
## Unhandled Custom Tasks Runner Use Cases?
|
||||||
|
|
||||||
|
If you have a use case that the new API doesn't handle, please [open an issue](http://github.com/nrwl/nx).
|
||||||
@ -13,11 +13,13 @@ If you are currently using a custom task runner or the `NX_REJECT_UNKNOWN_LOCAL_
|
|||||||
|
|
||||||
As of Nx 20, the `tasksRunnerOptions` property in `nx.json` is deprecated. This property was used to register custom task runners. `tasksRunnerOptions` and custom task runners will not work with the new database cache.
|
As of Nx 20, the `tasksRunnerOptions` property in `nx.json` is deprecated. This property was used to register custom task runners. `tasksRunnerOptions` and custom task runners will not work with the new database cache.
|
||||||
|
|
||||||
If you are using `tasksRunnerOptions`, you have a few options moving forward:
|
If you are using a custom tasks runner to customize your cache, you have the following options:
|
||||||
|
|
||||||
1. Use [Nx Cloud](/nx-cloud) for your remote cache. This is the safest, lowest-maintenance, most recommended option
|
Use [Nx Cloud](/nx-cloud) for your remote cache. This is the safest, lowest-maintenance, most recommended option.
|
||||||
2. If you cannot use Nx Cloud, consider an [Nx Powerpack](/powerpack) plugin for caching: [Amazon S3](/nx-api/powerpack-s3-cache), [Google Cloud](/nx-api/powerpack-gcs-cache), [Azure](/nx-api/powerpack-azure-cache) or a [shared network drive](/nx-api/powerpack-shared-fs-cache)
|
|
||||||
3. If there is no Powerpack plugin that supports the service where you want to store the remote cache, [file an issue](https://github.com/nrwl/nx/issues/new)
|
If you cannot use Nx Cloud, consider an [Nx Powerpack](/powerpack) plugin for caching: [Amazon S3](/nx-api/powerpack-s3-cache), [Google Cloud](/nx-api/powerpack-gcs-cache), [Azure](/nx-api/powerpack-azure-cache) or a [shared network drive](/nx-api/powerpack-shared-fs-cache). If there is no Powerpack plugin that supports the service where you want to store the remote cache, [file an issue](https://github.com/nrwl/nx/issues/new).
|
||||||
|
|
||||||
|
**To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner).**
|
||||||
|
|
||||||
## NX_REJECT_UNKNOWN_LOCAL_CACHE
|
## NX_REJECT_UNKNOWN_LOCAL_CACHE
|
||||||
|
|
||||||
|
|||||||
BIN
docs/shared/features/powerpack/NxPowerpack-Trial-v1.1.pdf
Normal file
BIN
docs/shared/features/powerpack/NxPowerpack-Trial-v1.1.pdf
Normal file
Binary file not shown.
@ -15,7 +15,7 @@ The plugin also provides the following pre-written rules:
|
|||||||
|
|
||||||
The `@nx/powerpack-conformance` plugin requires an Nx Powerpack license to function. [Activating Powerpack](/nx-enterprise/activate-powerpack) is a simple process.
|
The `@nx/powerpack-conformance` plugin requires an Nx Powerpack license to function. [Activating Powerpack](/nx-enterprise/activate-powerpack) is a simple process.
|
||||||
|
|
||||||
{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of Nx" url="https://cloud.nx.app/powerpack/purchase" /%}
|
{% call-to-action title="Get a License and Activate Powerpack" icon="nx" description="Unlock all the features of the Nx CLI" url="/nx-enterprise/activate-powerpack" /%}
|
||||||
|
|
||||||
Then, add the Conformance plugin to your workspace.
|
Then, add the Conformance plugin to your workspace.
|
||||||
|
|
||||||
|
|||||||
@ -12,11 +12,17 @@ The recommended way to enable the [remote cache](/ci/features/remote-cache) is t
|
|||||||
|
|
||||||
The options range from fully opting in to Nx's management of the remote cache to fully managing the configuration and security of your own remote cache.
|
The options range from fully opting in to Nx's management of the remote cache to fully managing the configuration and security of your own remote cache.
|
||||||
|
|
||||||
|
## Migrating from Custom Tasks Runners
|
||||||
|
|
||||||
|
Many people who are interested in Nx Powerpack have previously used custom task runners. Nx offers a new and simpler extension API designed to meet the same use cases as the now-deprecated custom task runners.
|
||||||
|
|
||||||
|
To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner).
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
All the self-hosted cache storage plugins require an Nx Powerpack license to function. [Activating Powerpack](/nx-enterprise/activate-powerpack) is a simple process.
|
All the self-hosted cache storage plugins require an Nx Powerpack license to function. [Activating Powerpack](/nx-enterprise/activate-powerpack) is a simple process.
|
||||||
|
|
||||||
{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of the Nx CLI" url="https://cloud.nx.app/powerpack/purchase" /%}
|
{% call-to-action title="Get a License and Activate Powerpack" icon="nx" description="Unlock all the features of the Nx CLI" url="/nx-enterprise/activate-powerpack" /%}
|
||||||
|
|
||||||
Then, choose the appropriate cache plugin for your situation.
|
Then, choose the appropriate cache plugin for your situation.
|
||||||
|
|
||||||
|
|||||||
27
docs/shared/features/powerpack/free-licenses-and-trials.md
Normal file
27
docs/shared/features/powerpack/free-licenses-and-trials.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Powerpack Free Licenses and Trials
|
||||||
|
|
||||||
|
## Free Licenses Enabling Self-Hosted Remote Cache
|
||||||
|
|
||||||
|
We value small teams using Nx. That's why we provide a free, remote cache-only license to any company with fewer than 30 engineers using Nx.
|
||||||
|
|
||||||
|
All licenses are perpetual, so you can use the latest version of Nx available to you while your license remains active, even after it expires.
|
||||||
|
|
||||||
|
[Get Your Free License Immediately](https://cloud.nx.app/powerpack/request/free)
|
||||||
|
|
||||||
|
We understand that some organizations may not neatly fit this definition (e.g., a larger organization with a small number of engineers using an Nx workspace). We'd like to unblock you. [Please reach out.](powerpack-support@nrwl.io)
|
||||||
|
|
||||||
|
## OSS License
|
||||||
|
|
||||||
|
We offer free, full-featured, Nx Powerpack licences to open source projects. [Apply for a free OSS license](https://docs.google.com/forms/d/e/1FAIpQLSczHgY1NuT1k8paVNO3TcR9cjTfpm6dg1zbG3Ji6zaLURYfcg/viewform).
|
||||||
|
|
||||||
|
## Free Trial Licenses
|
||||||
|
|
||||||
|
You can get a free, 30-day license immediately if you want to try Nx Powerpack. We're here to support you—whether that means extending your trial or helping with the installation. [Learn more about Nx Powerpack trials.](/assets/powerpack/NxPowerpack-Trial-v1.1.pdf)
|
||||||
|
|
||||||
|
[Get Your Trial License Immediately](https://cloud.nx.app/powerpack/request/trial)
|
||||||
|
|
||||||
|
If you're having trouble, [reach out for help.](powerpack-support@nrwl.io)
|
||||||
|
|
||||||
|
## Extended Trial Periods
|
||||||
|
|
||||||
|
Nx Powerpack does not make any requests to external APIs, and activating Powerpack can be completed in just a few minutes. However, we understand that in many large organizations approval processes can take a long time. We're here to help you. Need a trial extension or help with your business case? [Reach out and we'll help.](powerpack-support@nrwl.io)
|
||||||
@ -10,7 +10,7 @@ The atomic unit of code in an Nx workspace is a project. Tasks, module boundarie
|
|||||||
|
|
||||||
The `@nx/powerpack-owners` plugin requires an Nx Powerpack license to function. [Activating Powerpack](/nx-enterprise/activate-powerpack) is a simple process.
|
The `@nx/powerpack-owners` plugin requires an Nx Powerpack license to function. [Activating Powerpack](/nx-enterprise/activate-powerpack) is a simple process.
|
||||||
|
|
||||||
{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of Nx" url="https://cloud.nx.app/powerpack/purchase" /%}
|
{% call-to-action title="Get a License and Activate Powerpack" icon="nx" description="Unlock all the features of the Nx CLI" url="/nx-enterprise/activate-powerpack" /%}
|
||||||
|
|
||||||
Then, add the Owners plugin to your workspace.
|
Then, add the Owners plugin to your workspace.
|
||||||
|
|
||||||
|
|||||||
@ -7,10 +7,6 @@ The `@nx/powerpack-azure-cache` plugin enables you to use [Azure Storage](https:
|
|||||||
|
|
||||||
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
|
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
|
||||||
|
|
||||||
{% callout type="warning" title="Potential Cache Poisoning" %}
|
|
||||||
Using your own Azure Storage account to host the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache).
|
|
||||||
{% /callout %}
|
|
||||||
|
|
||||||
{% callout title="This plugin requires an active Nx Powerpack license" %}
|
{% callout title="This plugin requires an active Nx Powerpack license" %}
|
||||||
In order to use `@nx/powerpack-azure-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache.
|
In order to use `@nx/powerpack-azure-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache.
|
||||||
{% /callout %}
|
{% /callout %}
|
||||||
@ -19,7 +15,7 @@ In order to use `@nx/powerpack-azure-cache`, you need to have an active Powerpac
|
|||||||
|
|
||||||
### 1. Install the Package
|
### 1. Install the Package
|
||||||
|
|
||||||
1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already
|
1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already. It only takes a minute.
|
||||||
2. Install the package
|
2. Install the package
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@ -82,6 +78,12 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `contain
|
|||||||
| **container** | The name of the container to use |
|
| **container** | The name of the container to use |
|
||||||
| **accountName** | The name of blob storage account |
|
| **accountName** | The name of blob storage account |
|
||||||
|
|
||||||
|
### Migrating from Custom Tasks Runners
|
||||||
|
|
||||||
|
Many people who are interested in Nx Powerpack have previously used custom task runners. Nx offers a new and simpler extension API designed to meet the same use cases as the now-deprecated custom task runners.
|
||||||
|
|
||||||
|
To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner).
|
||||||
|
|
||||||
# Cache Modes
|
# Cache Modes
|
||||||
|
|
||||||
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
|
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
|
||||||
|
|||||||
@ -7,10 +7,6 @@ The `@nx/powerpack-gcs-cache` plugin enables you to use [Google Cloud Storage](h
|
|||||||
|
|
||||||
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
|
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
|
||||||
|
|
||||||
{% callout type="warning" title="Potential Cache Poisoning" %}
|
|
||||||
Using your own Google Cloud Storage account to host the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache).
|
|
||||||
{% /callout %}
|
|
||||||
|
|
||||||
{% callout title="This plugin requires an active Nx Powerpack license" %}
|
{% callout title="This plugin requires an active Nx Powerpack license" %}
|
||||||
In order to use `@nx/powerpack-gcs-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache.
|
In order to use `@nx/powerpack-gcs-cache`, you need to have an active Powerpack license. If you don't have a license or it has expired, your cache will no longer be shared and each machine will use its local cache.
|
||||||
{% /callout %}
|
{% /callout %}
|
||||||
@ -19,7 +15,7 @@ In order to use `@nx/powerpack-gcs-cache`, you need to have an active Powerpack
|
|||||||
|
|
||||||
### 1. Install the Package
|
### 1. Install the Package
|
||||||
|
|
||||||
1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already
|
1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already. It only takes a minute.
|
||||||
2. Install the package
|
2. Install the package
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@ -81,6 +77,12 @@ Finally, you need to configure your Nx cache in the `nx.json` file. The `bucket`
|
|||||||
| ------------ | ----------------------------- |
|
| ------------ | ----------------------------- |
|
||||||
| **bucket** | The name of the bucket to use |
|
| **bucket** | The name of the bucket to use |
|
||||||
|
|
||||||
|
### Migrating from Custom Tasks Runners
|
||||||
|
|
||||||
|
Many people who are interested in Nx Powerpack have previously used custom task runners. Nx offers a new and simpler extension API designed to meet the same use cases as the now-deprecated custom task runners.
|
||||||
|
|
||||||
|
To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner).
|
||||||
|
|
||||||
# Cache Modes
|
# Cache Modes
|
||||||
|
|
||||||
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
|
By default, Nx will try to write and read from the remote cache while running locally. This means that permissions must be set for users who are expected to access the remote cache.
|
||||||
|
|||||||
@ -7,8 +7,8 @@ The `@nx/powerpack-s3-cache` plugin enables you to use an [Amazon S3](https://aw
|
|||||||
|
|
||||||
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
|
This plugin will enable the remote cache for your Nx workspace, but does not provide any of the other features of Nx Cloud. If you want to leverage [distributed task execution](/ci/features/distribute-task-execution), [re-running flaky tasks](/ci/features/flaky-tasks) or [automatically splitting tasks](/ci/features/split-e2e-tasks), you'll need to [connect to Nx Cloud](/ci/intro/connect-to-nx-cloud) and use [Nx Replay](/ci/features/remote-cache) instead.
|
||||||
|
|
||||||
{% callout type="warning" title="Potential Cache Poisoning" %}
|
{% callout title="No Cache Poisoning" %}
|
||||||
Using your own Amazon S3 bucket to host the remote cache opens you up to the possibility of [cache poisoning](/troubleshooting/unknown-local-cache). To avoid this, use [Nx Replay](/ci/features/remote-cache).
|
`@nx/powerpack-s3-cache` implements content integrity checks to prevent cache poisoning, making it a more secure solution than previous DIY approaches.
|
||||||
{% /callout %}
|
{% /callout %}
|
||||||
|
|
||||||
{% callout title="This plugin requires an active Nx Powerpack license" %}
|
{% callout title="This plugin requires an active Nx Powerpack license" %}
|
||||||
@ -19,7 +19,7 @@ In order to use `@nx/powerpack-s3-cache`, you need to have an active Powerpack l
|
|||||||
|
|
||||||
### 1. Install the Package
|
### 1. Install the Package
|
||||||
|
|
||||||
1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already
|
1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already. It only takes a minute.
|
||||||
2. Install the package
|
2. Install the package
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@ -180,3 +180,9 @@ The cache mode in CI can also be configured by setting `ciMode` to `read-only` o
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Migrating from Custom Tasks Runners
|
||||||
|
|
||||||
|
Many people who are interested in Nx Powerpack have previously used custom task runners. Nx offers a new and simpler extension API designed to meet the same use cases as the now-deprecated custom task runners.
|
||||||
|
|
||||||
|
To learn more about migrating from custom task runners, [please refer to this detailed guide](/deprecated/custom-tasks-runner).
|
||||||
|
|||||||
@ -19,7 +19,7 @@ In order to use `@nx/powerpack-shared-fs-cache`, you need to have an active Powe
|
|||||||
|
|
||||||
### 1. Install the Package
|
### 1. Install the Package
|
||||||
|
|
||||||
1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already
|
1. [Activate Powerpack](/nx-enterprise/activate-powerpack) if you haven't already. It only takes a minute.
|
||||||
2. Install the package
|
2. Install the package
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@ -4,19 +4,20 @@ Nx Powerpack unlocks features of Nx that are particularly useful for larger orga
|
|||||||
|
|
||||||
- [Run language-agnostic conformance rules](/nx-enterprise/powerpack/conformance)
|
- [Run language-agnostic conformance rules](/nx-enterprise/powerpack/conformance)
|
||||||
- [Define code ownership at the project level](/nx-enterprise/powerpack/owners)
|
- [Define code ownership at the project level](/nx-enterprise/powerpack/owners)
|
||||||
- [Change the remote cache storage location](/nx-enterprise/powerpack/custom-caching)
|
- [Self-hosted remote cache storage](/nx-enterprise/powerpack/custom-caching)
|
||||||
|
|
||||||
Activating Powerpack is a two step process.
|
Activating Powerpack is a two-step process.
|
||||||
|
|
||||||
## 1. Purchase a License
|
## Get a License Key
|
||||||
|
|
||||||
You'll need to [purchase a license](https://cloud.nx.app/powerpack/purchase) online. The license is a seat-based license. If you are a small team, the purchase form has an option to apply for a free license. If you have an open-source repository, you can [register for a free OSS license](https://forms.gle/mWjQo6Vrv5Kt6WYh9) as well.
|
1. Small teams can [immediately get a free Nx Powerpack license for remote cache](https://cloud.nx.app/powerpack/request/free). _[Read more about who qualifies.](/nx-enterprise/powerpack/free-licenses-and-trials)_
|
||||||
|
2. Open-source projects can [register for a free OSS license](https://forms.gle/mWjQo6Vrv5Kt6WYh9) as well.
|
||||||
|
3. Larger teams can immediately [get a free trial license](https://cloud.nx.app/powerpack/request/trial). _[Read more about how trials work](/nx-enterprise/powerpack/free-licenses-and-trials)._
|
||||||
|
4. You can also [purchase a license](https://cloud.nx.app/powerpack/purchase) online.
|
||||||
|
|
||||||
{% call-to-action title="Buy a Powerpack License" icon="nx" description="Unlock all the features of Nx" url="https://cloud.nx.app/powerpack/purchase" /%}
|
**If you are unsure how to proceed, starting with a trial process is recommended, and we will accommodate your organization's needs.**
|
||||||
|
|
||||||
Once you've completed the purchase, you will receive a license key.
|
## Register the License Key
|
||||||
|
|
||||||
## 2. Register the License Key
|
|
||||||
|
|
||||||
{% tabs %}
|
{% tabs %}
|
||||||
{% tab label="Closed Source Repository" %}
|
{% tab label="Closed Source Repository" %}
|
||||||
@ -27,7 +28,15 @@ To register the license key in your repository, run the `nx activate-powerpack`
|
|||||||
nx activate-powerpack YOUR_LICENSE_KEY
|
nx activate-powerpack YOUR_LICENSE_KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
The license will be saved in your repository and should be committed so that every developer has access to the Powerpack features.
|
The license will be saved in your repository and should be committed so that every developer has access to the Powerpack features. **Only one developer needs to run this. The rest of the team will gain access to Nx Powerpack features once they pull the changes including the checked-in file.**
|
||||||
|
|
||||||
|
Another option is to register the license key as an environment variable in CI.
|
||||||
|
|
||||||
|
```{% fileName=".env" %}
|
||||||
|
NX_POWERPACK_LICENSE=YOUR_LICENSE_KEY
|
||||||
|
```
|
||||||
|
|
||||||
|
**Whether you use the `active-powerpack` command or set the environment variable, Nx Powerpack does not make any requests to external APIs. No data is collected or sent anywhere.**
|
||||||
|
|
||||||
{% /tab %}
|
{% /tab %}
|
||||||
{% tab label="Open Source Repository" %}
|
{% tab label="Open Source Repository" %}
|
||||||
@ -40,3 +49,7 @@ NX_POWERPACK_LICENSE=YOUR_LICENSE_KEY
|
|||||||
|
|
||||||
{% /tab %}
|
{% /tab %}
|
||||||
{% /tabs %}
|
{% /tabs %}
|
||||||
|
|
||||||
|
### Buying and Registering Nx Powerpack When Using Nx Cloud
|
||||||
|
|
||||||
|
Nx Cloud users can buy Nx Powerpack on the organization settings page. The license will be available automatically.
|
||||||
|
|||||||
@ -178,6 +178,7 @@
|
|||||||
- [Enterprise](/nx-enterprise)
|
- [Enterprise](/nx-enterprise)
|
||||||
- [Activate Powerpack](/nx-enterprise/activate-powerpack)
|
- [Activate Powerpack](/nx-enterprise/activate-powerpack)
|
||||||
- [Powerpack Features](/nx-enterprise/powerpack)
|
- [Powerpack Features](/nx-enterprise/powerpack)
|
||||||
|
- [Free Licenses & Trials](/nx-enterprise/powerpack/free-licenses-and-trials)
|
||||||
- [Run Language-Agnostic Conformance Rules](/nx-enterprise/powerpack/conformance)
|
- [Run Language-Agnostic Conformance Rules](/nx-enterprise/powerpack/conformance)
|
||||||
- [Define Code Ownership at the Project Level](/nx-enterprise/powerpack/owners)
|
- [Define Code Ownership at the Project Level](/nx-enterprise/powerpack/owners)
|
||||||
- [Self-Host the Remote Cache](/nx-enterprise/powerpack/custom-caching)
|
- [Self-Host the Remote Cache](/nx-enterprise/powerpack/custom-caching)
|
||||||
@ -226,6 +227,7 @@
|
|||||||
- [As Provided vs. Derived](/deprecated/as-provided-vs-derived)
|
- [As Provided vs. Derived](/deprecated/as-provided-vs-derived)
|
||||||
- [Workspace Generators](/deprecated/workspace-generators)
|
- [Workspace Generators](/deprecated/workspace-generators)
|
||||||
- [Legacy Cache](/deprecated/legacy-cache)
|
- [Legacy Cache](/deprecated/legacy-cache)
|
||||||
|
- [Custom Tasks Runner](/deprecated/custom-tasks-runner)
|
||||||
- [Workspace Executors](/deprecated/workspace-executors)
|
- [Workspace Executors](/deprecated/workspace-executors)
|
||||||
- [runtimeCacheInputs](/deprecated/runtime-cache-inputs)
|
- [runtimeCacheInputs](/deprecated/runtime-cache-inputs)
|
||||||
- [cacheableOperations](/deprecated/cacheable-operations)
|
- [cacheableOperations](/deprecated/cacheable-operations)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { ButtonLinkProps, DefaultLayout } from '@nx/nx-dev/ui-common';
|
import { ButtonLinkProps, DefaultLayout } from '@nx/nx-dev/ui-common';
|
||||||
import {
|
import {
|
||||||
CallToAction,
|
CallToAction,
|
||||||
|
Faq,
|
||||||
GetStarted,
|
GetStarted,
|
||||||
Hero,
|
Hero,
|
||||||
PowerpackFeatures,
|
PowerpackFeatures,
|
||||||
@ -55,6 +56,10 @@ export default function NxPowerPackPage(): ReactElement {
|
|||||||
<GetStarted />
|
<GetStarted />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-32 scroll-mt-32 lg:mt-56">
|
||||||
|
<Faq />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="mt-32 lg:mt-56">
|
<div className="mt-32 lg:mt-56">
|
||||||
<CallToAction />
|
<CallToAction />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
BIN
nx-dev/nx-dev/public/assets/powerpack/NxPowerpack-Trial-v1.1.pdf
Normal file
BIN
nx-dev/nx-dev/public/assets/powerpack/NxPowerpack-Trial-v1.1.pdf
Normal file
Binary file not shown.
@ -3,7 +3,10 @@ import { cx } from '@nx/nx-dev/ui-primitives';
|
|||||||
|
|
||||||
export function CustomLink(props: any) {
|
export function CustomLink(props: any) {
|
||||||
const target =
|
const target =
|
||||||
props.target || (props.href.startsWith('http') ? '_blank' : undefined);
|
props.target ||
|
||||||
|
(props.href.startsWith('http') || props.href.indexOf('.pdf') > -1
|
||||||
|
? '_blank'
|
||||||
|
: undefined);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@ -6,3 +6,4 @@ export * from './lib/get-started';
|
|||||||
export * from './lib/powerpack-pricing';
|
export * from './lib/powerpack-pricing';
|
||||||
export * from './lib/call-to-action';
|
export * from './lib/call-to-action';
|
||||||
export * from './lib/trial-nx-powerpack';
|
export * from './lib/trial-nx-powerpack';
|
||||||
|
export * from './lib/faq';
|
||||||
|
|||||||
130
nx-dev/ui-powerpack/src/lib/faq.tsx
Normal file
130
nx-dev/ui-powerpack/src/lib/faq.tsx
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
'use client';
|
||||||
|
import {
|
||||||
|
Disclosure,
|
||||||
|
DisclosureButton,
|
||||||
|
DisclosurePanel,
|
||||||
|
Transition,
|
||||||
|
} from '@headlessui/react';
|
||||||
|
import { ChevronDownIcon } from '@heroicons/react/24/outline';
|
||||||
|
import { SectionHeading } from '@nx/nx-dev/ui-common';
|
||||||
|
import { cx } from '@nx/nx-dev/ui-primitives';
|
||||||
|
import { FAQPageJsonLd } from 'next-seo';
|
||||||
|
import Link from 'next/link';
|
||||||
|
import { ReactElement } from 'react';
|
||||||
|
|
||||||
|
export function Faq(): ReactElement {
|
||||||
|
const faqs = [
|
||||||
|
{
|
||||||
|
question: 'Does Nx Powerpack activation require network access?',
|
||||||
|
answer:
|
||||||
|
'If you enable Nx Powerpack without Nx Cloud, no networks will be created and no data will be collected.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: 'Can I get Nx Powerpack license for free?',
|
||||||
|
answer:
|
||||||
|
'Open source projects can get Powerpack for free, and small teams can get a remote cache only license for free. All licenses are perpetual and licenses can be updated as long as the organization still qualifies.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: 'How we define a small team?',
|
||||||
|
answer:
|
||||||
|
'We value small teams using Nx. That is why we provide a free, perpetual, remote cache only license to any company with fewer than 30 engineers using Nx. If you have a special case, reach out and we will help. Read more here: https://nx.dev/nx-enterprise/powerpack/free-licenses-and-trials',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: 'What can a large team do?',
|
||||||
|
answer:
|
||||||
|
'You can get a trial license immediately. Read more here: https://nx.dev/nx-enterprise/powerpack/free-licenses-and-trials',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question:
|
||||||
|
'Only interested in Nx Powerpack because of Custom Tasks Runner deprecation',
|
||||||
|
answer:
|
||||||
|
'We created a transition path from using Custom Tasks Runners to using the new plugins api hooks (beforeTasksExecution and aftertTasksExectution) and Nx Powerpack. Read more here: https://nx.dev/deprecated/custom-tasks-runner',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: 'Is Nx Powerpack license perpetual?',
|
||||||
|
answer:
|
||||||
|
'Yes. The most recent version of Nx you can access while your license is still active will remain usable even after the license expires.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: 'Do Nx Enterprise customers have access to Nx Powerpack?',
|
||||||
|
answer:
|
||||||
|
'Nx Powerpack is provided at no additional cost for Nx Enterprise customers. Your DPE can help you get maximum value out of Nx Powerpack packages.',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section id="faq" className="scroll-mt-24">
|
||||||
|
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
||||||
|
<div className="lg:grid lg:grid-cols-3 lg:gap-8">
|
||||||
|
<header>
|
||||||
|
<SectionHeading as="h2" variant="title">
|
||||||
|
Have questions?
|
||||||
|
</SectionHeading>
|
||||||
|
<SectionHeading as="p" variant="subtitle" className="mt-6">
|
||||||
|
Check out our most commonly asked questions.
|
||||||
|
</SectionHeading>
|
||||||
|
|
||||||
|
<p className="text-md mt-4 text-slate-400 dark:text-slate-600">
|
||||||
|
<Link
|
||||||
|
href="/contact"
|
||||||
|
title="Reach out to the team"
|
||||||
|
className="font-semibold"
|
||||||
|
>
|
||||||
|
Can’t find the answer you’re looking for?
|
||||||
|
</Link>
|
||||||
|
</p>
|
||||||
|
</header>
|
||||||
|
<FAQPageJsonLd
|
||||||
|
useAppDir={true}
|
||||||
|
mainEntity={faqs.map((faq) => ({
|
||||||
|
questionName: faq.question,
|
||||||
|
acceptedAnswerText: faq.answer,
|
||||||
|
}))}
|
||||||
|
/>
|
||||||
|
<div className="mt-12 lg:col-span-2 lg:mt-0">
|
||||||
|
<dl className="mt-6 space-y-6 divide-y divide-slate-100 dark:divide-slate-800">
|
||||||
|
{faqs.map((faq) => (
|
||||||
|
<Disclosure as="div" key={faq.question} className="pt-6">
|
||||||
|
{({ open }) => (
|
||||||
|
<>
|
||||||
|
<dt className="text-lg">
|
||||||
|
<DisclosureButton className="flex w-full items-start justify-between text-left text-slate-400">
|
||||||
|
<span className="font-medium text-slate-800 dark:text-slate-300">
|
||||||
|
{faq.question}
|
||||||
|
</span>
|
||||||
|
<span className="ml-6 flex h-7 items-center">
|
||||||
|
<ChevronDownIcon
|
||||||
|
className={cx(
|
||||||
|
open ? '-rotate-180' : 'rotate-0',
|
||||||
|
'h-6 w-6 transform transition-transform'
|
||||||
|
)}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</DisclosureButton>
|
||||||
|
</dt>
|
||||||
|
<Transition
|
||||||
|
enter="transition duration-100 ease-out"
|
||||||
|
enterFrom="transform -translate-y-6 opacity-0"
|
||||||
|
enterTo="transform translate-y-0 opacity-100"
|
||||||
|
leave="transition duration-75 ease-out"
|
||||||
|
leaveFrom="transform translate-y-0 opacity-100"
|
||||||
|
leaveTo="transform -translate-y-6 opacity-0"
|
||||||
|
>
|
||||||
|
<DisclosurePanel as="dd" className="mt-2 pr-12">
|
||||||
|
<p className="text-base text-slate-500 dark:text-slate-400">
|
||||||
|
{faq.answer}
|
||||||
|
</p>
|
||||||
|
</DisclosurePanel>
|
||||||
|
</Transition>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Disclosure>
|
||||||
|
))}
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -41,12 +41,11 @@ export function Hero(): ReactElement {
|
|||||||
</SectionHeading>
|
</SectionHeading>
|
||||||
<div className="mt-10 flex items-center justify-center gap-x-6">
|
<div className="mt-10 flex items-center justify-center gap-x-6">
|
||||||
<ButtonLink
|
<ButtonLink
|
||||||
href="https://cloud.nx.app/powerpack/purchase?utm_source=nx.dev&utm_medium=referral&utm_campaign=nx-powerpackurl"
|
href="cloud.nx.app/powerpack"
|
||||||
title="Talk to the engineering team"
|
|
||||||
variant="primary"
|
variant="primary"
|
||||||
size="default"
|
size="default"
|
||||||
>
|
>
|
||||||
Buy Powerpack
|
Get Powerpack License
|
||||||
</ButtonLink>
|
</ButtonLink>
|
||||||
<a
|
<a
|
||||||
href={YOUTUBE_URL}
|
href={YOUTUBE_URL}
|
||||||
|
|||||||
@ -43,12 +43,13 @@ export function PowerpackFeatures(): ReactElement {
|
|||||||
Self-hosted cache storage
|
Self-hosted cache storage
|
||||||
</SectionHeading>
|
</SectionHeading>
|
||||||
<p className="mt-6 text-pretty text-lg">
|
<p className="mt-6 text-pretty text-lg">
|
||||||
Use <Strong>Amazon S3</Strong> or a{' '}
|
Use <Strong>Amazon S3</Strong>, <Strong>MinIO</Strong>,{' '}
|
||||||
|
<Strong>GCP</Strong>, <Strong>Azure</Strong> or a{' '}
|
||||||
<Strong>shared network drive</Strong> as your remote cache
|
<Strong>shared network drive</Strong> as your remote cache
|
||||||
storage, offering a flexible, self-managed solution for faster
|
storage, offering a flexible, self-managed solution for faster
|
||||||
builds. Nx Powerpack self-hosted cache storage is{' '}
|
builds. Nx Powerpack self-hosted cache storage is{' '}
|
||||||
<TextLink
|
<TextLink
|
||||||
href="https://cloud.nx.app/powerpack/purchase?licenseBusinessType=small&utm_source=nx.dev&utm_medium=referral&utm_campaign=nx-powerpackurl"
|
href="/nx-enterprise/powerpack/free-licenses-and-trials"
|
||||||
title="Get a Powerpack license"
|
title="Get a Powerpack license"
|
||||||
>
|
>
|
||||||
free for small teams
|
free for small teams
|
||||||
|
|||||||
@ -104,7 +104,7 @@ export function Faq(): ReactElement {
|
|||||||
'We have a helpful comparison above. If you have additional questions, or these plans don’t fit your needs please reach out to https://nx.dev/contact/sales and we will do our best to help.',
|
'We have a helpful comparison above. If you have additional questions, or these plans don’t fit your needs please reach out to https://nx.dev/contact/sales and we will do our best to help.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
question: 'What if I need more than 70 active contributors?',
|
question: 'What if I need more than 30 active contributors?',
|
||||||
answer: 'Please reach out to https://nx.dev/contact/sales',
|
answer: 'Please reach out to https://nx.dev/contact/sales',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user