1be6e6756c
修复 Cocos 内置插件提示词,禁止回退到项目内 MCP 扩展 移除 agc_cocos_execute 对项目写锁的无关依赖 将项目对话读取移到 blocking worker,避免客户端窗口阻塞 为 Windows 开发与发行构建默认启用 Cocos 编辑器执行能力 补充 Cocos Inspector 引导、桥接协议和客户端回归验证
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
import assert from 'node:assert/strict';
|
|
import { test } from 'node:test';
|
|
|
|
import { buildTauriBuildArguments } from './build-release.mjs';
|
|
import { withDefaultCargoFeatures } from './cargo-features.mjs';
|
|
|
|
test('Windows release includes the same editor feature as development', () => {
|
|
assert.deepEqual(
|
|
buildTauriBuildArguments([], 'x86_64-pc-windows-msvc', 'win32'),
|
|
[
|
|
'build',
|
|
'--features=cocos-editor-execute',
|
|
'--target',
|
|
'x86_64-pc-windows-msvc',
|
|
],
|
|
);
|
|
assert.deepEqual(
|
|
buildTauriBuildArguments(
|
|
['--no-bundle'],
|
|
'x86_64-pc-windows-msvc',
|
|
'linux',
|
|
),
|
|
['build', '--no-bundle'],
|
|
);
|
|
assert.deepEqual(
|
|
buildTauriBuildArguments(['--target=aarch64-apple-darwin']),
|
|
['build', '--target=aarch64-apple-darwin'],
|
|
);
|
|
});
|
|
test('explicit Cargo features override defaults in every supported spelling', () => {
|
|
for (const args of [
|
|
['--features', 'custom'],
|
|
['--features=custom'],
|
|
['-f', 'custom'],
|
|
['-fcustom'],
|
|
]) {
|
|
assert.deepEqual(
|
|
withDefaultCargoFeatures(args, ['cocos-editor-execute']),
|
|
args,
|
|
);
|
|
}
|
|
assert.deepEqual(
|
|
withDefaultCargoFeatures(
|
|
['--', '--features=app'],
|
|
['cocos-editor-execute'],
|
|
),
|
|
['--features=cocos-editor-execute', '--', '--features=app'],
|
|
);
|
|
});
|