@revoengine/cli 1.0.33 → 1.0.35
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/CHANGELOG.md +34 -0
- package/README.md +89 -6
- package/dist/src/argument-contract.d.ts +17 -0
- package/dist/src/argument-contract.js +359 -0
- package/dist/src/automation-contract.generated.d.ts +2 -2
- package/dist/src/automation-contract.generated.js +2 -2
- package/dist/src/cli.js +15 -13
- package/dist/src/client.d.ts +2 -0
- package/dist/src/client.js +38 -1
- package/dist/src/commands/agents.js +5 -1
- package/dist/src/commands/auth.js +2 -0
- package/dist/src/commands/component.js +34 -17
- package/dist/src/commands/database-tables.js +5 -1
- package/dist/src/commands/database-views.js +5 -1
- package/dist/src/commands/endpoints.js +5 -1
- package/dist/src/commands/env.js +5 -1
- package/dist/src/commands/events.js +5 -1
- package/dist/src/commands/groups.js +5 -1
- package/dist/src/commands/info.js +2 -0
- package/dist/src/commands/job-templates.js +5 -1
- package/dist/src/commands/metadata.js +2 -0
- package/dist/src/commands/migrate.d.ts +2 -2
- package/dist/src/commands/migrate.js +31 -7
- package/dist/src/commands/project.js +19 -14
- package/dist/src/commands/request.js +2 -0
- package/dist/src/commands/role-groups.js +5 -1
- package/dist/src/commands/schedules.js +5 -1
- package/dist/src/commands/search.js +2 -0
- package/dist/src/commands/service-accounts.js +5 -1
- package/dist/src/commands/studio.js +2 -0
- package/dist/src/commands/terminal-file-descriptor.d.ts +9 -0
- package/dist/src/commands/terminal-file-descriptor.js +39 -0
- package/dist/src/commands/terminal-file.js +41 -6
- package/dist/src/commands/terminal-image.js +3 -31
- package/dist/src/commands/terminal-process-group.d.ts +25 -0
- package/dist/src/commands/terminal-process-group.js +144 -0
- package/dist/src/commands/terminal.js +123 -40
- package/dist/src/commands/tests.js +2 -0
- package/dist/src/component-lock.d.ts +15 -1
- package/dist/src/component-lock.js +96 -10
- package/dist/src/env-sync.js +12 -6
- package/dist/src/migration.d.ts +7 -0
- package/dist/src/migration.js +39 -21
- package/dist/src/planning-snapshot.d.ts +3 -0
- package/dist/src/planning-snapshot.js +60 -2
- package/dist/src/project.d.ts +1 -0
- package/dist/src/project.js +7 -8
- package/dist/src/resource-syncs/agent-sync.js +76 -24
- package/dist/src/resource-syncs/database-table-sync.js +33 -22
- package/dist/src/resource-syncs/database-view-sync.js +41 -28
- package/dist/src/resource-syncs/endpoint-sync.js +90 -18
- package/dist/src/resource-syncs/event-sync.js +33 -14
- package/dist/src/resource-syncs/group-sync.js +21 -11
- package/dist/src/resource-syncs/job-template-sync.js +98 -37
- package/dist/src/resource-syncs/role-group-sync.js +22 -11
- package/dist/src/resource-syncs/schedule-sync.js +26 -11
- package/dist/src/resource-syncs/service-account-sync.js +22 -11
- package/dist/src/reviewed-plan.js +3 -0
- package/dist/src/runtime-view.js +2 -18
- package/dist/src/sync-omit-command.d.ts +6 -0
- package/dist/src/sync-omit-command.js +49 -0
- package/dist/src/sync-omit-write-fence.d.ts +10 -0
- package/dist/src/sync-omit-write-fence.js +134 -0
- package/dist/src/sync-omit.d.ts +59 -0
- package/dist/src/sync-omit.js +469 -0
- package/dist/src/ui.js +10 -5
- package/dist/src/update-notifier.d.ts +1 -1
- package/dist/src/update-notifier.js +2 -1
- package/dist/src/utils.js +46 -17
- package/dist/src/workspace-prune.js +11 -3
- package/dist/src/workspace-write-lock.d.ts +7 -0
- package/dist/src/workspace-write-lock.js +144 -0
- package/package.json +4 -2
|
@@ -6,6 +6,9 @@ const families = ['databaseSchemas', 'databaseViews', 'components', 'jobTemplate
|
|
|
6
6
|
function reviewState(plan) {
|
|
7
7
|
return {
|
|
8
8
|
target: plan.pruneTargetKey,
|
|
9
|
+
omitTargetRevisionHash: plan.omitTargetRevisionHash,
|
|
10
|
+
omitSourceRevisionHash: plan.omitSourceRevisionHash,
|
|
11
|
+
omitTargetVersions: plan.omitTargetVersions,
|
|
9
12
|
resources: plan.resources,
|
|
10
13
|
policy: plan.policy,
|
|
11
14
|
identityOrder: plan.identityOrder,
|
package/dist/src/runtime-view.js
CHANGED
|
@@ -1,24 +1,8 @@
|
|
|
1
1
|
import { getActiveEnvironmentName, getConfigDir, resolveRuntimeConfig } from "./config.js";
|
|
2
2
|
import { AuthenticationError } from "./client.js";
|
|
3
|
+
import { runtimeConnectionOverrides } from "./argument-contract.js";
|
|
3
4
|
function resolveArgsRuntime(context) {
|
|
4
|
-
return resolveRuntimeConfig(
|
|
5
|
-
envName: typeof context.args.env === 'string' ? context.args.env : undefined,
|
|
6
|
-
baseUrl: typeof context.args.url === 'string'
|
|
7
|
-
? context.args.url
|
|
8
|
-
: typeof context.args.baseUrl === 'string'
|
|
9
|
-
? context.args.baseUrl
|
|
10
|
-
: undefined,
|
|
11
|
-
instance: typeof context.args.instance === 'string'
|
|
12
|
-
? context.args.instance
|
|
13
|
-
: typeof context.args.i === 'string'
|
|
14
|
-
? context.args.i
|
|
15
|
-
: undefined,
|
|
16
|
-
token: typeof context.args.token === 'string'
|
|
17
|
-
? context.args.token
|
|
18
|
-
: typeof context.args.t === 'string'
|
|
19
|
-
? context.args.t
|
|
20
|
-
: undefined,
|
|
21
|
-
});
|
|
5
|
+
return resolveRuntimeConfig(runtimeConnectionOverrides(context.args));
|
|
22
6
|
}
|
|
23
7
|
function extractEmail(profile) {
|
|
24
8
|
if (!profile || typeof profile !== 'object') {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SyncResourceFamily } from './sync-omit.ts';
|
|
2
|
+
import type { CommandContext } from './types.ts';
|
|
3
|
+
export declare function commandWritesWorkspace(context: CommandContext): boolean;
|
|
4
|
+
/** One invocation owns its policy and digest cache, including direct command handlers. */
|
|
5
|
+
export declare function withCommandSyncOmit<T>(context: CommandContext, families: readonly SyncResourceFamily[], operation: (context: CommandContext) => T): T;
|
|
6
|
+
export declare function workspaceSyncOmitFamilies(context: CommandContext): SyncResourceFamily[];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { readProjectStableKeyName, readProjectTrackedResources } from "./project.js";
|
|
2
|
+
import { shouldTrackResource } from "./tracked-resources.js";
|
|
3
|
+
import { currentSyncOmitPolicy, parseOmitPolicy, SYNC_RESOURCE_FAMILIES, validateSyncOmitFamilies, withSyncOmitPolicy } from "./sync-omit.js";
|
|
4
|
+
import { validateCommandArguments } from "./argument-contract.js";
|
|
5
|
+
import { withWorkspaceWriteLock } from "./workspace-write-lock.js";
|
|
6
|
+
export function commandWritesWorkspace(context) {
|
|
7
|
+
const [command, action] = context.args._;
|
|
8
|
+
const dryRun = [context.args['dry-run'], context.args.dryRun].some(value => value === true || value === 'true');
|
|
9
|
+
if (dryRun && (command === 'migrate' || ['env', 'projects'].includes(command) && action === 'apply'))
|
|
10
|
+
return false;
|
|
11
|
+
return command === 'pull' || command === 'deploy'
|
|
12
|
+
|| command === 'plan' && action === 'update'
|
|
13
|
+
|| command === 'migrate' && action === 'run'
|
|
14
|
+
|| ['env', 'projects'].includes(command) && action === 'apply'
|
|
15
|
+
|| !['env', 'projects', 'migrate'].includes(command) && ['pull', 'pull-all', 'push', 'push-all'].includes(action);
|
|
16
|
+
}
|
|
17
|
+
/** One invocation owns its policy and digest cache, including direct command handlers. */
|
|
18
|
+
export function withCommandSyncOmit(context, families, operation) {
|
|
19
|
+
validateCommandArguments(context.args);
|
|
20
|
+
const execute = (scoped) => commandWritesWorkspace(scoped)
|
|
21
|
+
? withWorkspaceWriteLock(scoped.cwd, () => operation(scoped)) : operation(scoped);
|
|
22
|
+
const inherited = currentSyncOmitPolicy();
|
|
23
|
+
if (context.args.omit === undefined && inherited.rules.length)
|
|
24
|
+
return execute(context);
|
|
25
|
+
const policy = parseOmitPolicy(context.args, { stableKeyName: readProjectStableKeyName(context.cwd) });
|
|
26
|
+
if (policy.rules.length) {
|
|
27
|
+
const command = context.args._[0];
|
|
28
|
+
const action = context.args._[1];
|
|
29
|
+
const allowed = ['plan', 'diff', 'deploy', 'pull'].includes(command)
|
|
30
|
+
|| (command === 'migrate' && ['plan', 'run', 'verify'].includes(action))
|
|
31
|
+
|| (['env', 'projects'].includes(command) && ['diff', 'apply'].includes(action))
|
|
32
|
+
|| (!['migrate', 'env', 'projects'].includes(command) && ['plan', 'push', 'push-all', 'pull', 'pull-all'].includes(action));
|
|
33
|
+
if (!allowed)
|
|
34
|
+
throw new Error('--omit is supported only by sync pull/plan/diff/push/deploy and migration run/verify.');
|
|
35
|
+
validateSyncOmitFamilies(policy, families);
|
|
36
|
+
}
|
|
37
|
+
const scoped = policy.rules.length ? {
|
|
38
|
+
...context,
|
|
39
|
+
print: (value) => context.print(value && typeof value === 'object' && !Array.isArray(value)
|
|
40
|
+
? { ...value, omit: policy } : value),
|
|
41
|
+
} : context;
|
|
42
|
+
if (policy.rules.length && !context.args.json)
|
|
43
|
+
context.println(`Preserving ${context.args._[0] === 'pull' || ['pull', 'pull-all'].includes(context.args._[1]) ? 'local' : 'target'} properties (--omit): ${policy.rules.map(rule => `${rule.resource ? `${rule.resource}:` : ''}${rule.path}`).join(', ')}`);
|
|
44
|
+
return withSyncOmitPolicy(policy, () => execute(scoped));
|
|
45
|
+
}
|
|
46
|
+
export function workspaceSyncOmitFamilies(context) {
|
|
47
|
+
const tracked = readProjectTrackedResources(context.cwd);
|
|
48
|
+
return SYNC_RESOURCE_FAMILIES.filter(family => shouldTrackResource(tracked, family));
|
|
49
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RevoClient } from './client.ts';
|
|
2
|
+
import type { SyncResourceFamily } from './sync-omit.ts';
|
|
3
|
+
export type SyncOmitTargetVersions = Record<string, number | null>;
|
|
4
|
+
/** Inspect resource envelopes only. Runtime inputs and resource configurations are never traversed. */
|
|
5
|
+
export declare function syncTargetVersionRecords(family: SyncResourceFamily, value: unknown, fallbackId?: string): Array<{
|
|
6
|
+
id: string;
|
|
7
|
+
version: number | null;
|
|
8
|
+
}>;
|
|
9
|
+
/** Preserve the reviewed revision even if an update builder reads a newer ignored value. Backend CAS covers the following race. */
|
|
10
|
+
export declare function fenceSyncOmitWrites(client: RevoClient, reviewed: Readonly<SyncOmitTargetVersions>, assertSourceUnchanged?: () => void): RevoClient;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
const identityFields = {
|
|
2
|
+
'database-table': 'databaseId', 'database-view': 'databaseViewId', component: 'componentId',
|
|
3
|
+
endpoint: 'endpointId', 'job-template': 'jobTemplateId', schedule: 'scheduleId', event: 'eventId',
|
|
4
|
+
group: 'groupId', 'role-group': 'roleGroupId', 'service-account': 'userId', agent: 'agentId', 'agent-plugin': 'agentPluginId',
|
|
5
|
+
};
|
|
6
|
+
const envelopeFields = ['data', 'items', 'results', 'resource', 'database', 'databaseSchema', 'databaseView', 'component', 'endpoint',
|
|
7
|
+
'jobTemplate', 'schedule', 'event', 'jobEvent', 'group', 'roleGroup', 'account', 'agent', 'agentPlugin', 'databases', 'databaseSchemas', 'databaseViews',
|
|
8
|
+
'components', 'endpoints', 'jobTemplates', 'schedules', 'events', 'jobEvents', 'groups', 'roleGroups', 'accounts', 'serviceAccounts', 'agents', 'agentPlugins'];
|
|
9
|
+
function isObject(value) {
|
|
10
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
11
|
+
}
|
|
12
|
+
/** Inspect resource envelopes only. Runtime inputs and resource configurations are never traversed. */
|
|
13
|
+
export function syncTargetVersionRecords(family, value, fallbackId) {
|
|
14
|
+
const records = [];
|
|
15
|
+
function visit(current, depth, fallback) {
|
|
16
|
+
if (depth > 12)
|
|
17
|
+
throw new Error('Target revision response is nested too deeply; review a fresh deployment plan.');
|
|
18
|
+
if (Array.isArray(current)) {
|
|
19
|
+
for (const item of current)
|
|
20
|
+
visit(item, depth + 1);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (!isObject(current))
|
|
24
|
+
return;
|
|
25
|
+
const identity = family === 'event' ? current.jobEventId ?? current.eventId ?? current.id : current[identityFields[family]] ?? current.id;
|
|
26
|
+
const id = typeof identity === 'string' && identity ? identity : fallback;
|
|
27
|
+
const version = Number.isSafeInteger(current.version) && Number(current.version) >= 0 ? Number(current.version) : null;
|
|
28
|
+
if (id && (identity !== undefined || Object.hasOwn(current, 'version'))) {
|
|
29
|
+
records.push({ id, version });
|
|
30
|
+
// A resource row can contain hydrated relationship rows with independent
|
|
31
|
+
// revision counters. Envelope traversal ends at the authoring resource.
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
for (const key of envelopeFields) {
|
|
35
|
+
if (Object.hasOwn(current, key))
|
|
36
|
+
visit(current[key], depth + 1, fallback);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
visit(value, 0, fallbackId);
|
|
40
|
+
return records;
|
|
41
|
+
}
|
|
42
|
+
const writeFamilies = {
|
|
43
|
+
updateJobTemplate: 'job-template', updateEndpoint: 'endpoint', updateSchedule: 'schedule', updateEvent: 'event',
|
|
44
|
+
updateGroup: 'group', updateRoleGroup: 'role-group', updateServiceAccount: 'service-account',
|
|
45
|
+
updateAgent: 'agent', updateAgentPlugin: 'agent-plugin', updateDatabaseSchema: 'database-table',
|
|
46
|
+
updateDatabaseSchemaMetadata: 'database-table', acceptDatabaseSchema: 'database-table', updateDatabaseView: 'database-view',
|
|
47
|
+
};
|
|
48
|
+
const createFamilies = {
|
|
49
|
+
createJobTemplate: 'job-template', createEndpoint: 'endpoint', createSchedule: 'schedule', createEvent: 'event',
|
|
50
|
+
createGroup: 'group', createRoleGroup: 'role-group', createServiceAccount: 'service-account',
|
|
51
|
+
createAgent: 'agent', createAgentPlugin: 'agent-plugin', createDatabaseSchema: 'database-table', createDatabaseView: 'database-view',
|
|
52
|
+
};
|
|
53
|
+
/** Preserve the reviewed revision even if an update builder reads a newer ignored value. Backend CAS covers the following race. */
|
|
54
|
+
export function fenceSyncOmitWrites(client, reviewed, assertSourceUnchanged) {
|
|
55
|
+
const versions = { ...reviewed };
|
|
56
|
+
const created = new Set();
|
|
57
|
+
const pending = new Set();
|
|
58
|
+
return new Proxy(client, {
|
|
59
|
+
get(target, property) {
|
|
60
|
+
const value = Reflect.get(target, property, target);
|
|
61
|
+
if (typeof value !== 'function')
|
|
62
|
+
return value;
|
|
63
|
+
const creatingFamily = typeof property === 'string' && Object.hasOwn(createFamilies, property) ? createFamilies[property] : undefined;
|
|
64
|
+
if (creatingFamily)
|
|
65
|
+
return async (...args) => {
|
|
66
|
+
assertSourceUnchanged?.();
|
|
67
|
+
const result = await value.apply(target, args);
|
|
68
|
+
for (const record of syncTargetVersionRecords(creatingFamily, result)) {
|
|
69
|
+
const key = `${creatingFamily}:${record.id}`;
|
|
70
|
+
if (Object.hasOwn(reviewed, key))
|
|
71
|
+
throw new Error(`Created ${creatingFamily} reused a reviewed identity; review a fresh deployment plan.`);
|
|
72
|
+
versions[key] = record.version;
|
|
73
|
+
created.add(key);
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
};
|
|
77
|
+
const family = typeof property === 'string' && Object.hasOwn(writeFamilies, property) ? writeFamilies[property] : undefined;
|
|
78
|
+
if (!family) {
|
|
79
|
+
if (typeof property === 'string' && /^(create|update|save|restore|activate|disable|delete|add|remove|accept)/.test(property))
|
|
80
|
+
return async (...args) => {
|
|
81
|
+
assertSourceUnchanged?.();
|
|
82
|
+
return value.apply(target, args);
|
|
83
|
+
};
|
|
84
|
+
return value.bind(target);
|
|
85
|
+
}
|
|
86
|
+
return async (...args) => {
|
|
87
|
+
const admission = property === 'acceptDatabaseSchema';
|
|
88
|
+
const id = args[admission ? 1 : 0];
|
|
89
|
+
const body = args[admission ? 0 : 1];
|
|
90
|
+
if (typeof id !== 'string' || !id) {
|
|
91
|
+
if (!admission)
|
|
92
|
+
throw new Error(`Target ${family} identity is missing before a reviewed write.`);
|
|
93
|
+
assertSourceUnchanged?.();
|
|
94
|
+
const result = await value.apply(target, args);
|
|
95
|
+
if (admission)
|
|
96
|
+
for (const record of syncTargetVersionRecords(family, result)) {
|
|
97
|
+
const key = `${family}:${record.id}`;
|
|
98
|
+
if (Object.hasOwn(reviewed, key))
|
|
99
|
+
throw new Error(`Created ${family} reused a reviewed identity; review a fresh deployment plan.`);
|
|
100
|
+
versions[key] = record.version;
|
|
101
|
+
created.add(key);
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
const key = `${family}:${id}`;
|
|
106
|
+
if (!Object.hasOwn(versions, key) || !Object.hasOwn(reviewed, key) && !created.has(key))
|
|
107
|
+
throw new Error(`Target ${family} identity was not reviewed or created by this deployment; review a fresh deployment plan.`);
|
|
108
|
+
const expected = versions[key];
|
|
109
|
+
const submitted = isObject(body) ? body.version : undefined;
|
|
110
|
+
if (expected === null || submitted !== expected || pending.has(key)) {
|
|
111
|
+
throw new Error(`Reviewed ${family} revision changed before write; review a fresh deployment plan.`);
|
|
112
|
+
}
|
|
113
|
+
pending.add(key);
|
|
114
|
+
try {
|
|
115
|
+
assertSourceUnchanged?.();
|
|
116
|
+
const result = await value.apply(target, args);
|
|
117
|
+
const revisions = syncTargetVersionRecords(family, result, id).filter(record => record.id === id && record.version !== null);
|
|
118
|
+
const observed = revisions.at(-1)?.version;
|
|
119
|
+
if (observed !== undefined && observed !== null) {
|
|
120
|
+
if (observed < expected)
|
|
121
|
+
throw new Error(`Written ${family} returned an older revision; review a fresh deployment plan.`);
|
|
122
|
+
if (observed > expected + 1)
|
|
123
|
+
throw new Error(`Written ${family} advanced beyond this reviewed write; review a fresh deployment plan.`);
|
|
124
|
+
versions[key] = observed;
|
|
125
|
+
}
|
|
126
|
+
return result;
|
|
127
|
+
}
|
|
128
|
+
finally {
|
|
129
|
+
pending.delete(key);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ParsedArgs } from './types.ts';
|
|
2
|
+
export declare const SYNC_RESOURCE_FAMILIES: readonly ["database-table", "database-view", "component", "service-account", "agent-plugin", "agent", "job-template", "endpoint", "schedule", "event", "group", "role-group"];
|
|
3
|
+
export type SyncResourceFamily = (typeof SYNC_RESOURCE_FAMILIES)[number];
|
|
4
|
+
export type SyncOmitRule = {
|
|
5
|
+
resource?: SyncResourceFamily;
|
|
6
|
+
path: string;
|
|
7
|
+
};
|
|
8
|
+
export type SyncOmitPolicy = {
|
|
9
|
+
schemaVersion: 1;
|
|
10
|
+
rules: readonly SyncOmitRule[];
|
|
11
|
+
fingerprint: string;
|
|
12
|
+
};
|
|
13
|
+
export type SyncDefinitionDigest = {
|
|
14
|
+
kind: 'value';
|
|
15
|
+
hash: string;
|
|
16
|
+
array?: true;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'object';
|
|
19
|
+
properties: Record<string, SyncDefinitionDigest>;
|
|
20
|
+
};
|
|
21
|
+
export type SyncOmitBaseline = {
|
|
22
|
+
schemaVersion: 1;
|
|
23
|
+
rawHash: string;
|
|
24
|
+
tree: SyncDefinitionDigest;
|
|
25
|
+
paths: string[];
|
|
26
|
+
policyFingerprint: string;
|
|
27
|
+
};
|
|
28
|
+
export declare function normalizeSyncResourceFamily(value: string): SyncResourceFamily;
|
|
29
|
+
/** Flags are invocation-local; resource metadata never changes this policy. */
|
|
30
|
+
export declare function parseOmitPolicy(args: Pick<ParsedArgs, string> | Record<string, unknown>, options?: {
|
|
31
|
+
stableKeyName?: string;
|
|
32
|
+
}): SyncOmitPolicy;
|
|
33
|
+
export declare function emptySyncOmitPolicy(): SyncOmitPolicy;
|
|
34
|
+
/** Unqualified paths must be meaningful for every selected family. Mixed workspaces can qualify individual rules. */
|
|
35
|
+
export declare function validateSyncOmitFamilies(policy: SyncOmitPolicy, resources: readonly (SyncResourceFamily | string)[]): void;
|
|
36
|
+
export declare function currentSyncOmitPolicy(): SyncOmitPolicy;
|
|
37
|
+
export declare function withSyncOmitPolicy<T>(policy: SyncOmitPolicy, operation: () => T): T;
|
|
38
|
+
/** Integrity checks and source manifests always retain the complete definition. */
|
|
39
|
+
export declare function withoutSyncOmit<T>(operation: () => T): T;
|
|
40
|
+
export declare function omitPaths(resource: SyncResourceFamily | string, policy?: SyncOmitPolicy): readonly string[][];
|
|
41
|
+
export declare function projectSyncDefinition<T>(family: SyncResourceFamily | string, shape: T, policy?: SyncOmitPolicy): T;
|
|
42
|
+
/** Updates retain target ownership, including the difference between missing and null. Creates use the complete desired definition. */
|
|
43
|
+
export declare function preserveOmittedProperties<T>(family: SyncResourceFamily | string, desired: T, target: unknown, policy?: SyncOmitPolicy): T;
|
|
44
|
+
/** Verify target-owned values separately from the deliberately masked convergence hash. */
|
|
45
|
+
export declare function assertOmittedPropertiesPreserved(family: SyncResourceFamily | string, expectedTargetManifest: unknown, actualManifest: unknown): void;
|
|
46
|
+
export declare function createSyncDefinitionDigest(shape: unknown): SyncDefinitionDigest;
|
|
47
|
+
export declare function projectSyncDefinitionDigest(resource: SyncResourceFamily | string, tree: SyncDefinitionDigest, policy?: SyncOmitPolicy): SyncDefinitionDigest;
|
|
48
|
+
export declare function hashSyncDefinitionDigest(tree: SyncDefinitionDigest): string;
|
|
49
|
+
export declare function hashSyncDefinition(resource: SyncResourceFamily | string, shape: unknown, legacyHash?: string): string;
|
|
50
|
+
export declare function syncBaselineData(resource: SyncResourceFamily | string, value: string): SyncOmitBaseline | undefined;
|
|
51
|
+
export declare function syncBaselineHash(resource: SyncResourceFamily | string, baseline?: {
|
|
52
|
+
remoteHash?: string;
|
|
53
|
+
omitBaseline?: SyncOmitBaseline;
|
|
54
|
+
}): string | undefined;
|
|
55
|
+
/** Local pull ownership has its own complete proof; target-environment baselines never prove local edit safety. */
|
|
56
|
+
export declare function syncSourceBaselineHash(resource: SyncResourceFamily | string, entry?: {
|
|
57
|
+
sourceHash?: string;
|
|
58
|
+
sourceBaseline?: SyncOmitBaseline;
|
|
59
|
+
}): string | undefined;
|