74d4972ecc
迁移按计划态分类排除同任务预览视频并区分零候选与多候选。 历史画布迁移忽略复制的来源链,正式生成继续保持严格血缘校验。 逐帧核验登记对象并补齐对象路径与对象 ID,支持前置 scope 的安全 dry-run。 补充迁移 HTTP 调用、撤权能力、回归测试和长期数据契约。
44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
import {
|
|
callSpacetimeProcedure,
|
|
callSpacetimeProcedureViaCli,
|
|
ensureProcedureOk,
|
|
parseArgs,
|
|
} from './spacetime-migration-common.mjs';
|
|
|
|
try {
|
|
const options = parseArgs(process.argv.slice(2));
|
|
if (!options.operatorIdentity) {
|
|
throw new Error('必须传入 --operator-identity。');
|
|
}
|
|
|
|
const input = {
|
|
operator_identity_hex: options.operatorIdentity,
|
|
};
|
|
if (options.useHttp && !options.token) {
|
|
throw new Error('--use-http 需要同时传入 --token。');
|
|
}
|
|
const result = options.useHttp
|
|
? await callSpacetimeProcedure(
|
|
options,
|
|
'revoke_database_migration_operator',
|
|
input,
|
|
)
|
|
: await callSpacetimeProcedureViaCli(
|
|
options,
|
|
'revoke_database_migration_operator',
|
|
input,
|
|
);
|
|
ensureProcedureOk(result);
|
|
|
|
console.log(
|
|
`[spacetime:migration:operator] 已撤销 ${result.operator_identity_hex ?? options.operatorIdentity}`,
|
|
);
|
|
} catch (error) {
|
|
console.error(
|
|
`[spacetime:migration:operator] ${error instanceof Error ? error.message : String(error)}`,
|
|
);
|
|
process.exit(1);
|
|
}
|