@revoengine/cli 1.0.10 → 1.0.11

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.
Files changed (79) hide show
  1. package/README.md +312 -33
  2. package/dist/src/cli.js +58 -7
  3. package/dist/src/client.d.ts +356 -5
  4. package/dist/src/client.js +803 -19
  5. package/dist/src/commands/auth.js +4 -2
  6. package/dist/src/commands/component.js +260 -141
  7. package/dist/src/commands/database-schemas.d.ts +2 -0
  8. package/dist/src/commands/database-schemas.js +188 -0
  9. package/dist/src/commands/database-views.d.ts +2 -0
  10. package/dist/src/commands/database-views.js +123 -0
  11. package/dist/src/commands/endpoints.js +114 -0
  12. package/dist/src/commands/env.js +44 -24
  13. package/dist/src/commands/events.d.ts +2 -0
  14. package/dist/src/commands/events.js +146 -0
  15. package/dist/src/commands/groups.d.ts +2 -0
  16. package/dist/src/commands/groups.js +169 -0
  17. package/dist/src/commands/index.d.ts +8 -0
  18. package/dist/src/commands/index.js +8 -0
  19. package/dist/src/commands/job-templates.d.ts +2 -0
  20. package/dist/src/commands/job-templates.js +101 -0
  21. package/dist/src/commands/metadata.js +29 -7
  22. package/dist/src/commands/project.js +10 -3
  23. package/dist/src/commands/role-groups.d.ts +2 -0
  24. package/dist/src/commands/role-groups.js +152 -0
  25. package/dist/src/commands/schedules.d.ts +2 -0
  26. package/dist/src/commands/schedules.js +141 -0
  27. package/dist/src/commands/terminal-service.d.ts +38 -0
  28. package/dist/src/commands/terminal-service.js +210 -0
  29. package/dist/src/commands/terminal.d.ts +22 -0
  30. package/dist/src/commands/terminal.js +511 -0
  31. package/dist/src/component-lock.d.ts +100 -2
  32. package/dist/src/component-lock.js +304 -15
  33. package/dist/src/config.d.ts +10 -2
  34. package/dist/src/config.js +49 -14
  35. package/dist/src/database-schema-artifacts.d.ts +7 -0
  36. package/dist/src/database-schema-artifacts.js +8 -0
  37. package/dist/src/env-sync.d.ts +0 -3
  38. package/dist/src/env-sync.js +3 -19
  39. package/dist/src/metadata-backfill.d.ts +16 -6
  40. package/dist/src/metadata-backfill.js +1069 -18
  41. package/dist/src/project.d.ts +2 -0
  42. package/dist/src/project.js +4 -17
  43. package/dist/src/prompt.js +10 -18
  44. package/dist/src/resource-metadata.d.ts +1 -0
  45. package/dist/src/resource-metadata.js +3 -0
  46. package/dist/src/resource-syncs/database-schema-sync.d.ts +117 -0
  47. package/dist/src/resource-syncs/database-schema-sync.js +2289 -0
  48. package/dist/src/resource-syncs/database-view-sync.d.ts +124 -0
  49. package/dist/src/resource-syncs/database-view-sync.js +1317 -0
  50. package/dist/src/resource-syncs/endpoint-sync.d.ts +96 -0
  51. package/dist/src/resource-syncs/endpoint-sync.js +1283 -0
  52. package/dist/src/resource-syncs/event-sync.d.ts +99 -0
  53. package/dist/src/resource-syncs/event-sync.js +949 -0
  54. package/dist/src/resource-syncs/group-sync.d.ts +86 -0
  55. package/dist/src/resource-syncs/group-sync.js +882 -0
  56. package/dist/src/resource-syncs/job-template-sync.d.ts +85 -0
  57. package/dist/src/resource-syncs/job-template-sync.js +782 -0
  58. package/dist/src/resource-syncs/role-group-sync.d.ts +83 -0
  59. package/dist/src/resource-syncs/role-group-sync.js +597 -0
  60. package/dist/src/resource-syncs/schedule-sync.d.ts +111 -0
  61. package/dist/src/resource-syncs/schedule-sync.js +1302 -0
  62. package/dist/src/resource-syncs/util.d.ts +19 -0
  63. package/dist/src/resource-syncs/util.js +116 -0
  64. package/dist/src/runtime-view.d.ts +1 -0
  65. package/dist/src/runtime-view.js +6 -1
  66. package/dist/src/sync-output.d.ts +38 -0
  67. package/dist/src/sync-output.js +131 -0
  68. package/dist/src/tracked-resources.d.ts +1 -1
  69. package/dist/src/tracked-resources.js +26 -2
  70. package/dist/src/types.d.ts +224 -0
  71. package/dist/src/ui.d.ts +3 -0
  72. package/dist/src/ui.js +67 -18
  73. package/dist/src/utils.d.ts +2 -0
  74. package/dist/src/utils.js +64 -0
  75. package/dist/src/workspace-component.d.ts +2 -0
  76. package/dist/src/workspace-component.js +34 -0
  77. package/dist/src/workspace-resource.d.ts +2 -0
  78. package/dist/src/workspace-resource.js +52 -0
  79. package/package.json +8 -3
@@ -0,0 +1,111 @@
1
+ import type { RevoClient } from '../client.ts';
2
+ export declare const SCHEDULES_DIRECTORY = "Schedules";
3
+ export declare const SCHEDULE_MANIFEST_FILE = "schedule.json";
4
+ export type JobTemplateScheduleTarget = {
5
+ type: 'JOB_TEMPLATE';
6
+ jobTemplateStableKey: string;
7
+ };
8
+ export type MaterializedViewScheduleTarget = {
9
+ type: 'MATERIALIZED_VIEW';
10
+ databaseViewStableKey: string;
11
+ refreshMode: 'CONCURRENT' | 'BLOCKING';
12
+ };
13
+ export type ScheduleTarget = JobTemplateScheduleTarget | MaterializedViewScheduleTarget;
14
+ export type ScheduleManifest = {
15
+ kind: 'schedule';
16
+ stableKey: string;
17
+ name: string;
18
+ category?: string | null;
19
+ description?: string;
20
+ metadata: Record<string, unknown>;
21
+ cron: string;
22
+ timezone: string;
23
+ target: ScheduleTarget;
24
+ /** Retained for operator context only. It is never used in a target write. */
25
+ sourceTargetConfig?: Record<string, unknown> | null;
26
+ /** Source active state, intentionally editable before a later activation phase. */
27
+ activationCandidate: boolean;
28
+ };
29
+ export type SchedulePullWarning = {
30
+ stableKey: string;
31
+ reason: string;
32
+ };
33
+ export type SchedulePullResult = {
34
+ pulled: Array<{
35
+ manifest: ScheduleManifest;
36
+ targetPath: string;
37
+ }>;
38
+ warnings: SchedulePullWarning[];
39
+ };
40
+ export type SchedulePlanStatus = 'clean' | 'create' | 'safe-update' | 'remote-changed' | 'conflict' | 'missing-lock' | 'orphan' | 'collision' | 'skipped';
41
+ export type SchedulePlanItem = {
42
+ status: SchedulePlanStatus;
43
+ stableKey?: string;
44
+ name: string;
45
+ reason?: string;
46
+ changedFields?: string[];
47
+ desiredHash?: string;
48
+ currentHash?: string;
49
+ baselineHash?: string;
50
+ jobTemplateStableKey?: string;
51
+ databaseViewStableKey?: string;
52
+ };
53
+ export type SchedulesPlan = {
54
+ resourceType: 'schedule';
55
+ env: string;
56
+ counts: Record<SchedulePlanStatus, number>;
57
+ blockers: string[];
58
+ warnings: string[];
59
+ items: SchedulePlanItem[];
60
+ exclusions: string[];
61
+ };
62
+ export type SchedulePushResult = {
63
+ stableKey: string;
64
+ action: 'create' | 'update' | 'noop' | 'orphan' | 'skipped' | 'activate';
65
+ status: 'deployed' | 'skipped' | 'failed';
66
+ targetPath: string;
67
+ reason?: string;
68
+ error?: string;
69
+ };
70
+ export type VerifiedScheduleActivation = {
71
+ stableKey: string;
72
+ scheduleId: string;
73
+ targetPath: string;
74
+ stableKeyName: string;
75
+ targetId: string;
76
+ target: ScheduleTarget;
77
+ };
78
+ export declare function scheduleManifestPath(workspaceRoot: string, manifest: ScheduleManifest): string;
79
+ /** Desired target shape. Source-only configuration and activation are excluded. */
80
+ export declare function hashPortableSchedule(manifest: ScheduleManifest): string;
81
+ /** Local baseline shape. It deliberately includes editable/source-only pull data. */
82
+ export declare function hashScheduleManifest(manifest: ScheduleManifest): string;
83
+ export declare function buildSchedulesPlan(input: {
84
+ client: RevoClient;
85
+ cwd: string;
86
+ envName: string;
87
+ stableKeyName: string;
88
+ }): Promise<SchedulesPlan>;
89
+ export declare function pullSchedulesToWorkspace(input: {
90
+ client: RevoClient;
91
+ cwd: string;
92
+ envName: string;
93
+ stableKeyName: string;
94
+ force?: boolean;
95
+ }): Promise<SchedulePullResult>;
96
+ export declare function pushSchedules(input: {
97
+ client: RevoClient;
98
+ cwd: string;
99
+ envName: string;
100
+ stableKeyName: string;
101
+ force?: boolean;
102
+ allowMaterialized?: boolean;
103
+ }): Promise<{
104
+ plan: SchedulesPlan;
105
+ results: SchedulePushResult[];
106
+ verifiedActivationCandidates: VerifiedScheduleActivation[];
107
+ }>;
108
+ export declare function activateVerifiedSchedules(input: {
109
+ client: RevoClient;
110
+ candidates: ReadonlyArray<VerifiedScheduleActivation>;
111
+ }): Promise<SchedulePushResult[]>;