@hcmai/sdk 0.31.3 → 0.33.0
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/README.md +4 -2
- package/dist/index.d.ts +73 -2
- package/dist/index.js +332 -53
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -75,6 +75,7 @@ var CliErrorCode = /* @__PURE__ */ ((CliErrorCode2) => {
|
|
|
75
75
|
CliErrorCode2["INVALID_ARGUMENT"] = "INVALID_ARGUMENT";
|
|
76
76
|
CliErrorCode2["INVALID_JSON"] = "INVALID_JSON";
|
|
77
77
|
CliErrorCode2["MISSING_FLAG"] = "MISSING_FLAG";
|
|
78
|
+
CliErrorCode2["OFFLINE_UNAVAILABLE"] = "OFFLINE_UNAVAILABLE";
|
|
78
79
|
CliErrorCode2["AUTH_FAILED"] = "AUTH_FAILED";
|
|
79
80
|
CliErrorCode2["AUTH_EXPIRED"] = "AUTH_EXPIRED";
|
|
80
81
|
CliErrorCode2["AUTH_REFRESH_FAILED"] = "AUTH_REFRESH_FAILED";
|
|
@@ -94,6 +95,7 @@ var CliErrorCode = /* @__PURE__ */ ((CliErrorCode2) => {
|
|
|
94
95
|
CliErrorCode2["PROTOCOL_UNSUPPORTED"] = "PROTOCOL_UNSUPPORTED";
|
|
95
96
|
CliErrorCode2["PROFILE_NOT_FOUND"] = "PROFILE_NOT_FOUND";
|
|
96
97
|
CliErrorCode2["CONFIG_PARSE_ERROR"] = "CONFIG_PARSE_ERROR";
|
|
98
|
+
CliErrorCode2["OFFLINE_KIT_ERROR"] = "OFFLINE_KIT_ERROR";
|
|
97
99
|
CliErrorCode2["KEYCHAIN_UNAVAILABLE"] = "KEYCHAIN_UNAVAILABLE";
|
|
98
100
|
CliErrorCode2["ENV_NOT_FOUND"] = "ENV_NOT_FOUND";
|
|
99
101
|
CliErrorCode2["ENV_ALREADY_EXISTS"] = "ENV_ALREADY_EXISTS";
|
|
@@ -127,6 +129,7 @@ var CODE_TO_EXIT = {
|
|
|
127
129
|
["INVALID_ARGUMENT" /* INVALID_ARGUMENT */]: 1 /* USAGE_ERROR */,
|
|
128
130
|
["INVALID_JSON" /* INVALID_JSON */]: 1 /* USAGE_ERROR */,
|
|
129
131
|
["MISSING_FLAG" /* MISSING_FLAG */]: 1 /* USAGE_ERROR */,
|
|
132
|
+
["OFFLINE_UNAVAILABLE" /* OFFLINE_UNAVAILABLE */]: 1 /* USAGE_ERROR */,
|
|
130
133
|
["AUTH_FAILED" /* AUTH_FAILED */]: 2 /* AUTH_ERROR */,
|
|
131
134
|
["AUTH_EXPIRED" /* AUTH_EXPIRED */]: 2 /* AUTH_ERROR */,
|
|
132
135
|
["AUTH_REFRESH_FAILED" /* AUTH_REFRESH_FAILED */]: 2 /* AUTH_ERROR */,
|
|
@@ -148,6 +151,7 @@ var CODE_TO_EXIT = {
|
|
|
148
151
|
["PROTOCOL_UNSUPPORTED" /* PROTOCOL_UNSUPPORTED */]: 4 /* NETWORK_ERROR */,
|
|
149
152
|
["PROFILE_NOT_FOUND" /* PROFILE_NOT_FOUND */]: 5 /* CONFIG_ERROR */,
|
|
150
153
|
["CONFIG_PARSE_ERROR" /* CONFIG_PARSE_ERROR */]: 5 /* CONFIG_ERROR */,
|
|
154
|
+
["OFFLINE_KIT_ERROR" /* OFFLINE_KIT_ERROR */]: 5 /* CONFIG_ERROR */,
|
|
151
155
|
["KEYCHAIN_UNAVAILABLE" /* KEYCHAIN_UNAVAILABLE */]: 5 /* CONFIG_ERROR */,
|
|
152
156
|
["ENV_NOT_FOUND" /* ENV_NOT_FOUND */]: 5 /* CONFIG_ERROR */,
|
|
153
157
|
["ENV_ALREADY_EXISTS" /* ENV_ALREADY_EXISTS */]: 5 /* CONFIG_ERROR */,
|
|
@@ -8383,7 +8387,7 @@ function columnSlotsToFlex(text3, rewrite = true) {
|
|
|
8383
8387
|
import { isMap as isMap3, isScalar as isScalar3, isSeq as isSeq3, parseDocument as parseDocument3 } from "yaml";
|
|
8384
8388
|
|
|
8385
8389
|
// src/meta/generated/meta-schemas.ts
|
|
8386
|
-
var META_SCHEMA_SOURCE_COMMIT = "
|
|
8390
|
+
var META_SCHEMA_SOURCE_COMMIT = "f86b7ac1b12963648eeb7a73eba2492dac2bce86";
|
|
8387
8391
|
var META_SCHEMAS = {
|
|
8388
8392
|
list: {
|
|
8389
8393
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -8711,7 +8715,7 @@ var META_SCHEMAS = {
|
|
|
8711
8715
|
"presentation": {
|
|
8712
8716
|
"type": "string",
|
|
8713
8717
|
"enum": ["dialog", "drawer"],
|
|
8714
|
-
"description": "1.81.0\
|
|
8718
|
+
"description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
|
|
8715
8719
|
},
|
|
8716
8720
|
"result": {
|
|
8717
8721
|
"$ref": "#/$defs/Map(String,Object)",
|
|
@@ -8732,6 +8736,10 @@ var META_SCHEMAS = {
|
|
|
8732
8736
|
"showSearch": {
|
|
8733
8737
|
"type": "boolean"
|
|
8734
8738
|
},
|
|
8739
|
+
"standardForm": {
|
|
8740
|
+
"type": "boolean",
|
|
8741
|
+
"description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
|
|
8742
|
+
},
|
|
8735
8743
|
"targetAction": {
|
|
8736
8744
|
"type": "string"
|
|
8737
8745
|
},
|
|
@@ -8759,7 +8767,19 @@ var META_SCHEMAS = {
|
|
|
8759
8767
|
"required": ["dialogType"],
|
|
8760
8768
|
"properties": {
|
|
8761
8769
|
"dialogType": {
|
|
8762
|
-
"
|
|
8770
|
+
"enum": ["list", "custom"]
|
|
8771
|
+
}
|
|
8772
|
+
}
|
|
8773
|
+
}
|
|
8774
|
+
}, {
|
|
8775
|
+
"if": {
|
|
8776
|
+
"required": ["standardForm"]
|
|
8777
|
+
},
|
|
8778
|
+
"then": {
|
|
8779
|
+
"required": ["dialogType"],
|
|
8780
|
+
"properties": {
|
|
8781
|
+
"dialogType": {
|
|
8782
|
+
"const": "custom"
|
|
8763
8783
|
}
|
|
8764
8784
|
}
|
|
8765
8785
|
}
|
|
@@ -9698,7 +9718,11 @@ var META_SCHEMAS = {
|
|
|
9698
9718
|
"presentation": {
|
|
9699
9719
|
"type": "string",
|
|
9700
9720
|
"enum": ["dialog", "drawer"],
|
|
9701
|
-
"description": "1.81.0\
|
|
9721
|
+
"description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
|
|
9722
|
+
},
|
|
9723
|
+
"standardForm": {
|
|
9724
|
+
"type": "boolean",
|
|
9725
|
+
"description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
|
|
9702
9726
|
}
|
|
9703
9727
|
},
|
|
9704
9728
|
"required": ["dialogType"],
|
|
@@ -9710,7 +9734,19 @@ var META_SCHEMAS = {
|
|
|
9710
9734
|
"required": ["dialogType"],
|
|
9711
9735
|
"properties": {
|
|
9712
9736
|
"dialogType": {
|
|
9713
|
-
"
|
|
9737
|
+
"enum": ["list", "custom"]
|
|
9738
|
+
}
|
|
9739
|
+
}
|
|
9740
|
+
}
|
|
9741
|
+
}, {
|
|
9742
|
+
"if": {
|
|
9743
|
+
"required": ["standardForm"]
|
|
9744
|
+
},
|
|
9745
|
+
"then": {
|
|
9746
|
+
"required": ["dialogType"],
|
|
9747
|
+
"properties": {
|
|
9748
|
+
"dialogType": {
|
|
9749
|
+
"const": "custom"
|
|
9714
9750
|
}
|
|
9715
9751
|
}
|
|
9716
9752
|
}
|
|
@@ -9743,7 +9779,11 @@ var META_SCHEMAS = {
|
|
|
9743
9779
|
"presentation": {
|
|
9744
9780
|
"type": "string",
|
|
9745
9781
|
"enum": ["dialog", "drawer"],
|
|
9746
|
-
"description": "1.81.0\
|
|
9782
|
+
"description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
|
|
9783
|
+
},
|
|
9784
|
+
"standardForm": {
|
|
9785
|
+
"type": "boolean",
|
|
9786
|
+
"description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
|
|
9747
9787
|
}
|
|
9748
9788
|
},
|
|
9749
9789
|
"allOf": [{
|
|
@@ -9754,7 +9794,19 @@ var META_SCHEMAS = {
|
|
|
9754
9794
|
"required": ["dialogType"],
|
|
9755
9795
|
"properties": {
|
|
9756
9796
|
"dialogType": {
|
|
9757
|
-
"
|
|
9797
|
+
"enum": ["list", "custom"]
|
|
9798
|
+
}
|
|
9799
|
+
}
|
|
9800
|
+
}
|
|
9801
|
+
}, {
|
|
9802
|
+
"if": {
|
|
9803
|
+
"required": ["standardForm"]
|
|
9804
|
+
},
|
|
9805
|
+
"then": {
|
|
9806
|
+
"required": ["dialogType"],
|
|
9807
|
+
"properties": {
|
|
9808
|
+
"dialogType": {
|
|
9809
|
+
"const": "custom"
|
|
9758
9810
|
}
|
|
9759
9811
|
}
|
|
9760
9812
|
}
|
|
@@ -11252,7 +11304,7 @@ var META_SCHEMAS = {
|
|
|
11252
11304
|
"presentation": {
|
|
11253
11305
|
"type": "string",
|
|
11254
11306
|
"enum": ["dialog", "drawer"],
|
|
11255
|
-
"description": "1.81.0\
|
|
11307
|
+
"description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
|
|
11256
11308
|
},
|
|
11257
11309
|
"result": {
|
|
11258
11310
|
"$ref": "#/$defs/Map(String,Object)",
|
|
@@ -11273,6 +11325,10 @@ var META_SCHEMAS = {
|
|
|
11273
11325
|
"showSearch": {
|
|
11274
11326
|
"type": "boolean"
|
|
11275
11327
|
},
|
|
11328
|
+
"standardForm": {
|
|
11329
|
+
"type": "boolean",
|
|
11330
|
+
"description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
|
|
11331
|
+
},
|
|
11276
11332
|
"targetAction": {
|
|
11277
11333
|
"type": "string"
|
|
11278
11334
|
},
|
|
@@ -11300,7 +11356,19 @@ var META_SCHEMAS = {
|
|
|
11300
11356
|
"required": ["dialogType"],
|
|
11301
11357
|
"properties": {
|
|
11302
11358
|
"dialogType": {
|
|
11303
|
-
"
|
|
11359
|
+
"enum": ["list", "custom"]
|
|
11360
|
+
}
|
|
11361
|
+
}
|
|
11362
|
+
}
|
|
11363
|
+
}, {
|
|
11364
|
+
"if": {
|
|
11365
|
+
"required": ["standardForm"]
|
|
11366
|
+
},
|
|
11367
|
+
"then": {
|
|
11368
|
+
"required": ["dialogType"],
|
|
11369
|
+
"properties": {
|
|
11370
|
+
"dialogType": {
|
|
11371
|
+
"const": "custom"
|
|
11304
11372
|
}
|
|
11305
11373
|
}
|
|
11306
11374
|
}
|
|
@@ -12158,7 +12226,7 @@ var META_SCHEMAS = {
|
|
|
12158
12226
|
"presentation": {
|
|
12159
12227
|
"type": "string",
|
|
12160
12228
|
"enum": ["dialog", "drawer"],
|
|
12161
|
-
"description": "1.81.0\
|
|
12229
|
+
"description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
|
|
12162
12230
|
},
|
|
12163
12231
|
"result": {
|
|
12164
12232
|
"$ref": "#/$defs/Map(String,Object)",
|
|
@@ -12179,6 +12247,10 @@ var META_SCHEMAS = {
|
|
|
12179
12247
|
"showSearch": {
|
|
12180
12248
|
"type": "boolean"
|
|
12181
12249
|
},
|
|
12250
|
+
"standardForm": {
|
|
12251
|
+
"type": "boolean",
|
|
12252
|
+
"description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
|
|
12253
|
+
},
|
|
12182
12254
|
"targetAction": {
|
|
12183
12255
|
"type": "string"
|
|
12184
12256
|
},
|
|
@@ -12206,7 +12278,19 @@ var META_SCHEMAS = {
|
|
|
12206
12278
|
"required": ["dialogType"],
|
|
12207
12279
|
"properties": {
|
|
12208
12280
|
"dialogType": {
|
|
12209
|
-
"
|
|
12281
|
+
"enum": ["list", "custom"]
|
|
12282
|
+
}
|
|
12283
|
+
}
|
|
12284
|
+
}
|
|
12285
|
+
}, {
|
|
12286
|
+
"if": {
|
|
12287
|
+
"required": ["standardForm"]
|
|
12288
|
+
},
|
|
12289
|
+
"then": {
|
|
12290
|
+
"required": ["dialogType"],
|
|
12291
|
+
"properties": {
|
|
12292
|
+
"dialogType": {
|
|
12293
|
+
"const": "custom"
|
|
12210
12294
|
}
|
|
12211
12295
|
}
|
|
12212
12296
|
}
|
|
@@ -13598,6 +13682,105 @@ var META_SCHEMAS = {
|
|
|
13598
13682
|
}
|
|
13599
13683
|
}
|
|
13600
13684
|
},
|
|
13685
|
+
"identityCorrection": {
|
|
13686
|
+
"type": "object",
|
|
13687
|
+
"properties": {
|
|
13688
|
+
"approvalEvidence": {
|
|
13689
|
+
"type": "object",
|
|
13690
|
+
"properties": {
|
|
13691
|
+
"approvedValues": {
|
|
13692
|
+
"type": "array",
|
|
13693
|
+
"items": {
|
|
13694
|
+
"type": "string",
|
|
13695
|
+
"minLength": 1,
|
|
13696
|
+
"pattern": "\\S"
|
|
13697
|
+
},
|
|
13698
|
+
"minItems": 1,
|
|
13699
|
+
"uniqueItems": true
|
|
13700
|
+
},
|
|
13701
|
+
"decisionField": {
|
|
13702
|
+
"type": "string",
|
|
13703
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$"
|
|
13704
|
+
},
|
|
13705
|
+
"model": {
|
|
13706
|
+
"type": "string",
|
|
13707
|
+
"minLength": 1
|
|
13708
|
+
},
|
|
13709
|
+
"recordField": {
|
|
13710
|
+
"type": "string",
|
|
13711
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$"
|
|
13712
|
+
}
|
|
13713
|
+
},
|
|
13714
|
+
"additionalProperties": false,
|
|
13715
|
+
"required": ["model", "recordField", "decisionField", "approvedValues"]
|
|
13716
|
+
},
|
|
13717
|
+
"eligibleStates": {
|
|
13718
|
+
"type": "array",
|
|
13719
|
+
"items": {
|
|
13720
|
+
"type": "string",
|
|
13721
|
+
"minLength": 1,
|
|
13722
|
+
"pattern": "\\S"
|
|
13723
|
+
},
|
|
13724
|
+
"minItems": 1,
|
|
13725
|
+
"uniqueItems": true
|
|
13726
|
+
},
|
|
13727
|
+
"groups": {
|
|
13728
|
+
"type": "array",
|
|
13729
|
+
"items": {
|
|
13730
|
+
"type": "object",
|
|
13731
|
+
"properties": {
|
|
13732
|
+
"employeeCodeField": {
|
|
13733
|
+
"type": "string",
|
|
13734
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$"
|
|
13735
|
+
},
|
|
13736
|
+
"employeeField": {
|
|
13737
|
+
"type": "string",
|
|
13738
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$"
|
|
13739
|
+
},
|
|
13740
|
+
"employeeNameField": {
|
|
13741
|
+
"type": "string",
|
|
13742
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$"
|
|
13743
|
+
},
|
|
13744
|
+
"externalIdentityField": {
|
|
13745
|
+
"type": "string",
|
|
13746
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$"
|
|
13747
|
+
},
|
|
13748
|
+
"externalProviderId": {
|
|
13749
|
+
"type": "string",
|
|
13750
|
+
"format": "uuid"
|
|
13751
|
+
},
|
|
13752
|
+
"key": {
|
|
13753
|
+
"type": "string",
|
|
13754
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$"
|
|
13755
|
+
},
|
|
13756
|
+
"userField": {
|
|
13757
|
+
"type": "string",
|
|
13758
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$"
|
|
13759
|
+
}
|
|
13760
|
+
},
|
|
13761
|
+
"additionalProperties": false,
|
|
13762
|
+
"required": ["key", "employeeField", "userField"],
|
|
13763
|
+
"dependentRequired": {
|
|
13764
|
+
"externalIdentityField": ["externalProviderId"],
|
|
13765
|
+
"externalProviderId": ["externalIdentityField"]
|
|
13766
|
+
}
|
|
13767
|
+
},
|
|
13768
|
+
"minItems": 1
|
|
13769
|
+
},
|
|
13770
|
+
"roles": {
|
|
13771
|
+
"type": "array",
|
|
13772
|
+
"items": {
|
|
13773
|
+
"type": "string",
|
|
13774
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_.-]*$"
|
|
13775
|
+
},
|
|
13776
|
+
"minItems": 1,
|
|
13777
|
+
"uniqueItems": true
|
|
13778
|
+
}
|
|
13779
|
+
},
|
|
13780
|
+
"description": "\u7EC8\u6001\u8EAB\u4EFD\u5173\u8054\u7EA0\u6B63\u7684\u663E\u5F0F\u63A5\u5165\u7B56\u7565\uFF1B\u4E0D\u6539\u53D8\u901A\u7528\u66F4\u65B0\u51BB\u7ED3\uFF0C\u7F3A\u5C11\u7B56\u7565\u3001\u5BA1\u6279\u8BC1\u636E\u6216\u52A8\u4F5C\u6388\u6743\u65F6\u62D2\u7EDD\u6267\u884C\u3002",
|
|
13781
|
+
"required": ["roles", "eligibleStates", "groups", "approvalEvidence"],
|
|
13782
|
+
"additionalProperties": false
|
|
13783
|
+
},
|
|
13601
13784
|
"immutableWhen": {
|
|
13602
13785
|
"type": "object",
|
|
13603
13786
|
"properties": {
|
|
@@ -13881,8 +14064,8 @@ var META_SCHEMAS = {
|
|
|
13881
14064
|
},
|
|
13882
14065
|
"storageSlot": {
|
|
13883
14066
|
"type": "string",
|
|
13884
|
-
"description": "\u5B58\u50A8\u69FD\u7F16\u7801\
|
|
13885
|
-
"pattern": "^
|
|
14067
|
+
"description": "\u5B58\u50A8\u69FD\u7F16\u7801\uFF08s + 3 \u4F4D\u6570\u5B57\uFF09\uFF0C\u53D6\u503C\u89C1\u5B58\u50A8\u69FD\u76EE\u5F55\uFF08GET /api/tenant-extension/storage-slots\uFF09\uFF1B\u672A\u58F0\u660E\u4F7F\u7528\u9ED8\u8BA4\u5B58\u50A8",
|
|
14068
|
+
"pattern": "^s\\d{3}$"
|
|
13886
14069
|
},
|
|
13887
14070
|
"synonyms": {
|
|
13888
14071
|
"type": "array",
|
|
@@ -14455,6 +14638,9 @@ var META_SCHEMAS = {
|
|
|
14455
14638
|
"showSearch": {
|
|
14456
14639
|
"type": "boolean"
|
|
14457
14640
|
},
|
|
14641
|
+
"standardForm": {
|
|
14642
|
+
"type": "boolean"
|
|
14643
|
+
},
|
|
14458
14644
|
"targetAction": {
|
|
14459
14645
|
"type": "string"
|
|
14460
14646
|
},
|
|
@@ -15269,7 +15455,11 @@ var META_SCHEMAS = {
|
|
|
15269
15455
|
"presentation": {
|
|
15270
15456
|
"type": "string",
|
|
15271
15457
|
"enum": ["dialog", "drawer"],
|
|
15272
|
-
"description": "1.81.0\
|
|
15458
|
+
"description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
|
|
15459
|
+
},
|
|
15460
|
+
"standardForm": {
|
|
15461
|
+
"type": "boolean",
|
|
15462
|
+
"description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
|
|
15273
15463
|
}
|
|
15274
15464
|
},
|
|
15275
15465
|
"allOf": [{
|
|
@@ -15280,7 +15470,19 @@ var META_SCHEMAS = {
|
|
|
15280
15470
|
"required": ["dialogType"],
|
|
15281
15471
|
"properties": {
|
|
15282
15472
|
"dialogType": {
|
|
15283
|
-
"
|
|
15473
|
+
"enum": ["list", "custom"]
|
|
15474
|
+
}
|
|
15475
|
+
}
|
|
15476
|
+
}
|
|
15477
|
+
}, {
|
|
15478
|
+
"if": {
|
|
15479
|
+
"required": ["standardForm"]
|
|
15480
|
+
},
|
|
15481
|
+
"then": {
|
|
15482
|
+
"required": ["dialogType"],
|
|
15483
|
+
"properties": {
|
|
15484
|
+
"dialogType": {
|
|
15485
|
+
"const": "custom"
|
|
15284
15486
|
}
|
|
15285
15487
|
}
|
|
15286
15488
|
}
|
|
@@ -15798,7 +16000,11 @@ var META_SCHEMAS = {
|
|
|
15798
16000
|
"presentation": {
|
|
15799
16001
|
"type": "string",
|
|
15800
16002
|
"enum": ["dialog", "drawer"],
|
|
15801
|
-
"description": "1.81.0\
|
|
16003
|
+
"description": "1.81.0\uFF1Alist\u684C\u9762\u652F\u6301drawer\u53F3\u4FA7\u62BD\u5C49\uFF1B1.92.0\u8D77\u5DF2\u6CE8\u518Ccustom\u7EC4\u4EF6\u4EA6\u652F\u6301\u3002\u4F7F\u7528width\u4F5C\u4E3Asize\uFF0C\u9ED8\u8BA4dialog\uFF0C\u79FB\u52A8\u7AEF\u4FDD\u7559\u539F\u5BBF\u4E3B\u3002"
|
|
16004
|
+
},
|
|
16005
|
+
"standardForm": {
|
|
16006
|
+
"type": "boolean",
|
|
16007
|
+
"description": "1.92.0\uFF1A\u4EC5dialogType=custom\u652F\u6301\uFF0C\u4E25\u683C\u5E03\u5C14\u503C\uFF1Btrue\u7531\u516C\u5171\u5BBF\u4E3B\u542F\u7528\u6807\u51C6\u8868\u5355\u6837\u5F0F\uFF0C\u7701\u7565\u4FDD\u7559\u539F\u884C\u4E3A\u3002"
|
|
15802
16008
|
}
|
|
15803
16009
|
},
|
|
15804
16010
|
"allOf": [{
|
|
@@ -15809,7 +16015,19 @@ var META_SCHEMAS = {
|
|
|
15809
16015
|
"required": ["dialogType"],
|
|
15810
16016
|
"properties": {
|
|
15811
16017
|
"dialogType": {
|
|
15812
|
-
"
|
|
16018
|
+
"enum": ["list", "custom"]
|
|
16019
|
+
}
|
|
16020
|
+
}
|
|
16021
|
+
}
|
|
16022
|
+
}, {
|
|
16023
|
+
"if": {
|
|
16024
|
+
"required": ["standardForm"]
|
|
16025
|
+
},
|
|
16026
|
+
"then": {
|
|
16027
|
+
"required": ["dialogType"],
|
|
16028
|
+
"properties": {
|
|
16029
|
+
"dialogType": {
|
|
16030
|
+
"const": "custom"
|
|
15813
16031
|
}
|
|
15814
16032
|
}
|
|
15815
16033
|
}
|
|
@@ -17968,6 +18186,65 @@ async function getColumnSlotSql(http, params, opts = {}) {
|
|
|
17968
18186
|
return data;
|
|
17969
18187
|
}
|
|
17970
18188
|
|
|
18189
|
+
// src/meta/storage-slots.ts
|
|
18190
|
+
var STORAGE_SLOTS_PATH = "/api/tenant-extension/storage-slots";
|
|
18191
|
+
function isRecord4(value) {
|
|
18192
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18193
|
+
}
|
|
18194
|
+
function unexpected2(where, body) {
|
|
18195
|
+
return new CliError({
|
|
18196
|
+
code: "PROTOCOL_UNSUPPORTED" /* PROTOCOL_UNSUPPORTED */,
|
|
18197
|
+
message: `${STORAGE_SLOTS_PATH} \u8FD4\u56DE\u4E86 2xx\uFF0C\u4F46\u54CD\u5E94\u4E0D\u662F\u7EA6\u5B9A\u7684\u5B58\u50A8\u69FD\u76EE\u5F55\uFF1A${where}\uFF1B\u6CA1\u6709\u628A\u7F3A\u7684\u90E8\u5206\u8865\u6210\u9ED8\u8BA4\u503C`,
|
|
18198
|
+
context: {
|
|
18199
|
+
reasonCode: "STORAGE_SLOT_RESPONSE_UNRECOGNIZED",
|
|
18200
|
+
details: body,
|
|
18201
|
+
nextStep: "\u7528 `hcm version` \u6838\u5BF9\u540E\u7AEF\u7248\u672C\u662F\u5426\u542B\u5B58\u50A8\u69FD\u767B\u8BB0\uFF08ADR-502\uFF09\uFF1B\u7248\u672C\u5BF9\u5F97\u4E0A\u5C31\u628A\u8FD9\u6BB5\u54CD\u5E94\u62A5\u7ED9 CLI \u7EF4\u62A4\u8005"
|
|
18202
|
+
}
|
|
18203
|
+
});
|
|
18204
|
+
}
|
|
18205
|
+
function entryProblem(entry) {
|
|
18206
|
+
if (!isRecord4(entry)) return "\u4E0D\u662F\u5BF9\u8C61";
|
|
18207
|
+
if (typeof entry.slot !== "string" || !entry.slot.trim()) return "slot \u7F3A\u5931\u6216\u4E3A\u7A7A";
|
|
18208
|
+
if (typeof entry.status !== "string" || !entry.status.trim()) return "status \u7F3A\u5931\u6216\u4E3A\u7A7A";
|
|
18209
|
+
if (typeof entry.available !== "boolean") return "available \u7F3A\u5931\u6216\u4E0D\u662F\u5E03\u5C14";
|
|
18210
|
+
return void 0;
|
|
18211
|
+
}
|
|
18212
|
+
function slotsProblem(slots, path25) {
|
|
18213
|
+
for (let i = 0; i < slots.length; i += 1) {
|
|
18214
|
+
const problem6 = entryProblem(slots[i]);
|
|
18215
|
+
if (problem6) return `${path25}[${i}] ${problem6}`;
|
|
18216
|
+
}
|
|
18217
|
+
return void 0;
|
|
18218
|
+
}
|
|
18219
|
+
async function getStorageSlots(http) {
|
|
18220
|
+
const resp = await http.get(STORAGE_SLOTS_PATH);
|
|
18221
|
+
const data = resp.data?.data;
|
|
18222
|
+
if (!isRecord4(data)) throw unexpected2("\u6CA1\u6709 data \u5BF9\u8C61", resp.data);
|
|
18223
|
+
if (typeof data.synced !== "boolean") throw unexpected2("data.synced \u7F3A\u5931\u6216\u4E0D\u662F\u5E03\u5C14", resp.data);
|
|
18224
|
+
if (!Array.isArray(data.families)) throw unexpected2("data.families \u7F3A\u5931\u6216\u4E0D\u662F\u6570\u7EC4", resp.data);
|
|
18225
|
+
const families = [];
|
|
18226
|
+
for (let i = 0; i < data.families.length; i += 1) {
|
|
18227
|
+
const raw = data.families[i];
|
|
18228
|
+
const at = `data.families[${i}]`;
|
|
18229
|
+
if (!isRecord4(raw)) throw unexpected2(`${at} \u4E0D\u662F\u5BF9\u8C61`, resp.data);
|
|
18230
|
+
if (typeof raw.family !== "string" || !raw.family.trim()) throw unexpected2(`${at}.family \u7F3A\u5931\u6216\u4E3A\u7A7A`, resp.data);
|
|
18231
|
+
if (!Array.isArray(raw.builtInSlots)) throw unexpected2(`${at}.builtInSlots \u7F3A\u5931\u6216\u4E0D\u662F\u6570\u7EC4`, resp.data);
|
|
18232
|
+
const builtInProblem = slotsProblem(raw.builtInSlots, `${at}.builtInSlots`);
|
|
18233
|
+
if (builtInProblem) throw unexpected2(builtInProblem, resp.data);
|
|
18234
|
+
const registered = raw.registeredSlots;
|
|
18235
|
+
if (Array.isArray(registered)) {
|
|
18236
|
+
const registeredProblem = slotsProblem(registered, `${at}.registeredSlots`);
|
|
18237
|
+
if (registeredProblem) throw unexpected2(registeredProblem, resp.data);
|
|
18238
|
+
} else if (registered !== void 0 && registered !== null) {
|
|
18239
|
+
throw unexpected2(`${at}.registeredSlots \u65E2\u4E0D\u662F\u6570\u7EC4\u4E5F\u4E0D\u662F null`, resp.data);
|
|
18240
|
+
} else if (data.synced) {
|
|
18241
|
+
throw unexpected2(`${at} synced=true \u5374\u6CA1\u7ED9 registeredSlots\uFF08\u767B\u8BB0\u69FD\u6E05\u5355\uFF09`, resp.data);
|
|
18242
|
+
}
|
|
18243
|
+
families.push({ ...raw, registeredSlots: Array.isArray(registered) ? registered : null });
|
|
18244
|
+
}
|
|
18245
|
+
return { ...data, families };
|
|
18246
|
+
}
|
|
18247
|
+
|
|
17971
18248
|
// src/meta/validate-meta.ts
|
|
17972
18249
|
import yaml8 from "js-yaml";
|
|
17973
18250
|
|
|
@@ -19987,7 +20264,7 @@ function actionsPath(modelKey, state = "") {
|
|
|
19987
20264
|
if (!state) return base;
|
|
19988
20265
|
return `${base}?${new URLSearchParams({ state }).toString()}`;
|
|
19989
20266
|
}
|
|
19990
|
-
function
|
|
20267
|
+
function isRecord5(v) {
|
|
19991
20268
|
return Boolean(v) && typeof v === "object" && !Array.isArray(v);
|
|
19992
20269
|
}
|
|
19993
20270
|
function keyOrNull(key) {
|
|
@@ -20029,7 +20306,7 @@ async function collectActionGates(probe, modelKeys2, state = "") {
|
|
|
20029
20306
|
continue;
|
|
20030
20307
|
}
|
|
20031
20308
|
const body = out.body;
|
|
20032
|
-
if (!
|
|
20309
|
+
if (!isRecord5(body) || !Array.isArray(body.actions)) {
|
|
20033
20310
|
unavailable.push({
|
|
20034
20311
|
modelKey: model,
|
|
20035
20312
|
status: out.status,
|
|
@@ -20045,13 +20322,13 @@ async function collectActionGates(probe, modelKeys2, state = "") {
|
|
|
20045
20322
|
else statesEchoed.add(echoed);
|
|
20046
20323
|
for (const action3 of body.actions) {
|
|
20047
20324
|
actionsSeen += 1;
|
|
20048
|
-
if (!
|
|
20325
|
+
if (!isRecord5(action3)) {
|
|
20049
20326
|
reject(rejected, model, null, "malformed-action");
|
|
20050
20327
|
continue;
|
|
20051
20328
|
}
|
|
20052
20329
|
const cands = Array.isArray(action3.candidates) ? action3.candidates : [];
|
|
20053
20330
|
for (const c of cands) {
|
|
20054
|
-
if (
|
|
20331
|
+
if (isRecord5(c) && typeof c.source === "string" && c.source) sources.add(c.source);
|
|
20055
20332
|
}
|
|
20056
20333
|
const effectClass = classifyEffect(action3.effect);
|
|
20057
20334
|
if (effectClass !== "absent") actionsWithEffect += 1;
|
|
@@ -20095,7 +20372,7 @@ async function collectActionGates(probe, modelKeys2, state = "") {
|
|
|
20095
20372
|
reject(rejected, model, key, "no-candidates");
|
|
20096
20373
|
continue;
|
|
20097
20374
|
}
|
|
20098
|
-
if (!cands.every((c) =>
|
|
20375
|
+
if (!cands.every((c) => isRecord5(c))) {
|
|
20099
20376
|
reject(rejected, model, key, "malformed-candidate");
|
|
20100
20377
|
continue;
|
|
20101
20378
|
}
|
|
@@ -20418,7 +20695,7 @@ var badSection = (t) => `\u4F20\u5165\u7684 mutation \u6BB5\u4E0D\u662F\u5BF9\u8
|
|
|
20418
20695
|
var badCell = (op, t) => `\u4F20\u5165\u7684 mutation \u91CC ${op} \u8FD9\u4E00\u9879\u4E0D\u662F\u5BF9\u8C61\uFF08${t}\uFF09\uFF0C\u65E0\u6CD5\u5224\u8BFB`;
|
|
20419
20696
|
var missingCell = (op) => `\u4F20\u5165\u7684 mutation \u91CC\u6CA1\u6709 ${op} \u8FD9\u4E00\u9879`;
|
|
20420
20697
|
var WORDING3 = 'writable=false \u7684\u4E24\u79CD\u539F\u56E0\uFF1Aderived:<kind>\uFF08\u6D3E\u751F\u5B57\u6BB5\uFF0C\u670D\u52A1\u7AEF\u7B97\u51FA\u6765\u7684\uFF09\u3001readonly\uFF08\u5143\u6570\u636E\u58F0\u660E\u53EA\u8BFB\uFF09\u3002autoGenerate=true \u7684\u5B57\u6BB5\uFF08\u5DE5\u53F7 / \u7EC4\u7EC7 / \u5C97\u4F4D / \u6CD5\u4EBA\u7F16\u7801\u7B49\uFF09**\u4E0D\u662F**\u4E0D\u53EF\u5199\uFF1A\u670D\u52A1\u7AEF\u53EA\u5728\u5B57\u6BB5\u4E3A\u7A7A\u65F6\u751F\u6210\uFF0C\u8C03\u7528\u65B9\u624B\u5DE5\u6307\u5B9A\u7684\u503C\u4F18\u5148 \u2014\u2014 \u7531\u72EC\u7ACB\u6807\u8BB0 `autoGeneratedIfAbsent` \u70B9\u540D\uFF08\u4E0D\u9001\u5219\u751F\u6210\u3001\u9001\u5219\u91C7\u7EB3\uFF09\uFF0C\u4E0D\u518D\u8FDB notWritableReason\u3002\u{1F534} writable=true **\u53EA\u8868\u793A\u5143\u6570\u636E\u6CA1\u58F0\u660E\u8FD9\u4E24\u79CD\u4E0D\u53EF\u5199**\uFF0C\u4E0D\u8868\u793A\u8FD9\u4E2A\u5B57\u6BB5\u8BE5\u7531\u987E\u95EE\u586B \u2014\u2014 \u5B9E\u6D4B createById / updateById \u8FD9 1476 \u4E2A\u5BA1\u8BA1\u5B57\u6BB5\u56DB\u4E2A\u6807\u5FD7\u5168\u662F false\uFF0C\u7167\u6837\u662F writable=true\uFF0C\u5B83\u4EEC\u7531 ref.auditBackref=true \u70B9\u540D\uFF08topology \u628A\u540C\u4E00\u6279\u8FB9\u6392\u9664\u51FA\u4F9D\u8D56\u56FE\uFF0C\u8FD9\u91CC\u4E0D\u6392\u9664\uFF1Amapping \u662F\u5B57\u6BB5\u6E05\u5355\uFF0C\u4E0D\u662F\u4F9D\u8D56\u56FE\uFF09\u3002ref.valueDomain \u53EA\u5728\u76EE\u6807\u662F\u7801\u8868\uFF08DYNAMIC / CO_*\uFF09\u65F6\u7ED9\u51FA\uFF1B\u6307\u5411\u4E1A\u52A1\u6A21\u578B\u65F6\u4E3A null \u2014\u2014 \u5B9E\u6D4B 234 \u4E2A\u58F0\u660E\u51FA\u6765\u7684\u5F15\u7528\u76EE\u6807\u91CC\uFF0C230 \u4E2A\u5728\u540D\u518C\u4E2D\uFF1A\u5176\u4E2D 32 \u4E2A\u662F\u7801\u8868\u3001198 \u4E2A\u662F\u4E1A\u52A1\u6A21\u578B\uFF08User 1564 / OrgUnit 292 / Employee 199 \u2026\uFF09\u8981\u6309\u4E1A\u52A1\u952E\u73B0\u67E5\uFF1B\u53E6\u6709 4 \u4E2A\u60AC\u7A7A\u76EE\u6807\uFF08\u58F0\u660E\u4E86\u5F15\u7528\u4F46\u4E0D\u5728 /api/system/models \u540D\u518C\u91CC\uFF0C\u89C1 topology.json \u7684 dangling\uFF09\u3002valuedomain \u91CC\u6CA1\u6709\u4E1A\u52A1\u6A21\u578B\u7684\u5BF9\u7167\u8868\uFF0C\u6307\u4E00\u4E2A\u4E0D\u5B58\u5728\u7684\u6587\u4EF6\u6BD4\u4E0D\u6307\u66F4\u7CDF\uFF1A\u987E\u95EE\u4F1A\u4EE5\u4E3A\u90A3\u4EFD\u5BF9\u7167\u8868\u53EA\u662F\u8FD8\u6CA1\u751F\u6210\u3002ref.labelFieldSource=unknown \u8868\u793A\u4EA7\u54C1\u6CA1\u58F0\u660E\u663E\u793A\u5B57\u6BB5\u540D\uFF08\u5B9E\u6D4B\u8FDB\u56FE\u7684 2923 \u6761\u8FB9\u91CC 1366 \u6761\u6CA1\u58F0\u660E\uFF09\uFF0C**\u4E0D\u662F**\u300C\u9ED8\u8BA4\u7528 name\u300D\u2014\u2014 \u90A3 1366 \u6761\u6307\u5411 224 \u4E2A\u5728\u518C\u76EE\u6807\uFF0C\u5176\u4E2D 60 \u4E2A\uFF0827%\uFF0C\u76EE\u6807\u6A21\u578B\u53E3\u5F84\uFF09\u8FDE name \u5B57\u6BB5\u90FD\u6CA1\u6709\uFF0C\u6309\u8FB9\u7B97 152 \u6761\uFF0811%\uFF0C\u5B57\u6BB5\u53E3\u5F84\uFF09\u843D\u5728\u5B83\u4EEC\u8EAB\u4E0A\u3002mutation.allowed \u6052\u4E3A\u4E09\u4E2A\u503C\u4E4B\u4E00\uFF1Atrue / false / "unknown"\u3002"unknown" \u8868\u793A\u8BE5\u6A21\u578B\u8FD9\u4E00\u9879\u6CA1\u67E5\u5230\uFF0C**\u4E0D\u662F**\u300C\u5141\u8BB8\u300D\uFF1B\u5177\u4F53\u662F\u54EA\u4E00\u79CD\u6CA1\u67E5\u5230\u770B reason\uFF08\u670D\u52A1\u7AEF\u4FA7\uFF1A\u6CA1\u5E94\u7B54 / \u54CD\u5E94\u7F3A\u8FD9\u4E00\u9879 / allowed \u4E0D\u662F\u5E03\u5C14\uFF1B\u5DE5\u5177\u4FA7\uFF1A\u5E76\u53D1\u6279\u6B21\u91CC\u6CA1\u62FF\u5230\u8FD9\u4E2A\u6A21\u578B\u7684\u7ED3\u679C\uFF1B\u8C03\u7528\u65B9\u4FA7\uFF1A\u672C\u8F6E\u6CA1\u67E5 / \u4F20\u5165\u7684 mutation \u6BB5\u4E0D\u662F\u5BF9\u8C61 / \u4F20\u5165\u7684\u8FD9\u4E00\u9879\u4E0D\u662F\u5BF9\u8C61 / \u4F20\u5165\u7684\u91CC\u6CA1\u6709\u8FD9\u4E00\u9879 \u2014\u2014 \u516B\u79CD\u6210\u56E0\u63AA\u8F9E\u5404\u4E0D\u76F8\u540C\uFF0C\u300C\u4F20\u5165\u7684\u300D\u5F00\u5934\u7684\u662F\u62FC\u8FD9\u4EFD\u57FA\u7EBF\u7684\u4EBA\u641E\u9519\u4E86\uFF0C\u4E0D\u662F\u670D\u52A1\u7AEF\uFF09\u3002enumCount \u6570\u7684\u662F\u8BE5\u5B57\u6BB5\u5019\u9009\u503C\u7684**\u5143\u7D20\u4E2A\u6570**\uFF0C\u4E0E index/fields.jsonl \u91CC\u8BE5\u5B57\u6BB5\u7684 enums \u884C\u6570\u76F8\u7B49\u3002';
|
|
20421
|
-
function
|
|
20698
|
+
function isRecord6(v) {
|
|
20422
20699
|
return Boolean(v) && typeof v === "object" && !Array.isArray(v);
|
|
20423
20700
|
}
|
|
20424
20701
|
function typeName2(v) {
|
|
@@ -20443,7 +20720,7 @@ async function collectMutation(probe, modelKeys2) {
|
|
|
20443
20720
|
continue;
|
|
20444
20721
|
}
|
|
20445
20722
|
const body = out.error === "ok" ? out.body : null;
|
|
20446
|
-
if (!
|
|
20723
|
+
if (!isRecord6(body)) {
|
|
20447
20724
|
const reason = `\u672A\u5E94\u7B54\uFF08HTTP ${out.status} / ${out.error}\uFF09`;
|
|
20448
20725
|
problems.push(`${key}: mutation-capability ${reason}`);
|
|
20449
20726
|
mutation[key] = Object.fromEntries(MUTATION_OPS.map((op) => [op, { allowed: "unknown", reason }]));
|
|
@@ -20452,7 +20729,7 @@ async function collectMutation(probe, modelKeys2) {
|
|
|
20452
20729
|
const entry = {};
|
|
20453
20730
|
for (const op of MUTATION_OPS) {
|
|
20454
20731
|
const cell = body[op];
|
|
20455
|
-
if (!
|
|
20732
|
+
if (!isRecord6(cell) || !("allowed" in cell)) {
|
|
20456
20733
|
entry[op] = { allowed: "unknown", reason: `\u54CD\u5E94\u91CC\u6CA1\u6709 ${op} \u8FD9\u4E00\u9879` };
|
|
20457
20734
|
problems.push(`${key}: mutation-capability \u54CD\u5E94\u7F3A ${op}`);
|
|
20458
20735
|
continue;
|
|
@@ -20473,14 +20750,14 @@ function mutationSection(entry) {
|
|
|
20473
20750
|
if (entry === void 0 || entry === null) {
|
|
20474
20751
|
return Object.fromEntries(MUTATION_OPS.map((op) => [op, { allowed: "unknown", reason: NOT_QUERIED }]));
|
|
20475
20752
|
}
|
|
20476
|
-
if (!
|
|
20753
|
+
if (!isRecord6(entry)) {
|
|
20477
20754
|
const reason = badSection(typeName2(entry));
|
|
20478
20755
|
return Object.fromEntries(MUTATION_OPS.map((op) => [op, { allowed: "unknown", reason }]));
|
|
20479
20756
|
}
|
|
20480
20757
|
const section = {};
|
|
20481
20758
|
for (const op of MUTATION_OPS) {
|
|
20482
20759
|
const cell = entry[op];
|
|
20483
|
-
if (
|
|
20760
|
+
if (isRecord6(cell)) {
|
|
20484
20761
|
section[op] = cell;
|
|
20485
20762
|
} else if (op in entry) {
|
|
20486
20763
|
section[op] = { allowed: "unknown", reason: badCell(op, typeName2(cell)) };
|
|
@@ -20493,7 +20770,7 @@ function mutationSection(entry) {
|
|
|
20493
20770
|
function writability(field) {
|
|
20494
20771
|
const derived = field.derived;
|
|
20495
20772
|
if (derived) {
|
|
20496
|
-
const kind =
|
|
20773
|
+
const kind = isRecord6(derived) ? derived.kind : null;
|
|
20497
20774
|
return { writable: false, reason: `derived:${typeof kind === "string" && kind ? kind : "unknown"}` };
|
|
20498
20775
|
}
|
|
20499
20776
|
if (field.isReadonly) return { writable: false, reason: "readonly" };
|
|
@@ -20508,7 +20785,7 @@ function buildMapping(metas, edges, mutation, codeTables = []) {
|
|
|
20508
20785
|
const { fields, problem: problem6 } = metaFields(metas[modelKey]);
|
|
20509
20786
|
const rows = [];
|
|
20510
20787
|
for (const f of fields) {
|
|
20511
|
-
if (!
|
|
20788
|
+
if (!isRecord6(f)) continue;
|
|
20512
20789
|
const key = f.key;
|
|
20513
20790
|
if (typeof key !== "string" || !key) continue;
|
|
20514
20791
|
const { writable, reason } = writability(f);
|
|
@@ -20551,7 +20828,7 @@ function buildMapping(metas, edges, mutation, codeTables = []) {
|
|
|
20551
20828
|
// 「爬过且这个模型确实没有字段」必须与「没爬过」(文件不存在)区分开。
|
|
20552
20829
|
crawled: true,
|
|
20553
20830
|
wording: WORDING3,
|
|
20554
|
-
mutation: mutationSection(
|
|
20831
|
+
mutation: mutationSection(isRecord6(mutation) ? mutation[modelKey] : mutation),
|
|
20555
20832
|
fieldCount: rows.length,
|
|
20556
20833
|
// 🔴 `null` = 载荷判读正常(fieldCount=0 就是「这个模型确实没字段」);
|
|
20557
20834
|
// 非 null = **爬过、但判不出字段**,此时 fieldCount=0 不代表「没字段」。
|
|
@@ -20563,8 +20840,8 @@ function buildMapping(metas, edges, mutation, codeTables = []) {
|
|
|
20563
20840
|
}
|
|
20564
20841
|
function allowedIn(sheet, op) {
|
|
20565
20842
|
const section = sheet.mutation;
|
|
20566
|
-
const cell =
|
|
20567
|
-
return
|
|
20843
|
+
const cell = isRecord6(section) ? section[op] : void 0;
|
|
20844
|
+
return isRecord6(cell) ? cell.allowed : "unknown";
|
|
20568
20845
|
}
|
|
20569
20846
|
var PATH_SEPARATORS = ["/", String.fromCharCode(92)];
|
|
20570
20847
|
function unsafeKeyReason(modelKey) {
|
|
@@ -20746,7 +21023,7 @@ function writeModelsMd(layout, text3) {
|
|
|
20746
21023
|
// src/fde/recon/pointer-audit.ts
|
|
20747
21024
|
import { existsSync as existsSync3 } from "fs";
|
|
20748
21025
|
import * as path10 from "path";
|
|
20749
|
-
function
|
|
21026
|
+
function isRecord7(v) {
|
|
20750
21027
|
return Boolean(v) && typeof v === "object" && !Array.isArray(v);
|
|
20751
21028
|
}
|
|
20752
21029
|
function auditValueDomainPointers(layout, sheets) {
|
|
@@ -20755,7 +21032,7 @@ function auditValueDomainPointers(layout, sheets) {
|
|
|
20755
21032
|
for (const sheet of sheets) {
|
|
20756
21033
|
for (const field of sheet.fields) {
|
|
20757
21034
|
const ref = field.ref;
|
|
20758
|
-
const pointer =
|
|
21035
|
+
const pointer = isRecord7(ref) ? ref.valueDomain : null;
|
|
20759
21036
|
if (typeof pointer !== "string" || pointer === "") continue;
|
|
20760
21037
|
if (!seen.has(pointer)) {
|
|
20761
21038
|
seen.set(pointer, existsSync3(path10.join(layout.dir, pointer)));
|
|
@@ -20846,18 +21123,18 @@ var WORDING4 = "rows = \u672C\u8F6E\u4EE5\u5F53\u524D\u767B\u5F55\u8EAB\u4EFD\u8
|
|
|
20846
21123
|
function listPath(modelKey) {
|
|
20847
21124
|
return `/api/models/${modelKey}/list/dsl`;
|
|
20848
21125
|
}
|
|
20849
|
-
function
|
|
21126
|
+
function isRecord8(v) {
|
|
20850
21127
|
return Boolean(v) && typeof v === "object" && !Array.isArray(v);
|
|
20851
21128
|
}
|
|
20852
21129
|
function readContent(body) {
|
|
20853
|
-
if (!
|
|
21130
|
+
if (!isRecord8(body)) return { rows: null, total: null, nonDict: 0 };
|
|
20854
21131
|
const rows = body.content;
|
|
20855
21132
|
const total = body.totalElements;
|
|
20856
21133
|
if (!Array.isArray(rows)) return { rows: null, total: null, nonDict: 0 };
|
|
20857
21134
|
if (typeof total !== "number" || !Number.isInteger(total) || total < 0) {
|
|
20858
21135
|
return { rows: null, total: null, nonDict: 0 };
|
|
20859
21136
|
}
|
|
20860
|
-
const kept = rows.filter((r) =>
|
|
21137
|
+
const kept = rows.filter((r) => isRecord8(r));
|
|
20861
21138
|
return { rows: kept, total, nonDict: rows.length - kept.length };
|
|
20862
21139
|
}
|
|
20863
21140
|
async function collectCodeTables(probe, modelEntries2, opts = {}) {
|
|
@@ -20870,7 +21147,7 @@ async function collectCodeTables(probe, modelEntries2, opts = {}) {
|
|
|
20870
21147
|
const problems = [];
|
|
20871
21148
|
const keys = [];
|
|
20872
21149
|
for (const entry of modelEntries2) {
|
|
20873
|
-
if (!
|
|
21150
|
+
if (!isRecord8(entry) || entry.type !== DYNAMIC_TYPE) continue;
|
|
20874
21151
|
const key = entry.modelKey;
|
|
20875
21152
|
if (typeof key !== "string" || !key) {
|
|
20876
21153
|
problems.push(`\u540D\u518C\u91CC\u6709\u4E00\u6761 type=DYNAMIC \u7684\u6761\u76EE\u4F46 modelKey \u4E0D\u53EF\u7528\uFF08${JSON.stringify(key)}\uFF09\uFF0C\u5DF2\u8DF3\u8FC7`);
|
|
@@ -21004,12 +21281,12 @@ function collectEnumDomains(metas) {
|
|
|
21004
21281
|
for (const modelKey of Object.keys(metas).sort()) {
|
|
21005
21282
|
const { fields } = metaFields(metas[modelKey]);
|
|
21006
21283
|
for (const field of fields) {
|
|
21007
|
-
if (!
|
|
21284
|
+
if (!isRecord8(field)) continue;
|
|
21008
21285
|
const fieldKey = field.key;
|
|
21009
21286
|
if (typeof fieldKey !== "string" || !fieldKey) continue;
|
|
21010
21287
|
const enums = field.enums;
|
|
21011
21288
|
if (!Array.isArray(enums) || enums.length === 0) continue;
|
|
21012
|
-
const kept = enums.filter(
|
|
21289
|
+
const kept = enums.filter(isRecord8).map((e) => ({ ...e }));
|
|
21013
21290
|
rows.push({
|
|
21014
21291
|
model: modelKey,
|
|
21015
21292
|
field: fieldKey,
|
|
@@ -21020,7 +21297,7 @@ function collectEnumDomains(metas) {
|
|
|
21020
21297
|
// —— 否则「这个字段的枚举少了一项」这件事没有任何出处。
|
|
21021
21298
|
// 实测 3179 条全是对象,这一档从未观测到;**恒发空列表**而不是条件出键:
|
|
21022
21299
|
// 「有这一列且为空」与「没这一列」是两个值,后者读起来像「没检查过」。
|
|
21023
|
-
nonDictElements: enums.filter((e) => !
|
|
21300
|
+
nonDictElements: enums.filter((e) => !isRecord8(e)).map((e) => JSON.stringify(e) ?? String(e))
|
|
21024
21301
|
});
|
|
21025
21302
|
}
|
|
21026
21303
|
}
|
|
@@ -21065,7 +21342,7 @@ function writeValuedomain(layout, codeTables, enums, opts = {}) {
|
|
|
21065
21342
|
roundId: opts.roundId ?? null,
|
|
21066
21343
|
// 🔴 `identity || {}` 会把「调用方没传身份」和「身份是空的」压成同一个值,
|
|
21067
21344
|
// 而它们的下一步不同(前者去补工具的登录,后者去问服务端为什么不给 user)。
|
|
21068
|
-
identity:
|
|
21345
|
+
identity: isRecord8(opts.identity) ? opts.identity : null,
|
|
21069
21346
|
codeTableCount: Object.keys(codeTables).length,
|
|
21070
21347
|
enumFieldCount: enums.length,
|
|
21071
21348
|
// 🔴 名册里一共看到几条。上游名册加载失败给出空数组时,产物会与
|
|
@@ -21135,7 +21412,7 @@ function parseRoundStamp(stamp2) {
|
|
|
21135
21412
|
function newRoundId(started) {
|
|
21136
21413
|
return `${roundStamp(started)}-${randomBytes3(4).toString("hex")}`;
|
|
21137
21414
|
}
|
|
21138
|
-
function
|
|
21415
|
+
function isRecord9(v) {
|
|
21139
21416
|
return Boolean(v) && typeof v === "object" && !Array.isArray(v);
|
|
21140
21417
|
}
|
|
21141
21418
|
function readJsonSoft(file) {
|
|
@@ -21154,8 +21431,8 @@ function readJsonSoft(file) {
|
|
|
21154
21431
|
}
|
|
21155
21432
|
function readCrawledAt(layout) {
|
|
21156
21433
|
const body = readJsonSoft(path11.join(layout.dir, KIT_CRAWLED_AT_FILE));
|
|
21157
|
-
const models =
|
|
21158
|
-
return
|
|
21434
|
+
const models = isRecord9(body) ? body.models : null;
|
|
21435
|
+
return isRecord9(models) ? models : {};
|
|
21159
21436
|
}
|
|
21160
21437
|
function writeCrawledAt(layout, freshKeys, carriedKeys, roundId, started) {
|
|
21161
21438
|
const previous = readCrawledAt(layout);
|
|
@@ -21203,14 +21480,14 @@ function productRoundId(root, rel) {
|
|
|
21203
21480
|
const p = path11.join(root, rel);
|
|
21204
21481
|
if (!existsSync4(p)) return ["missing", null];
|
|
21205
21482
|
const body = readJsonSoft(p);
|
|
21206
|
-
if (body === void 0 || !
|
|
21483
|
+
if (body === void 0 || !isRecord9(body)) return ["unreadable", null];
|
|
21207
21484
|
const rid = body.roundId;
|
|
21208
21485
|
if (typeof rid !== "string" || !rid) return ["unstamped", null];
|
|
21209
21486
|
return ["stamped", rid];
|
|
21210
21487
|
}
|
|
21211
21488
|
function inspectRound(root) {
|
|
21212
21489
|
const raw = readJsonSoft(path11.join(root, KIT_CRAWLED_AT_FILE));
|
|
21213
|
-
const ledger =
|
|
21490
|
+
const ledger = isRecord9(raw) ? raw : {};
|
|
21214
21491
|
const rid = ledger.roundId;
|
|
21215
21492
|
const roundId = typeof rid === "string" && rid ? rid : null;
|
|
21216
21493
|
const rawWritten = ledger.productsWrittenThisRound;
|
|
@@ -21315,7 +21592,7 @@ function renderRound(result) {
|
|
|
21315
21592
|
}
|
|
21316
21593
|
var SCHEMA_RECRAWL_NEXT = "\u4E0B\u4E00\u6B65\uFF1A\u8DD1\u4E00\u6B21**\u5168\u91CF** `hcm chiron recon`\uFF08\u628A `--model` \u53BB\u6389\uFF09\uFF0C\u6574\u4EFD\u57FA\u7EBF\u624D\u90FD\u51FA\u81EA\u672C\u7248 kit\u3002";
|
|
21317
21594
|
function carriedGatesSchemaProblem(oldGates) {
|
|
21318
|
-
if (!
|
|
21595
|
+
if (!isRecord9(oldGates)) {
|
|
21319
21596
|
const shape = Array.isArray(oldGates) ? "list" : oldGates === null ? "null" : typeof oldGates;
|
|
21320
21597
|
return `gates.json: \u4E0A\u4E00\u8F6E\u7684\u95F8\u8868\u8F7D\u8377\u662F ${shape} \u4E0D\u662F\u5BF9\u8C61\uFF0C\u65E2\u8BFB\u4E0D\u51FA schema \u7248\u672C\u3001\u4E5F\u4E00\u6761\u95F8\u90FD\u6CBF\u7528\u4E0D\u4E86\uFF08\u672C\u8F6E\u7684 gates \u6570\u7EC4\u91CC\u53EA\u6709\u8FD9\u4E00\u8F6E\u771F\u722C\u5230\u7684\uFF09\u3002${SCHEMA_RECRAWL_NEXT}`;
|
|
21321
21598
|
}
|
|
@@ -21356,7 +21633,7 @@ function collectCarryOver(layout, freshMetas) {
|
|
|
21356
21633
|
problems.push(`${name}: \u8BFB\u4E0D\u56DE\u4E0A\u4E00\u8F6E\u7684 meta\uFF08${e.message}\uFF09\uFF0C\u8BE5\u6A21\u578B\u8FD9\u6B21\u4E0D\u8FDB\u7D22\u5F15`);
|
|
21357
21634
|
continue;
|
|
21358
21635
|
}
|
|
21359
|
-
if (
|
|
21636
|
+
if (isRecord9(body)) carriedMetas[key] = body;
|
|
21360
21637
|
else {
|
|
21361
21638
|
problems.push(
|
|
21362
21639
|
`${name}: \u4E0A\u4E00\u8F6E\u7684 meta \u8F7D\u8377\u662F ${Array.isArray(body) ? "list" : body === null ? "null" : typeof body} \u4E0D\u662F\u5BF9\u8C61\uFF0C\u8BE5\u6A21\u578B\u8FD9\u6B21\u4E0D\u8FDB\u7D22\u5F15`
|
|
@@ -21371,9 +21648,9 @@ function collectCarryOver(layout, freshMetas) {
|
|
|
21371
21648
|
const stale = carriedGatesSchemaProblem(oldGates);
|
|
21372
21649
|
if (stale) problems.push(stale);
|
|
21373
21650
|
}
|
|
21374
|
-
const oldList =
|
|
21651
|
+
const oldList = isRecord9(oldGates) && Array.isArray(oldGates.gates) ? oldGates.gates : [];
|
|
21375
21652
|
for (const g of oldList) {
|
|
21376
|
-
if (
|
|
21653
|
+
if (isRecord9(g) && !(String(g.model) in freshMetas)) carriedGates.push(g);
|
|
21377
21654
|
}
|
|
21378
21655
|
return { carriedMetas, carriedGates, problems };
|
|
21379
21656
|
}
|
|
@@ -21497,7 +21774,7 @@ async function runRecon(probe, layout, opts = {}) {
|
|
|
21497
21774
|
products.push(...mappingPaths.map((p) => relOf(layout, p)));
|
|
21498
21775
|
const sheetsWritten = Math.max(mappingPaths.length - 1, 0);
|
|
21499
21776
|
let previous = readJsonSoft(path11.join(layout.dir, "fingerprint.json"));
|
|
21500
|
-
if (!
|
|
21777
|
+
if (!isRecord9(previous)) previous = null;
|
|
21501
21778
|
const current = await computeFingerprint(probe);
|
|
21502
21779
|
products.push(relOf(layout, layout.writeJson("fingerprint.json", current)));
|
|
21503
21780
|
const drift = previous === null ? null : compareFingerprint(previous, current);
|
|
@@ -31023,7 +31300,7 @@ async function createJiraClient(opts = {}) {
|
|
|
31023
31300
|
// src/jira/refs.ts
|
|
31024
31301
|
var escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
31025
31302
|
var HOST = `(?:${GITLAB_REF_HOSTS.map(escapeRe).join("|")})`;
|
|
31026
|
-
var GITLAB_REF_RE = new RegExp(`${HOST}\\/hcm\\/(hcm_nx_(?:core|cloud))(?:#|\\/-\\/(?:issues|work_items)\\/)(\\d+)`, "g");
|
|
31303
|
+
var GITLAB_REF_RE = new RegExp(`${HOST}\\/hcm\\/(hcm_nx_(?:core|cloud|cli))(?:#|\\/-\\/(?:issues|work_items)\\/)(\\d+)`, "g");
|
|
31027
31304
|
var CNB_REF_RE = new RegExp(`(?<!${HOST}\\/)hcm\\/(hcm_nx_(?:core|cli|cloud))(?:#|\\/-\\/issues\\/)(\\d+)`, "g");
|
|
31028
31305
|
var refId = (r) => forgeOf(r) === "gitlab" ? `${GITLAB_HOST}/${r.repo}#${r.number}` : `${r.repo}#${r.number}`;
|
|
31029
31306
|
var refUrl = (r) => forgeOf(r) === "gitlab" ? gitlabIssueUrl(r.repo, r.number) : repoIssueUrl(r.repo, r.number);
|
|
@@ -31267,6 +31544,7 @@ export {
|
|
|
31267
31544
|
STEP_RECORD,
|
|
31268
31545
|
STEP_STOP,
|
|
31269
31546
|
STEP_UNBIND,
|
|
31547
|
+
STORAGE_SLOTS_PATH,
|
|
31270
31548
|
SUPERSEDED_STATUS,
|
|
31271
31549
|
SYNTH_FOOTNOTE,
|
|
31272
31550
|
SYNTH_MARK,
|
|
@@ -31428,6 +31706,7 @@ export {
|
|
|
31428
31706
|
getMiniStatus,
|
|
31429
31707
|
getScriptTask,
|
|
31430
31708
|
getSettingDomain,
|
|
31709
|
+
getStorageSlots,
|
|
31431
31710
|
getTenantMeta,
|
|
31432
31711
|
gitlabIssueUrl,
|
|
31433
31712
|
globalConfigFile,
|