@revoengine/cli 1.0.10 → 1.0.13

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 (104) hide show
  1. package/README.md +314 -239
  2. package/dist/src/cli.js +126 -9
  3. package/dist/src/client.d.ts +373 -6
  4. package/dist/src/client.js +1005 -53
  5. package/dist/src/commands/auth.js +4 -2
  6. package/dist/src/commands/component.d.ts +67 -0
  7. package/dist/src/commands/component.js +555 -164
  8. package/dist/src/commands/database-tables.d.ts +2 -0
  9. package/dist/src/commands/database-tables.js +169 -0
  10. package/dist/src/commands/database-views.d.ts +2 -0
  11. package/dist/src/commands/database-views.js +126 -0
  12. package/dist/src/commands/endpoints.js +124 -0
  13. package/dist/src/commands/env.js +44 -24
  14. package/dist/src/commands/events.d.ts +2 -0
  15. package/dist/src/commands/events.js +144 -0
  16. package/dist/src/commands/groups.d.ts +2 -0
  17. package/dist/src/commands/groups.js +160 -0
  18. package/dist/src/commands/index.d.ts +9 -0
  19. package/dist/src/commands/index.js +9 -0
  20. package/dist/src/commands/job-templates.d.ts +2 -0
  21. package/dist/src/commands/job-templates.js +107 -0
  22. package/dist/src/commands/metadata.js +75 -10
  23. package/dist/src/commands/migrate.d.ts +6 -0
  24. package/dist/src/commands/migrate.js +658 -0
  25. package/dist/src/commands/project.js +10 -3
  26. package/dist/src/commands/role-groups.d.ts +2 -0
  27. package/dist/src/commands/role-groups.js +141 -0
  28. package/dist/src/commands/schedules.d.ts +2 -0
  29. package/dist/src/commands/schedules.js +140 -0
  30. package/dist/src/commands/terminal-browser.d.ts +16 -0
  31. package/dist/src/commands/terminal-browser.js +92 -0
  32. package/dist/src/commands/terminal-image.d.ts +7 -0
  33. package/dist/src/commands/terminal-image.js +40 -0
  34. package/dist/src/commands/terminal-patch-worker.d.ts +1 -0
  35. package/dist/src/commands/terminal-patch-worker.js +24 -0
  36. package/dist/src/commands/terminal-patch.d.ts +2 -0
  37. package/dist/src/commands/terminal-patch.js +156 -0
  38. package/dist/src/commands/terminal-sandbox.d.ts +8 -0
  39. package/dist/src/commands/terminal-sandbox.js +87 -0
  40. package/dist/src/commands/terminal-service.d.ts +38 -0
  41. package/dist/src/commands/terminal-service.js +210 -0
  42. package/dist/src/commands/terminal.d.ts +49 -0
  43. package/dist/src/commands/terminal.js +826 -0
  44. package/dist/src/component-lock.d.ts +111 -3
  45. package/dist/src/component-lock.js +363 -15
  46. package/dist/src/config.d.ts +10 -2
  47. package/dist/src/config.js +49 -14
  48. package/dist/src/database-table-artifacts.d.ts +7 -0
  49. package/dist/src/database-table-artifacts.js +8 -0
  50. package/dist/src/diff-details.d.ts +8 -0
  51. package/dist/src/diff-details.js +152 -0
  52. package/dist/src/env-sync.d.ts +0 -3
  53. package/dist/src/env-sync.js +11 -25
  54. package/dist/src/http-trace.d.ts +94 -0
  55. package/dist/src/http-trace.js +226 -0
  56. package/dist/src/metadata-backfill.d.ts +18 -7
  57. package/dist/src/metadata-backfill.js +1002 -27
  58. package/dist/src/migration.d.ts +141 -0
  59. package/dist/src/migration.js +1632 -0
  60. package/dist/src/project.d.ts +2 -0
  61. package/dist/src/project.js +4 -17
  62. package/dist/src/prompt.js +10 -18
  63. package/dist/src/resource-inventory.d.ts +28 -0
  64. package/dist/src/resource-inventory.js +85 -0
  65. package/dist/src/resource-metadata.d.ts +1 -0
  66. package/dist/src/resource-metadata.js +3 -0
  67. package/dist/src/resource-syncs/database-table-sync.d.ts +127 -0
  68. package/dist/src/resource-syncs/database-table-sync.js +2374 -0
  69. package/dist/src/resource-syncs/database-view-sync.d.ts +146 -0
  70. package/dist/src/resource-syncs/database-view-sync.js +1405 -0
  71. package/dist/src/resource-syncs/endpoint-sync.d.ts +123 -0
  72. package/dist/src/resource-syncs/endpoint-sync.js +1563 -0
  73. package/dist/src/resource-syncs/event-sync.d.ts +126 -0
  74. package/dist/src/resource-syncs/event-sync.js +1046 -0
  75. package/dist/src/resource-syncs/group-sync.d.ts +93 -0
  76. package/dist/src/resource-syncs/group-sync.js +928 -0
  77. package/dist/src/resource-syncs/job-template-sync.d.ts +106 -0
  78. package/dist/src/resource-syncs/job-template-sync.js +843 -0
  79. package/dist/src/resource-syncs/role-group-sync.d.ts +90 -0
  80. package/dist/src/resource-syncs/role-group-sync.js +635 -0
  81. package/dist/src/resource-syncs/schedule-sync.d.ts +140 -0
  82. package/dist/src/resource-syncs/schedule-sync.js +1396 -0
  83. package/dist/src/resource-syncs/util.d.ts +22 -0
  84. package/dist/src/resource-syncs/util.js +118 -0
  85. package/dist/src/resource-target.d.ts +11 -0
  86. package/dist/src/resource-target.js +48 -0
  87. package/dist/src/runtime-view.d.ts +1 -0
  88. package/dist/src/runtime-view.js +6 -1
  89. package/dist/src/sync-output.d.ts +66 -0
  90. package/dist/src/sync-output.js +268 -0
  91. package/dist/src/tracked-resources.d.ts +1 -1
  92. package/dist/src/tracked-resources.js +28 -2
  93. package/dist/src/types.d.ts +227 -0
  94. package/dist/src/ui.d.ts +3 -0
  95. package/dist/src/ui.js +76 -18
  96. package/dist/src/utils.d.ts +4 -0
  97. package/dist/src/utils.js +81 -0
  98. package/dist/src/workspace-component.d.ts +2 -0
  99. package/dist/src/workspace-component.js +34 -0
  100. package/dist/src/workspace-diff.d.ts +25 -0
  101. package/dist/src/workspace-diff.js +75 -0
  102. package/dist/src/workspace-resource.d.ts +2 -0
  103. package/dist/src/workspace-resource.js +52 -0
  104. package/package.json +12 -4
