GitHub(nextgroup2706/ken_nogi)は今後使わず自社Gitea運用に切替え。 NodeSrvは旧リポジトリの履歴を破棄しファイルのみ統合(Dokploy用サービスアカウントは 別途mygit-admin/NodeSrv.gitに履歴あり)。notepmエクスポート(12GB)とPleasanter インストーラzip(208MB)はサイズが大きいため.gitignoreで除外。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
48 lines
1.8 KiB
JavaScript
48 lines
1.8 KiB
JavaScript
// site-*_latest.jsonのColumns配列を、Excel定義書と比較しやすいフラットなレコード配列へ変換する。
|
|
// 読み取り専用の調査用スクリプト(ファイルへの書き込みは行わない)。
|
|
const fs = require("fs");
|
|
|
|
const [, , latestJsonPath, outPath] = process.argv;
|
|
const latest = JSON.parse(fs.readFileSync(latestJsonPath, "utf8"));
|
|
const ss = latest.Response.Data.SiteSettings;
|
|
|
|
// EditorColumnHash: どのタブに属するか
|
|
const tabOf = {};
|
|
for (const [tabKey, cols] of Object.entries(ss.EditorColumnHash || {})) {
|
|
for (const c of cols) tabOf[c] = tabKey;
|
|
}
|
|
|
|
// StatusControls: 全ステータス制御をマージしてColumnName→ReadOnly対象かを判定
|
|
const lockedColumns = new Set();
|
|
for (const sc of ss.StatusControls || []) {
|
|
for (const col of Object.keys(sc.ColumnHash || {})) {
|
|
if (sc.ColumnHash[col] === "ReadOnly") lockedColumns.add(col);
|
|
}
|
|
}
|
|
|
|
// Processes.ValidateInputs: プロセス単位の必須項目
|
|
const processRequiredColumns = new Set();
|
|
for (const p of ss.Processes || []) {
|
|
for (const vi of p.ValidateInputs || []) {
|
|
if (vi.Required) processRequiredColumns.add(vi.ColumnName);
|
|
}
|
|
}
|
|
|
|
const records = ss.Columns.map((c) => ({
|
|
ColumnName: c.ColumnName,
|
|
LabelText: c.LabelText || "",
|
|
GridLabelText: c.GridLabelText || "",
|
|
Hide: !!c.Hide,
|
|
ValidateRequired: !!c.ValidateRequired,
|
|
ProcessRequired: processRequiredColumns.has(c.ColumnName),
|
|
ExtendedFieldCss: c.ExtendedFieldCss || "",
|
|
FieldCss: c.FieldCss || "",
|
|
NoWrap: !!c.NoWrap,
|
|
StatusLocked: lockedColumns.has(c.ColumnName),
|
|
Tab: tabOf[c.ColumnName] || "(EditorColumnHash未登録)",
|
|
ChoicesText: c.ChoicesText ? String(c.ChoicesText).slice(0, 80) : "",
|
|
}));
|
|
|
|
fs.writeFileSync(outPath, JSON.stringify(records, null, 2), "utf8");
|
|
console.log("Columns件数:", records.length, "→", outPath);
|