fix(landlock-run): publish under deepseek scope

This commit is contained in:
Hypatia May
2026-08-06 14:41:17 +08:00
parent 10c1d77a4f
commit 22c7087074
57 changed files with 146 additions and 134 deletions

View File

@@ -31,10 +31,14 @@ const vendoredPackages = new Set([
'@cordisjs/plugin-logger-console',
])
const publicLandlockPackages = new Set([
'node-addon-landlock-run',
'node-addon-landlock-run-linux-arm64',
'node-addon-landlock-run-linux-x64',
'@deepseek-ai/node-addon-landlock-run',
'@deepseek-ai/node-addon-landlock-run-linux-arm64',
'@deepseek-ai/node-addon-landlock-run-linux-x64',
])
/** Deliberate source payloads whose exact bytes are part of the package's audit surface. */
const publicationSourceAllowlist: Readonly<Record<string, readonly string[]>> = {
'@deepseek-ai/node-addon-landlock-run': ['src/main.c'],
}
const repositoryUrl = 'git+https://github.com/deepseek-harness/deepseek-harness.git'
const localArtifactDirs = new Set(['node_modules'])
@@ -200,8 +204,9 @@ function checkWorkspace({ dir, manifest }: WorkspaceManifest): string[] {
}
if (manifest.name?.startsWith('@deepseek-ai/')) {
const allowedSources = publicationSourceAllowlist[manifest.name] ?? []
for (const file of manifest.files ?? []) {
if (isForbiddenPublicationFile(file)) {
if (isForbiddenPublicationFile(file) && !allowedSources.includes(file)) {
errors.push(`${label}: package.json files must not publish ${JSON.stringify(file)}`)
}
}

View File

@@ -41,9 +41,9 @@ const DEV_ONLY_AREAS = [
/** First-party public native packages: reachable at runtime but not third-party. */
const FIRST_PARTY = new Set([
'node-addon-landlock-run',
'node-addon-landlock-run-linux-arm64',
'node-addon-landlock-run-linux-x64',
'@deepseek-ai/node-addon-landlock-run',
'@deepseek-ai/node-addon-landlock-run-linux-arm64',
'@deepseek-ai/node-addon-landlock-run-linux-x64',
])
/**
@@ -587,7 +587,7 @@ ${BUILD_TIME_TOOLS.map(tool => `| [\`${tool.name}\`](${tool.repo}) | ${tool.lice
## First-party native packages
\`node-addon-landlock-run\` (and its platform packages) is built and released from this repository under BSD 3-Clause. It is listed here for completeness; it is first-party, not third-party.
\`@deepseek-ai/node-addon-landlock-run\` (and its platform packages) is built and released from this repository under BSD 3-Clause. It is listed here for completeness; it is first-party, not third-party.
`
}