refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s

- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名)
- 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块)
- docreader proto 描述符采用等长替换,保持序列化字节布局有效
- Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像
- 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
runny committed 2026-11-13 20:52:51 +08:00
1 parent 9097ee699d
commit 9058149576
3136 files changed
+18018 -18004

No files matched your search

+2 -2
View File
@@ -14,7 +14,7 @@ async function walk(dir) {
}
return result;
}
for (const retired of ['/demo/', '/demo/1/', '/redesign/', '/redesign/1/', '/demo6/preview.html', '/brand/weknora.svg', '/icon.svg', '/docs/favicon.svg', '/docs/README.html', '/docs/homepage/README.html', '/docs/homepage/BRAND-ASSETS.html', '/docs/static-site/', '/docs/releases/']) {
for (const retired of ['/demo/', '/demo/1/', '/redesign/', '/redesign/1/', '/demo6/preview.html', '/brand/academy.svg', '/icon.svg', '/docs/favicon.svg', '/docs/README.html', '/docs/homepage/README.html', '/docs/homepage/BRAND-ASSETS.html', '/docs/static-site/', '/docs/releases/']) {
assert.equal(await resolveSiteFile(root, retired), null, `Retired demo must not be published: ${retired}`);
}
const failures = [];
@@ -30,7 +30,7 @@ const pages = await walk(root);
for (const file of pages) {
const html = await readFile(file, 'utf8');
const route = '/' + relative(root, file).replaceAll('\\', '/');
const base = new URL(route, 'https://weknora.test');
const base = new URL(route, 'https://academy.test');
for (const match of html.matchAll(/<(?:a|link|img|script|source|video)\b[^>]*>/g)) {
const tag = match[0];
for (const [, raw] of tag.matchAll(/(?:href|src|poster)="([^"]+)"/g)) {
+1 -1
View File
@@ -7,7 +7,7 @@ const check = spawnSync(process.execPath, ['scripts/check-site.mjs'], { cwd: roo
if (check.status !== 0) process.exit(check.status || 1);
mkdirSync(resolve(root, 'releases'), { recursive: true });
const version = readFileSync(resolve(root, 'VERSION'), 'utf8').trim();
const output = resolve(root, `releases/weknora-site-v${version}.tar.gz`);
const output = resolve(root, `releases/academy-site-v${version}.tar.gz`);
const packed = spawnSync('tar', ['-czf', output, '-C', resolve(root, 'static-site'), '.'], { stdio: 'inherit', env: { ...process.env, COPYFILE_DISABLE: '1' } });
if (packed.status !== 0) process.exit(packed.status || 1);
console.log(`Deployable archive: ${output}`);
@@ -6,7 +6,7 @@ import { test } from 'node:test';
import { readScreenshotSizes } from '../.vitepress/screenshot-sizes.mjs';
test('reserves each screenshot intrinsic ratio and picks up replacement dimensions', () => {
const dir = mkdtempSync(join(tmpdir(), 'weknora-shot-sizes-'));
const dir = mkdtempSync(join(tmpdir(), 'academy-shot-sizes-'));
try {
// IHDR bytes from a PNG header; the extractor deliberately does not decode pixels.
const header = Buffer.from('89504e470d0a1a0a0000000d4948445200000f0000000840', 'hex');
+1 -1
View File
@@ -21,4 +21,4 @@ const server = createServer(async (request, response) => {
else createReadStream(file.path).pipe(response);
} catch { response.writeHead(500).end('Unable to serve this page'); }
});
server.listen(port, '127.0.0.1', () => console.log(`WeKnora unified preview: http://127.0.0.1:${port}/`));
server.listen(port, '127.0.0.1', () => console.log(`Academy unified preview: http://127.0.0.1:${port}/`));
+4 -4
View File
@@ -3,8 +3,8 @@ import { spawnSync } from 'node:child_process';
import { randomUUID } from 'node:crypto';
import { setTimeout } from 'node:timers/promises';
const image = process.argv[2] || 'weknora-site:0.8.3';
const name = `weknora-site-test-${randomUUID()}`;
const image = process.argv[2] || 'academy-site:0.8.3';
const name = `academy-site-test-${randomUUID()}`;
function docker(...args) {
const result = spawnSync('docker', args, { encoding: 'utf8' });
if (result.error) throw result.error;
@@ -67,7 +67,7 @@ try {
assert.equal(redirect.status, 308);
assert.equal(new URL(redirect.headers.get('location'), origin).origin, origin);
assert.equal(new URL(redirect.headers.get('location'), origin).pathname, '/docs/');
const assets = new Set(['/docs/_home/brand/weknora-original.png', '/docs/_home/product/wiki-browser.png', '/docs/favicon.ico']);
const assets = new Set(['/docs/_home/brand/academy-original.png', '/docs/_home/product/wiki-browser.png', '/docs/favicon.ico']);
for (const path of ['/', '/docs/', '/docs/03-features/14-wiki', '/docs/03-features/14-wiki.html']) {
const response = await fetch(origin + path);
assert.equal(response.status, 200, path);
@@ -76,7 +76,7 @@ try {
assert.equal(response.headers.get('x-frame-options'), 'SAMEORIGIN');
assert.equal(response.headers.get('referrer-policy'), 'strict-origin-when-cross-origin');
const html = await response.text();
assert.match(html, /WeKnora/i, path);
assert.match(html, /Academy/i, path);
for (const [, asset] of html.matchAll(/(?:src|href)="([^"?#]+\.(?:js|css))"/g)) {
const url = new URL(asset, origin + path);
if (url.origin === origin) assets.add(url.pathname);
+1 -1
View File
@@ -179,7 +179,7 @@ try {
const image = document.querySelector('.wk-brand img');
return image?.complete && image.naturalWidth === 945 && image.naturalHeight === 650;
});
assert.equal(await page.locator('.wk-brand img').getAttribute('src'), '/docs/_home/brand/weknora-original.png');
assert.equal(await page.locator('.wk-brand img').getAttribute('src'), '/docs/_home/brand/academy-original.png');
await checkVisibleControl(page, '.wk-theme-toggle');
}
}