- web-app、sdk-app 的 skill-office 不再覆盖 assetRoot;pythonEnvironment 不变 - Desktop 与 Python SDK 打包不再生成 office-skills 资源目录,删除 prepareOfficeSkillAssets 与 skillSource - Desktop 打包 smoke 校验 4 个 Office 技能可从运行时归档列出并加载 - 同步测试、README、Agent Note,新增升级指南 office-skill-resources
33 lines
1.3 KiB
TypeScript
33 lines
1.3 KiB
TypeScript
import { spawnSync } from 'node:child_process'
|
|
import { resolve } from 'node:path'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
const root = resolve(import.meta.dirname, '..')
|
|
const script = resolve(root, 'scripts/build-exe-for-python-sdk.ts')
|
|
|
|
describe('Python runtime executable assets', () => {
|
|
it('packages the dynamically resolved web frontend distribution', () => {
|
|
const result = spawnSync(process.execPath, [
|
|
'--import',
|
|
'tsx/esm',
|
|
script,
|
|
'--skip-build',
|
|
'--dry-run',
|
|
'--targets=node24-macos-arm64',
|
|
], {
|
|
cwd: root,
|
|
encoding: 'utf8',
|
|
env: { ...process.env, npm_execpath: 'C:\\tools\\pnpm.cjs' },
|
|
})
|
|
|
|
expect(result.status).toBe(0)
|
|
expect(result.stdout).toContain('node_modules/@deepseek-ai/dsh-web-frontend/dist/**/*')
|
|
expect(result.stdout).toContain('node_modules/@deepseek-ai/dsh-*/**/*.{svg,png,jpg,jpeg,webp}')
|
|
expect(result.stdout).not.toContain('skill-badge/assets/**/*')
|
|
expect(result.stdout).toContain('node_modules/@deepseek-ai/dsh-sandbox-windows-acl/assets/**/*')
|
|
expect(result.stdout).not.toContain('node_modules/**/*.py')
|
|
// skill-office reads its SKILL.md files from the package's assets directory.
|
|
expect(result.stdout).toContain('"node_modules/**/*.md"')
|
|
})
|
|
})
|