@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.
- package/README.md +312 -33
- package/dist/src/cli.js +58 -7
- package/dist/src/client.d.ts +356 -5
- package/dist/src/client.js +803 -19
- package/dist/src/commands/auth.js +4 -2
- package/dist/src/commands/component.js +260 -141
- package/dist/src/commands/database-schemas.d.ts +2 -0
- package/dist/src/commands/database-schemas.js +188 -0
- package/dist/src/commands/database-views.d.ts +2 -0
- package/dist/src/commands/database-views.js +123 -0
- package/dist/src/commands/endpoints.js +114 -0
- package/dist/src/commands/env.js +44 -24
- package/dist/src/commands/events.d.ts +2 -0
- package/dist/src/commands/events.js +146 -0
- package/dist/src/commands/groups.d.ts +2 -0
- package/dist/src/commands/groups.js +169 -0
- package/dist/src/commands/index.d.ts +8 -0
- package/dist/src/commands/index.js +8 -0
- package/dist/src/commands/job-templates.d.ts +2 -0
- package/dist/src/commands/job-templates.js +101 -0
- package/dist/src/commands/metadata.js +29 -7
- package/dist/src/commands/project.js +10 -3
- package/dist/src/commands/role-groups.d.ts +2 -0
- package/dist/src/commands/role-groups.js +152 -0
- package/dist/src/commands/schedules.d.ts +2 -0
- package/dist/src/commands/schedules.js +141 -0
- package/dist/src/commands/terminal-service.d.ts +38 -0
- package/dist/src/commands/terminal-service.js +210 -0
- package/dist/src/commands/terminal.d.ts +22 -0
- package/dist/src/commands/terminal.js +511 -0
- package/dist/src/component-lock.d.ts +100 -2
- package/dist/src/component-lock.js +304 -15
- package/dist/src/config.d.ts +10 -2
- package/dist/src/config.js +49 -14
- package/dist/src/database-schema-artifacts.d.ts +7 -0
- package/dist/src/database-schema-artifacts.js +8 -0
- package/dist/src/env-sync.d.ts +0 -3
- package/dist/src/env-sync.js +3 -19
- package/dist/src/metadata-backfill.d.ts +16 -6
- package/dist/src/metadata-backfill.js +1069 -18
- package/dist/src/project.d.ts +2 -0
- package/dist/src/project.js +4 -17
- package/dist/src/prompt.js +10 -18
- package/dist/src/resource-metadata.d.ts +1 -0
- package/dist/src/resource-metadata.js +3 -0
- package/dist/src/resource-syncs/database-schema-sync.d.ts +117 -0
- package/dist/src/resource-syncs/database-schema-sync.js +2289 -0
- package/dist/src/resource-syncs/database-view-sync.d.ts +124 -0
- package/dist/src/resource-syncs/database-view-sync.js +1317 -0
- package/dist/src/resource-syncs/endpoint-sync.d.ts +96 -0
- package/dist/src/resource-syncs/endpoint-sync.js +1283 -0
- package/dist/src/resource-syncs/event-sync.d.ts +99 -0
- package/dist/src/resource-syncs/event-sync.js +949 -0
- package/dist/src/resource-syncs/group-sync.d.ts +86 -0
- package/dist/src/resource-syncs/group-sync.js +882 -0
- package/dist/src/resource-syncs/job-template-sync.d.ts +85 -0
- package/dist/src/resource-syncs/job-template-sync.js +782 -0
- package/dist/src/resource-syncs/role-group-sync.d.ts +83 -0
- package/dist/src/resource-syncs/role-group-sync.js +597 -0
- package/dist/src/resource-syncs/schedule-sync.d.ts +111 -0
- package/dist/src/resource-syncs/schedule-sync.js +1302 -0
- package/dist/src/resource-syncs/util.d.ts +19 -0
- package/dist/src/resource-syncs/util.js +116 -0
- package/dist/src/runtime-view.d.ts +1 -0
- package/dist/src/runtime-view.js +6 -1
- package/dist/src/sync-output.d.ts +38 -0
- package/dist/src/sync-output.js +131 -0
- package/dist/src/tracked-resources.d.ts +1 -1
- package/dist/src/tracked-resources.js +26 -2
- package/dist/src/types.d.ts +224 -0
- package/dist/src/ui.d.ts +3 -0
- package/dist/src/ui.js +67 -18
- package/dist/src/utils.d.ts +2 -0
- package/dist/src/utils.js +64 -0
- package/dist/src/workspace-component.d.ts +2 -0
- package/dist/src/workspace-component.js +34 -0
- package/dist/src/workspace-resource.d.ts +2 -0
- package/dist/src/workspace-resource.js +52 -0
- package/package.json +8 -3
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { RevoClient } from '../client.ts';
|
|
2
|
+
export declare const DATABASE_VIEWS_DIRECTORY = "DatabaseViews";
|
|
3
|
+
export declare const DATABASE_VIEW_MANIFEST_FILE = "database-view.json";
|
|
4
|
+
export type DatabaseViewSourceColumn = {
|
|
5
|
+
stableKey: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
isArray: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type DatabaseViewSource = {
|
|
11
|
+
databaseStableKey: string;
|
|
12
|
+
name: string;
|
|
13
|
+
columns: DatabaseViewSourceColumn[];
|
|
14
|
+
};
|
|
15
|
+
export type DatabaseViewRawSqlSource = {
|
|
16
|
+
databaseStableKey: string;
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
export type DatabaseViewOutputField = {
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
isArray: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type DatabaseViewIndex = {
|
|
25
|
+
columns: string[];
|
|
26
|
+
unique?: boolean;
|
|
27
|
+
};
|
|
28
|
+
type DatabaseViewManifestBase = {
|
|
29
|
+
kind: 'database-view';
|
|
30
|
+
stableKey: string;
|
|
31
|
+
name: string;
|
|
32
|
+
category?: string | null;
|
|
33
|
+
description?: string;
|
|
34
|
+
metadata: Record<string, unknown>;
|
|
35
|
+
type: 'VIEW' | 'MATERIALIZED_VIEW';
|
|
36
|
+
sources: DatabaseViewSource[] | DatabaseViewRawSqlSource[];
|
|
37
|
+
output: DatabaseViewOutputField[];
|
|
38
|
+
uniqueKey?: string[];
|
|
39
|
+
indexes?: DatabaseViewIndex[];
|
|
40
|
+
};
|
|
41
|
+
export type StructuredDatabaseViewManifest = DatabaseViewManifestBase & {
|
|
42
|
+
definitionMode: 'STRUCTURED';
|
|
43
|
+
request: Record<string, unknown>;
|
|
44
|
+
sources: DatabaseViewSource[];
|
|
45
|
+
};
|
|
46
|
+
export type RawSqlDatabaseViewManifest = DatabaseViewManifestBase & {
|
|
47
|
+
definitionMode: 'RAW_SQL';
|
|
48
|
+
rawQuery: string;
|
|
49
|
+
sources: DatabaseViewRawSqlSource[];
|
|
50
|
+
};
|
|
51
|
+
export type DatabaseViewManifest = StructuredDatabaseViewManifest | RawSqlDatabaseViewManifest;
|
|
52
|
+
export type DatabaseViewPullSkip = {
|
|
53
|
+
stableKey?: string;
|
|
54
|
+
name: string;
|
|
55
|
+
reason: string;
|
|
56
|
+
};
|
|
57
|
+
export type DatabaseViewPullResult = {
|
|
58
|
+
pulled: Array<{
|
|
59
|
+
manifest: DatabaseViewManifest;
|
|
60
|
+
targetPath: string;
|
|
61
|
+
}>;
|
|
62
|
+
skipped: DatabaseViewPullSkip[];
|
|
63
|
+
};
|
|
64
|
+
export type DatabaseViewPlanStatus = 'clean' | 'create' | 'safe-update' | 'remote-changed' | 'conflict' | 'missing-lock' | 'orphan' | 'collision' | 'skipped';
|
|
65
|
+
export type DatabaseViewPlanItem = {
|
|
66
|
+
status: DatabaseViewPlanStatus;
|
|
67
|
+
stableKey?: string;
|
|
68
|
+
name: string;
|
|
69
|
+
reason?: string;
|
|
70
|
+
changedFields?: string[];
|
|
71
|
+
risks?: string[];
|
|
72
|
+
scheduleDependencies?: string[];
|
|
73
|
+
desiredHash?: string;
|
|
74
|
+
currentHash?: string;
|
|
75
|
+
baselineHash?: string;
|
|
76
|
+
};
|
|
77
|
+
export type DatabaseViewsPlan = {
|
|
78
|
+
resourceType: 'database-view';
|
|
79
|
+
env: string;
|
|
80
|
+
counts: Record<DatabaseViewPlanStatus, number>;
|
|
81
|
+
warnings: string[];
|
|
82
|
+
blockers: string[];
|
|
83
|
+
globalBlockers: string[];
|
|
84
|
+
exclusions: string[];
|
|
85
|
+
items: DatabaseViewPlanItem[];
|
|
86
|
+
};
|
|
87
|
+
export type DatabaseViewPushResult = {
|
|
88
|
+
stableKey: string;
|
|
89
|
+
action: 'create' | 'update' | 'reconcile' | 'skipped';
|
|
90
|
+
status: 'deployed' | 'skipped' | 'failed' | 'write-unverified';
|
|
91
|
+
targetPath: string;
|
|
92
|
+
reason?: string;
|
|
93
|
+
error?: string;
|
|
94
|
+
accessPolicyRequired?: boolean;
|
|
95
|
+
};
|
|
96
|
+
export declare function hashPortableDatabaseView(manifest: DatabaseViewManifest): string;
|
|
97
|
+
export declare function hashDatabaseViewManifest(manifest: DatabaseViewManifest): string;
|
|
98
|
+
export declare function buildDatabaseViewsPlan(input: {
|
|
99
|
+
client: RevoClient;
|
|
100
|
+
cwd: string;
|
|
101
|
+
envName: string;
|
|
102
|
+
stableKeyName: string;
|
|
103
|
+
}): Promise<DatabaseViewsPlan>;
|
|
104
|
+
export declare function pushDatabaseViews(input: {
|
|
105
|
+
client: RevoClient;
|
|
106
|
+
cwd: string;
|
|
107
|
+
envName: string;
|
|
108
|
+
stableKeyName: string;
|
|
109
|
+
stableKey?: string;
|
|
110
|
+
force?: boolean;
|
|
111
|
+
allowMaterializedWrites?: boolean;
|
|
112
|
+
}): Promise<{
|
|
113
|
+
plan: DatabaseViewsPlan;
|
|
114
|
+
results: DatabaseViewPushResult[];
|
|
115
|
+
}>;
|
|
116
|
+
export declare function pullDatabaseViewsToWorkspace(input: {
|
|
117
|
+
client: RevoClient;
|
|
118
|
+
cwd: string;
|
|
119
|
+
envName: string;
|
|
120
|
+
stableKeyName: string;
|
|
121
|
+
force?: boolean;
|
|
122
|
+
strict?: boolean;
|
|
123
|
+
}): Promise<DatabaseViewPullResult>;
|
|
124
|
+
export {};
|