@revoengine/cli 1.0.13 → 1.0.15
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 +26 -12
- package/dist/src/cli.js +4 -0
- package/dist/src/client.d.ts +5 -11
- package/dist/src/client.js +41 -74
- package/dist/src/commands/component.js +26 -25
- package/dist/src/commands/env.js +1 -5
- package/dist/src/commands/migrate.js +10 -0
- package/dist/src/commands/terminal-browser.d.ts +41 -6
- package/dist/src/commands/terminal-browser.js +503 -20
- package/dist/src/commands/terminal-image.js +59 -1
- package/dist/src/commands/terminal-operational-log.d.ts +18 -0
- package/dist/src/commands/terminal-operational-log.js +119 -0
- package/dist/src/commands/terminal-policy.d.ts +29 -0
- package/dist/src/commands/terminal-policy.js +67 -0
- package/dist/src/commands/terminal-pty.d.ts +4 -0
- package/dist/src/commands/terminal-pty.js +41 -0
- package/dist/src/commands/terminal-reconnect-grace.d.ts +30 -0
- package/dist/src/commands/terminal-reconnect-grace.js +87 -0
- package/dist/src/commands/terminal-sandbox.d.ts +5 -1
- package/dist/src/commands/terminal-sandbox.js +19 -5
- package/dist/src/commands/terminal-secure-browser.d.ts +25 -0
- package/dist/src/commands/terminal-secure-browser.js +58 -0
- package/dist/src/commands/terminal-service.d.ts +4 -3
- package/dist/src/commands/terminal-service.js +19 -15
- package/dist/src/commands/terminal.d.ts +22 -3
- package/dist/src/commands/terminal.js +622 -95
- package/dist/src/config.d.ts +0 -3
- package/dist/src/config.js +0 -2
- package/dist/src/migration.js +10 -11
- package/dist/src/request-queue.d.ts +20 -0
- package/dist/src/request-queue.js +80 -0
- package/dist/src/resource-inventory.js +9 -10
- package/dist/src/resource-syncs/database-view-sync.d.ts +0 -1
- package/dist/src/resource-syncs/database-view-sync.js +1 -12
- package/dist/src/resource-syncs/endpoint-sync.js +12 -46
- package/dist/src/types.d.ts +2 -0
- package/package.json +5 -3
package/dist/src/config.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export type RuntimeConfig = {
|
|
|
4
4
|
baseUrl: string;
|
|
5
5
|
instance: string;
|
|
6
6
|
token: string;
|
|
7
|
-
production?: true;
|
|
8
7
|
};
|
|
9
8
|
export type RuntimeConfigOptions = {
|
|
10
9
|
baseUrl?: string;
|
|
@@ -16,7 +15,6 @@ export type StoredEnvironmentProfile = {
|
|
|
16
15
|
baseUrl: string;
|
|
17
16
|
token: string;
|
|
18
17
|
instance?: string;
|
|
19
|
-
production?: true;
|
|
20
18
|
};
|
|
21
19
|
type StoredConfig = Omit<RuntimeConfig, 'instance'> & {
|
|
22
20
|
instance?: string;
|
|
@@ -69,7 +67,6 @@ export declare function readAuthValidationState(key?: string): AuthValidationSta
|
|
|
69
67
|
export declare function saveAuthValidationState(state: AuthValidationState): void;
|
|
70
68
|
export declare function clearAuthValidationState(key?: string): void;
|
|
71
69
|
export declare function resolveRuntimeConfig(options?: RuntimeConfigOptions): {
|
|
72
|
-
production?: true | undefined;
|
|
73
70
|
baseUrl: string;
|
|
74
71
|
instance: string;
|
|
75
72
|
token: string;
|
package/dist/src/config.js
CHANGED
|
@@ -185,7 +185,6 @@ function parseEnvironmentProfiles(value) {
|
|
|
185
185
|
baseUrl: entry.baseUrl,
|
|
186
186
|
token: entry.token,
|
|
187
187
|
...(typeof entry.instance === 'string' && isUuid(entry.instance) ? { instance: entry.instance } : {}),
|
|
188
|
-
...(entry.production === true ? { production: true } : {}),
|
|
189
188
|
};
|
|
190
189
|
}
|
|
191
190
|
return Object.keys(environments).length > 0 ? environments : null;
|
|
@@ -475,7 +474,6 @@ export function resolveRuntimeConfig(options = {}) {
|
|
|
475
474
|
baseUrl: options.baseUrl || profile.baseUrl || DEFAULT_BASE_URL,
|
|
476
475
|
instance: options.instance ?? (profile.instance || ''),
|
|
477
476
|
token: options.token || profile.token || '',
|
|
478
|
-
...(profile.production ? { production: true } : {}),
|
|
479
477
|
};
|
|
480
478
|
}
|
|
481
479
|
const defaultStored = mergeWithLegacy(stored);
|
package/dist/src/migration.js
CHANGED
|
@@ -59,7 +59,6 @@ function migrationPolicy(input) {
|
|
|
59
59
|
function viewMigrationPolicy(input, deferPreview = false) {
|
|
60
60
|
return {
|
|
61
61
|
...migrationPolicy(input),
|
|
62
|
-
allowActiveScheduleDependencies: true,
|
|
63
62
|
...(deferPreview ? { deferPreview: true } : {}),
|
|
64
63
|
};
|
|
65
64
|
}
|
|
@@ -867,11 +866,21 @@ function workspaceDesiredPulls(input) {
|
|
|
867
866
|
} : {}),
|
|
868
867
|
};
|
|
869
868
|
}
|
|
869
|
+
function migrationComponentIdentity(cwd) {
|
|
870
|
+
const projectRoot = resolveProjectRoot(cwd) || cwd;
|
|
871
|
+
const identity = readProjectMetadata(cwd)
|
|
872
|
+
? readProjectComponentIdentity(cwd)
|
|
873
|
+
: readComponentLock(projectRoot).componentIdentity;
|
|
874
|
+
return identity.mode === 'stableKey'
|
|
875
|
+
? identity
|
|
876
|
+
: { mode: 'stableKey', metadataProperty: readProjectStableKeyName(cwd) };
|
|
877
|
+
}
|
|
870
878
|
function componentCommandContext(input) {
|
|
871
879
|
return {
|
|
872
880
|
args: { _: ['component', input.operation], all: true, force: true, yes: true },
|
|
873
881
|
client: input.client,
|
|
874
882
|
componentEnvironment: input.envName,
|
|
883
|
+
componentIdentity: migrationComponentIdentity(input.cwd),
|
|
875
884
|
cwd: input.cwd,
|
|
876
885
|
packageVersion: 'migration',
|
|
877
886
|
print: () => undefined,
|
|
@@ -879,15 +888,6 @@ function componentCommandContext(input) {
|
|
|
879
888
|
error: () => undefined,
|
|
880
889
|
};
|
|
881
890
|
}
|
|
882
|
-
function requireStableComponentIdentity(cwd) {
|
|
883
|
-
const projectRoot = resolveProjectRoot(cwd) || cwd;
|
|
884
|
-
const identity = readProjectMetadata(cwd)
|
|
885
|
-
? readProjectComponentIdentity(cwd)
|
|
886
|
-
: readComponentLock(projectRoot).componentIdentity;
|
|
887
|
-
if (identity.mode !== 'stableKey') {
|
|
888
|
-
throw new Error('Component migration requires componentIdentity.mode "stableKey" in project metadata or the shared lock.');
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
891
|
export async function pullResourcesToWorkspace(input) {
|
|
892
892
|
requireProject(input);
|
|
893
893
|
const resources = selectedResources(input);
|
|
@@ -915,7 +915,6 @@ export async function pullResourcesToWorkspace(input) {
|
|
|
915
915
|
}));
|
|
916
916
|
}
|
|
917
917
|
if (resources.includes('component')) {
|
|
918
|
-
requireStableComponentIdentity(input.cwd);
|
|
919
918
|
pulls.components = await runMigrationStage('source pull', 'component', input.sourceLabel, () => pullAllComponents(componentCommandContext({
|
|
920
919
|
cwd: input.cwd,
|
|
921
920
|
envName: input.sourceKey,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const HTTP_REQUEST_CONCURRENCY = 6;
|
|
2
|
+
export declare const DEFAULT_QUEUE_TIMEOUT_MS: number;
|
|
3
|
+
export declare class RequestQueue {
|
|
4
|
+
private active;
|
|
5
|
+
private pendingReads;
|
|
6
|
+
private pendingMutations;
|
|
7
|
+
private readonly concurrency;
|
|
8
|
+
constructor(concurrency?: number);
|
|
9
|
+
run<T>(task: () => Promise<T>, options?: {
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
timeoutMs?: number;
|
|
12
|
+
priority?: 'read' | 'mutation';
|
|
13
|
+
}): Promise<T>;
|
|
14
|
+
private pendingFor;
|
|
15
|
+
private removePending;
|
|
16
|
+
private clearWait;
|
|
17
|
+
private drain;
|
|
18
|
+
}
|
|
19
|
+
export declare function withRequestQueue<T>(command: () => Promise<T>): Promise<T>;
|
|
20
|
+
export declare function currentRequestQueue(): RequestQueue | undefined;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
+
export const HTTP_REQUEST_CONCURRENCY = 6;
|
|
3
|
+
export const DEFAULT_QUEUE_TIMEOUT_MS = 5 * 60_000;
|
|
4
|
+
export class RequestQueue {
|
|
5
|
+
active = 0;
|
|
6
|
+
pendingReads = [];
|
|
7
|
+
pendingMutations = [];
|
|
8
|
+
concurrency;
|
|
9
|
+
constructor(concurrency = HTTP_REQUEST_CONCURRENCY) {
|
|
10
|
+
this.concurrency = concurrency;
|
|
11
|
+
}
|
|
12
|
+
run(task, options = {}) {
|
|
13
|
+
if (options.signal?.aborted) {
|
|
14
|
+
return Promise.reject(options.signal.reason ?? new DOMException('Request cancelled.', 'AbortError'));
|
|
15
|
+
}
|
|
16
|
+
return new Promise((resolve, reject) => {
|
|
17
|
+
const entry = {
|
|
18
|
+
task, resolve: (value) => resolve(value), reject,
|
|
19
|
+
signal: options.signal,
|
|
20
|
+
priority: options.priority ?? 'read',
|
|
21
|
+
};
|
|
22
|
+
if (options.signal) {
|
|
23
|
+
entry.onAbort = () => this.removePending(entry, options.signal?.reason ?? new DOMException('Request cancelled.', 'AbortError'));
|
|
24
|
+
options.signal.addEventListener('abort', entry.onAbort, { once: true });
|
|
25
|
+
}
|
|
26
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_QUEUE_TIMEOUT_MS;
|
|
27
|
+
entry.timer = setTimeout(() => this.removePending(entry, new Error(`HTTP request queue wait timed out after ${timeoutMs} ms.`)), timeoutMs);
|
|
28
|
+
this.pendingFor(entry).push(entry);
|
|
29
|
+
this.drain();
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
pendingFor(entry) {
|
|
33
|
+
return entry.priority === 'mutation' ? this.pendingMutations : this.pendingReads;
|
|
34
|
+
}
|
|
35
|
+
removePending(entry, error) {
|
|
36
|
+
const pending = this.pendingFor(entry);
|
|
37
|
+
const index = pending.indexOf(entry);
|
|
38
|
+
if (index < 0) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
pending.splice(index, 1);
|
|
42
|
+
this.clearWait(entry);
|
|
43
|
+
entry.reject(error);
|
|
44
|
+
}
|
|
45
|
+
clearWait(entry) {
|
|
46
|
+
if (entry.timer) {
|
|
47
|
+
clearTimeout(entry.timer);
|
|
48
|
+
}
|
|
49
|
+
if (entry.signal && entry.onAbort) {
|
|
50
|
+
entry.signal.removeEventListener('abort', entry.onAbort);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
drain() {
|
|
54
|
+
while (this.active < this.concurrency && (this.pendingMutations.length > 0 || this.pendingReads.length > 0)) {
|
|
55
|
+
const entry = this.pendingMutations.shift() || this.pendingReads.shift();
|
|
56
|
+
this.clearWait(entry);
|
|
57
|
+
if (entry.signal?.aborted) {
|
|
58
|
+
entry.reject(entry.signal.reason ?? new DOMException('Request cancelled.', 'AbortError'));
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
this.active += 1;
|
|
62
|
+
Promise.resolve().then(entry.task).then((value) => {
|
|
63
|
+
this.active -= 1;
|
|
64
|
+
this.drain();
|
|
65
|
+
entry.resolve(value);
|
|
66
|
+
}, (error) => {
|
|
67
|
+
this.active -= 1;
|
|
68
|
+
this.drain();
|
|
69
|
+
entry.reject(error);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const commandQueue = new AsyncLocalStorage();
|
|
75
|
+
export function withRequestQueue(command) {
|
|
76
|
+
return commandQueue.run(new RequestQueue(), command);
|
|
77
|
+
}
|
|
78
|
+
export function currentRequestQueue() {
|
|
79
|
+
return commandQueue.getStore();
|
|
80
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { HTTP_REQUEST_CONCURRENCY } from "./request-queue.js";
|
|
2
|
+
import { mapWithConcurrency } from "./utils.js";
|
|
1
3
|
export function unwrapResource(value) {
|
|
2
4
|
if (value && typeof value === 'object' && !Array.isArray(value) && 'data' in value) {
|
|
3
5
|
const data = value.data;
|
|
@@ -22,16 +24,13 @@ export function resourceIdOf(resource) {
|
|
|
22
24
|
|| '');
|
|
23
25
|
}
|
|
24
26
|
async function* readDetails(summaries, getDetail) {
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
for (const entry of entries) {
|
|
33
|
-
yield entry;
|
|
34
|
-
}
|
|
27
|
+
const entries = await mapWithConcurrency(summaries, async (summary) => {
|
|
28
|
+
const listedId = resourceIdOf(summary);
|
|
29
|
+
const resource = listedId ? unwrapResource(await getDetail(listedId)) : summary;
|
|
30
|
+
return { listedId, resource };
|
|
31
|
+
}, HTTP_REQUEST_CONCURRENCY);
|
|
32
|
+
for (const entry of entries) {
|
|
33
|
+
yield entry;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
const readers = {
|
|
@@ -71,7 +71,6 @@ export type DatabaseViewMigrationPolicy = {
|
|
|
71
71
|
sourceWins: boolean;
|
|
72
72
|
allowDestructive: boolean;
|
|
73
73
|
deferPreview?: boolean;
|
|
74
|
-
allowActiveScheduleDependencies?: boolean;
|
|
75
74
|
};
|
|
76
75
|
export type DatabaseViewPlanStatus = 'clean' | 'create' | 'safe-update' | 'remote-changed' | 'conflict' | 'validation-failed' | 'missing-lock' | 'orphan' | 'collision' | 'skipped';
|
|
77
76
|
export type DatabaseViewPlanItem = {
|
|
@@ -950,10 +950,9 @@ function verifyUpdatedDatabaseView(input) {
|
|
|
950
950
|
return remoteHash;
|
|
951
951
|
}
|
|
952
952
|
async function recheckDatabaseViewUpdate(input) {
|
|
953
|
-
const [views, databaseResult
|
|
953
|
+
const [views, databaseResult] = await Promise.all([
|
|
954
954
|
input.client.listAllDatabaseViewsForSync(),
|
|
955
955
|
input.client.listAllDatabaseSchemas({ projection: 'pull' }),
|
|
956
|
-
input.client.listAllSchedules(),
|
|
957
956
|
]);
|
|
958
957
|
const matches = views.filter((record) => stableKeyOf(record, input.stableKeyName) === input.manifest.stableKey);
|
|
959
958
|
if (matches.length !== 1) {
|
|
@@ -990,16 +989,6 @@ async function recheckDatabaseViewUpdate(input) {
|
|
|
990
989
|
if (hashPortableDatabaseView(current) !== input.expectedHash) {
|
|
991
990
|
throw new Error('TARGET portable content changed after planning');
|
|
992
991
|
}
|
|
993
|
-
const materializedDetails = materializedPlanDetails({
|
|
994
|
-
manifest: input.manifest,
|
|
995
|
-
schedules: schedules.schedules,
|
|
996
|
-
databaseViewId,
|
|
997
|
-
});
|
|
998
|
-
if (materializedDetails.scheduleDependencies
|
|
999
|
-
&& materializedDetails.scheduleDependencies.length > 0
|
|
1000
|
-
&& input.migrationPolicy?.allowActiveScheduleDependencies !== true) {
|
|
1001
|
-
throw new Error(`active refresh Schedule dependencies require manual coordination: ${materializedDetails.scheduleDependencies.join(', ')}`);
|
|
1002
|
-
}
|
|
1003
992
|
const preview = await input.client.previewDatabaseView(databaseViewPreviewPayload(input.manifest));
|
|
1004
993
|
assertTargetPreviewMatchesManifest(input.manifest, preview);
|
|
1005
994
|
return { target, databases: databaseResult.databases };
|
|
@@ -3,14 +3,14 @@ import { describeFieldChanges } from "../diff-details.js";
|
|
|
3
3
|
import { hashPortableComponentSource, hashStable, readComponentLock, writeComponentLock } from "../component-lock.js";
|
|
4
4
|
import { withHttpTraceContext } from "../http-trace.js";
|
|
5
5
|
import { readConfiguredResourceMetadataStableKey, sanitizeUserMetadata } from "../resource-metadata.js";
|
|
6
|
-
import {
|
|
6
|
+
import { HTTP_REQUEST_CONCURRENCY } from "../request-queue.js";
|
|
7
|
+
import { mapWithConcurrency, readJsonFile, sanitizeSegment } from "../utils.js";
|
|
7
8
|
import { hydrateWorkspaceComponentElementDetails } from "../workspace-component.js";
|
|
8
9
|
import { findManifestFiles, isRecord, localTargetPath, removeRelocatedManifest, requireProjectLayout, stableKeySuffix, toPortableRelativePath, unwrapData, writePulledManifest, } from "./util.js";
|
|
9
10
|
export const ENDPOINTS_DIRECTORY = 'Endpoints';
|
|
10
11
|
export const ENDPOINT_MANIFEST_FILE = 'endpoint.json';
|
|
11
12
|
const ENDPOINT_DEFAULT_TIMEOUT_SECONDS = 60;
|
|
12
13
|
const ENDPOINT_DEFAULT_MEMORY_MB = 32;
|
|
13
|
-
const REMOTE_DETAIL_BATCH_SIZE = 10;
|
|
14
14
|
const REMOTE_DETAIL_REQUEST_TIMEOUT_MS = 30_000;
|
|
15
15
|
const ENDPOINT_PLAN_STATUS_ORDER = [
|
|
16
16
|
'create', 'restore', 'safe-update', 'remote-changed', 'conflict', 'missing-lock',
|
|
@@ -212,41 +212,9 @@ function readWorkspaceComponents(cwd, stableKeyName) {
|
|
|
212
212
|
}
|
|
213
213
|
return result;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
let available = REMOTE_DETAIL_BATCH_SIZE;
|
|
217
|
-
const waiting = [];
|
|
218
|
-
return async (task) => {
|
|
219
|
-
if (available > 0) {
|
|
220
|
-
available -= 1;
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
await new Promise((resolve) => waiting.push(resolve));
|
|
224
|
-
}
|
|
225
|
-
try {
|
|
226
|
-
return await task();
|
|
227
|
-
}
|
|
228
|
-
finally {
|
|
229
|
-
const next = waiting.shift();
|
|
230
|
-
if (next) {
|
|
231
|
-
next();
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
available += 1;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
async function mapInBatches(items, mapper, schedule) {
|
|
240
|
-
const results = [];
|
|
241
|
-
for (let offset = 0; offset < items.length; offset += REMOTE_DETAIL_BATCH_SIZE) {
|
|
242
|
-
const batch = items.slice(offset, offset + REMOTE_DETAIL_BATCH_SIZE);
|
|
243
|
-
results.push(...await Promise.all(batch.map((item) => schedule(() => mapper(item)))));
|
|
244
|
-
}
|
|
245
|
-
return results;
|
|
246
|
-
}
|
|
247
|
-
async function loadRemoteEndpoints(client, schedule = createRemoteDetailScheduler()) {
|
|
215
|
+
async function loadRemoteEndpoints(client) {
|
|
248
216
|
const { endpoints } = await withHttpTraceContext({ operation: 'list' }, () => client.listAllEndpoints());
|
|
249
|
-
return
|
|
217
|
+
return mapWithConcurrency(endpoints, async (summary) => {
|
|
250
218
|
const endpointId = endpointIdOf(summary);
|
|
251
219
|
if (!endpointId) {
|
|
252
220
|
return summary;
|
|
@@ -256,11 +224,11 @@ async function loadRemoteEndpoints(client, schedule = createRemoteDetailSchedule
|
|
|
256
224
|
entityId: endpointId,
|
|
257
225
|
...(typeof summary.name === 'string' ? { entityName: summary.name } : {}),
|
|
258
226
|
}, () => client.getEndpoint(endpointId, { timeoutMs: REMOTE_DETAIL_REQUEST_TIMEOUT_MS })));
|
|
259
|
-
},
|
|
227
|
+
}, HTTP_REQUEST_CONCURRENCY);
|
|
260
228
|
}
|
|
261
|
-
async function loadRemoteComponents(client
|
|
229
|
+
async function loadRemoteComponents(client) {
|
|
262
230
|
const { components } = await withHttpTraceContext({ dependency: 'component', operation: 'list' }, () => client.listAllComponents());
|
|
263
|
-
return
|
|
231
|
+
return mapWithConcurrency(components, async (summary) => {
|
|
264
232
|
const componentId = componentIdOf(summary);
|
|
265
233
|
if (!componentId) {
|
|
266
234
|
return summary;
|
|
@@ -271,7 +239,7 @@ async function loadRemoteComponents(client, schedule = createRemoteDetailSchedul
|
|
|
271
239
|
entityId: componentId,
|
|
272
240
|
...(typeof summary.name === 'string' ? { entityName: summary.name } : {}),
|
|
273
241
|
}, () => client.getComponent(componentId, { timeoutMs: REMOTE_DETAIL_REQUEST_TIMEOUT_MS })));
|
|
274
|
-
},
|
|
242
|
+
}, HTTP_REQUEST_CONCURRENCY);
|
|
275
243
|
}
|
|
276
244
|
async function componentBinding(input) {
|
|
277
245
|
const component = input.componentsById.get(input.componentId);
|
|
@@ -361,10 +329,9 @@ async function manifestFromRecord(input) {
|
|
|
361
329
|
}
|
|
362
330
|
export async function pullEndpointsToWorkspace(input) {
|
|
363
331
|
const { projectRoot, workspaceRoot } = requireProjectLayout(input.cwd, 'Endpoint');
|
|
364
|
-
const scheduleDetail = createRemoteDetailScheduler();
|
|
365
332
|
const [records, components] = await Promise.all([
|
|
366
|
-
loadRemoteEndpoints(input.client
|
|
367
|
-
loadRemoteComponents(input.client
|
|
333
|
+
loadRemoteEndpoints(input.client),
|
|
334
|
+
loadRemoteComponents(input.client),
|
|
368
335
|
]);
|
|
369
336
|
const componentsById = new Map(components.map((component) => [componentIdOf(component), component]));
|
|
370
337
|
const manifests = [];
|
|
@@ -761,10 +728,9 @@ export async function buildEndpointsPlan(input) {
|
|
|
761
728
|
}
|
|
762
729
|
}
|
|
763
730
|
}
|
|
764
|
-
const scheduleDetail = createRemoteDetailScheduler();
|
|
765
731
|
const [targetEndpoints, targetComponents] = await Promise.all([
|
|
766
|
-
loadRemoteEndpoints(input.client
|
|
767
|
-
loadRemoteComponents(input.client
|
|
732
|
+
loadRemoteEndpoints(input.client),
|
|
733
|
+
loadRemoteComponents(input.client),
|
|
768
734
|
]);
|
|
769
735
|
const workspaceComponents = readWorkspaceComponents(input.cwd, input.stableKeyName);
|
|
770
736
|
const targetComponentsByKey = targetComponentsByStableKey(targetComponents, input.stableKeyName);
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RevoClient } from './client.ts';
|
|
2
|
+
import type { ComponentIdentityConfig } from './resource-metadata.ts';
|
|
2
3
|
export type ParsedArgs = {
|
|
3
4
|
_: string[];
|
|
4
5
|
[key: string]: string | boolean | string[] | undefined;
|
|
@@ -7,6 +8,7 @@ export type CommandContext = {
|
|
|
7
8
|
args: ParsedArgs;
|
|
8
9
|
client: RevoClient;
|
|
9
10
|
componentEnvironment?: string;
|
|
11
|
+
componentIdentity?: ComponentIdentityConfig;
|
|
10
12
|
cwd: string;
|
|
11
13
|
packageVersion: string;
|
|
12
14
|
print: (value: unknown) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revoengine/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "CLI package for the RevoEngine Platform API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "npm run clean && tsc -p tsconfig.build.json",
|
|
13
13
|
"clean": "node --input-type=module -e \"import fs from 'node:fs'; fs.rmSync('dist', { recursive: true, force: true });\"",
|
|
14
|
-
"check": "node --input-type=module -e \"await import('./src/config.ts'); await import('./src/legacy.ts'); await import('./src/http-trace.ts'); await import('./src/client.ts'); await import('./src/component-lock.ts'); await import('./src/diff-details.ts'); await import('./src/resource-metadata.ts'); await import('./src/tracked-resources.ts'); await import('./src/resource-inventory.ts'); await import('./src/metadata-backfill.ts'); await import('./src/workspace-component.ts'); await import('./src/workspace-resource.ts'); await import('./src/database-table-artifacts.ts'); await import('./src/project.ts'); await import('./src/prompt.ts'); await import('./src/runtime-view.ts'); await import('./src/spinner.ts'); await import('./src/types.ts'); await import('./src/utils.ts'); await import('./src/resource-syncs/util.ts'); await import('./src/resource-syncs/database-table-sync.ts'); await import('./src/resource-syncs/database-view-sync.ts'); await import('./src/resource-syncs/endpoint-sync.ts'); await import('./src/resource-syncs/group-sync.ts'); await import('./src/resource-syncs/role-group-sync.ts'); await import('./src/resource-syncs/job-template-sync.ts'); await import('./src/resource-syncs/schedule-sync.ts'); await import('./src/resource-syncs/event-sync.ts'); await import('./src/migration.ts'); await import('./src/workspace-diff.ts'); await import('./src/sync-output.ts'); await import('./src/ui.ts'); await import('./src/update-notifier.ts'); await import('./src/env-sync.ts'); await import('./src/commands/auth.ts'); await import('./src/commands/component.ts'); await import('./src/commands/database-tables.ts'); await import('./src/commands/database-views.ts'); await import('./src/commands/endpoints.ts'); await import('./src/commands/env.ts'); await import('./src/commands/events.ts'); await import('./src/commands/groups.ts'); await import('./src/commands/info.ts'); await import('./src/commands/job-templates.ts'); await import('./src/commands/metadata.ts'); await import('./src/commands/migrate.ts'); await import('./src/commands/request.ts'); await import('./src/commands/role-groups.ts'); await import('./src/commands/search.ts'); await import('./src/commands/schedules.ts'); await import('./src/commands/terminal-service.ts'); await import('./src/commands/terminal-browser.ts'); await import('./src/commands/terminal-image.ts'); await import('./src/commands/terminal-sandbox.ts'); await import('./src/commands/terminal-patch.ts'); await import('./src/commands/terminal-patch-worker.ts'); await import('./src/commands/terminal.ts'); await import('./src/cli.ts'); await import('./src/index.ts'); await import('./bin/revo.ts'); await import('./scripts/dev.ts')\"",
|
|
14
|
+
"check": "node --input-type=module -e \"await import('./src/config.ts'); await import('./src/legacy.ts'); await import('./src/http-trace.ts'); await import('./src/request-queue.ts'); await import('./src/client.ts'); await import('./src/component-lock.ts'); await import('./src/diff-details.ts'); await import('./src/resource-metadata.ts'); await import('./src/tracked-resources.ts'); await import('./src/resource-inventory.ts'); await import('./src/metadata-backfill.ts'); await import('./src/workspace-component.ts'); await import('./src/workspace-resource.ts'); await import('./src/database-table-artifacts.ts'); await import('./src/project.ts'); await import('./src/prompt.ts'); await import('./src/runtime-view.ts'); await import('./src/spinner.ts'); await import('./src/types.ts'); await import('./src/utils.ts'); await import('./src/resource-syncs/util.ts'); await import('./src/resource-syncs/database-table-sync.ts'); await import('./src/resource-syncs/database-view-sync.ts'); await import('./src/resource-syncs/endpoint-sync.ts'); await import('./src/resource-syncs/group-sync.ts'); await import('./src/resource-syncs/role-group-sync.ts'); await import('./src/resource-syncs/job-template-sync.ts'); await import('./src/resource-syncs/schedule-sync.ts'); await import('./src/resource-syncs/event-sync.ts'); await import('./src/migration.ts'); await import('./src/workspace-diff.ts'); await import('./src/sync-output.ts'); await import('./src/ui.ts'); await import('./src/update-notifier.ts'); await import('./src/env-sync.ts'); await import('./src/commands/auth.ts'); await import('./src/commands/component.ts'); await import('./src/commands/database-tables.ts'); await import('./src/commands/database-views.ts'); await import('./src/commands/endpoints.ts'); await import('./src/commands/env.ts'); await import('./src/commands/events.ts'); await import('./src/commands/groups.ts'); await import('./src/commands/info.ts'); await import('./src/commands/job-templates.ts'); await import('./src/commands/metadata.ts'); await import('./src/commands/migrate.ts'); await import('./src/commands/request.ts'); await import('./src/commands/role-groups.ts'); await import('./src/commands/search.ts'); await import('./src/commands/schedules.ts'); await import('./src/commands/terminal-service.ts'); await import('./src/commands/terminal-browser.ts'); await import('./src/commands/terminal-image.ts'); await import('./src/commands/terminal-sandbox.ts'); await import('./src/commands/terminal-patch.ts'); await import('./src/commands/terminal-patch-worker.ts'); await import('./src/commands/terminal.ts'); await import('./src/cli.ts'); await import('./src/index.ts'); await import('./bin/revo.ts'); await import('./scripts/dev.ts')\"",
|
|
15
15
|
"dev": "node ./scripts/dev.ts",
|
|
16
16
|
"prepack": "npm run build",
|
|
17
17
|
"test": "node --test ./test/*.test.ts",
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"ws": "^8.19.0",
|
|
37
|
-
"node-pty": "^1.0.0",
|
|
38
37
|
"playwright-core": "1.63.0"
|
|
38
|
+
},
|
|
39
|
+
"optionalDependencies": {
|
|
40
|
+
"node-pty": "^1.0.0"
|
|
39
41
|
}
|
|
40
42
|
}
|