You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Jasmine-based tests against a locally started Directus server.
32
+
- Helpers start the server, create a Directus client, and run CLI commands programmatically, asserting logs and state.
33
+
- See `spec/helpers/sdk/*`, `spec/pull-diff-push/*`.
34
+
35
+
### `website` — Documentation
36
+
- Docusaurus site documenting installation, features, and how the sync works.
37
+
- When updating the CLI help outputs, build the whole project (`npm run build` at the root), then run `npm run update-help-outputs` to update the help outputs in the website.
38
+
39
+
## Other top-level
40
+
41
+
-`docker/`: build/publish scripts and Dockerfile for distributing Directus with the extension.
42
+
-`lerna.json`: monorepo management.
43
+
-`DOCUMENTATION.md`, `CHANGELOG.md`, etc.: project docs and changelog.
44
+
45
+
## Conventions
46
+
47
+
- TypeScript across packages; DI via `typedi`; logging via `pino`; validation via `zod`.
48
+
- Keep business logic in services; commands/endpoints orchestrate only.
49
+
- Follow per-package rules under `.cursor/rules/` for detailed guidance.
50
+
51
+
## Checks
52
+
53
+
- Before committing, run `npm run lint` to run the linter and fix any issues.
54
+
- Before pushing, run `npm run test` to run the tests and fix any issues.
55
+
- Before pushing, run `npm run build` to build the project and fix any issues.
56
+
- Before pushing, run `npm run docs:update` to update the help outputs in the website.
@@ -35,6 +38,9 @@ function cleanCommandOptions(commandOptions: Record<string, unknown>) {
35
38
if(commandOptions.specs===true){
36
39
deletecommandOptions.specs;
37
40
}
41
+
if(commandOptions.syncPolicyRoles===true){
42
+
deletecommandOptions.syncPolicyRoles;
43
+
}
38
44
returncommandOptions;
39
45
}
40
46
@@ -139,6 +145,10 @@ export function createProgram() {
139
145
'--no-collections',
140
146
`should pull and push the collections (default "${DefaultConfig.collections}")`,
141
147
);
148
+
constnoSyncPolicyRolesOption=newOption(
149
+
'--no-sync-policy-roles',
150
+
`should sync the role ↔ policy attachments (directus_access entries linking roles and policies). Disable to leave existing role-policy assignments on the target untouched (default "${DefaultConfig.syncPolicyRoles}")`,
151
+
);
142
152
constpreserveIdsOption=newOption(
143
153
'--preserve-ids <preserveIds>',
144
154
`comma separated list of collections that preserve their original ids (default to none). Use "*" or "all" to preserve all ids, if applicable.`,
@@ -194,6 +204,7 @@ export function createProgram() {
194
204
.addOption(excludeCollectionsOption)
195
205
.addOption(onlyCollectionsOption)
196
206
.addOption(noCollectionsOption)
207
+
.addOption(noSyncPolicyRolesOption)
197
208
.addOption(preserveIdsOption)
198
209
.addOption(snapshotPathOption)
199
210
.addOption(noSnapshotOption)
@@ -212,6 +223,7 @@ export function createProgram() {
212
223
.addOption(excludeCollectionsOption)
213
224
.addOption(onlyCollectionsOption)
214
225
.addOption(noCollectionsOption)
226
+
.addOption(noSyncPolicyRolesOption)
215
227
.addOption(snapshotPathOption)
216
228
.addOption(noSnapshotOption)
217
229
.addOption(noSplitOption)
@@ -227,6 +239,7 @@ export function createProgram() {
0 commit comments