@aurorajs.dev/catalyst-cli 3.1.3 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,7 +41,7 @@ $ npm install -g @aurorajs.dev/catalyst-cli
41
41
  $ catalyst COMMAND
42
42
  running command...
43
43
  $ catalyst (--version)
44
- @aurorajs.dev/catalyst-cli/3.1.3 darwin-arm64 node-v26.13.0
44
+ @aurorajs.dev/catalyst-cli/3.1.4 darwin-arm64 node-v26.13.0
45
45
  $ catalyst --help [COMMAND]
46
46
  USAGE
47
47
  $ catalyst COMMAND
@@ -66,6 +66,7 @@
66
66
  },
67
67
  "qa": {
68
68
  "optimization": false,
69
+ "outputHashing": "all",
69
70
  "extractLicenses": false,
70
71
  "sourceMap": true,
71
72
  "fileReplacements": [
@@ -77,6 +78,7 @@
77
78
  },
78
79
  "dev": {
79
80
  "optimization": false,
81
+ "outputHashing": "all",
80
82
  "extractLicenses": false,
81
83
  "sourceMap": true,
82
84
  "fileReplacements": [
@@ -92,11 +92,12 @@
92
92
  "NoPositionsMatchYourSearch": "No batches match your search.",
93
93
  "AlreadyAssigned": "This operator is already assigned to this batch.",
94
94
  "ProcessWeightsOpen": "Show kg per process of batch {{code}} ({{percent}}% progress)",
95
- "ProcessWeightsTitle": "Batch {{code}}",
95
+ "ProcessWeightsTitle": "Code {{code}}",
96
96
  "ProcessWeightsDescription": "Kilograms that went through each process.",
97
97
  "ProcessWeightsLoading": "Loading...",
98
98
  "ProcessWeightsError": "The kilograms per process could not be loaded.",
99
- "ProcessWeightsEmpty": "No process has registered weight for this batch yet."
99
+ "ProcessWeightsEmpty": "No process has registered weight for this batch yet.",
100
+ "ProcessWeightsDeletedProcess": "Deleted process"
100
101
  },
101
102
  "process": {
102
103
  "IsEquipmentRequired": "Requires Equipment",
@@ -92,11 +92,12 @@
92
92
  "NoPositionsMatchYourSearch": "Ningún lote coincide con tu búsqueda.",
93
93
  "AlreadyAssigned": "Este operario ya está asignado a este lote.",
94
94
  "ProcessWeightsOpen": "Ver kg por proceso del lote {{code}} (progreso {{percent}} %)",
95
- "ProcessWeightsTitle": "Lote {{code}}",
95
+ "ProcessWeightsTitle": "Código {{code}}",
96
96
  "ProcessWeightsDescription": "Kilos que han pasado por cada proceso.",
97
97
  "ProcessWeightsLoading": "Cargando...",
98
98
  "ProcessWeightsError": "No se han podido cargar los kilos por proceso.",
99
- "ProcessWeightsEmpty": "Ningún proceso tiene peso registrado para este lote todavía."
99
+ "ProcessWeightsEmpty": "Ningún proceso tiene peso registrado para este lote todavía.",
100
+ "ProcessWeightsDeletedProcess": "Proceso eliminado"
100
101
  },
101
102
  "process": {
102
103
  "IsEquipmentRequired": "Requiere equipo",
@@ -51,6 +51,25 @@ describe('aggregateWeightByProcess', () => {
51
51
  expect(result.map((r) => r.name)).toEqual(['Compactar', 'Moler', 'Pesada inicial']);
52
52
  });
53
53
 
54
+ it('should group the events of deleted processes in one last row with no name', () => {
55
+ const deleted = (processId: string, totalWeight: number | null): PositionEventWeightRow => ({
56
+ processId,
57
+ totalWeight,
58
+ process: null,
59
+ });
60
+ expect(
61
+ aggregateWeightByProcess([
62
+ deleted('gone-1', 600),
63
+ row('p1', 100, 'Moler'),
64
+ deleted('gone-2', 400),
65
+ deleted('gone-2', null),
66
+ ]),
67
+ ).toEqual([
68
+ { processId: 'p1', name: 'Moler', weightGrams: 100 },
69
+ { processId: null, name: null, weightGrams: 1000 },
70
+ ]);
71
+ });
72
+
54
73
  it('should return an empty list for no events', () => {
55
74
  expect(aggregateWeightByProcess([])).toEqual([]);
56
75
  });
@@ -2,12 +2,16 @@
2
2
  export interface PositionEventWeightRow {
3
3
  processId: string;
4
4
  totalWeight: number | null;
5
- process: { name: string };
5
+ // null when the process was deleted: the YAML declares `processId` with `avoidConstraint`, so
6
+ // the database does not stop a process in use from being deleted
7
+ process: { name: string } | null;
6
8
  }
7
9
 
8
10
  export interface ProcessWeight {
9
- processId: string;
10
- name: string;
11
+ /** null on the single row that groups the events of deleted processes. */
12
+ processId: string | null;
13
+ /** null on the single row that groups the events of deleted processes. */
14
+ name: string | null;
11
15
  /** Summed weight of the position's events for this process, in grams. */
12
16
  weightGrams: number;
13
17
  }
@@ -15,19 +19,21 @@ export interface ProcessWeight {
15
19
  /**
16
20
  * Groups the events of ONE position by process and sums their weight (grams). Processes whose
17
21
  * sum is not above zero are dropped. Rows are ordered by process name: the process schema has no
18
- * order field, and the name is the only stable, user-meaningful key.
22
+ * order field, and the name is the only stable, user-meaningful key. The events of deleted
23
+ * processes share one row with no id and no name, placed last.
19
24
  */
20
25
  export function aggregateWeightByProcess(rows: readonly PositionEventWeightRow[]): ProcessWeight[] {
21
- const byProcess = new Map<string, ProcessWeight>();
26
+ const byProcess = new Map<string | null, ProcessWeight>();
22
27
 
23
28
  for (const row of rows) {
24
- const current = byProcess.get(row.processId);
29
+ const processId = row.process ? row.processId : null;
30
+ const current = byProcess.get(processId);
25
31
  if (current) {
26
32
  current.weightGrams += row.totalWeight ?? 0;
27
33
  } else {
28
- byProcess.set(row.processId, {
29
- processId: row.processId,
30
- name: row.process.name,
34
+ byProcess.set(processId, {
35
+ processId,
36
+ name: row.process?.name ?? null,
31
37
  weightGrams: row.totalWeight ?? 0,
32
38
  });
33
39
  }
@@ -35,5 +41,9 @@ export function aggregateWeightByProcess(rows: readonly PositionEventWeightRow[]
35
41
 
36
42
  return [...byProcess.values()]
37
43
  .filter((entry) => entry.weightGrams > 0)
38
- .sort((a, b) => a.name.localeCompare(b.name));
44
+ .sort((a, b) => {
45
+ if (a.name === null) return 1;
46
+ if (b.name === null) return -1;
47
+ return a.name.localeCompare(b.name);
48
+ });
39
49
  }
@@ -90,7 +90,9 @@ export interface PlannerProcessWeightsDialogContext {
90
90
  <ul class="divide-y rounded-lg border">
91
91
  @for (row of rows(); track row.processId) {
92
92
  <li class="flex items-center justify-between gap-4 px-4 py-3 text-sm">
93
- <span class="min-w-0 truncate font-medium">{{ row.name }}</span>
93
+ <span class="min-w-0 truncate font-medium">
94
+ {{ row.name ?? t('production-planning.planner.ProcessWeightsDeletedProcess') }}
95
+ </span>
94
96
  <span class="shrink-0 font-semibold tabular-nums">
95
97
  {{ row.label }}
96
98
  </span>
@@ -113,15 +113,12 @@
113
113
  "setup.js"
114
114
  ]
115
115
  },
116
- "deploy": {
116
+ "backup:list": {
117
117
  "aliases": [],
118
118
  "args": {},
119
- "description": "Trigger deploy by pushing source branches to environments/{env}.",
119
+ "description": "List the complete backup copies of a Coolify environment at its destination, newest first: id, UTC date, size and contents. Reads no destination secret.",
120
120
  "examples": [
121
- "<%= config.bin %> deploy",
122
- "<%= config.bin %> deploy --env dev",
123
- "<%= config.bin %> deploy --dry-run",
124
- "<%= config.bin %> deploy --env prod -c ../aurora.yaml"
121
+ "<%= config.bin %> backup list --env prod"
125
122
  ],
126
123
  "flags": {
127
124
  "config": {
@@ -133,15 +130,10 @@
133
130
  "multiple": false,
134
131
  "type": "option"
135
132
  },
136
- "dry-run": {
137
- "description": "Show what would be pushed without executing",
138
- "name": "dry-run",
139
- "allowNo": false,
140
- "type": "boolean"
141
- },
142
133
  "env": {
143
- "description": "Deploy only this environment (e.g. dev, qa, prod)",
134
+ "description": "Environment that declares backups (e.g. prod)",
144
135
  "name": "env",
136
+ "required": true,
145
137
  "hasDynamicHelp": false,
146
138
  "multiple": false,
147
139
  "type": "option"
@@ -149,7 +141,7 @@
149
141
  },
150
142
  "hasDynamicHelp": false,
151
143
  "hiddenAliases": [],
152
- "id": "deploy",
144
+ "id": "backup:list",
153
145
  "pluginAlias": "@aurorajs.dev/catalyst-cli",
154
146
  "pluginName": "@aurorajs.dev/catalyst-cli",
155
147
  "pluginType": "core",
@@ -159,16 +151,16 @@
159
151
  "relativePath": [
160
152
  "dist",
161
153
  "commands",
162
- "deploy",
163
- "index.js"
154
+ "backup",
155
+ "list.js"
164
156
  ]
165
157
  },
166
- "backup:list": {
158
+ "backup:restore": {
167
159
  "aliases": [],
168
160
  "args": {},
169
- "description": "List the complete backup copies of a Coolify environment at its destination, newest first: id, UTC date, size and contents. Reads no destination secret.",
161
+ "description": "Restore a backup copy into the same Coolify environment: the database (when the copy holds one) and the uploaded files are REPLACED by the copy, with no confirmation prompt. The backend is stopped during the restore and started again. Running it again with the same copy is safe. Reads no destination secret.",
170
162
  "examples": [
171
- "<%= config.bin %> backup list --env prod"
163
+ "<%= config.bin %> backup restore --env prod --copy 7k2m9qx4ab"
172
164
  ],
173
165
  "flags": {
174
166
  "config": {
@@ -180,6 +172,14 @@
180
172
  "multiple": false,
181
173
  "type": "option"
182
174
  },
175
+ "copy": {
176
+ "description": "Id of the copy to restore (see \"backup list\")",
177
+ "name": "copy",
178
+ "required": true,
179
+ "hasDynamicHelp": false,
180
+ "multiple": false,
181
+ "type": "option"
182
+ },
183
183
  "env": {
184
184
  "description": "Environment that declares backups (e.g. prod)",
185
185
  "name": "env",
@@ -191,7 +191,7 @@
191
191
  },
192
192
  "hasDynamicHelp": false,
193
193
  "hiddenAliases": [],
194
- "id": "backup:list",
194
+ "id": "backup:restore",
195
195
  "pluginAlias": "@aurorajs.dev/catalyst-cli",
196
196
  "pluginName": "@aurorajs.dev/catalyst-cli",
197
197
  "pluginType": "core",
@@ -202,15 +202,15 @@
202
202
  "dist",
203
203
  "commands",
204
204
  "backup",
205
- "list.js"
205
+ "restore.js"
206
206
  ]
207
207
  },
208
- "backup:restore": {
208
+ "backup:run": {
209
209
  "aliases": [],
210
210
  "args": {},
211
- "description": "Restore a backup copy into the same Coolify environment: the database (when the copy holds one) and the uploaded files are REPLACED by the copy, with no confirmation prompt. The backend is stopped during the restore and started again. Running it again with the same copy is safe. Reads no destination secret.",
211
+ "description": "Take a backup copy of a Coolify environment now: the same job as its timer. Prints the id of the new copy and exits zero only when the job succeeded. Reads no destination secret.",
212
212
  "examples": [
213
- "<%= config.bin %> backup restore --env prod --copy 7k2m9qx4ab"
213
+ "<%= config.bin %> backup run --env prod"
214
214
  ],
215
215
  "flags": {
216
216
  "config": {
@@ -222,14 +222,6 @@
222
222
  "multiple": false,
223
223
  "type": "option"
224
224
  },
225
- "copy": {
226
- "description": "Id of the copy to restore (see \"backup list\")",
227
- "name": "copy",
228
- "required": true,
229
- "hasDynamicHelp": false,
230
- "multiple": false,
231
- "type": "option"
232
- },
233
225
  "env": {
234
226
  "description": "Environment that declares backups (e.g. prod)",
235
227
  "name": "env",
@@ -241,7 +233,7 @@
241
233
  },
242
234
  "hasDynamicHelp": false,
243
235
  "hiddenAliases": [],
244
- "id": "backup:restore",
236
+ "id": "backup:run",
245
237
  "pluginAlias": "@aurorajs.dev/catalyst-cli",
246
238
  "pluginName": "@aurorajs.dev/catalyst-cli",
247
239
  "pluginType": "core",
@@ -252,15 +244,18 @@
252
244
  "dist",
253
245
  "commands",
254
246
  "backup",
255
- "restore.js"
247
+ "run.js"
256
248
  ]
257
249
  },
258
- "backup:run": {
250
+ "deploy": {
259
251
  "aliases": [],
260
252
  "args": {},
261
- "description": "Take a backup copy of a Coolify environment now: the same job as its timer. Prints the id of the new copy and exits zero only when the job succeeded. Reads no destination secret.",
253
+ "description": "Trigger deploy by pushing source branches to environments/{env}.",
262
254
  "examples": [
263
- "<%= config.bin %> backup run --env prod"
255
+ "<%= config.bin %> deploy",
256
+ "<%= config.bin %> deploy --env dev",
257
+ "<%= config.bin %> deploy --dry-run",
258
+ "<%= config.bin %> deploy --env prod -c ../aurora.yaml"
264
259
  ],
265
260
  "flags": {
266
261
  "config": {
@@ -272,10 +267,15 @@
272
267
  "multiple": false,
273
268
  "type": "option"
274
269
  },
270
+ "dry-run": {
271
+ "description": "Show what would be pushed without executing",
272
+ "name": "dry-run",
273
+ "allowNo": false,
274
+ "type": "boolean"
275
+ },
275
276
  "env": {
276
- "description": "Environment that declares backups (e.g. prod)",
277
+ "description": "Deploy only this environment (e.g. dev, qa, prod)",
277
278
  "name": "env",
278
- "required": true,
279
279
  "hasDynamicHelp": false,
280
280
  "multiple": false,
281
281
  "type": "option"
@@ -283,7 +283,7 @@
283
283
  },
284
284
  "hasDynamicHelp": false,
285
285
  "hiddenAliases": [],
286
- "id": "backup:run",
286
+ "id": "deploy",
287
287
  "pluginAlias": "@aurorajs.dev/catalyst-cli",
288
288
  "pluginName": "@aurorajs.dev/catalyst-cli",
289
289
  "pluginType": "core",
@@ -293,8 +293,8 @@
293
293
  "relativePath": [
294
294
  "dist",
295
295
  "commands",
296
- "backup",
297
- "run.js"
296
+ "deploy",
297
+ "index.js"
298
298
  ]
299
299
  },
300
300
  "env:decrypt": {
@@ -401,6 +401,40 @@
401
401
  "encrypt.js"
402
402
  ]
403
403
  },
404
+ "keys": {
405
+ "aliases": [],
406
+ "args": {},
407
+ "description": "Generate RSA private key and public key (defaults to ./backend/.keys)",
408
+ "examples": [
409
+ "<%= config.bin %> <%= command.id %>",
410
+ "<%= config.bin %> <%= command.id %> --out ./keys"
411
+ ],
412
+ "flags": {
413
+ "out": {
414
+ "char": "o",
415
+ "description": "Output directory for the key files (default: backend/.keys)",
416
+ "name": "out",
417
+ "hasDynamicHelp": false,
418
+ "multiple": false,
419
+ "type": "option"
420
+ }
421
+ },
422
+ "hasDynamicHelp": false,
423
+ "hiddenAliases": [],
424
+ "id": "keys",
425
+ "pluginAlias": "@aurorajs.dev/catalyst-cli",
426
+ "pluginName": "@aurorajs.dev/catalyst-cli",
427
+ "pluginType": "core",
428
+ "strict": true,
429
+ "enableJsonFlag": false,
430
+ "isESM": true,
431
+ "relativePath": [
432
+ "dist",
433
+ "commands",
434
+ "keys",
435
+ "index.js"
436
+ ]
437
+ },
404
438
  "generate": {
405
439
  "aliases": [],
406
440
  "args": {
@@ -516,40 +550,6 @@
516
550
  "index.js"
517
551
  ]
518
552
  },
519
- "keys": {
520
- "aliases": [],
521
- "args": {},
522
- "description": "Generate RSA private key and public key (defaults to ./backend/.keys)",
523
- "examples": [
524
- "<%= config.bin %> <%= command.id %>",
525
- "<%= config.bin %> <%= command.id %> --out ./keys"
526
- ],
527
- "flags": {
528
- "out": {
529
- "char": "o",
530
- "description": "Output directory for the key files (default: backend/.keys)",
531
- "name": "out",
532
- "hasDynamicHelp": false,
533
- "multiple": false,
534
- "type": "option"
535
- }
536
- },
537
- "hasDynamicHelp": false,
538
- "hiddenAliases": [],
539
- "id": "keys",
540
- "pluginAlias": "@aurorajs.dev/catalyst-cli",
541
- "pluginName": "@aurorajs.dev/catalyst-cli",
542
- "pluginType": "core",
543
- "strict": true,
544
- "enableJsonFlag": false,
545
- "isESM": true,
546
- "relativePath": [
547
- "dist",
548
- "commands",
549
- "keys",
550
- "index.js"
551
- ]
552
- },
553
553
  "new": {
554
554
  "aliases": [],
555
555
  "args": {
@@ -590,33 +590,26 @@
590
590
  "index.js"
591
591
  ]
592
592
  },
593
- "origin:accept": {
593
+ "pipeline": {
594
594
  "aliases": [],
595
- "args": {
596
- "pathspec": {
597
- "description": "Optional file or directory. Defaults to recursive cwd scan.",
598
- "name": "pathspec",
599
- "required": false
600
- }
601
- },
602
- "description": "Adopt the codegen proposal: replace current with `.origin` and delete `.origin`.",
595
+ "args": {},
596
+ "description": "Generate a deploy workflow and its supporting files from templates (interactive).",
603
597
  "examples": [
604
- "<%= config.bin %> origin accept",
605
- "<%= config.bin %> origin accept backend/foo.ts",
606
- "<%= config.bin %> origin accept backend/iam/",
607
- "<%= config.bin %> origin accept --json"
598
+ "<%= config.bin %> pipeline",
599
+ "<%= config.bin %> pipeline --force"
608
600
  ],
609
601
  "flags": {
610
- "json": {
611
- "description": "Emit machine-readable JSON instead of human text.",
612
- "name": "json",
602
+ "force": {
603
+ "char": "f",
604
+ "description": "Overwrite existing files of the set",
605
+ "name": "force",
613
606
  "allowNo": false,
614
607
  "type": "boolean"
615
608
  }
616
609
  },
617
610
  "hasDynamicHelp": false,
618
611
  "hiddenAliases": [],
619
- "id": "origin:accept",
612
+ "id": "pipeline",
620
613
  "pluginAlias": "@aurorajs.dev/catalyst-cli",
621
614
  "pluginName": "@aurorajs.dev/catalyst-cli",
622
615
  "pluginType": "core",
@@ -626,36 +619,39 @@
626
619
  "relativePath": [
627
620
  "dist",
628
621
  "commands",
629
- "origin",
630
- "accept.js"
622
+ "pipeline",
623
+ "index.js"
631
624
  ]
632
625
  },
633
- "origin:diff": {
626
+ "provision:audit": {
634
627
  "aliases": [],
635
- "args": {
636
- "pathspec": {
637
- "description": "Optional file or directory. Defaults to recursive cwd scan.",
638
- "name": "pathspec",
639
- "required": false
640
- }
641
- },
642
- "description": "Print a unified diff of each `.origin` proposal against its current file.",
628
+ "args": {},
629
+ "description": "Compare Coolify servers with the state aurora.yaml declares, without changing them. Exits non-zero on drift or when an expected port state is violated.",
643
630
  "examples": [
644
- "<%= config.bin %> origin diff",
645
- "<%= config.bin %> origin diff backend/foo.ts",
646
- "<%= config.bin %> origin diff --json"
631
+ "<%= config.bin %> provision audit",
632
+ "<%= config.bin %> provision audit --env prod"
647
633
  ],
648
634
  "flags": {
649
- "json": {
650
- "description": "Emit machine-readable JSON instead of human text.",
651
- "name": "json",
652
- "allowNo": false,
653
- "type": "boolean"
635
+ "config": {
636
+ "char": "c",
637
+ "description": "Path to aurora.yaml config file",
638
+ "name": "config",
639
+ "default": "./aurora.yaml",
640
+ "hasDynamicHelp": false,
641
+ "multiple": false,
642
+ "type": "option"
643
+ },
644
+ "env": {
645
+ "description": "Audit only this environment (e.g. dev, qa, prod)",
646
+ "name": "env",
647
+ "hasDynamicHelp": false,
648
+ "multiple": false,
649
+ "type": "option"
654
650
  }
655
651
  },
656
652
  "hasDynamicHelp": false,
657
653
  "hiddenAliases": [],
658
- "id": "origin:diff",
654
+ "id": "provision:audit",
659
655
  "pluginAlias": "@aurorajs.dev/catalyst-cli",
660
656
  "pluginName": "@aurorajs.dev/catalyst-cli",
661
657
  "pluginType": "core",
@@ -665,194 +661,17 @@
665
661
  "relativePath": [
666
662
  "dist",
667
663
  "commands",
668
- "origin",
669
- "diff.js"
664
+ "provision",
665
+ "audit.js"
670
666
  ]
671
667
  },
672
- "origin:ignore": {
668
+ "provision": {
673
669
  "aliases": [],
674
- "args": {
675
- "pathspec": {
676
- "description": "Optional file or directory. Defaults to recursive cwd scan.",
677
- "name": "pathspec",
678
- "required": false
679
- }
680
- },
681
- "description": "Reject the proposal AND mark the current file as ignored on future regens.",
670
+ "args": {},
671
+ "description": "Provision Aurora project infrastructure on Coolify: the server layer and the application layer (project, PostgreSQL and Redis if declared, both applications, their variables, the deploy trigger and its GitHub secret and variables).",
682
672
  "examples": [
683
- "<%= config.bin %> origin ignore",
684
- "<%= config.bin %> origin ignore backend/foo.ts",
685
- "<%= config.bin %> origin ignore backend/iam/",
686
- "<%= config.bin %> origin ignore --json"
687
- ],
688
- "flags": {
689
- "json": {
690
- "description": "Emit machine-readable JSON instead of human text.",
691
- "name": "json",
692
- "allowNo": false,
693
- "type": "boolean"
694
- }
695
- },
696
- "hasDynamicHelp": false,
697
- "hiddenAliases": [],
698
- "id": "origin:ignore",
699
- "pluginAlias": "@aurorajs.dev/catalyst-cli",
700
- "pluginName": "@aurorajs.dev/catalyst-cli",
701
- "pluginType": "core",
702
- "strict": true,
703
- "enableJsonFlag": false,
704
- "isESM": true,
705
- "relativePath": [
706
- "dist",
707
- "commands",
708
- "origin",
709
- "ignore.js"
710
- ]
711
- },
712
- "origin:list": {
713
- "aliases": [],
714
- "args": {
715
- "pathspec": {
716
- "description": "Optional file or directory. Defaults to recursive cwd scan.",
717
- "name": "pathspec",
718
- "required": false
719
- }
720
- },
721
- "description": "List `.origin` files emitted by `catalyst generate`.",
722
- "examples": [
723
- "<%= config.bin %> origin list",
724
- "<%= config.bin %> origin list backend/",
725
- "<%= config.bin %> origin list backend/foo.ts",
726
- "<%= config.bin %> origin list --json"
727
- ],
728
- "flags": {
729
- "json": {
730
- "description": "Emit machine-readable JSON instead of human text.",
731
- "name": "json",
732
- "allowNo": false,
733
- "type": "boolean"
734
- }
735
- },
736
- "hasDynamicHelp": false,
737
- "hiddenAliases": [],
738
- "id": "origin:list",
739
- "pluginAlias": "@aurorajs.dev/catalyst-cli",
740
- "pluginName": "@aurorajs.dev/catalyst-cli",
741
- "pluginType": "core",
742
- "strict": true,
743
- "enableJsonFlag": false,
744
- "isESM": true,
745
- "relativePath": [
746
- "dist",
747
- "commands",
748
- "origin",
749
- "list.js"
750
- ]
751
- },
752
- "origin:reject": {
753
- "aliases": [],
754
- "args": {
755
- "pathspec": {
756
- "description": "Optional file or directory. Defaults to recursive cwd scan.",
757
- "name": "pathspec",
758
- "required": false
759
- }
760
- },
761
- "description": "Reject the codegen proposal: delete `.origin` and keep the current file as-is.",
762
- "examples": [
763
- "<%= config.bin %> origin reject",
764
- "<%= config.bin %> origin reject backend/foo.ts",
765
- "<%= config.bin %> origin reject backend/iam/",
766
- "<%= config.bin %> origin reject --json"
767
- ],
768
- "flags": {
769
- "json": {
770
- "description": "Emit machine-readable JSON instead of human text.",
771
- "name": "json",
772
- "allowNo": false,
773
- "type": "boolean"
774
- }
775
- },
776
- "hasDynamicHelp": false,
777
- "hiddenAliases": [],
778
- "id": "origin:reject",
779
- "pluginAlias": "@aurorajs.dev/catalyst-cli",
780
- "pluginName": "@aurorajs.dev/catalyst-cli",
781
- "pluginType": "core",
782
- "strict": true,
783
- "enableJsonFlag": false,
784
- "isESM": true,
785
- "relativePath": [
786
- "dist",
787
- "commands",
788
- "origin",
789
- "reject.js"
790
- ]
791
- },
792
- "origin:review": {
793
- "aliases": [],
794
- "args": {},
795
- "description": "Interactive walk-through of pending `.origin` files (inquirer + VS Code diff).",
796
- "examples": [
797
- "<%= config.bin %> origin review"
798
- ],
799
- "flags": {},
800
- "hasDynamicHelp": false,
801
- "hiddenAliases": [],
802
- "id": "origin:review",
803
- "pluginAlias": "@aurorajs.dev/catalyst-cli",
804
- "pluginName": "@aurorajs.dev/catalyst-cli",
805
- "pluginType": "core",
806
- "strict": true,
807
- "enableJsonFlag": false,
808
- "isESM": true,
809
- "relativePath": [
810
- "dist",
811
- "commands",
812
- "origin",
813
- "review.js"
814
- ]
815
- },
816
- "pipeline": {
817
- "aliases": [],
818
- "args": {},
819
- "description": "Generate a deploy workflow and its supporting files from templates (interactive).",
820
- "examples": [
821
- "<%= config.bin %> pipeline",
822
- "<%= config.bin %> pipeline --force"
823
- ],
824
- "flags": {
825
- "force": {
826
- "char": "f",
827
- "description": "Overwrite existing files of the set",
828
- "name": "force",
829
- "allowNo": false,
830
- "type": "boolean"
831
- }
832
- },
833
- "hasDynamicHelp": false,
834
- "hiddenAliases": [],
835
- "id": "pipeline",
836
- "pluginAlias": "@aurorajs.dev/catalyst-cli",
837
- "pluginName": "@aurorajs.dev/catalyst-cli",
838
- "pluginType": "core",
839
- "strict": true,
840
- "enableJsonFlag": false,
841
- "isESM": true,
842
- "relativePath": [
843
- "dist",
844
- "commands",
845
- "pipeline",
846
- "index.js"
847
- ]
848
- },
849
- "provision:audit": {
850
- "aliases": [],
851
- "args": {},
852
- "description": "Compare Coolify servers with the state aurora.yaml declares, without changing them. Exits non-zero on drift or when an expected port state is violated.",
853
- "examples": [
854
- "<%= config.bin %> provision audit",
855
- "<%= config.bin %> provision audit --env prod"
673
+ "<%= config.bin %> provision --env dev",
674
+ "CATALYST_GHCR_TOKEN=ghp_x <%= config.bin %> provision --env prod # servers and applications"
856
675
  ],
857
676
  "flags": {
858
677
  "config": {
@@ -865,16 +684,22 @@
865
684
  "type": "option"
866
685
  },
867
686
  "env": {
868
- "description": "Audit only this environment (e.g. dev, qa, prod)",
687
+ "description": "Provision only this environment (e.g. dev, qa, prod)",
869
688
  "name": "env",
870
689
  "hasDynamicHelp": false,
871
690
  "multiple": false,
872
691
  "type": "option"
692
+ },
693
+ "full-upgrade": {
694
+ "description": "Besides the security updates, upgrade every installed package. This can upgrade Docker, which restarts Coolify and every application on the server.",
695
+ "name": "full-upgrade",
696
+ "allowNo": false,
697
+ "type": "boolean"
873
698
  }
874
699
  },
875
700
  "hasDynamicHelp": false,
876
701
  "hiddenAliases": [],
877
- "id": "provision:audit",
702
+ "id": "provision",
878
703
  "pluginAlias": "@aurorajs.dev/catalyst-cli",
879
704
  "pluginName": "@aurorajs.dev/catalyst-cli",
880
705
  "pluginType": "core",
@@ -885,54 +710,40 @@
885
710
  "dist",
886
711
  "commands",
887
712
  "provision",
888
- "audit.js"
713
+ "index.js"
889
714
  ]
890
715
  },
891
- "provision": {
716
+ "upgrade": {
892
717
  "aliases": [],
893
718
  "args": {},
894
- "description": "Provision Aurora project infrastructure on Coolify: the server layer and the application layer (project, PostgreSQL and Redis if declared, both applications, their variables, the deploy trigger and its GitHub secret and variables).",
719
+ "description": "Run it from the root of the project, on the branch that should receive the upgrade. git must be on the PATH.\n\n1. It reads the installed packages from aurora.lock.yaml and refuses to run without it, or when the running CLI no longer ships a locked package. It also refuses, before changing anything, when the \"aurora/scaffold\" branch is missing or when a tracked file has staged or unstaged changes (untracked files do not count): commit or stash them first.\n2. It migrates the module definition files, with no version gate, so a rerun after a merge picks up late arrivals: it renames each cliter/<bc>/<module>.aurora.yaml to <module>.module.yaml with \"git mv\", rewrites in every tracked file the two generated lines that name the old file (the \"@source\" header and the field-schema \"derived from\" line, changing only the suffix), and recomputes the cliter/<bc>/.locks integrity of a rewritten file only when the stored hash matched the file before the rewrite, so a file you modified still shows up as modified. Developer comments and docs are not touched. If both names exist for one module it stops, naming both paths. When it changed something it commits exactly that in one commit, \"chore(catalyst): rename module definition files to <module>.module.yaml\", running the project's git hooks, before the merge.\n3. It renders the scaffold of the running CLI plus every locked package into a temporary directory, with the composition files generated from the package manifests and the lockfile updated to the running CLI version. The install, the backend/.env copy and the GraphQL codegen are not part of that rendering, so pnpm-lock.yaml, backend/.env and backend/src/@api/graphql.ts never enter it.\n4. It commits that rendering on \"aurora/scaffold\" as a child of its tip, without switching branches or touching the working tree. When the rendering equals the tip it creates no commit, and it reports the scaffold as up to date only when the tip is already contained in the checked-out branch; otherwise it runs the merge again.\n5. It runs \"git merge --no-edit aurora/scaffold\" on the checked-out branch.\n6. After a merge without conflict it installs the dependencies, appends to backend/.env the keys with a declared value that any locked package declares and the file lacks (an existing value is never changed), regenerates the GraphQL types and the business-rules index, and prints what is left to do: \"pnpm db:generate --name <package>\" for each package whose backend changed, the required keys missing in backend/.env and the tools SQL scripts to run. It never generates or applies a schema migration.\n\nGit's three-way merge resolves ownership. A file the project never changed (for example under backend/src/@aurora/) takes the new rendering's content. A file the project changed (wiring, custom module declarations, aurora.yaml) keeps its changes and receives only the rendering's own delta. A file the rendering removed and the project never changed is deleted.\n\nWhen the project and the rendering change the same lines, the command exits non-zero, lists the conflicted files, names the post-merge steps to run after the resolution together with the backend/.env keys to add (with their value) or to set, and leaves the merge in progress. Resolve the markers, then \"git add\" and \"git commit\", or discard the upgrade with \"git merge --abort\"; the next run merges the same rendering again.\n\nThe \"aurora/scaffold\" branch must exist: \"catalyst new\" creates it. It lives in the clone that ran \"catalyst new\" until it is pushed: after each upgrade, \"git push origin aurora/scaffold\" together with the merged branch, and a fresh clone gets it with \"git fetch origin aurora/scaffold:aurora/scaffold\". Installed packages upgrade here together with the scaffold; the framework npm packages update through npm.\n\nA post-merge step that fails (for example the install without network) stops the command with a non-zero exit after the merge commit: it names the failed step and the ones not run, and prints the pending backend/.env keys, because a rerun finds the project up to date.\n\nTo restore a file to its pristine rendering: git checkout aurora/scaffold -- <path>\nTo undo a completed upgrade: git reset --hard ORIG_HEAD\nWhen the run created the migration commit (\"chore(catalyst): rename module definition files to <module>.module.yaml\"), it sits before the merge: after that reset, git reset --hard HEAD~1 undoes it too.",
895
720
  "examples": [
896
- "<%= config.bin %> provision --env dev",
897
- "CATALYST_GHCR_TOKEN=ghp_x <%= config.bin %> provision --env prod # servers and applications"
721
+ "<%= config.bin %> upgrade",
722
+ "<%= config.bin %> upgrade --verbose"
898
723
  ],
899
724
  "flags": {
900
- "config": {
901
- "char": "c",
902
- "description": "Path to aurora.yaml config file",
903
- "name": "config",
904
- "default": "./aurora.yaml",
905
- "hasDynamicHelp": false,
906
- "multiple": false,
907
- "type": "option"
908
- },
909
- "env": {
910
- "description": "Provision only this environment (e.g. dev, qa, prod)",
911
- "name": "env",
912
- "hasDynamicHelp": false,
913
- "multiple": false,
914
- "type": "option"
915
- },
916
- "full-upgrade": {
917
- "description": "Besides the security updates, upgrade every installed package. This can upgrade Docker, which restarts Coolify and every application on the server.",
918
- "name": "full-upgrade",
725
+ "verbose": {
726
+ "char": "v",
727
+ "description": "Report all steps on screen.",
728
+ "name": "verbose",
919
729
  "allowNo": false,
920
730
  "type": "boolean"
921
731
  }
922
732
  },
923
733
  "hasDynamicHelp": false,
924
734
  "hiddenAliases": [],
925
- "id": "provision",
735
+ "id": "upgrade",
926
736
  "pluginAlias": "@aurorajs.dev/catalyst-cli",
927
737
  "pluginName": "@aurorajs.dev/catalyst-cli",
928
738
  "pluginType": "core",
929
739
  "strict": true,
740
+ "summary": "Merge the current scaffold and the locked packages into an installed project through its \"aurora/scaffold\" branch.",
930
741
  "enableJsonFlag": false,
931
742
  "isESM": true,
932
743
  "relativePath": [
933
744
  "dist",
934
745
  "commands",
935
- "provision",
746
+ "upgrade",
936
747
  "index.js"
937
748
  ]
938
749
  },
@@ -1207,40 +1018,229 @@
1207
1018
  "validate.js"
1208
1019
  ]
1209
1020
  },
1210
- "upgrade": {
1021
+ "origin:accept": {
1211
1022
  "aliases": [],
1212
- "args": {},
1213
- "description": "Run it from the root of the project, on the branch that should receive the upgrade. git must be on the PATH.\n\n1. It reads the installed packages from aurora.lock.yaml and refuses to run without it, or when the running CLI no longer ships a locked package. It also refuses, before changing anything, when the \"aurora/scaffold\" branch is missing or when a tracked file has staged or unstaged changes (untracked files do not count): commit or stash them first.\n2. It migrates the module definition files, with no version gate, so a rerun after a merge picks up late arrivals: it renames each cliter/<bc>/<module>.aurora.yaml to <module>.module.yaml with \"git mv\", rewrites in every tracked file the two generated lines that name the old file (the \"@source\" header and the field-schema \"derived from\" line, changing only the suffix), and recomputes the cliter/<bc>/.locks integrity of a rewritten file only when the stored hash matched the file before the rewrite, so a file you modified still shows up as modified. Developer comments and docs are not touched. If both names exist for one module it stops, naming both paths. When it changed something it commits exactly that in one commit, \"chore(catalyst): rename module definition files to <module>.module.yaml\", running the project's git hooks, before the merge.\n3. It renders the scaffold of the running CLI plus every locked package into a temporary directory, with the composition files generated from the package manifests and the lockfile updated to the running CLI version. The install, the backend/.env copy and the GraphQL codegen are not part of that rendering, so pnpm-lock.yaml, backend/.env and backend/src/@api/graphql.ts never enter it.\n4. It commits that rendering on \"aurora/scaffold\" as a child of its tip, without switching branches or touching the working tree. When the rendering equals the tip it creates no commit, and it reports the scaffold as up to date only when the tip is already contained in the checked-out branch; otherwise it runs the merge again.\n5. It runs \"git merge --no-edit aurora/scaffold\" on the checked-out branch.\n6. After a merge without conflict it installs the dependencies, appends to backend/.env the keys with a declared value that any locked package declares and the file lacks (an existing value is never changed), regenerates the GraphQL types and the business-rules index, and prints what is left to do: \"pnpm db:generate --name <package>\" for each package whose backend changed, the required keys missing in backend/.env and the tools SQL scripts to run. It never generates or applies a schema migration.\n\nGit's three-way merge resolves ownership. A file the project never changed (for example under backend/src/@aurora/) takes the new rendering's content. A file the project changed (wiring, custom module declarations, aurora.yaml) keeps its changes and receives only the rendering's own delta. A file the rendering removed and the project never changed is deleted.\n\nWhen the project and the rendering change the same lines, the command exits non-zero, lists the conflicted files, names the post-merge steps to run after the resolution together with the backend/.env keys to add (with their value) or to set, and leaves the merge in progress. Resolve the markers, then \"git add\" and \"git commit\", or discard the upgrade with \"git merge --abort\"; the next run merges the same rendering again.\n\nThe \"aurora/scaffold\" branch must exist: \"catalyst new\" creates it. It lives in the clone that ran \"catalyst new\" until it is pushed: after each upgrade, \"git push origin aurora/scaffold\" together with the merged branch, and a fresh clone gets it with \"git fetch origin aurora/scaffold:aurora/scaffold\". Installed packages upgrade here together with the scaffold; the framework npm packages update through npm.\n\nA post-merge step that fails (for example the install without network) stops the command with a non-zero exit after the merge commit: it names the failed step and the ones not run, and prints the pending backend/.env keys, because a rerun finds the project up to date.\n\nTo restore a file to its pristine rendering: git checkout aurora/scaffold -- <path>\nTo undo a completed upgrade: git reset --hard ORIG_HEAD\nWhen the run created the migration commit (\"chore(catalyst): rename module definition files to <module>.module.yaml\"), it sits before the merge: after that reset, git reset --hard HEAD~1 undoes it too.",
1023
+ "args": {
1024
+ "pathspec": {
1025
+ "description": "Optional file or directory. Defaults to recursive cwd scan.",
1026
+ "name": "pathspec",
1027
+ "required": false
1028
+ }
1029
+ },
1030
+ "description": "Adopt the codegen proposal: replace current with `.origin` and delete `.origin`.",
1214
1031
  "examples": [
1215
- "<%= config.bin %> upgrade",
1216
- "<%= config.bin %> upgrade --verbose"
1032
+ "<%= config.bin %> origin accept",
1033
+ "<%= config.bin %> origin accept backend/foo.ts",
1034
+ "<%= config.bin %> origin accept backend/iam/",
1035
+ "<%= config.bin %> origin accept --json"
1217
1036
  ],
1218
1037
  "flags": {
1219
- "verbose": {
1220
- "char": "v",
1221
- "description": "Report all steps on screen.",
1222
- "name": "verbose",
1038
+ "json": {
1039
+ "description": "Emit machine-readable JSON instead of human text.",
1040
+ "name": "json",
1223
1041
  "allowNo": false,
1224
1042
  "type": "boolean"
1225
1043
  }
1226
1044
  },
1227
1045
  "hasDynamicHelp": false,
1228
1046
  "hiddenAliases": [],
1229
- "id": "upgrade",
1047
+ "id": "origin:accept",
1230
1048
  "pluginAlias": "@aurorajs.dev/catalyst-cli",
1231
1049
  "pluginName": "@aurorajs.dev/catalyst-cli",
1232
1050
  "pluginType": "core",
1233
1051
  "strict": true,
1234
- "summary": "Merge the current scaffold and the locked packages into an installed project through its \"aurora/scaffold\" branch.",
1235
1052
  "enableJsonFlag": false,
1236
1053
  "isESM": true,
1237
1054
  "relativePath": [
1238
1055
  "dist",
1239
1056
  "commands",
1240
- "upgrade",
1241
- "index.js"
1057
+ "origin",
1058
+ "accept.js"
1059
+ ]
1060
+ },
1061
+ "origin:diff": {
1062
+ "aliases": [],
1063
+ "args": {
1064
+ "pathspec": {
1065
+ "description": "Optional file or directory. Defaults to recursive cwd scan.",
1066
+ "name": "pathspec",
1067
+ "required": false
1068
+ }
1069
+ },
1070
+ "description": "Print a unified diff of each `.origin` proposal against its current file.",
1071
+ "examples": [
1072
+ "<%= config.bin %> origin diff",
1073
+ "<%= config.bin %> origin diff backend/foo.ts",
1074
+ "<%= config.bin %> origin diff --json"
1075
+ ],
1076
+ "flags": {
1077
+ "json": {
1078
+ "description": "Emit machine-readable JSON instead of human text.",
1079
+ "name": "json",
1080
+ "allowNo": false,
1081
+ "type": "boolean"
1082
+ }
1083
+ },
1084
+ "hasDynamicHelp": false,
1085
+ "hiddenAliases": [],
1086
+ "id": "origin:diff",
1087
+ "pluginAlias": "@aurorajs.dev/catalyst-cli",
1088
+ "pluginName": "@aurorajs.dev/catalyst-cli",
1089
+ "pluginType": "core",
1090
+ "strict": true,
1091
+ "enableJsonFlag": false,
1092
+ "isESM": true,
1093
+ "relativePath": [
1094
+ "dist",
1095
+ "commands",
1096
+ "origin",
1097
+ "diff.js"
1098
+ ]
1099
+ },
1100
+ "origin:ignore": {
1101
+ "aliases": [],
1102
+ "args": {
1103
+ "pathspec": {
1104
+ "description": "Optional file or directory. Defaults to recursive cwd scan.",
1105
+ "name": "pathspec",
1106
+ "required": false
1107
+ }
1108
+ },
1109
+ "description": "Reject the proposal AND mark the current file as ignored on future regens.",
1110
+ "examples": [
1111
+ "<%= config.bin %> origin ignore",
1112
+ "<%= config.bin %> origin ignore backend/foo.ts",
1113
+ "<%= config.bin %> origin ignore backend/iam/",
1114
+ "<%= config.bin %> origin ignore --json"
1115
+ ],
1116
+ "flags": {
1117
+ "json": {
1118
+ "description": "Emit machine-readable JSON instead of human text.",
1119
+ "name": "json",
1120
+ "allowNo": false,
1121
+ "type": "boolean"
1122
+ }
1123
+ },
1124
+ "hasDynamicHelp": false,
1125
+ "hiddenAliases": [],
1126
+ "id": "origin:ignore",
1127
+ "pluginAlias": "@aurorajs.dev/catalyst-cli",
1128
+ "pluginName": "@aurorajs.dev/catalyst-cli",
1129
+ "pluginType": "core",
1130
+ "strict": true,
1131
+ "enableJsonFlag": false,
1132
+ "isESM": true,
1133
+ "relativePath": [
1134
+ "dist",
1135
+ "commands",
1136
+ "origin",
1137
+ "ignore.js"
1138
+ ]
1139
+ },
1140
+ "origin:list": {
1141
+ "aliases": [],
1142
+ "args": {
1143
+ "pathspec": {
1144
+ "description": "Optional file or directory. Defaults to recursive cwd scan.",
1145
+ "name": "pathspec",
1146
+ "required": false
1147
+ }
1148
+ },
1149
+ "description": "List `.origin` files emitted by `catalyst generate`.",
1150
+ "examples": [
1151
+ "<%= config.bin %> origin list",
1152
+ "<%= config.bin %> origin list backend/",
1153
+ "<%= config.bin %> origin list backend/foo.ts",
1154
+ "<%= config.bin %> origin list --json"
1155
+ ],
1156
+ "flags": {
1157
+ "json": {
1158
+ "description": "Emit machine-readable JSON instead of human text.",
1159
+ "name": "json",
1160
+ "allowNo": false,
1161
+ "type": "boolean"
1162
+ }
1163
+ },
1164
+ "hasDynamicHelp": false,
1165
+ "hiddenAliases": [],
1166
+ "id": "origin:list",
1167
+ "pluginAlias": "@aurorajs.dev/catalyst-cli",
1168
+ "pluginName": "@aurorajs.dev/catalyst-cli",
1169
+ "pluginType": "core",
1170
+ "strict": true,
1171
+ "enableJsonFlag": false,
1172
+ "isESM": true,
1173
+ "relativePath": [
1174
+ "dist",
1175
+ "commands",
1176
+ "origin",
1177
+ "list.js"
1178
+ ]
1179
+ },
1180
+ "origin:reject": {
1181
+ "aliases": [],
1182
+ "args": {
1183
+ "pathspec": {
1184
+ "description": "Optional file or directory. Defaults to recursive cwd scan.",
1185
+ "name": "pathspec",
1186
+ "required": false
1187
+ }
1188
+ },
1189
+ "description": "Reject the codegen proposal: delete `.origin` and keep the current file as-is.",
1190
+ "examples": [
1191
+ "<%= config.bin %> origin reject",
1192
+ "<%= config.bin %> origin reject backend/foo.ts",
1193
+ "<%= config.bin %> origin reject backend/iam/",
1194
+ "<%= config.bin %> origin reject --json"
1195
+ ],
1196
+ "flags": {
1197
+ "json": {
1198
+ "description": "Emit machine-readable JSON instead of human text.",
1199
+ "name": "json",
1200
+ "allowNo": false,
1201
+ "type": "boolean"
1202
+ }
1203
+ },
1204
+ "hasDynamicHelp": false,
1205
+ "hiddenAliases": [],
1206
+ "id": "origin:reject",
1207
+ "pluginAlias": "@aurorajs.dev/catalyst-cli",
1208
+ "pluginName": "@aurorajs.dev/catalyst-cli",
1209
+ "pluginType": "core",
1210
+ "strict": true,
1211
+ "enableJsonFlag": false,
1212
+ "isESM": true,
1213
+ "relativePath": [
1214
+ "dist",
1215
+ "commands",
1216
+ "origin",
1217
+ "reject.js"
1218
+ ]
1219
+ },
1220
+ "origin:review": {
1221
+ "aliases": [],
1222
+ "args": {},
1223
+ "description": "Interactive walk-through of pending `.origin` files (inquirer + VS Code diff).",
1224
+ "examples": [
1225
+ "<%= config.bin %> origin review"
1226
+ ],
1227
+ "flags": {},
1228
+ "hasDynamicHelp": false,
1229
+ "hiddenAliases": [],
1230
+ "id": "origin:review",
1231
+ "pluginAlias": "@aurorajs.dev/catalyst-cli",
1232
+ "pluginName": "@aurorajs.dev/catalyst-cli",
1233
+ "pluginType": "core",
1234
+ "strict": true,
1235
+ "enableJsonFlag": false,
1236
+ "isESM": true,
1237
+ "relativePath": [
1238
+ "dist",
1239
+ "commands",
1240
+ "origin",
1241
+ "review.js"
1242
1242
  ]
1243
1243
  }
1244
1244
  },
1245
- "version": "3.1.3"
1245
+ "version": "3.1.4"
1246
1246
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aurorajs.dev/catalyst-cli",
3
3
  "description": "A CLI tool to manage Aurora Catalyst projects",
4
- "version": "3.1.3",
4
+ "version": "3.1.4",
5
5
  "author": "José Carlos Rodríguez Palacín",
6
6
  "bin": {
7
7
  "catalyst": "./bin/run.js"