@@ -0,0 +1,141 @@
1
+ import { RevoClient } from './client.ts';
2
+ import { type ComponentPlan, type ComponentSyncResult } from './commands/component.ts';
3
+ import { type DatabaseSchemaMigrationPolicy, type DatabaseSchemaPullResult, type DatabaseSchemaPushResult, type DatabaseSchemasPlan } from './resource-syncs/database-table-sync.ts';
4
+ import { type DatabaseViewPullResult, type DatabaseViewPushResult, type DatabaseViewsPlan } from './resource-syncs/database-view-sync.ts';
5
+ import { type EndpointPlan, type EndpointPullResult, type EndpointPushResult } from './resource-syncs/endpoint-sync.ts';
6
+ import { type EventPullResult, type EventPushResult, type EventsPlan } from './resource-syncs/event-sync.ts';
7
+ import { type GroupPullResult, type GroupPushResult, type GroupsPlan } from './resource-syncs/group-sync.ts';
8
+ import { type JobTemplatePullResult, type JobTemplatePushResult, type JobTemplatesPlan } from './resource-syncs/job-template-sync.ts';
9
+ import { type SchedulePullResult, type SchedulePushResult, type SchedulesPlan } from './resource-syncs/schedule-sync.ts';
10
+ import { type RoleGroupPullResult, type RoleGroupPushResult, type RoleGroupsPlan } from './resource-syncs/role-group-sync.ts';
11
+ export type MigrationResource = 'database-table' | 'database-view' | 'component' | 'job-template' | 'endpoint' | 'schedule' | 'event' | 'group' | 'role-group';
12
+ export type MigrationVerdict = 'ready' | 'ready-with-warnings' | 'blocked';
13
+ export type MigrationOperations = Record<'noop' | 'create' | 'update' | 'adopt' | 'excluded' | 'blocked', number>;
14
+ type MigrationPushResult = DatabaseSchemaPushResult | DatabaseViewPushResult | ComponentSyncResult | JobTemplatePushResult | EndpointPushResult | SchedulePushResult | EventPushResult | GroupPushResult | RoleGroupPushResult;
15
+ export type MigrationPhasePlan = {
16
+ order: number;
17
+ resource: MigrationResource;
18
+ needsChanges: boolean;
19
+ readyToMigrate: boolean;
20
+ verdict: MigrationVerdict;
21
+ operations: MigrationOperations;
22
+ warnings: string[];
23
+ blockers: string[];
24
+ };
25
+ export type MigrationSourcePullSummary = {
26
+ mode: 'temporary' | 'workspace' | 'repository';
27
+ pulled: number;
28
+ pruned: number;
29
+ skipped: number;
30
+ byResource: Partial<Record<MigrationResource, {
31
+ pulled: number;
32
+ pruned: number;
33
+ skipped: number;
34
+ }>>;
35
+ };
36
+ export type MigrationPlan = {
37
+ schemaVersion: 2;
38
+ command: 'plan';
39
+ from: string;
40
+ to: string;
41
+ resources: MigrationResource[];
42
+ policy: DatabaseSchemaMigrationPolicy & {
43
+ mode: 'upsert';
44
+ };
45
+ needsChanges: boolean;
46
+ readyToMigrate: boolean;
47
+ verdict: MigrationVerdict;
48
+ operations: MigrationOperations;
49
+ sourcePull: MigrationSourcePullSummary;
50
+ phases: MigrationPhasePlan[];
51
+ databaseSchemas?: DatabaseSchemasPlan;
52
+ databaseViews?: DatabaseViewsPlan;
53
+ components?: ComponentPlan;
54
+ jobTemplates?: JobTemplatesPlan;
55
+ endpoints?: EndpointPlan;
56
+ schedules?: SchedulesPlan;
57
+ events?: EventsPlan;
58
+ groups?: GroupsPlan;
59
+ roleGroups?: RoleGroupsPlan;
60
+ warnings: string[];
61
+ blockers: string[];
62
+ };
63
+ export type MigrationRun = {
64
+ schemaVersion: 2;
65
+ command: 'run';
66
+ from: string;
67
+ to: string;
68
+ resources: MigrationResource[];
69
+ policy: DatabaseSchemaMigrationPolicy & {
70
+ mode: 'upsert';
71
+ };
72
+ verdict: 'succeeded' | 'blocked' | 'failed';
73
+ sourcePull: {
74
+ databaseSchemas?: DatabaseSchemaPullResult;
75
+ databaseViews?: DatabaseViewPullResult;
76
+ components?: ComponentSyncResult[];
77
+ jobTemplates?: JobTemplatePullResult;
78
+ endpoints?: EndpointPullResult;
79
+ schedules?: SchedulePullResult;
80
+ events?: EventPullResult;
81
+ groups?: GroupPullResult;
82
+ roleGroups?: RoleGroupPullResult;
83
+ };
84
+ plan: MigrationPlan;
85
+ results: MigrationPushResult[];
86
+ phaseResults: Partial<Record<MigrationResource, MigrationPushResult[]>>;
87
+ verification?: MigrationPlan;
88
+ };
89
+ type MigrationInputBase = {
90
+ cwd: string;
91
+ from: string;
92
+ to: string;
93
+ resources?: MigrationResource[];
94
+ withStats?: boolean;
95
+ allowDestructive?: boolean;
96
+ detailedDiff?: boolean;
97
+ };
98
+ export type MigrationInput = MigrationInputBase & ({
99
+ sourceMode: 'workspace';
100
+ targetClient: RevoClient;
101
+ targetKey: string;
102
+ targetLabel: string;
103
+ } | {
104
+ sourceMode?: 'environment';
105
+ targetClient?: never;
106
+ targetKey?: never;
107
+ targetLabel?: never;
108
+ });
109
+ export type ResourcePullResults = {
110
+ databaseSchemas?: DatabaseSchemaPullResult;
111
+ databaseViews?: DatabaseViewPullResult;
112
+ components?: ComponentSyncResult[];
113
+ jobTemplates?: JobTemplatePullResult;
114
+ endpoints?: EndpointPullResult;
115
+ schedules?: SchedulePullResult;
116
+ events?: EventPullResult;
117
+ groups?: GroupPullResult;
118
+ roleGroups?: RoleGroupPullResult;
119
+ };
120
+ export type ResourcePullInput = {
121
+ cwd: string;
122
+ client: RevoClient;
123
+ sourceKey: string;
124
+ sourceLabel: string;
125
+ resources?: MigrationResource[];
126
+ force?: boolean;
127
+ pruneOrphans?: boolean;
128
+ };
129
+ export type ResourcePullRun = {
130
+ schemaVersion: 1;
131
+ command: 'pull';
132
+ source: string;
133
+ sourceKey: string;
134
+ resources: MigrationResource[];
135
+ summary: MigrationSourcePullSummary;
136
+ results: ResourcePullResults;
137
+ };
138
+ export declare function pullResourcesToWorkspace(input: ResourcePullInput): Promise<ResourcePullRun>;
139
+ export declare function buildMigrationPlan(input: MigrationInput): Promise<MigrationPlan>;
140
+ export declare function runMigration(input: MigrationInput): Promise<MigrationRun>;
141
+ export {};