Isaac Mann 12eb5df469
docs(core): powerpack docs (#27904)
-  Activate powerpack recipe
-  Powerpack owners documentation
- [x] Powerpack custom remote cache documentation
- [x] Powerpack conformance documentation

Infrastructure for powerpack docs

- Adds the ability to generate API docs from ocean packages

To generate API documentation for plugins in the ocean repository, run
the `nx documentation` command with the `NX_OCEAN_RELATIVE_PATH`
environment variable set to the relative path to your checked out copy
of the ocean repo.

```
NX_OCEAN_RELATIVE_PATH=../ocean nx documentation
```

This will create generated API documentation in the
`docs/external-generated` folder. This API will be merged into the
normal `docs/generated` documentation when the docs site is built.

Because there are two separate output folders, if someone runs `nx
documentation` without the `NX_OCEAN_RELATIVE_PATH` environment
variable, the ocean documentation will not be overwritten. The ocean
documentation will only be updated or deleted when someone explicitly
chooses to do so.

---------

Co-authored-by: Juri Strumpflohner <juri.strumpflohner@gmail.com>
2024-09-25 10:15:47 -04:00

2.1 KiB

title description
Overview of the Nx powerpack-shared-fs-cache Plugin The powerpack-shared-fs-cache Nx plugin enables you to use an shared file system directory instead of Nx Cloud to host your remote cache

The @nx/powerpack-shared-fs-cache plugin enables you to use an shared file system directory instead of Nx Cloud to host your remote cache. You are responsible for the sharing mechanism for the directory, but the plugin ensures that Nx correctly associates task metadata with the file artifacts.

{% callout type="warning" title="Potential Cache Poisoning" %} Using a shared file system folder for the remote cache opens you up to the possibility of cache poisoning. To avoid this, use Nx Replay or share your cache with an AWS S3 bucket using @nx/powerpack-s3-cache. {% /callout %}

{% callout title="This plugin requires an active Nx Powerpack license" %} In order to use @nx/powerpack-shared-fs-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 %}

Setup

1. Install the Package

  1. Activate Powerpack if you haven't already
  2. Install the package
nx add @nx/powerpack-shared-fs-cache

2. Configure the Cache Directory

The @nx/powerpack-shared-fs-cache plugin treats your local cache directory as if it is also a remote cache directory. The local cache directory can be set using cacheDirectory in the nx.json file or the NX_CACHE_DIRECTORY environment variable. The default local cache directory is .nx/cache

3. Share the Cache Directory

The @nx/powerpack-shared-fs-cache plugin does not actually share the cache directory across your organization. If you want that functionality, use Nx Replay instead. Your shared file system directory might be a directory that is saved and restored by a CI provider or it could be a shared network drive.