Skip to content

Commit

Permalink
Merge branch 'dev/1.10.4' into enterprise
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon committed Dec 19, 2024
2 parents 4a9b751 + 0e8609e commit 31c480f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/Rule/KeysInRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import RuleFunc from './RuleFunc.json'
import RuleField from './RuleField.json'

const funcList = RuleFunc.reduce((arr: Array<string>, { list }): Array<string> => {
list.forEach(({ name }: { name: string }) => arr.push(name))
list?.forEach(({ name }: { name: string }) => arr.push(name))
return arr
}, [])

Expand Down
20 changes: 20 additions & 0 deletions src/hooks/Rule/RuleFunc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,26 @@
"required": true
}
]
},
{
"name": "str_utf16_le",
"args": [
{
"name": "Data",
"type": "string",
"required": true
}
]
},
{
"name": "sqlserver_bin2hexstr",
"args": [
{
"name": "Data",
"type": "string",
"required": true
}
]
}
]
},
Expand Down
1 change: 1 addition & 0 deletions src/hooks/Rule/bridge/useComponentsHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default (
} else if (prop.type === 'boolean' && prop.is_template) {
prop.type = 'enum'
prop.symbols = [true, false]
prop.default ??= ''
} else if (prop.type === 'object' && !prop.properties && prop.is_template) {
setComponentProps(prop, { supportPlaceholder: ['key', 'value'] })
}
Expand Down
24 changes: 24 additions & 0 deletions src/i18n/RuleSyntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,30 @@ Typical JQ programs describe simple transformations or filters for JSON data, bu
zh: 'Map 的大小',
en: 'The size of the map',
},
strUtf16LeDesc: {
zh: '将 UTF-8 字符串转换为 UTF-16 小端序编码',
en: 'Convert a UTF-8 string to UTF-16 little-endian',
},
strUtf16LeParams: {
zh: '要转换的字符串',
en: 'String to convert',
},
strUtf16LeReturns: {
zh: 'UTF-16 小端序编码的字符串',
en: 'UTF-16 little-endian encoded string',
},
sqlserverBin2HexstrDesc: {
zh: '将字符串或二进制转换为 SQL Server 十六进制格式(带 0x 前缀)',
en: 'Convert string or binary to SQL Server hex format with 0x prefix',
},
sqlserverBin2HexstrParams: {
zh: '要转换的数据',
en: 'Data to convert',
},
sqlserverBin2HexstrReturns: {
zh: 'SQL Server 格式的十六进制字符串',
en: 'Hex string in SQL Server format',
},
schemaDecodeDesc: {
zh: `将数据解码为目标数据结构`,
en: `Decode data to target data structure`,
Expand Down

0 comments on commit 31c480f

Please sign in to comment.