@revoengine/cli 1.0.14 → 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 +13 -13
- package/dist/src/client.d.ts +0 -11
- package/dist/src/client.js +0 -32
- package/dist/src/commands/env.js +1 -5
- package/dist/src/commands/terminal-browser.d.ts +1 -0
- package/dist/src/commands/terminal-browser.js +23 -1
- package/dist/src/commands/terminal-policy.d.ts +6 -0
- package/dist/src/commands/terminal-policy.js +19 -0
- package/dist/src/commands/terminal-pty.js +2 -0
- package/dist/src/commands/terminal-reconnect-grace.d.ts +19 -0
- package/dist/src/commands/terminal-reconnect-grace.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 +17 -1
- package/dist/src/commands/terminal.js +390 -78
- package/dist/src/config.d.ts +0 -3
- package/dist/src/config.js +0 -2
- package/dist/src/migration.js +0 -1
- package/dist/src/resource-syncs/database-view-sync.d.ts +0 -1
- package/dist/src/resource-syncs/database-view-sync.js +1 -12
- package/package.json +5 -4
- package/scripts/ensure-pty-helper.mjs +0 -9
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
|
@@ -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 };
|
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",
|
|
@@ -15,11 +15,10 @@
|
|
|
15
15
|
"dev": "node ./scripts/dev.ts",
|
|
16
16
|
"prepack": "npm run build",
|
|
17
17
|
"test": "node --test ./test/*.test.ts",
|
|
18
|
-
"postinstall": "
|
|
18
|
+
"postinstall": "playwright-core install --only-shell chromium"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"dist/",
|
|
22
|
-
"scripts/ensure-pty-helper.mjs",
|
|
23
22
|
"README.md",
|
|
24
23
|
"tsconfig.json",
|
|
25
24
|
"tsconfig.build.json"
|
|
@@ -35,7 +34,9 @@
|
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
36
|
"ws": "^8.19.0",
|
|
38
|
-
"node-pty": "^1.0.0",
|
|
39
37
|
"playwright-core": "1.63.0"
|
|
38
|
+
},
|
|
39
|
+
"optionalDependencies": {
|
|
40
|
+
"node-pty": "^1.0.0"
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
4
|
-
|
|
5
|
-
const packageRoot = fileURLToPath(new URL('..', import.meta.url));
|
|
6
|
-
const source = fs.existsSync(path.join(packageRoot, 'dist/src/commands/terminal-pty.js'))
|
|
7
|
-
? 'dist/src/commands/terminal-pty.js' : 'src/commands/terminal-pty.ts';
|
|
8
|
-
const { ensurePtyHelperExecutable } = await import(pathToFileURL(path.join(packageRoot, source)).href);
|
|
9
|
-
ensurePtyHelperExecutable();
|