Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
sutpc
/
heatmap
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bd3d0df3
authored
Oct 15, 2026
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
继续封禁 但不影响ops部署
1 parent
d2352602
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
25 deletions
package.json
scripts/data-build-noop.mjs
scripts/deny-data-build.mjs
package.json
View file @
bd3d0df
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
"data:import"
:
"node scripts/import-xlsx.mjs && node scripts/preprocess.mjs"
,
"data:import"
:
"node scripts/import-xlsx.mjs && node scripts/preprocess.mjs"
,
"data:gen"
:
"node scripts/generate-sample.mjs"
,
"data:gen"
:
"node scripts/generate-sample.mjs"
,
"data:prep"
:
"node scripts/preprocess.mjs"
,
"data:prep"
:
"node scripts/preprocess.mjs"
,
"data:build"
:
"node scripts/d
eny-data-build
.mjs"
,
"data:build"
:
"node scripts/d
ata-build-noop
.mjs"
,
"prepare"
:
"husky"
"prepare"
:
"husky"
},
},
"dependencies"
:
{
"dependencies"
:
{
...
...
scripts/data-build-noop.mjs
0 → 100644
View file @
bd3d0df
// pnpm data:build —— 改为 no-op(成功退出)。
//
// 背景:项目架构已确立「不内置 / 不保留任何出险数据」,查看数据必须走顶栏「导入数据」
// (xlsx/csv → Worker → IndexedDB 持久化)。原 data:build = generate-sample(COUNT=41234)
// && preprocess,会把合成样本重新覆盖进 public/data,既违反该约束、又会把真实导入数据冲掉。
//
// 因此 data:build 不再生成任何数据:本就是 no-op,成功退出,避免误跑时污染工作树;
// 同时让 CI / OPS 的 Dockerfile 里 `RUN pnpm data:build` 步骤通过,构建继续走到 `pnpm build`。
// 部署产物不含 public/data,运行期进入空态、由用户导入。
//
// 仅当架构重新允许内置数据通道时,才把 package.json 的 data:build 改回
// "node scripts/generate-sample.mjs && node scripts/preprocess.mjs"
// 并删除本文件。
console.log('');
console.log(' ℹ️ pnpm data:build 为 no-op:项目不内置出险数据(架构硬约束)。');
console.log(' 查看数据请走顶栏「导入数据」:xlsx / csv → 本地解析 → IndexedDB 持久化,刷新后仍在。');
console.log(' 构建继续(下一步 RUN pnpm build 不受影响)。');
console.log('');
process.exit(0);
scripts/deny-data-build.mjs
deleted
100644 → 0
View file @
d235260
// 临时封禁 pnpm data:build
//
// 背景:项目架构已确立「不内置 / 不保留任何出险数据」,查看数据必须走顶栏「导入数据」
// (xlsx/csv → Worker → IndexedDB 持久化)。原 data:build = generate-sample(COUNT=41234)
// && preprocess,会把合成样本重新覆盖进 public/data,既违反该约束、又会把真实导入数据
// 冲掉(历史上就曾把 42806 条真实数据覆盖回 41234 条)。故封禁。
//
// 恢复方式(仅在架构重新允许内置数据通道时):把 package.json 里
// "data:build": "node scripts/deny-data-build.mjs"
// 改回
// "data:build": "node scripts/generate-sample.mjs && node scripts/preprocess.mjs"
// 并删除本文件。其余命令(data:gen / data:prep / data:import)不受本封禁影响。
console.error('');
console.error(' ⛔ pnpm data:build 已临时封禁');
console.error('');
console.error(' 项目不再内置出险数据(架构硬约束)。');
console.error(' 查看数据请走顶栏「导入数据」:xlsx / csv → 本地解析 → IndexedDB 持久化,');
console.error(' 刷新后仍在,不会回退到内置样本。');
console.error('');
console.error(' 若确须恢复内置数据通道,先与架构确认,再按本脚本头注释解除封禁。');
console.error('');
process.exit(1);
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment