@revoengine/cli 1.0.11 → 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.
- package/README.md +275 -479
- package/dist/src/cli.js +71 -5
- package/dist/src/client.d.ts +28 -12
- package/dist/src/client.js +234 -66
- package/dist/src/commands/component.d.ts +67 -0
- package/dist/src/commands/component.js +299 -27
- package/dist/src/commands/database-tables.d.ts +2 -0
- package/dist/src/commands/{database-schemas.js → database-tables.js} +21 -40
- package/dist/src/commands/database-views.js +21 -18
- package/dist/src/commands/endpoints.js +26 -16
- package/dist/src/commands/events.js +18 -20
- package/dist/src/commands/groups.js +13 -22
- package/dist/src/commands/index.d.ts +2 -1
- package/dist/src/commands/index.js +2 -1
- package/dist/src/commands/job-templates.js +21 -15
- package/dist/src/commands/metadata.js +58 -15
- package/dist/src/commands/migrate.d.ts +6 -0
- package/dist/src/commands/migrate.js +658 -0
- package/dist/src/commands/project.js +4 -4
- package/dist/src/commands/role-groups.js +14 -25
- package/dist/src/commands/schedules.js +19 -20
- package/dist/src/commands/terminal-browser.d.ts +16 -0
- package/dist/src/commands/terminal-browser.js +92 -0
- package/dist/src/commands/terminal-image.d.ts +7 -0
- package/dist/src/commands/terminal-image.js +40 -0
- package/dist/src/commands/terminal-patch-worker.d.ts +1 -0
- package/dist/src/commands/terminal-patch-worker.js +24 -0
- package/dist/src/commands/terminal-patch.d.ts +2 -0
- package/dist/src/commands/terminal-patch.js +156 -0
- package/dist/src/commands/terminal-sandbox.d.ts +8 -0
- package/dist/src/commands/terminal-sandbox.js +87 -0
- package/dist/src/commands/terminal-service.js +2 -2
- package/dist/src/commands/terminal.d.ts +31 -4
- package/dist/src/commands/terminal.js +360 -45
- package/dist/src/component-lock.d.ts +12 -2
- package/dist/src/component-lock.js +60 -1
- package/dist/src/diff-details.d.ts +8 -0
- package/dist/src/diff-details.js +152 -0
- package/dist/src/env-sync.js +8 -6
- package/dist/src/http-trace.d.ts +94 -0
- package/dist/src/http-trace.js +226 -0
- package/dist/src/metadata-backfill.d.ts +5 -4
- package/dist/src/metadata-backfill.js +82 -158
- package/dist/src/migration.d.ts +141 -0
- package/dist/src/migration.js +1632 -0
- package/dist/src/resource-inventory.d.ts +28 -0
- package/dist/src/resource-inventory.js +85 -0
- package/dist/src/resource-syncs/{database-schema-sync.d.ts → database-table-sync.d.ts} +13 -3
- package/dist/src/resource-syncs/{database-schema-sync.js → database-table-sync.js} +147 -62
- package/dist/src/resource-syncs/database-view-sync.d.ts +24 -2
- package/dist/src/resource-syncs/database-view-sync.js +156 -68
- package/dist/src/resource-syncs/endpoint-sync.d.ts +27 -0
- package/dist/src/resource-syncs/endpoint-sync.js +362 -82
- package/dist/src/resource-syncs/event-sync.d.ts +27 -0
- package/dist/src/resource-syncs/event-sync.js +123 -26
- package/dist/src/resource-syncs/group-sync.d.ts +7 -0
- package/dist/src/resource-syncs/group-sync.js +60 -14
- package/dist/src/resource-syncs/job-template-sync.d.ts +21 -0
- package/dist/src/resource-syncs/job-template-sync.js +91 -30
- package/dist/src/resource-syncs/role-group-sync.d.ts +7 -0
- package/dist/src/resource-syncs/role-group-sync.js +47 -9
- package/dist/src/resource-syncs/schedule-sync.d.ts +30 -1
- package/dist/src/resource-syncs/schedule-sync.js +114 -20
- package/dist/src/resource-syncs/util.d.ts +3 -0
- package/dist/src/resource-syncs/util.js +8 -6
- package/dist/src/resource-target.d.ts +11 -0
- package/dist/src/resource-target.js +48 -0
- package/dist/src/sync-output.d.ts +29 -1
- package/dist/src/sync-output.js +139 -2
- package/dist/src/tracked-resources.d.ts +1 -1
- package/dist/src/tracked-resources.js +8 -6
- package/dist/src/types.d.ts +3 -0
- package/dist/src/ui.js +18 -9
- package/dist/src/utils.d.ts +2 -0
- package/dist/src/utils.js +17 -0
- package/dist/src/workspace-diff.d.ts +25 -0
- package/dist/src/workspace-diff.js +75 -0
- package/package.json +9 -6
- package/dist/src/commands/database-schemas.d.ts +0 -2
- /package/dist/src/{database-schema-artifacts.d.ts → database-table-artifacts.d.ts} +0 -0
- /package/dist/src/{database-schema-artifacts.js → database-table-artifacts.js} +0 -0
|
@@ -55,22 +55,65 @@ function printPlanText(context, plan) {
|
|
|
55
55
|
if (plan.skipPartitions) {
|
|
56
56
|
println('Scope: root database schemas only (partitions skipped).');
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
const sortedItems = [...plan.items].sort((left, right) => [
|
|
59
|
+
left.resourceType,
|
|
60
|
+
left.category || '',
|
|
61
|
+
left.name,
|
|
62
|
+
left.resourceId,
|
|
63
|
+
left.metadataField,
|
|
64
|
+
left.columnName || '',
|
|
65
|
+
].join('\0').localeCompare([
|
|
66
|
+
right.resourceType,
|
|
67
|
+
right.category || '',
|
|
68
|
+
right.name,
|
|
69
|
+
right.resourceId,
|
|
70
|
+
right.metadataField,
|
|
71
|
+
right.columnName || '',
|
|
72
|
+
].join('\0')));
|
|
73
|
+
const assignedItems = sortedItems.filter((item) => item.action === 'skip' && item.stableKey);
|
|
74
|
+
const excludedItems = sortedItems.filter((item) => item.action === 'skip' && !item.stableKey);
|
|
75
|
+
const updateItems = sortedItems.filter((item) => item.action === 'update');
|
|
76
|
+
const blockedItems = sortedItems.filter((item) => item.action === 'blocked');
|
|
77
|
+
const printItems = (items) => {
|
|
78
|
+
for (const item of items) {
|
|
79
|
+
const reservedMetadataNotice = item.resourceType === 'group'
|
|
80
|
+
&& item.reason.includes('backend-reserved metadata keys excluded')
|
|
81
|
+
? ` (${item.reason})`
|
|
82
|
+
: '';
|
|
83
|
+
const resourceLabel = item.resourceKind === 'database-partition'
|
|
84
|
+
? `${item.resourceType} partition ${item.name}${item.parentName ? ` (parent: ${item.parentName})` : ''}`
|
|
85
|
+
: item.resourceKind === 'database-column'
|
|
86
|
+
? `${item.resourceType} column ${item.name}`
|
|
87
|
+
: `${item.resourceType} ${item.name}`;
|
|
88
|
+
if (item.action === 'skip') {
|
|
89
|
+
if (item.stableKey) {
|
|
90
|
+
println(`${paint('= assigned', ANSI.dim + ANSI.yellow)} ${resourceLabel} -> ${item.metadataField}.${item.stableKeyName}=${item.stableKey}${reservedMetadataNotice}`);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
println(`${paint('- excluded', ANSI.dim + ANSI.yellow)} ${resourceLabel} (${item.reason})`);
|
|
94
|
+
}
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (item.action === 'blocked') {
|
|
98
|
+
println(`${paint('! blocked', ANSI.bold + ANSI.red)} ${resourceLabel} -> ${item.metadataField}.${item.stableKeyName}=${item.stableKey} (${item.reason})`);
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
println(`${paint('+ update', ANSI.bold + ANSI.green)} ${resourceLabel} -> ${item.metadataField}.${item.stableKeyName}=${item.stableKey}${reservedMetadataNotice}`);
|
|
66
102
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
103
|
+
};
|
|
104
|
+
println(`Assigned Stable Keys (${assignedItems.length})`);
|
|
105
|
+
printItems(assignedItems);
|
|
106
|
+
println(`Stable Keys to update (${updateItems.length})`);
|
|
107
|
+
printItems(updateItems);
|
|
108
|
+
if (excludedItems.length > 0) {
|
|
109
|
+
println(`Excluded resources (${excludedItems.length})`);
|
|
110
|
+
printItems(excludedItems);
|
|
111
|
+
}
|
|
112
|
+
if (blockedItems.length > 0) {
|
|
113
|
+
println(`Blocked Stable Keys (${blockedItems.length})`);
|
|
114
|
+
printItems(blockedItems);
|
|
115
|
+
}
|
|
116
|
+
println(`Plan: ${updateItems.length} to update, ${assignedItems.length} assigned, ${excludedItems.length} excluded, ${blockedItems.length} blocked.`);
|
|
74
117
|
}
|
|
75
118
|
function assertNoPlanBlockers(plan) {
|
|
76
119
|
if (plan.blockers.length > 0) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandContext } from '../types.ts';
|
|
2
|
+
export declare function handleDiffCommand(context: CommandContext): Promise<void>;
|
|
3
|
+
export declare function handlePlanCommand(context: CommandContext): Promise<void>;
|
|
4
|
+
export declare function handlePullCommand(context: CommandContext): Promise<void>;
|
|
5
|
+
export declare function handleDeployCommand(context: CommandContext): Promise<void>;
|
|
6
|
+
export declare function handleMigrateCommand(context: CommandContext): Promise<void>;
|