dsh-d365-kit 0.34.1 → 0.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +318 -308
- package/CHANGELOG.zh-CN.md +317 -307
- package/INSTALL.md +94 -94
- package/INSTALL.zh-CN.md +93 -93
- package/LICENSE +21 -21
- package/README.md +336 -327
- package/README.zh-CN.md +336 -327
- package/client.js +1818 -1818
- package/cordis.patch.yml +44 -44
- package/docs/en/architecture.md +172 -172
- package/docs/en/checks.md +184 -184
- package/docs/en/installation.md +151 -151
- package/docs/en/permissions.md +161 -161
- package/docs/en/scenarios.md +202 -202
- package/docs/en/tools.md +665 -665
- package/docs/en/troubleshooting.md +131 -131
- package/docs/zh/architecture.md +172 -172
- package/docs/zh/checks.md +184 -184
- package/docs/zh/installation.md +151 -151
- package/docs/zh/permissions.md +161 -161
- package/docs/zh/scenarios.md +202 -202
- package/docs/zh/tools.md +665 -665
- package/docs/zh/troubleshooting.md +131 -131
- package/examples/prompts.en.md +206 -206
- package/examples/prompts.zh-CN.md +206 -206
- package/examples/waivers.example.json +20 -20
- package/icon.svg +6 -6
- package/index.js +139 -139
- package/lib/auth.js +181 -181
- package/lib/client.js +496 -496
- package/lib/code-check.js +549 -549
- package/lib/config.js +323 -323
- package/lib/contract-history.js +49 -49
- package/lib/contract.js +583 -583
- package/lib/csharp-check.js +493 -493
- package/lib/data-migrate.js +1318 -1318
- package/lib/data-policy.js +78 -78
- package/lib/error-codes.js +80 -80
- package/lib/gitlab.js +161 -161
- package/lib/health.js +205 -205
- package/lib/migrate.js +732 -732
- package/lib/preflight.js +116 -116
- package/lib/refs.js +191 -191
- package/lib/resources.js +320 -320
- package/lib/retention-defaults.js +17 -17
- package/lib/retention.js +384 -384
- package/lib/runtime.js +232 -232
- package/lib/settings-http.js +512 -512
- package/lib/settings-store.js +371 -371
- package/lib/snapshot.js +149 -149
- package/lib/tool-code-check.js +133 -133
- package/lib/tool-configure.js +169 -169
- package/lib/tool-contract.js +376 -376
- package/lib/tool-data-sync.js +559 -559
- package/lib/tool-data-write.js +203 -203
- package/lib/tool-data.js +282 -282
- package/lib/tool-diff.js +484 -484
- package/lib/tool-environments.js +106 -106
- package/lib/tool-flows.js +540 -540
- package/lib/tool-health.js +127 -127
- package/lib/tool-layers.js +497 -497
- package/lib/tool-metadata.js +417 -417
- package/lib/tool-migrate.js +102 -102
- package/lib/tool-refs.js +206 -206
- package/lib/tool-reports.js +299 -299
- package/lib/tool-sync.js +430 -430
- package/lib/tool-write.js +563 -563
- package/lib/waivers.js +83 -83
- package/lib/write-actions.js +1374 -1374
- package/lib/write-policy.js +199 -199
- package/lib/write-store.js +167 -167
- package/locale/en.json +68 -68
- package/locale/zh.json +68 -68
- package/package.json +2 -2
- package/skills/d365-troubleshooting/SKILL.md +115 -115
package/docs/zh/scenarios.md
CHANGED
|
@@ -1,202 +1,202 @@
|
|
|
1
|
-
# 使用场景
|
|
2
|
-
|
|
3
|
-
**[English](../en/scenarios.md)** | 简体中文
|
|
4
|
-
|
|
5
|
-
下面这些都是可以直接对 agent 说的话。工具参数在括号里,agent 会自己补。
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. 接手一个环境,先摸清楚
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
四个环境都连一下,看看各自在干什么。
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
d365_envs check=true
|
|
17
|
-
d365_health allEnvironments=true hours=24
|
|
18
|
-
d365_metadata resource=organization
|
|
19
|
-
d365_metadata resource=solutions top=10 orderby="installedon desc"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
得到:每个环境是否连通、组织版本、挂起/失败作业、正在进行的导入发布、最近装了什么。
|
|
23
|
-
|
|
24
|
-
这是回答任何「环境里有没有 X」之前的第一步——避免把「没配置」误说成「环境里没有」。
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## 2. 这个字段能删吗
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
account 上的 contoso_customertier,现在还有哪些表单、视图、流程在用?顺便看下还有多少条记录带着值。
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
d365_refs kind=field entity=account attribute=contoso_customertier allEnvironments=true
|
|
36
|
-
d365_data action=group entity=account field=contoso_customertier top=10
|
|
37
|
-
d365_layers component=contoso_customertier componentType=Attribute entity=account
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
三份证据合起来:
|
|
41
|
-
|
|
42
|
-
- **引用**:17 张表单、64 个视图(列 62 / 筛选 50)、0 条流程/业务规则;
|
|
43
|
-
- **数据**:该字段有值的记录分布(空值单独一档);
|
|
44
|
-
- **层**:这个字段是谁加的、当前生效层是哪个解决方案——如果来自受管解决方案,本地删不掉,只能让发布方改。
|
|
45
|
-
|
|
46
|
-
删除本身是 `d365_write action=plan-delete-attribute ... acknowledge=true`,但通常先用这三份证据说服人。
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## 3. 两个环境为什么不一样
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
把 DEV 和 SIT 的表单、视图、字段各同步一份,然后告诉我差异,再解释 Account 表单为什么会不一样。
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
d365_sync environments=["dev","sit"] resources=["forms","views","solutions"] includeAttributes=true entities=["account"]
|
|
58
|
-
d365_diff base=dev head=sit resources=["forms","views","attributes"]
|
|
59
|
-
d365_layers component=Account componentType=SystemForm allEnvironments=true
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
`d365_diff` 给机械差异(哪些行新增/删除/改字段),`d365_layers` 给原因(谁覆盖了它、谁在最上层)。
|
|
63
|
-
|
|
64
|
-
噪声已经处理过:时间戳与 `*id` 列不参与比较,`organization` 默认跳过。表单内容差异大时,报告里的字段级 diff 比整段 XML 可读得多。
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## 4. 发布前评估一个解决方案
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
把 ContosoBase 从 DEV 发到 SIT 和 UAT,有什么风险?
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
d365_migrate action=assess source=dev solution=ContosoBase targets=["sit","uat"]
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
报告会回答:
|
|
79
|
-
|
|
80
|
-
- 目标有没有这个解决方案,源版本是不是更高;
|
|
81
|
-
- 每个组件在目标的最上层是谁,导入后哪些解决方案的定义会被压住(列出被遮蔽的解决方案,按组件数排序);
|
|
82
|
-
- 选项集的值会不会丢(源有、目标没有的值 = 严重;标签不一致 = 警告);
|
|
83
|
-
- 目标缺失的组件;
|
|
84
|
-
- 源是未受管时,导入后形成的层无法通过卸载解决方案清除。
|
|
85
|
-
|
|
86
|
-
真实案例:一个只含 1 个全局选项集的解决方案,评估结论可能是「0 严重、2 警告,但会让 7 个解决方案的定义失效」——真正要决策的不是丢不丢数据,而是**以后谁再导入一次 Contoso 的 patch,就会把这个层又盖回去**。
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## 5. 检查一个 MR 能不能发到 UAT
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
https://gitlab.example.com/contoso/powerapps/-/merge_requests/7759/diffs 这个 MR 发到 UAT 会不会有问题?
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
d365_code_check mergeRequest="https://gitlab.example.com/contoso/powerapps/-/merge_requests/7759/diffs" targets=["uat"]
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
输出三段:
|
|
101
|
-
|
|
102
|
-
- **阻断**:字段不在任何引用该库的表单上、实体不存在、删除的函数仍被 Handler 引用、C# 类型/步骤/镜像缺失;
|
|
103
|
-
- **警告**:字段只在部分表单上、程序集版本没提升、硬编码 GUID;
|
|
104
|
-
- **人工确认**:配置数据、secure configuration、权限、列名与普通键的歧义。
|
|
105
|
-
|
|
106
|
-
报告在 `.d365/reports/code-check-<MR>-<时间戳>.md`。
|
|
107
|
-
|
|
108
|
-
纯 C# 的 MR 也能跑:按工程目录推断程序集 → 精确匹配 → 查类型/步骤/镜像/过滤属性。程序集名只做精确匹配,猜错比不查更糟。
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## 6. 补一批选项值
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
contoso_taxcategoryos 还缺 36 个税号类型,按 .d365/reports 里的清单补到 DEV。
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
d365_write action=plan-add-options environment=dev optionSet=contoso_taxcategoryos \
|
|
120
|
-
labels=["AD3|Andorra: Tax Register Number (NRT)", "..."]
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
计划返回操作列表(值从当前最大值 +1 顺延、已存在的代码进 skipped)。核对后:
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
执行 mw04aul6-1ci6aa
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
对话里弹卡片 → 批准 → 写入 → 只发布这个选项集。审计在 `.d365/changes/`,发布结果在 `.d365/changes/publish-<planId>.json`。
|
|
130
|
-
|
|
131
|
-
**其余环境不要重复手工追加**:随解决方案导入走,否则下次谁再导入受管 patch,手工加的层就被压掉了。
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## 7. 上游改了插件,下游缺什么
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
DEV 的插件注册,SIT 和 UAT 都跟上了吗?顺便看下表单引用的脚本有没有缺。
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
d365_contract action=drift source=dev targets=["sit","uat"] forms=true
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
典型结果(真实数据):86 条 = 程序集缺失 4、插件步骤缺失 72、类型缺失 8、表单库缺失 2。
|
|
146
|
-
`forms=false` 可跳过读 formxml;`handlers=true` 会下载脚本核对函数是否存在(慢,最多 400 个脚本/环境)。
|
|
147
|
-
|
|
148
|
-
确实允许的差异登记豁免:
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
d365_contract action=waive rule=form-library-missing env=sit \
|
|
152
|
-
object="/_static/_common/scripts/CommandbarActions.js" reason="该环境不用 SLA 对话框" days=30
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
下次跑同一组 `source → targets`,会给出「新增 N / 已消失 M」的趋势。
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## 8. 发布卡住了 / 现在能不能写
|
|
160
|
-
|
|
161
|
-
```
|
|
162
|
-
四个环境现在有正在跑的导入或发布吗?我想改点元数据。
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
```
|
|
166
|
-
d365_health allEnvironments=true
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
如果某个环境有正在进行的 `Publish` 或导入,任何写入都会 `0x80071151` 或等锁超时。等它结束再执行;`d365_write execute` 本身也会先查这一步,忙时直接拒绝而不是丢一个原始 429。
|
|
170
|
-
|
|
171
|
-
确认那条记录是残留(例如几天前中断的导入)时,才用 `force: true`。
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## 9. 磁盘被产物撑大了
|
|
176
|
-
|
|
177
|
-
```
|
|
178
|
-
.d365 现在多大?哪些能清?
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
```
|
|
182
|
-
d365_reports action=list
|
|
183
|
-
d365_reports action=cleanup target=query # 默认只预演
|
|
184
|
-
d365_reports action=cleanup target=query dryRun=false
|
|
185
|
-
d365_reports action=compact # 把快照 JSON 压成单行
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
真实数据:四份全量快照约 540 MB,压成单行省 68 MB;单份快照里 `plugin_steps.json` 约 55 MB、`solution_components.json` 约 39 MB、`web_resources.json` 约 20 MB。
|
|
189
|
-
|
|
190
|
-
保留策略与自动清理见 [tools.md](tools.md#d365_reports) 与根目录 README。
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
## 组合用法
|
|
195
|
-
|
|
196
|
-
| 想问 | 组合 |
|
|
197
|
-
| --- | --- |
|
|
198
|
-
| 改这个字段安全吗 | `d365_refs` + `d365_data` + `d365_layers` |
|
|
199
|
-
| 这个版本能发吗 | `d365_health` + `d365_migrate` + `d365_contract` |
|
|
200
|
-
| 这个 MR 能合吗 | `d365_code_check` + `d365_refs` |
|
|
201
|
-
| 环境之间差在哪 | `d365_sync` + `d365_diff` + `d365_layers` |
|
|
202
|
-
| 为什么运行时报错 | `d365_refs`(字段/脚本引用)+ `d365_layers`(谁覆盖)+ `d365_health`(作业) |
|
|
1
|
+
# 使用场景
|
|
2
|
+
|
|
3
|
+
**[English](../en/scenarios.md)** | 简体中文
|
|
4
|
+
|
|
5
|
+
下面这些都是可以直接对 agent 说的话。工具参数在括号里,agent 会自己补。
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. 接手一个环境,先摸清楚
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
四个环境都连一下,看看各自在干什么。
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
d365_envs check=true
|
|
17
|
+
d365_health allEnvironments=true hours=24
|
|
18
|
+
d365_metadata resource=organization
|
|
19
|
+
d365_metadata resource=solutions top=10 orderby="installedon desc"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
得到:每个环境是否连通、组织版本、挂起/失败作业、正在进行的导入发布、最近装了什么。
|
|
23
|
+
|
|
24
|
+
这是回答任何「环境里有没有 X」之前的第一步——避免把「没配置」误说成「环境里没有」。
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. 这个字段能删吗
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
account 上的 contoso_customertier,现在还有哪些表单、视图、流程在用?顺便看下还有多少条记录带着值。
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
d365_refs kind=field entity=account attribute=contoso_customertier allEnvironments=true
|
|
36
|
+
d365_data action=group entity=account field=contoso_customertier top=10
|
|
37
|
+
d365_layers component=contoso_customertier componentType=Attribute entity=account
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
三份证据合起来:
|
|
41
|
+
|
|
42
|
+
- **引用**:17 张表单、64 个视图(列 62 / 筛选 50)、0 条流程/业务规则;
|
|
43
|
+
- **数据**:该字段有值的记录分布(空值单独一档);
|
|
44
|
+
- **层**:这个字段是谁加的、当前生效层是哪个解决方案——如果来自受管解决方案,本地删不掉,只能让发布方改。
|
|
45
|
+
|
|
46
|
+
删除本身是 `d365_write action=plan-delete-attribute ... acknowledge=true`,但通常先用这三份证据说服人。
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 3. 两个环境为什么不一样
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
把 DEV 和 SIT 的表单、视图、字段各同步一份,然后告诉我差异,再解释 Account 表单为什么会不一样。
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
d365_sync environments=["dev","sit"] resources=["forms","views","solutions"] includeAttributes=true entities=["account"]
|
|
58
|
+
d365_diff base=dev head=sit resources=["forms","views","attributes"]
|
|
59
|
+
d365_layers component=Account componentType=SystemForm allEnvironments=true
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`d365_diff` 给机械差异(哪些行新增/删除/改字段),`d365_layers` 给原因(谁覆盖了它、谁在最上层)。
|
|
63
|
+
|
|
64
|
+
噪声已经处理过:时间戳与 `*id` 列不参与比较,`organization` 默认跳过。表单内容差异大时,报告里的字段级 diff 比整段 XML 可读得多。
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 4. 发布前评估一个解决方案
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
把 ContosoBase 从 DEV 发到 SIT 和 UAT,有什么风险?
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
d365_migrate action=assess source=dev solution=ContosoBase targets=["sit","uat"]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
报告会回答:
|
|
79
|
+
|
|
80
|
+
- 目标有没有这个解决方案,源版本是不是更高;
|
|
81
|
+
- 每个组件在目标的最上层是谁,导入后哪些解决方案的定义会被压住(列出被遮蔽的解决方案,按组件数排序);
|
|
82
|
+
- 选项集的值会不会丢(源有、目标没有的值 = 严重;标签不一致 = 警告);
|
|
83
|
+
- 目标缺失的组件;
|
|
84
|
+
- 源是未受管时,导入后形成的层无法通过卸载解决方案清除。
|
|
85
|
+
|
|
86
|
+
真实案例:一个只含 1 个全局选项集的解决方案,评估结论可能是「0 严重、2 警告,但会让 7 个解决方案的定义失效」——真正要决策的不是丢不丢数据,而是**以后谁再导入一次 Contoso 的 patch,就会把这个层又盖回去**。
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 5. 检查一个 MR 能不能发到 UAT
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
https://gitlab.example.com/contoso/powerapps/-/merge_requests/7759/diffs 这个 MR 发到 UAT 会不会有问题?
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
d365_code_check mergeRequest="https://gitlab.example.com/contoso/powerapps/-/merge_requests/7759/diffs" targets=["uat"]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
输出三段:
|
|
101
|
+
|
|
102
|
+
- **阻断**:字段不在任何引用该库的表单上、实体不存在、删除的函数仍被 Handler 引用、C# 类型/步骤/镜像缺失;
|
|
103
|
+
- **警告**:字段只在部分表单上、程序集版本没提升、硬编码 GUID;
|
|
104
|
+
- **人工确认**:配置数据、secure configuration、权限、列名与普通键的歧义。
|
|
105
|
+
|
|
106
|
+
报告在 `.d365/reports/code-check-<MR>-<时间戳>.md`。
|
|
107
|
+
|
|
108
|
+
纯 C# 的 MR 也能跑:按工程目录推断程序集 → 精确匹配 → 查类型/步骤/镜像/过滤属性。程序集名只做精确匹配,猜错比不查更糟。
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 6. 补一批选项值
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
contoso_taxcategoryos 还缺 36 个税号类型,按 .d365/reports 里的清单补到 DEV。
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
d365_write action=plan-add-options environment=dev optionSet=contoso_taxcategoryos \
|
|
120
|
+
labels=["AD3|Andorra: Tax Register Number (NRT)", "..."]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
计划返回操作列表(值从当前最大值 +1 顺延、已存在的代码进 skipped)。核对后:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
执行 mw04aul6-1ci6aa
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
对话里弹卡片 → 批准 → 写入 → 只发布这个选项集。审计在 `.d365/changes/`,发布结果在 `.d365/changes/publish-<planId>.json`。
|
|
130
|
+
|
|
131
|
+
**其余环境不要重复手工追加**:随解决方案导入走,否则下次谁再导入受管 patch,手工加的层就被压掉了。
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 7. 上游改了插件,下游缺什么
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
DEV 的插件注册,SIT 和 UAT 都跟上了吗?顺便看下表单引用的脚本有没有缺。
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
d365_contract action=drift source=dev targets=["sit","uat"] forms=true
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
典型结果(真实数据):86 条 = 程序集缺失 4、插件步骤缺失 72、类型缺失 8、表单库缺失 2。
|
|
146
|
+
`forms=false` 可跳过读 formxml;`handlers=true` 会下载脚本核对函数是否存在(慢,最多 400 个脚本/环境)。
|
|
147
|
+
|
|
148
|
+
确实允许的差异登记豁免:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
d365_contract action=waive rule=form-library-missing env=sit \
|
|
152
|
+
object="/_static/_common/scripts/CommandbarActions.js" reason="该环境不用 SLA 对话框" days=30
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
下次跑同一组 `source → targets`,会给出「新增 N / 已消失 M」的趋势。
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 8. 发布卡住了 / 现在能不能写
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
四个环境现在有正在跑的导入或发布吗?我想改点元数据。
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
d365_health allEnvironments=true
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
如果某个环境有正在进行的 `Publish` 或导入,任何写入都会 `0x80071151` 或等锁超时。等它结束再执行;`d365_write execute` 本身也会先查这一步,忙时直接拒绝而不是丢一个原始 429。
|
|
170
|
+
|
|
171
|
+
确认那条记录是残留(例如几天前中断的导入)时,才用 `force: true`。
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## 9. 磁盘被产物撑大了
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
.d365 现在多大?哪些能清?
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
d365_reports action=list
|
|
183
|
+
d365_reports action=cleanup target=query # 默认只预演
|
|
184
|
+
d365_reports action=cleanup target=query dryRun=false
|
|
185
|
+
d365_reports action=compact # 把快照 JSON 压成单行
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
真实数据:四份全量快照约 540 MB,压成单行省 68 MB;单份快照里 `plugin_steps.json` 约 55 MB、`solution_components.json` 约 39 MB、`web_resources.json` 约 20 MB。
|
|
189
|
+
|
|
190
|
+
保留策略与自动清理见 [tools.md](tools.md#d365_reports) 与根目录 README。
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 组合用法
|
|
195
|
+
|
|
196
|
+
| 想问 | 组合 |
|
|
197
|
+
| --- | --- |
|
|
198
|
+
| 改这个字段安全吗 | `d365_refs` + `d365_data` + `d365_layers` |
|
|
199
|
+
| 这个版本能发吗 | `d365_health` + `d365_migrate` + `d365_contract` |
|
|
200
|
+
| 这个 MR 能合吗 | `d365_code_check` + `d365_refs` |
|
|
201
|
+
| 环境之间差在哪 | `d365_sync` + `d365_diff` + `d365_layers` |
|
|
202
|
+
| 为什么运行时报错 | `d365_refs`(字段/脚本引用)+ `d365_layers`(谁覆盖)+ `d365_health`(作业) |
|