Helpers
Untrack
Removes tracking from an element within Directus. You must specify the collection and the ID of the element you wish to stop tracking.
npx directus-sync helpers untrack --collection <collection> --id <id>
Available Options
Options:
--collection <collection> the collection of the element
--id <id> the id of the element to untrack
-h, --help display help for command
Examples
Untrack a specific role
npx directus-sync helpers untrack --collection directus_roles --id 123e4567-e89b-12d3-a456-426614174000
Untrack a flow
npx directus-sync helpers untrack --collection directus_flows --id 987fcdeb-51a2-43d8-b4c1-897d54321000
Remove Permission Duplicates
Permissions should be unique regarding the role, collection, and action. Unfortunately, Directus does not enforce this uniqueness. This can lead to unexpected behavior, such as missing ids or other permissions fields. More details can be found in the Directus issue #21965.
If you have permission duplicates, you can use the following command to remove them:
npx directus-sync helpers remove-permission-duplicates --keep <keep>
This command will keep the last (or first) permission found and remove the others for each duplicated group role, collection, and action.
Available Options
Options:
--keep <keep> the permission to keep in case of conflict: "first" or "last"
(default "last")
-h, --help display help for command
Wait for Server Ready
Wait until the Directus server reports healthy on its health endpoint. Polls every X seconds until ready or until the timeout is reached.
npx directus-sync helpers wait-server-ready --interval <seconds> --timeout <seconds>
By default, interval is 5 seconds and timeout is 90 seconds.
Available Options
Options:
--interval <interval> seconds between checks (default "5")
--timeout <timeout> timeout in seconds (default "90")
--successes <successes> number of consecutive successes required (default
"1")
-h, --help display help for command