1.0.7 • Published 11 months ago
directus-extension-operation-nanoid v1.0.7
Introduction
A Directus operation extension that generates a NanoID for your Directus flows using the official nanoid package.
- Customize your seed: Use a the default alphabet (
A-Za-z0-9_-) or use your own custom alphabet. - Set your length: Modify the length of yoru NanoID according to your flow use-case.
- Add a prefix or suffix: Want to use Stripe-style identifiers? Add a prefix and suffix to generated NanoIDs.
Installation
Method 1: Directus Marketplace
The easiest way to install this package is via the Directus Marketplace, located inside of your Settings module.
Method 2: npm
Install the extension by using npm install or the package manager of your choice (i.e. pnpm, bun) to your Directus project.
# Using pnpm
pnpm i directus-extension-operation-nanoid
# Using bun
bun i directus-extension-operation-nanoid
# Using npm
npm i directus-extension-operation-nanoid
# Using yarn
yarn add directus-extension-operation-nanoidMethod 3: Manual
Clone this repository inside the /extensions folder of your Directus project.
git clone https://github.com/antonioso-ng/directus-extension-operation-nanoidIf you require further information on how to manually install the extension inside your self-hosted instance or Docker instance, you can check the following Directus documentation on the topic.
Developing
As with any project, clone this repository.
git clone https://github.com/antonioso-ng/directus-extension-operation-nanoidInstall project dependencies.
bun iRun the extension on watch mode or build it.
# Develop and watch
bun run dev
# Build extension
bun run buildAcknowledgements
- The Directus team for creating and maintaining an amazing platform with limitless potential.
- Andrey Sitnik for the
nanoidpackage.