@maiyunnet/kebab 7.6.1 → 7.6.2
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/doc/kebab-rag.md +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/doc/README.sc.md +0 -201
- package/doc/README.tc.md +0 -203
- package/doc/icon.png +0 -0
- package/doc/sc/api/index/index.md +0 -47
- package/doc/sc/api/index/interfaces/IConfig.md +0 -165
- package/doc/sc/api/index/interfaces/IConfigAi.md +0 -29
- package/doc/sc/api/index/interfaces/IConfigConst.md +0 -201
- package/doc/sc/api/index/interfaces/IConfigDb.md +0 -59
- package/doc/sc/api/index/interfaces/IConfigDns.md +0 -27
- package/doc/sc/api/index/interfaces/IConfigJwt.md +0 -51
- package/doc/sc/api/index/interfaces/IConfigKv.md +0 -59
- package/doc/sc/api/index/interfaces/IConfigLang.md +0 -27
- package/doc/sc/api/index/interfaces/IConfigS3.md +0 -53
- package/doc/sc/api/index/interfaces/IConfigSql.md +0 -19
- package/doc/sc/api/index/interfaces/IConfigTurnstile.md +0 -51
- package/doc/sc/api/index/interfaces/IConfigVector.md +0 -51
- package/doc/sc/api/index/interfaces/IPostFile.md +0 -43
- package/doc/sc/api/index/interfaces/IUrlParse.md +0 -97
- package/doc/sc/api/index/interfaces/IVhost.md +0 -43
- package/doc/sc/api/index/type-aliases/DbValue.md +0 -13
- package/doc/sc/api/index/type-aliases/Json.md +0 -13
- package/doc/sc/api/index/variables/CERT_CWD.md +0 -11
- package/doc/sc/api/index/variables/CONF_CWD.md +0 -11
- package/doc/sc/api/index/variables/FTMP_CWD.md +0 -11
- package/doc/sc/api/index/variables/IND_CWD.md +0 -11
- package/doc/sc/api/index/variables/LIB_CWD.md +0 -11
- package/doc/sc/api/index/variables/LIB_PATH.md +0 -11
- package/doc/sc/api/index/variables/LOG_CWD.md +0 -11
- package/doc/sc/api/index/variables/MOD_CWD.md +0 -11
- package/doc/sc/api/index/variables/ROOT_CWD.md +0 -13
- package/doc/sc/api/index/variables/ROOT_PATH.md +0 -13
- package/doc/sc/api/index/variables/SYS_PATH.md +0 -11
- package/doc/sc/api/index/variables/VER.md +0 -13
- package/doc/sc/api/index/variables/VHOST_CWD.md +0 -11
- package/doc/sc/api/index/variables/WWW_CWD.md +0 -11
- package/doc/sc/api/index.md +0 -48
- package/doc/sc/api/lib/ai/classes/Ai.md +0 -103
- package/doc/sc/api/lib/ai/enumerations/ESERVICE.md +0 -61
- package/doc/sc/api/lib/ai/functions/get.md +0 -29
- package/doc/sc/api/lib/ai/index.md +0 -23
- package/doc/sc/api/lib/ai/interfaces/IOptions.md +0 -65
- package/doc/sc/api/lib/buffer/classes/Reader.md +0 -177
- package/doc/sc/api/lib/buffer/classes/Writer.md +0 -147
- package/doc/sc/api/lib/buffer/functions/getReader.md +0 -25
- package/doc/sc/api/lib/buffer/functions/getWriter.md +0 -25
- package/doc/sc/api/lib/buffer/index.md +0 -17
- package/doc/sc/api/lib/captcha/classes/Captcha.md +0 -79
- package/doc/sc/api/lib/captcha/functions/get.md +0 -37
- package/doc/sc/api/lib/captcha/index.md +0 -15
- package/doc/sc/api/lib/consistent/classes/Consistent.md +0 -135
- package/doc/sc/api/lib/consistent/functions/addToCircle.md +0 -37
- package/doc/sc/api/lib/consistent/functions/fast.md +0 -37
- package/doc/sc/api/lib/consistent/functions/findInCircle.md +0 -37
- package/doc/sc/api/lib/consistent/functions/get.md +0 -21
- package/doc/sc/api/lib/consistent/functions/getRange.md +0 -37
- package/doc/sc/api/lib/consistent/functions/hash.md +0 -25
- package/doc/sc/api/lib/consistent/index.md +0 -20
- package/doc/sc/api/lib/core/functions/checkType.md +0 -37
- package/doc/sc/api/lib/core/functions/clone.md +0 -31
- package/doc/sc/api/lib/core/functions/convert62.md +0 -25
- package/doc/sc/api/lib/core/functions/debug.md +0 -31
- package/doc/sc/api/lib/core/functions/display.md +0 -31
- package/doc/sc/api/lib/core/functions/emptyObject.md +0 -31
- package/doc/sc/api/lib/core/functions/exec.md +0 -31
- package/doc/sc/api/lib/core/functions/getLog.md +0 -71
- package/doc/sc/api/lib/core/functions/ip.md +0 -27
- package/doc/sc/api/lib/core/functions/log.md +0 -37
- package/doc/sc/api/lib/core/functions/ls.md +0 -39
- package/doc/sc/api/lib/core/functions/muid.md +0 -59
- package/doc/sc/api/lib/core/functions/objectSort.md +0 -31
- package/doc/sc/api/lib/core/functions/passThroughAppend.md +0 -37
- package/doc/sc/api/lib/core/functions/purify.md +0 -25
- package/doc/sc/api/lib/core/functions/rand.md +0 -37
- package/doc/sc/api/lib/core/functions/random.md +0 -37
- package/doc/sc/api/lib/core/functions/realIP.md +0 -29
- package/doc/sc/api/lib/core/functions/removeGlobal.md +0 -31
- package/doc/sc/api/lib/core/functions/sendNpm.md +0 -31
- package/doc/sc/api/lib/core/functions/sendPm2.md +0 -37
- package/doc/sc/api/lib/core/functions/sendReload.md +0 -24
- package/doc/sc/api/lib/core/functions/sendRestart.md +0 -24
- package/doc/sc/api/lib/core/functions/setCookie.md +0 -43
- package/doc/sc/api/lib/core/functions/setGlobal.md +0 -37
- package/doc/sc/api/lib/core/functions/sleep.md +0 -25
- package/doc/sc/api/lib/core/functions/unconvert62.md +0 -25
- package/doc/sc/api/lib/core/functions/updateCode.md +0 -49
- package/doc/sc/api/lib/core/functions/write.md +0 -31
- package/doc/sc/api/lib/core/functions/writeEventStreamHead.md +0 -21
- package/doc/sc/api/lib/core/functions/writeHead.md +0 -37
- package/doc/sc/api/lib/core/index.md +0 -66
- package/doc/sc/api/lib/core/interfaces/ICookieOptions.md +0 -59
- package/doc/sc/api/lib/core/interfaces/ILogOptions.md +0 -75
- package/doc/sc/api/lib/core/type-aliases/TPm2Action.md +0 -13
- package/doc/sc/api/lib/core/variables/RANDOM_L.md +0 -13
- package/doc/sc/api/lib/core/variables/RANDOM_LN.md +0 -13
- package/doc/sc/api/lib/core/variables/RANDOM_LU.md +0 -13
- package/doc/sc/api/lib/core/variables/RANDOM_LUN.md +0 -13
- package/doc/sc/api/lib/core/variables/RANDOM_LUNS.md +0 -13
- package/doc/sc/api/lib/core/variables/RANDOM_N.md +0 -13
- package/doc/sc/api/lib/core/variables/RANDOM_U.md +0 -13
- package/doc/sc/api/lib/core/variables/RANDOM_UN.md +0 -13
- package/doc/sc/api/lib/core/variables/RANDOM_V.md +0 -13
- package/doc/sc/api/lib/core/variables/REAL_IP_CF.md +0 -13
- package/doc/sc/api/lib/core/variables/REAL_IP_X.md +0 -13
- package/doc/sc/api/lib/core/variables/global.md +0 -13
- package/doc/sc/api/lib/core/variables/globalConfig.md +0 -47
- package/doc/sc/api/lib/cron/functions/getRegulars.md +0 -17
- package/doc/sc/api/lib/cron/functions/regular.md +0 -31
- package/doc/sc/api/lib/cron/index.md +0 -17
- package/doc/sc/api/lib/cron/interfaces/IRegular.md +0 -59
- package/doc/sc/api/lib/cron/interfaces/IRegularData.md +0 -101
- package/doc/sc/api/lib/crypto/functions/aesDecrypt.md +0 -91
- package/doc/sc/api/lib/crypto/functions/aesEncrypt.md +0 -95
- package/doc/sc/api/lib/crypto/functions/base64Decode.md +0 -59
- package/doc/sc/api/lib/crypto/functions/base64Encode.md +0 -25
- package/doc/sc/api/lib/crypto/functions/cipherDecrypt.md +0 -49
- package/doc/sc/api/lib/crypto/functions/cipherEncrypt.md +0 -49
- package/doc/sc/api/lib/crypto/functions/gcmDecrypt.md +0 -71
- package/doc/sc/api/lib/crypto/functions/gcmEncrypt.md +0 -71
- package/doc/sc/api/lib/crypto/functions/generateKeyPair.md +0 -61
- package/doc/sc/api/lib/crypto/functions/hashHmac.md +0 -79
- package/doc/sc/api/lib/crypto/functions/hashHmacFile.md +0 -79
- package/doc/sc/api/lib/crypto/functions/privateDecrypt.md +0 -31
- package/doc/sc/api/lib/crypto/functions/privateEncrypt.md +0 -31
- package/doc/sc/api/lib/crypto/functions/publicDecrypt.md +0 -31
- package/doc/sc/api/lib/crypto/functions/publicEncrypt.md +0 -31
- package/doc/sc/api/lib/crypto/functions/sign.md +0 -83
- package/doc/sc/api/lib/crypto/functions/sm4Decrypt.md +0 -91
- package/doc/sc/api/lib/crypto/functions/sm4Encrypt.md +0 -91
- package/doc/sc/api/lib/crypto/functions/uuid.md +0 -25
- package/doc/sc/api/lib/crypto/functions/verify.md +0 -43
- package/doc/sc/api/lib/crypto/index.md +0 -40
- package/doc/sc/api/lib/crypto/variables/AES_256_CBC.md +0 -13
- package/doc/sc/api/lib/crypto/variables/AES_256_CTR.md +0 -13
- package/doc/sc/api/lib/crypto/variables/AES_256_ECB.md +0 -13
- package/doc/sc/api/lib/crypto/variables/AES_256_GCM.md +0 -13
- package/doc/sc/api/lib/crypto/variables/SM4_CBC.md +0 -11
- package/doc/sc/api/lib/crypto/variables/SM4_CFB.md +0 -13
- package/doc/sc/api/lib/crypto/variables/SM4_ECB.md +0 -13
- package/doc/sc/api/lib/db/conn/classes/Connection.md +0 -315
- package/doc/sc/api/lib/db/conn/index.md +0 -11
- package/doc/sc/api/lib/db/enumerations/ESERVICE.md +0 -27
- package/doc/sc/api/lib/db/functions/get.md +0 -37
- package/doc/sc/api/lib/db/index.md +0 -50
- package/doc/sc/api/lib/db/interfaces/IData.md +0 -57
- package/doc/sc/api/lib/db/interfaces/IPacket.md +0 -75
- package/doc/sc/api/lib/db/pool/classes/Pool.md +0 -143
- package/doc/sc/api/lib/db/pool/functions/getConnectionList.md +0 -17
- package/doc/sc/api/lib/db/pool/index.md +0 -19
- package/doc/sc/api/lib/db/pool/interfaces/IConnectionInfo.md +0 -91
- package/doc/sc/api/lib/db/tran/classes/Transaction.md +0 -137
- package/doc/sc/api/lib/db/tran/index.md +0 -11
- package/doc/sc/api/lib/dns/classes/Dns.md +0 -187
- package/doc/sc/api/lib/dns/enumerations/ERECORDLINE.md +0 -59
- package/doc/sc/api/lib/dns/enumerations/ERECORDTYPE.md +0 -67
- package/doc/sc/api/lib/dns/enumerations/ESERVICE.md +0 -27
- package/doc/sc/api/lib/dns/functions/get.md +0 -29
- package/doc/sc/api/lib/dns/index.md +0 -27
- package/doc/sc/api/lib/dns/interfaces/IAddDomainRecord.md +0 -27
- package/doc/sc/api/lib/dns/interfaces/IDomainList.md +0 -43
- package/doc/sc/api/lib/dns/interfaces/IOptions.md +0 -41
- package/doc/sc/api/lib/fs/functions/chmod.md +0 -31
- package/doc/sc/api/lib/fs/functions/copyFile.md +0 -31
- package/doc/sc/api/lib/fs/functions/copyFolder.md +0 -37
- package/doc/sc/api/lib/fs/functions/createReadStream.md +0 -31
- package/doc/sc/api/lib/fs/functions/createWriteStream.md +0 -31
- package/doc/sc/api/lib/fs/functions/getContent.md +0 -63
- package/doc/sc/api/lib/fs/functions/isDir.md +0 -25
- package/doc/sc/api/lib/fs/functions/isFile.md +0 -25
- package/doc/sc/api/lib/fs/functions/mkdir.md +0 -31
- package/doc/sc/api/lib/fs/functions/pipe.md +0 -39
- package/doc/sc/api/lib/fs/functions/putContent.md +0 -47
- package/doc/sc/api/lib/fs/functions/readDir.md +0 -29
- package/doc/sc/api/lib/fs/functions/readLink.md +0 -31
- package/doc/sc/api/lib/fs/functions/readToResponse.md +0 -43
- package/doc/sc/api/lib/fs/functions/rename.md +0 -31
- package/doc/sc/api/lib/fs/functions/rmdir.md +0 -25
- package/doc/sc/api/lib/fs/functions/rmdirDeep.md +0 -25
- package/doc/sc/api/lib/fs/functions/stats.md +0 -25
- package/doc/sc/api/lib/fs/functions/symlink.md +0 -37
- package/doc/sc/api/lib/fs/functions/unlink.md +0 -25
- package/doc/sc/api/lib/fs/index.md +0 -30
- package/doc/sc/api/lib/kv/classes/Kv.md +0 -1161
- package/doc/sc/api/lib/kv/functions/get.md +0 -41
- package/doc/sc/api/lib/kv/index.md +0 -20
- package/doc/sc/api/lib/kv/interfaces/IConnectionInfo.md +0 -43
- package/doc/sc/api/lib/kv/interfaces/IZRangeOptions.md +0 -52
- package/doc/sc/api/lib/lan/functions/card.md +0 -17
- package/doc/sc/api/lib/lan/functions/scan.md +0 -17
- package/doc/sc/api/lib/lan/index.md +0 -12
- package/doc/sc/api/lib/lang/functions/getCodeByAccept.md +0 -25
- package/doc/sc/api/lib/lang/index.md +0 -17
- package/doc/sc/api/lib/lang/variables/codes.md +0 -13
- package/doc/sc/api/lib/lang/variables/map.md +0 -13
- package/doc/sc/api/lib/lang/variables/names.md +0 -11
- package/doc/sc/api/lib/net/formdata/classes/FormData.md +0 -157
- package/doc/sc/api/lib/net/formdata/index.md +0 -15
- package/doc/sc/api/lib/net/formdata/interfaces/IItem.md +0 -55
- package/doc/sc/api/lib/net/functions/buildCookieQuery.md +0 -31
- package/doc/sc/api/lib/net/functions/fetch.md +0 -31
- package/doc/sc/api/lib/net/functions/filterHeaders.md +0 -37
- package/doc/sc/api/lib/net/functions/get.md +0 -31
- package/doc/sc/api/lib/net/functions/getCa.md +0 -17
- package/doc/sc/api/lib/net/functions/getFormData.md +0 -17
- package/doc/sc/api/lib/net/functions/mproxy.md +0 -38
- package/doc/sc/api/lib/net/functions/mproxyData.md +0 -25
- package/doc/sc/api/lib/net/functions/open.md +0 -23
- package/doc/sc/api/lib/net/functions/post.md +0 -37
- package/doc/sc/api/lib/net/functions/postJson.md +0 -37
- package/doc/sc/api/lib/net/functions/postJsonResponseJson.md +0 -39
- package/doc/sc/api/lib/net/functions/request.md +0 -33
- package/doc/sc/api/lib/net/functions/resetCookieSession.md +0 -25
- package/doc/sc/api/lib/net/functions/rproxy.md +0 -37
- package/doc/sc/api/lib/net/functions/setCookie.md +0 -63
- package/doc/sc/api/lib/net/index.md +0 -37
- package/doc/sc/api/lib/net/interfaces/ICookie.md +0 -69
- package/doc/sc/api/lib/net/interfaces/IMproxyOptions.md +0 -85
- package/doc/sc/api/lib/net/interfaces/IRequestOptions.md +0 -133
- package/doc/sc/api/lib/net/interfaces/IRproxyOptions.md +0 -107
- package/doc/sc/api/lib/net/request/classes/Request.md +0 -297
- package/doc/sc/api/lib/net/request/index.md +0 -11
- package/doc/sc/api/lib/net/response/classes/Response.md +0 -109
- package/doc/sc/api/lib/net/response/index.md +0 -11
- package/doc/sc/api/lib/net/type-aliases/THttpHeaders.md +0 -27
- package/doc/sc/api/lib/s3/classes/S3.md +0 -220
- package/doc/sc/api/lib/s3/enumerations/ESERVICE.md +0 -43
- package/doc/sc/api/lib/s3/functions/get.md +0 -29
- package/doc/sc/api/lib/s3/index.md +0 -23
- package/doc/sc/api/lib/s3/interfaces/IOptions.md +0 -71
- package/doc/sc/api/lib/scan/classes/Scan.md +0 -127
- package/doc/sc/api/lib/scan/functions/get.md +0 -33
- package/doc/sc/api/lib/scan/functions/scanned.md +0 -37
- package/doc/sc/api/lib/scan/functions/setData.md +0 -35
- package/doc/sc/api/lib/scan/index.md +0 -22
- package/doc/sc/api/lib/scan/interfaces/IOptions.md +0 -43
- package/doc/sc/api/lib/scan/interfaces/IStaticOptions.md +0 -35
- package/doc/sc/api/lib/session/classes/Session.md +0 -103
- package/doc/sc/api/lib/session/index.md +0 -15
- package/doc/sc/api/lib/session/interfaces/IOptions.md +0 -41
- package/doc/sc/api/lib/socket/functions/rwebsocket.md +0 -37
- package/doc/sc/api/lib/socket/index.md +0 -15
- package/doc/sc/api/lib/socket/interfaces/IRwebsocketOptions.md +0 -91
- package/doc/sc/api/lib/sql/classes/Sql.md +0 -791
- package/doc/sc/api/lib/sql/enumerations/EJSON.md +0 -61
- package/doc/sc/api/lib/sql/enumerations/ESERVICE.md +0 -27
- package/doc/sc/api/lib/sql/functions/aoMix.md +0 -25
- package/doc/sc/api/lib/sql/functions/column.md +0 -35
- package/doc/sc/api/lib/sql/functions/format.md +0 -37
- package/doc/sc/api/lib/sql/functions/get.md +0 -43
- package/doc/sc/api/lib/sql/index.md +0 -23
- package/doc/sc/api/lib/ssh/classes/Connection.md +0 -123
- package/doc/sc/api/lib/ssh/functions/get.md +0 -25
- package/doc/sc/api/lib/ssh/index.md +0 -19
- package/doc/sc/api/lib/ssh/interfaces/IExtOptions.md +0 -33
- package/doc/sc/api/lib/ssh/sftp/classes/Connection.md +0 -628
- package/doc/sc/api/lib/ssh/sftp/index.md +0 -11
- package/doc/sc/api/lib/ssh/shell/classes/Connection.md +0 -189
- package/doc/sc/api/lib/ssh/shell/index.md +0 -11
- package/doc/sc/api/lib/text/functions/getFilename.md +0 -25
- package/doc/sc/api/lib/text/functions/htmlescape.md +0 -25
- package/doc/sc/api/lib/text/functions/int2str.md +0 -42
- package/doc/sc/api/lib/text/functions/isAscii.md +0 -25
- package/doc/sc/api/lib/text/functions/isDomain.md +0 -27
- package/doc/sc/api/lib/text/functions/isEMail.md +0 -23
- package/doc/sc/api/lib/text/functions/isFalsy.md +0 -25
- package/doc/sc/api/lib/text/functions/isIPv4.md +0 -23
- package/doc/sc/api/lib/text/functions/isIPv6.md +0 -23
- package/doc/sc/api/lib/text/functions/isIdCardCN.md +0 -25
- package/doc/sc/api/lib/text/functions/isPhoneCN.md +0 -25
- package/doc/sc/api/lib/text/functions/isRealPath.md +0 -25
- package/doc/sc/api/lib/text/functions/isTruthy.md +0 -31
- package/doc/sc/api/lib/text/functions/logicalOr.md +0 -41
- package/doc/sc/api/lib/text/functions/match.md +0 -31
- package/doc/sc/api/lib/text/functions/nlReplace.md +0 -31
- package/doc/sc/api/lib/text/functions/parseDomain.md +0 -25
- package/doc/sc/api/lib/text/functions/parseJson.md +0 -25
- package/doc/sc/api/lib/text/functions/parseUrl.md +0 -23
- package/doc/sc/api/lib/text/functions/queryParse.md +0 -25
- package/doc/sc/api/lib/text/functions/queryStringify.md +0 -69
- package/doc/sc/api/lib/text/functions/sizeFormat.md +0 -31
- package/doc/sc/api/lib/text/functions/str2int.md +0 -36
- package/doc/sc/api/lib/text/functions/stringifyBuffer.md +0 -25
- package/doc/sc/api/lib/text/functions/stringifyJson.md +0 -31
- package/doc/sc/api/lib/text/functions/stringifyResult.md +0 -25
- package/doc/sc/api/lib/text/functions/trimJson.md +0 -23
- package/doc/sc/api/lib/text/functions/urlAtom.md +0 -25
- package/doc/sc/api/lib/text/functions/urlResolve.md +0 -31
- package/doc/sc/api/lib/text/index.md +0 -55
- package/doc/sc/api/lib/text/interfaces/IDomain.md +0 -43
- package/doc/sc/api/lib/text/type-aliases/TFalsy.md +0 -13
- package/doc/sc/api/lib/text/variables/REGEXP_ASCII.md +0 -13
- package/doc/sc/api/lib/text/variables/REGEXP_DOMAIN.md +0 -11
- package/doc/sc/api/lib/text/variables/REGEXP_EMAIL.md +0 -11
- package/doc/sc/api/lib/text/variables/REGEXP_IPV4.md +0 -11
- package/doc/sc/api/lib/text/variables/REGEXP_IPV6.md +0 -11
- package/doc/sc/api/lib/time/classes/Time.md +0 -125
- package/doc/sc/api/lib/time/functions/format.md +0 -37
- package/doc/sc/api/lib/time/functions/get.md +0 -27
- package/doc/sc/api/lib/time/functions/isMs.md +0 -25
- package/doc/sc/api/lib/time/functions/stamp.md +0 -31
- package/doc/sc/api/lib/time/index.md +0 -28
- package/doc/sc/api/lib/time/interfaces/IOptions.md +0 -29
- package/doc/sc/api/lib/time/variables/DAY.md +0 -13
- package/doc/sc/api/lib/time/variables/HOUR.md +0 -13
- package/doc/sc/api/lib/time/variables/YEAR.md +0 -13
- package/doc/sc/api/lib/turnstile/enumerations/EFACTORY.md +0 -27
- package/doc/sc/api/lib/turnstile/functions/verify.md +0 -35
- package/doc/sc/api/lib/turnstile/index.md +0 -15
- package/doc/sc/api/lib/vector/classes/Vector.md +0 -141
- package/doc/sc/api/lib/vector/functions/get.md +0 -25
- package/doc/sc/api/lib/vector/index.md +0 -19
- package/doc/sc/api/lib/vector/interfaces/IOptions.md +0 -61
- package/doc/sc/api/lib/ws/classes/Socket.md +0 -331
- package/doc/sc/api/lib/ws/enumerations/EFrameReceiveMode.md +0 -35
- package/doc/sc/api/lib/ws/enumerations/EOpcode.md +0 -59
- package/doc/sc/api/lib/ws/functions/connect.md +0 -31
- package/doc/sc/api/lib/ws/functions/createServer.md +0 -45
- package/doc/sc/api/lib/ws/functions/mproxy.md +0 -38
- package/doc/sc/api/lib/ws/functions/rproxy.md +0 -37
- package/doc/sc/api/lib/ws/functions/rsocket.md +0 -37
- package/doc/sc/api/lib/ws/index.md +0 -30
- package/doc/sc/api/lib/ws/interfaces/IConnectOptions.md +0 -95
- package/doc/sc/api/lib/ws/interfaces/IMproxyOptions.md +0 -87
- package/doc/sc/api/lib/ws/interfaces/IRproxyOptions.md +0 -105
- package/doc/sc/api/lib/zip/classes/Zip.md +0 -392
- package/doc/sc/api/lib/zip/functions/get.md +0 -25
- package/doc/sc/api/lib/zip/index.md +0 -29
- package/doc/sc/api/lib/zip/interfaces/IZipInputByType.md +0 -81
- package/doc/sc/api/lib/zip/interfaces/IZipItem.md +0 -65
- package/doc/sc/api/lib/zip/interfaces/IZipMetadata.md +0 -25
- package/doc/sc/api/lib/zip/interfaces/IZipOutputByType.md +0 -81
- package/doc/sc/api/lib/zip/interfaces/IZipStats.md +0 -49
- package/doc/sc/api/lib/zip/type-aliases/TZipInputFileFormat.md +0 -11
- package/doc/sc/api/lib/zip/type-aliases/TZipInputType.md +0 -11
- package/doc/sc/api/lib/zip/type-aliases/TZipOutputType.md +0 -11
- package/doc/sc/api/lib/zlib/functions/brotliCompress.md +0 -31
- package/doc/sc/api/lib/zlib/functions/brotliDecompress.md +0 -25
- package/doc/sc/api/lib/zlib/functions/compress.md +0 -37
- package/doc/sc/api/lib/zlib/functions/createBrotliCompress.md +0 -25
- package/doc/sc/api/lib/zlib/functions/createBrotliDecompress.md +0 -17
- package/doc/sc/api/lib/zlib/functions/createCompress.md +0 -31
- package/doc/sc/api/lib/zlib/functions/createDecompress.md +0 -25
- package/doc/sc/api/lib/zlib/functions/createDeflate.md +0 -25
- package/doc/sc/api/lib/zlib/functions/createGunzip.md +0 -17
- package/doc/sc/api/lib/zlib/functions/createGzip.md +0 -25
- package/doc/sc/api/lib/zlib/functions/createInflate.md +0 -17
- package/doc/sc/api/lib/zlib/functions/decompress.md +0 -31
- package/doc/sc/api/lib/zlib/functions/deflate.md +0 -31
- package/doc/sc/api/lib/zlib/functions/gunzip.md +0 -25
- package/doc/sc/api/lib/zlib/functions/gzip.md +0 -31
- package/doc/sc/api/lib/zlib/functions/inflate.md +0 -25
- package/doc/sc/api/lib/zlib/index.md +0 -31
- package/doc/sc/api/lib/zlib/interfaces/ICompress.md +0 -27
- package/doc/sc/api/lib/zlib/interfaces/ICompressBuffer.md +0 -27
- package/doc/sc/api/main/index.md +0 -7
- package/doc/sc/api/sys/ctr/classes/Ctr.md +0 -1242
- package/doc/sc/api/sys/ctr/functions/clearLocaleData.md +0 -17
- package/doc/sc/api/sys/ctr/index.md +0 -15
- package/doc/sc/api/sys/mod/classes/Rows.md +0 -165
- package/doc/sc/api/sys/mod/classes/default.md +0 -2175
- package/doc/sc/api/sys/mod/index.md +0 -21
- package/doc/sc/api/sys/mod/interfaces/IModUnionItem.md +0 -25
- package/doc/sc/api/sys/mod/interfaces/IRows.md +0 -57
- package/doc/sc/api/sys/mod/type-aliases/TOnlyProperties.md +0 -19
- package/doc/sc/api/sys/route/functions/clearKebabConfigs.md +0 -17
- package/doc/sc/api/sys/route/functions/getFormData.md +0 -47
- package/doc/sc/api/sys/route/functions/getPost.md +0 -25
- package/doc/sc/api/sys/route/functions/run.md +0 -83
- package/doc/sc/api/sys/route/functions/unlinkUploadFiles.md +0 -25
- package/doc/sc/api/sys/route/functions/waitCtr.md +0 -26
- package/doc/sc/api/sys/route/index.md +0 -16
- package/doc/sc/quick-start.md +0 -30
package/doc/kebab-rag.md
CHANGED
|
@@ -1385,7 +1385,7 @@ index/variables/VER.md
|
|
|
1385
1385
|
|
|
1386
1386
|
# Variable: VER
|
|
1387
1387
|
|
|
1388
|
-
> `const` **VER**: `"7.6.
|
|
1388
|
+
> `const` **VER**: `"7.6.2"` = `'7.6.2'`
|
|
1389
1389
|
|
|
1390
1390
|
Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
|
|
1391
1391
|
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* --- 本文件用来定义每个目录实体地址的常量 ---
|
|
7
7
|
*/
|
|
8
8
|
/** --- 当前系统版本号 --- */
|
|
9
|
-
export const VER = '7.6.
|
|
9
|
+
export const VER = '7.6.2';
|
|
10
10
|
// --- 服务端用的路径 ---
|
|
11
11
|
const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
|
|
12
12
|
/** --- /xxx/xxx --- */
|
package/package.json
CHANGED
package/doc/README.sc.md
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
<p align="center"><img src="./icon.png" width="64" height="64" alt="Kebab"></p>
|
|
2
|
-
<p align="center">
|
|
3
|
-
<a href="https://github.com/maiyun/kebab/blob/main/LICENSE">
|
|
4
|
-
<img alt="License" src="https://img.shields.io/github/license/maiyun/kebab?color=blue" />
|
|
5
|
-
</a>
|
|
6
|
-
<a href="https://www.npmjs.com/package/@maiyunnet/kebab">
|
|
7
|
-
<img alt="NPM stable version" src="https://img.shields.io/npm/v/@maiyunnet/kebab?color=brightgreen&logo=npm" />
|
|
8
|
-
</a>
|
|
9
|
-
<a href="https://github.com/maiyun/kebab/releases">
|
|
10
|
-
<img alt="GitHub releases" src="https://img.shields.io/github/v/release/maiyun/kebab?color=brightgreen&logo=github" />
|
|
11
|
-
</a>
|
|
12
|
-
<a href="https://github.com/maiyun/kebab/issues">
|
|
13
|
-
<img alt="GitHub issues" src="https://img.shields.io/github/issues/maiyun/kebab?color=blue&logo=github" />
|
|
14
|
-
</a>
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
简单,易用,功能完整开袋即食的 Node.js 框架。
|
|
18
|
-
|
|
19
|
-
## 语言
|
|
20
|
-
|
|
21
|
-
[繁體中文](README.tc.md) | [English](../README.md)
|
|
22
|
-
|
|
23
|
-
## 环境
|
|
24
|
-
|
|
25
|
-
Node 22 +
|
|
26
|
-
|
|
27
|
-
## 安装
|
|
28
|
-
|
|
29
|
-
执行 `npm i @maiyunnet/kebab` 安装最新版,安装后,执行 `npx kebab init` 进行初始化,然后执行 `npx kebab` 启动项目。
|
|
30
|
-
|
|
31
|
-
也可以使用 pm2 启动项目,执行 `pm2 start npx --name "kebab" -- kebab` 即可。
|
|
32
|
-
|
|
33
|
-
## 库
|
|
34
|
-
|
|
35
|
-
Ai, Buffer, Captcha, Consistent, Core, Cron, Crypto, Db (MySQL, PostgreSQL), Dns (DNSPod, Alibaba Cloud), Fs, Kv (Redis), Lan, Lang, Net, S3, Scan, Session, Socket, Sql, Ssh (Shell, Sftp), Text, Time, Turnstile (Cloudflare, Tencent Cloud), Vector (Milvus), Ws, Zip, Zlib.
|
|
36
|
-
|
|
37
|
-
## 部分特性
|
|
38
|
-
|
|
39
|
-
### 开袋即食
|
|
40
|
-
|
|
41
|
-
秉承开袋即食的原则,封装统一风格的常用类库。
|
|
42
|
-
|
|
43
|
-
### 热更新
|
|
44
|
-
|
|
45
|
-
通过调用 Core.sendRestart 方法, 您可以在不中断任何现有业务和连接的情况下平滑的实现新旧代码交替热更新。
|
|
46
|
-
|
|
47
|
-
### 多进程支持
|
|
48
|
-
|
|
49
|
-
创建基于 CPU 核心数量的多进程模型, 充分提高多核 CPU 的利用率。
|
|
50
|
-
|
|
51
|
-
### 全局连接池
|
|
52
|
-
|
|
53
|
-
同一进程中的不同站点如果连接到同一个 Db、Kv 等服务器, 则共享同一个连接池, 最大限度地提高效率并减少开销。
|
|
54
|
-
|
|
55
|
-
### 超好用 Net 库
|
|
56
|
-
|
|
57
|
-
```typescript
|
|
58
|
-
const res = await lNet.open('https://xxx/test').post().data({ 'a': '1', 'b': '2' }).request();
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
也可以这样用:
|
|
62
|
-
|
|
63
|
-
```typescript
|
|
64
|
-
const res = await lNet.get('https://xxx/test');
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
可以设置自定义的解析结果:
|
|
68
|
-
|
|
69
|
-
```typescript
|
|
70
|
-
const res = await lNet.get('https://xxx/test', {
|
|
71
|
-
'hosts': {
|
|
72
|
-
'xxx': '111.111.111.111'
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
也可以选择本地的其他网卡来访问:
|
|
78
|
-
|
|
79
|
-
```typescript
|
|
80
|
-
const res = await lNet.get('https://xxx/test', {
|
|
81
|
-
'local': '123.123.123.123'
|
|
82
|
-
});
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
更拥有完整的 Cookie 管理器,可以轻松将 Cookie 获取并存在任何地方,发送请求时,系统也会根据 Cookie 设置的域名、路径等来选择发送,并且 Set-Cookie 如果有非法跨域设置,也会被舍弃不会被记录,就像真正的浏览器一样:
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
const res1 = await lNet.get('https://xxx1.xxx/test1', { 'cookie': cookie });
|
|
89
|
-
const res2 = await lNet.get('https://xxx2.xxx/test2', { 'cookie': cookie });
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
> 提示:Net 库同时支持传入 options 和 open 链式操作,如 await lNet.open('xxx').follow().timeout(60).save(this._config.const.rootPath + 'doc/test.txt').request();
|
|
93
|
-
|
|
94
|
-
### 好用的 Db 库
|
|
95
|
-
|
|
96
|
-
拥有大量好用的接口,可以轻松的从数据库筛选出需要的数据:
|
|
97
|
-
|
|
98
|
-
```typescript
|
|
99
|
-
const ls = Order.where<Order>(this, db, {
|
|
100
|
-
'state': '1'
|
|
101
|
-
}).by('id', 'DESC').page(10, 1);
|
|
102
|
-
const list = await ls.all();
|
|
103
|
-
const count = await ls.count();
|
|
104
|
-
const total = await ls.total();
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
获取一个用户:
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
const user = await User.select<User>(this, db, ['id', 'user']).filter([
|
|
111
|
-
['time_add', '>=', '1583405134']
|
|
112
|
-
]).first();
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### XSRF 检测
|
|
116
|
-
|
|
117
|
-
使用 checkXInput 方法,可以进行 XSRF 检测,防止恶意访问。
|
|
118
|
-
|
|
119
|
-
### 扫码登录
|
|
120
|
-
|
|
121
|
-
借助 Scan 库可以轻松实现扫码登录的功能。
|
|
122
|
-
|
|
123
|
-
### 反向代理
|
|
124
|
-
|
|
125
|
-
使用 net 库的 rproxy 方法,配合路由参数,可轻松实现反向代理功能。
|
|
126
|
-
|
|
127
|
-
#### 还有更多特性等你探索
|
|
128
|
-
|
|
129
|
-
## 代码演示
|
|
130
|
-
|
|
131
|
-
### 生成 16 位随机数
|
|
132
|
-
|
|
133
|
-
```typescript
|
|
134
|
-
let str: string = Core.random(16, Core.RANDOM_N)
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### 生成验证码图片
|
|
138
|
-
|
|
139
|
-
```typescript
|
|
140
|
-
Captcha.get(400, 100).getBuffer();
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### 获取一个列表
|
|
144
|
-
|
|
145
|
-
```typescript
|
|
146
|
-
const userList = await User.where<User>(this, db, [
|
|
147
|
-
['state', '!=', '0'],
|
|
148
|
-
{
|
|
149
|
-
'type': ['1', '2', '3'],
|
|
150
|
-
'is_lock': '0'
|
|
151
|
-
}
|
|
152
|
-
]).all();
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
> 提示:所有数据库操作都已经做了安全防注入处理。
|
|
156
|
-
|
|
157
|
-
### Sql 库自动增加表前缀和包裹字符“`”
|
|
158
|
-
|
|
159
|
-
```typescript
|
|
160
|
-
sql.select(['SUM(user.age) age'], 'order').leftJoin('user', {'order.user_id': lSql.column('user.id')});
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
将输出:
|
|
164
|
-
|
|
165
|
-
```sql
|
|
166
|
-
SELECT SUM(`test_user`.`age`) AS `age` FROM `test_order` LEFT JOIN `test_user` ON `test_order`.`user_id` = `test_user`.`id`
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
写起来好轻松!
|
|
170
|
-
|
|
171
|
-
### 本地化
|
|
172
|
-
|
|
173
|
-
```typescript
|
|
174
|
-
await this._loadLocale(this._get['lang'], 'test');
|
|
175
|
-
return this._l('copy');
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
根据 lang 值不同,将输出:Copy、复制、複製、コピー等,在站点目录 /data/locale/ 中配置。
|
|
179
|
-
|
|
180
|
-
### 数据校验
|
|
181
|
-
|
|
182
|
-
根据字符串、数字、比对大小甚至是正则,对提交的数据进行直接校验,方便!
|
|
183
|
-
|
|
184
|
-
```typescript
|
|
185
|
-
{
|
|
186
|
-
'he': ['require', [0, 'The he param does not exist.']],
|
|
187
|
-
'num': ['> 10', [0, 'The num param must > 10.']],
|
|
188
|
-
'reg': ['/^[A-CX-Z5-7]+$/', [0, 'The reg param is incorrect.']],
|
|
189
|
-
'arr': [['a', 'x', 'hehe'], [0, 'The arr param is incorrect.']]
|
|
190
|
-
}
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
参见:/test/ctr-checkinput
|
|
194
|
-
|
|
195
|
-
### 其他演示
|
|
196
|
-
|
|
197
|
-
你可以访问 /test/ 来查看更多示例。
|
|
198
|
-
|
|
199
|
-
## 许可
|
|
200
|
-
|
|
201
|
-
本框架基于 [Apache-2.0](../LICENSE) 许可。
|
package/doc/README.tc.md
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
<p align="center"><img src="./icon.png" width="64" height="64" alt="Kebab"></p>
|
|
2
|
-
<p align="center">
|
|
3
|
-
<a href="https://github.com/maiyun/kebab/blob/main/LICENSE">
|
|
4
|
-
<img alt="License" src="https://img.shields.io/github/license/maiyun/kebab?color=blue" />
|
|
5
|
-
</a>
|
|
6
|
-
<a href="https://www.npmjs.com/package/@maiyunnet/kebab">
|
|
7
|
-
<img alt="NPM stable version" src="https://img.shields.io/npm/v/@maiyunnet/kebab?color=brightgreen&logo=npm" />
|
|
8
|
-
</a>
|
|
9
|
-
<a href="https://github.com/maiyun/kebab/releases">
|
|
10
|
-
<img alt="GitHub releases" src="https://img.shields.io/github/v/release/maiyun/kebab?color=brightgreen&logo=github" />
|
|
11
|
-
</a>
|
|
12
|
-
<a href="https://github.com/maiyun/kebab/issues">
|
|
13
|
-
<img alt="GitHub issues" src="https://img.shields.io/github/issues/maiyun/kebab?color=blue&logo=github" />
|
|
14
|
-
</a>
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
簡單,易用,功能完整開袋即食的 Node.js 框架。
|
|
18
|
-
|
|
19
|
-
## 語言
|
|
20
|
-
|
|
21
|
-
[简体中文](README.sc.md) | [English](../README.md)
|
|
22
|
-
|
|
23
|
-
## 環境
|
|
24
|
-
|
|
25
|
-
Node 22+
|
|
26
|
-
|
|
27
|
-
## 安装
|
|
28
|
-
|
|
29
|
-
執行 `npm i @maiyunnet/kebab` 安裝最新版,安裝完成後執行 `npx kebab init` 初始化,再執行 `npx kebab` 啟動專案。
|
|
30
|
-
|
|
31
|
-
也可以使用 pm2 啟動專案,執行 `pm2 start npx --name "kebab" -- kebab` 即可。
|
|
32
|
-
|
|
33
|
-
## 庫
|
|
34
|
-
|
|
35
|
-
Ai, Buffer, Captcha, Consistent, Core, Cron, Crypto, Db (MySQL, PostgreSQL), Dns (DNSPod, Alibaba Cloud), Fs, Kv (Redis), Lan, Lang, Net, S3, Scan, Session, Socket, Sql, Ssh (Shell, Sftp), Text, Time, Turnstile (Cloudflare, Tencent Cloud), Vector (Milvus), Ws, Zip, Zlib.
|
|
36
|
-
|
|
37
|
-
## 部分特性
|
|
38
|
-
|
|
39
|
-
### 開袋即食
|
|
40
|
-
|
|
41
|
-
秉承開袋即食的原則,封裝統一風格的常用類庫。
|
|
42
|
-
|
|
43
|
-
### 熱更新
|
|
44
|
-
|
|
45
|
-
透過調用 Sys.restart 方法,您可以在不中斷任何現有業務和連接的情況下平滑的實現新舊代碼交替熱更新。
|
|
46
|
-
|
|
47
|
-
### 多進程支援
|
|
48
|
-
|
|
49
|
-
創建基於 CPU 核心數量的多進程模型,充分提高多核 CPU 的利用率。
|
|
50
|
-
|
|
51
|
-
### 全域連接池
|
|
52
|
-
|
|
53
|
-
同一進程中的不同站點如果連接到同一個 db、kv 等伺服器,則共用同一個連接池,最大限度地提高效率並減少開銷。
|
|
54
|
-
|
|
55
|
-
### 超好用 net 庫
|
|
56
|
-
|
|
57
|
-
可以這樣用:
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
const res = await lNet.open('https://xxx/test').post().data({ 'a': '1', 'b': '2' }).request();
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
也可以這樣用:
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
const res = await lNet.get('https://xxx/test');
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
可以設置自訂的解析結果:
|
|
70
|
-
|
|
71
|
-
```typescript
|
|
72
|
-
const res = await lNet.get('https://xxx/test', {
|
|
73
|
-
'hosts': {
|
|
74
|
-
'xxx': '111.111.111.111'
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
也可以選擇本地的其他網卡來訪問:
|
|
80
|
-
|
|
81
|
-
```typescript
|
|
82
|
-
const res = await lNet.get('https://xxx/test', {
|
|
83
|
-
'local': '123.123.123.123'
|
|
84
|
-
});
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
更擁有完整的 Cookie 管理器,可以輕鬆將 Cookie 獲取並存在任何地方,發送請求時,系統也會根據 Cookie 設置的功能變數名稱、路徑等來選擇發送,並且 Set-Cookie 如果有非法跨域設置,也會被捨棄不會被記錄,就像真正的瀏覽器一樣:
|
|
88
|
-
|
|
89
|
-
```typescript
|
|
90
|
-
const res1 = await lNet.get('https://xxx1.xxx/test1', { 'cookie': cookie });
|
|
91
|
-
const res2 = await lNet.get('https://xxx2.xxx/test2', { 'cookie': cookie });
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
> 提示:net 庫同時支援傳入 options 和 open 鏈式操作,如 await lNet.open('xxx').follow().timeout(60).save(this._config.const.rootPath + 'doc/test.txt').request();
|
|
95
|
-
|
|
96
|
-
### 好用的 Db 庫
|
|
97
|
-
|
|
98
|
-
擁有大量好用的介面,可以輕鬆的從資料庫篩選出需要的資料:
|
|
99
|
-
|
|
100
|
-
```typescript
|
|
101
|
-
const ls = Order.where<Order>(this, db, {
|
|
102
|
-
'state': '1'
|
|
103
|
-
}).by('id', 'DESC').page(10, 1);
|
|
104
|
-
const list = await ls.all();
|
|
105
|
-
const count = await ls.count();
|
|
106
|
-
const total = await ls.total();
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
獲取一個使用者:
|
|
110
|
-
|
|
111
|
-
```typescript
|
|
112
|
-
const user = await User.select<User>(this, db, ['id', 'user']).filter([
|
|
113
|
-
['time_add', '>=', '1583405134']
|
|
114
|
-
]).first();
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### XSRF 檢測
|
|
118
|
-
|
|
119
|
-
使用 checkXInput 方法,可以進行 XSRF 檢測,防止惡意訪問。
|
|
120
|
-
|
|
121
|
-
### 扫码登录
|
|
122
|
-
|
|
123
|
-
借助 scan 庫可以輕鬆實現掃碼登入的功能。
|
|
124
|
-
|
|
125
|
-
### 反向代理
|
|
126
|
-
|
|
127
|
-
使用 net 庫的 rproxy 方法,配合路由參數,可輕鬆實現反向代理功能。
|
|
128
|
-
|
|
129
|
-
#### 還有更多特性等你探索
|
|
130
|
-
|
|
131
|
-
## 代碼演示
|
|
132
|
-
|
|
133
|
-
### 生成 16 位亂數
|
|
134
|
-
|
|
135
|
-
```typescript
|
|
136
|
-
let str: string = Core.random(16, Core.RANDOM_N)
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### 生成驗證碼圖片
|
|
140
|
-
|
|
141
|
-
```typescript
|
|
142
|
-
Captcha.get(400, 100).getBuffer();
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### 獲取一個清單
|
|
146
|
-
|
|
147
|
-
```typescript
|
|
148
|
-
const userList = await User.where<User>(this, db, [
|
|
149
|
-
['state', '!=', '0'],
|
|
150
|
-
{
|
|
151
|
-
'type': ['1', '2', '3'],
|
|
152
|
-
'is_lock': '0'
|
|
153
|
-
}
|
|
154
|
-
]).all();
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
> 提示:所有資料庫操作都已經做了安全防注入處理。
|
|
158
|
-
|
|
159
|
-
### Sql 庫自動增加表前綴和包裹字元「`」”
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
sql.select(['SUM(user.age) age'], 'order').leftJoin('user', {'order.user_id': lSql.column('user.id')});
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
將輸出:
|
|
166
|
-
|
|
167
|
-
```sql
|
|
168
|
-
SELECT SUM(`test_user`.`age`) AS `age` FROM `test_order` LEFT JOIN `test_user` ON `test_order`.`user_id` = `test_user`.`id`
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
寫起來好輕鬆!
|
|
172
|
-
|
|
173
|
-
### 本地化
|
|
174
|
-
|
|
175
|
-
```typescript
|
|
176
|
-
await this._loadLocale(this._get['lang'], 'test');
|
|
177
|
-
return this._l('copy');
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
根據 lang 值不同,將輸出:Copy、复制、複製、コピー等,在網站目錄 /data/locale/ 中配置。
|
|
181
|
-
|
|
182
|
-
### 数据校验
|
|
183
|
-
|
|
184
|
-
根據字串、數位、比對大小甚至是正則,對提交的數據進行直接校驗,方便!
|
|
185
|
-
|
|
186
|
-
```typescript
|
|
187
|
-
{
|
|
188
|
-
'he': ['require', [0, 'The he param does not exist.']],
|
|
189
|
-
'num': ['> 10', [0, 'The num param must > 10.']],
|
|
190
|
-
'reg': ['/^[A-CX-Z5-7]+$/', [0, 'The reg param is incorrect.']],
|
|
191
|
-
'arr': [['a', 'x', 'hehe'], [0, 'The arr param is incorrect.']]
|
|
192
|
-
}
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
參見:/test/ctr-checkinput
|
|
196
|
-
|
|
197
|
-
### 其他演示
|
|
198
|
-
|
|
199
|
-
你可以訪問 /test/ 來查看更多示例。
|
|
200
|
-
|
|
201
|
-
## 許可
|
|
202
|
-
|
|
203
|
-
本框架基於 [Apache-2.0](../LICENSE) 許可。
|
package/doc/icon.png
DELETED
|
Binary file
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
[**Documents for @maiyunnet/kebab**](../index.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[Documents for @maiyunnet/kebab](../index.md) / index
|
|
6
|
-
|
|
7
|
-
# index
|
|
8
|
-
|
|
9
|
-
## Interfaces
|
|
10
|
-
|
|
11
|
-
- [IConfig](interfaces/IConfig.md)
|
|
12
|
-
- [IConfigAi](interfaces/IConfigAi.md)
|
|
13
|
-
- [IConfigConst](interfaces/IConfigConst.md)
|
|
14
|
-
- [IConfigDb](interfaces/IConfigDb.md)
|
|
15
|
-
- [IConfigDns](interfaces/IConfigDns.md)
|
|
16
|
-
- [IConfigJwt](interfaces/IConfigJwt.md)
|
|
17
|
-
- [IConfigKv](interfaces/IConfigKv.md)
|
|
18
|
-
- [IConfigLang](interfaces/IConfigLang.md)
|
|
19
|
-
- [IConfigS3](interfaces/IConfigS3.md)
|
|
20
|
-
- [IConfigSql](interfaces/IConfigSql.md)
|
|
21
|
-
- [IConfigTurnstile](interfaces/IConfigTurnstile.md)
|
|
22
|
-
- [IConfigVector](interfaces/IConfigVector.md)
|
|
23
|
-
- [IPostFile](interfaces/IPostFile.md)
|
|
24
|
-
- [IUrlParse](interfaces/IUrlParse.md)
|
|
25
|
-
- [IVhost](interfaces/IVhost.md)
|
|
26
|
-
|
|
27
|
-
## Type Aliases
|
|
28
|
-
|
|
29
|
-
- [DbValue](type-aliases/DbValue.md)
|
|
30
|
-
- [Json](type-aliases/Json.md)
|
|
31
|
-
|
|
32
|
-
## Variables
|
|
33
|
-
|
|
34
|
-
- [CERT\_CWD](variables/CERT_CWD.md)
|
|
35
|
-
- [CONF\_CWD](variables/CONF_CWD.md)
|
|
36
|
-
- [FTMP\_CWD](variables/FTMP_CWD.md)
|
|
37
|
-
- [IND\_CWD](variables/IND_CWD.md)
|
|
38
|
-
- [LIB\_CWD](variables/LIB_CWD.md)
|
|
39
|
-
- [LIB\_PATH](variables/LIB_PATH.md)
|
|
40
|
-
- [LOG\_CWD](variables/LOG_CWD.md)
|
|
41
|
-
- [MOD\_CWD](variables/MOD_CWD.md)
|
|
42
|
-
- [ROOT\_CWD](variables/ROOT_CWD.md)
|
|
43
|
-
- [ROOT\_PATH](variables/ROOT_PATH.md)
|
|
44
|
-
- [SYS\_PATH](variables/SYS_PATH.md)
|
|
45
|
-
- [VER](variables/VER.md)
|
|
46
|
-
- [VHOST\_CWD](variables/VHOST_CWD.md)
|
|
47
|
-
- [WWW\_CWD](variables/WWW_CWD.md)
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
[**Documents for @maiyunnet/kebab**](../../index.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[Documents for @maiyunnet/kebab](../../index.md) / [index](../index.md) / IConfig
|
|
6
|
-
|
|
7
|
-
# Interface: IConfig
|
|
8
|
-
|
|
9
|
-
Defined in: [index.ts:50](https://github.com/maiyunnet/kebab/blob/master/index.ts#L50)
|
|
10
|
-
|
|
11
|
-
目录配置文件
|
|
12
|
-
|
|
13
|
-
## Indexable
|
|
14
|
-
|
|
15
|
-
\[`key`: `string`\]: `Record`\<`string`, `any`\>
|
|
16
|
-
|
|
17
|
-
## Properties
|
|
18
|
-
|
|
19
|
-
### ai
|
|
20
|
-
|
|
21
|
-
> **ai**: `Record`\<`string`, [`IConfigAi`](IConfigAi.md)\>
|
|
22
|
-
|
|
23
|
-
Defined in: [index.ts:81](https://github.com/maiyunnet/kebab/blob/master/index.ts#L81)
|
|
24
|
-
|
|
25
|
-
***
|
|
26
|
-
|
|
27
|
-
### const
|
|
28
|
-
|
|
29
|
-
> **const**: [`IConfigConst`](IConfigConst.md)
|
|
30
|
-
|
|
31
|
-
Defined in: [index.ts:62](https://github.com/maiyunnet/kebab/blob/master/index.ts#L62)
|
|
32
|
-
|
|
33
|
-
***
|
|
34
|
-
|
|
35
|
-
### db
|
|
36
|
-
|
|
37
|
-
> **db**: `Record`\<`string`, \{ `default`: [`IConfigDb`](IConfigDb.md); `read`: [`IConfigDb`](IConfigDb.md); \}\> & `object`
|
|
38
|
-
|
|
39
|
-
Defined in: [index.ts:63](https://github.com/maiyunnet/kebab/blob/master/index.ts#L63)
|
|
40
|
-
|
|
41
|
-
#### Type Declaration
|
|
42
|
-
|
|
43
|
-
##### default
|
|
44
|
-
|
|
45
|
-
> **default**: `"MYSQL"` \| `"PGSQL"`
|
|
46
|
-
|
|
47
|
-
***
|
|
48
|
-
|
|
49
|
-
### dns
|
|
50
|
-
|
|
51
|
-
> **dns**: `Record`\<`string`, [`IConfigDns`](IConfigDns.md)\>
|
|
52
|
-
|
|
53
|
-
Defined in: [index.ts:77](https://github.com/maiyunnet/kebab/blob/master/index.ts#L77)
|
|
54
|
-
|
|
55
|
-
***
|
|
56
|
-
|
|
57
|
-
### kv
|
|
58
|
-
|
|
59
|
-
> **kv**: [`IConfigKv`](IConfigKv.md)
|
|
60
|
-
|
|
61
|
-
Defined in: [index.ts:69](https://github.com/maiyunnet/kebab/blob/master/index.ts#L69)
|
|
62
|
-
|
|
63
|
-
***
|
|
64
|
-
|
|
65
|
-
### lang
|
|
66
|
-
|
|
67
|
-
> **lang**: [`IConfigLang`](IConfigLang.md)
|
|
68
|
-
|
|
69
|
-
Defined in: [index.ts:78](https://github.com/maiyunnet/kebab/blob/master/index.ts#L78)
|
|
70
|
-
|
|
71
|
-
***
|
|
72
|
-
|
|
73
|
-
### route
|
|
74
|
-
|
|
75
|
-
> **route**: `Record`\<`string`, `string`\>
|
|
76
|
-
|
|
77
|
-
Defined in: [index.ts:70](https://github.com/maiyunnet/kebab/blob/master/index.ts#L70)
|
|
78
|
-
|
|
79
|
-
***
|
|
80
|
-
|
|
81
|
-
### s3
|
|
82
|
-
|
|
83
|
-
> **s3**: `Record`\<`string`, [`IConfigS3`](IConfigS3.md)\>
|
|
84
|
-
|
|
85
|
-
Defined in: [index.ts:79](https://github.com/maiyunnet/kebab/blob/master/index.ts#L79)
|
|
86
|
-
|
|
87
|
-
***
|
|
88
|
-
|
|
89
|
-
### session
|
|
90
|
-
|
|
91
|
-
> **session**: `object`
|
|
92
|
-
|
|
93
|
-
Defined in: [index.ts:71](https://github.com/maiyunnet/kebab/blob/master/index.ts#L71)
|
|
94
|
-
|
|
95
|
-
#### name
|
|
96
|
-
|
|
97
|
-
> **name**: `string`
|
|
98
|
-
|
|
99
|
-
#### ssl
|
|
100
|
-
|
|
101
|
-
> **ssl**: `boolean`
|
|
102
|
-
|
|
103
|
-
#### ttl
|
|
104
|
-
|
|
105
|
-
> **ttl**: `number`
|
|
106
|
-
|
|
107
|
-
***
|
|
108
|
-
|
|
109
|
-
### set
|
|
110
|
-
|
|
111
|
-
> **set**: `object`
|
|
112
|
-
|
|
113
|
-
Defined in: [index.ts:51](https://github.com/maiyunnet/kebab/blob/master/index.ts#L51)
|
|
114
|
-
|
|
115
|
-
#### Index Signature
|
|
116
|
-
|
|
117
|
-
\[`key`: `string`\]: `any`
|
|
118
|
-
|
|
119
|
-
#### cacheTtl
|
|
120
|
-
|
|
121
|
-
> **cacheTtl**: `number`
|
|
122
|
-
|
|
123
|
-
#### mustHttps
|
|
124
|
-
|
|
125
|
-
> **mustHttps**: `boolean`
|
|
126
|
-
|
|
127
|
-
#### staticPath
|
|
128
|
-
|
|
129
|
-
> **staticPath**: `string`
|
|
130
|
-
|
|
131
|
-
#### staticPathFull
|
|
132
|
-
|
|
133
|
-
> **staticPathFull**: `string`
|
|
134
|
-
|
|
135
|
-
#### staticVer
|
|
136
|
-
|
|
137
|
-
> **staticVer**: `string`
|
|
138
|
-
|
|
139
|
-
#### timezone
|
|
140
|
-
|
|
141
|
-
> **timezone**: `number`
|
|
142
|
-
|
|
143
|
-
***
|
|
144
|
-
|
|
145
|
-
### sql
|
|
146
|
-
|
|
147
|
-
> **sql**: [`IConfigSql`](IConfigSql.md)
|
|
148
|
-
|
|
149
|
-
Defined in: [index.ts:76](https://github.com/maiyunnet/kebab/blob/master/index.ts#L76)
|
|
150
|
-
|
|
151
|
-
***
|
|
152
|
-
|
|
153
|
-
### turnstile
|
|
154
|
-
|
|
155
|
-
> **turnstile**: [`IConfigTurnstile`](IConfigTurnstile.md)
|
|
156
|
-
|
|
157
|
-
Defined in: [index.ts:80](https://github.com/maiyunnet/kebab/blob/master/index.ts#L80)
|
|
158
|
-
|
|
159
|
-
***
|
|
160
|
-
|
|
161
|
-
### vector
|
|
162
|
-
|
|
163
|
-
> **vector**: [`IConfigVector`](IConfigVector.md)
|
|
164
|
-
|
|
165
|
-
Defined in: [index.ts:82](https://github.com/maiyunnet/kebab/blob/master/index.ts#L82)
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
[**Documents for @maiyunnet/kebab**](../../index.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[Documents for @maiyunnet/kebab](../../index.md) / [index](../index.md) / IConfigAi
|
|
6
|
-
|
|
7
|
-
# Interface: IConfigAi
|
|
8
|
-
|
|
9
|
-
Defined in: [index.ts:118](https://github.com/maiyunnet/kebab/blob/master/index.ts#L118)
|
|
10
|
-
|
|
11
|
-
AI
|
|
12
|
-
|
|
13
|
-
## Properties
|
|
14
|
-
|
|
15
|
-
### endpoint?
|
|
16
|
-
|
|
17
|
-
> `optional` **endpoint**: `string`
|
|
18
|
-
|
|
19
|
-
Defined in: [index.ts:120](https://github.com/maiyunnet/kebab/blob/master/index.ts#L120)
|
|
20
|
-
|
|
21
|
-
目前只有微软 Azure 有
|
|
22
|
-
|
|
23
|
-
***
|
|
24
|
-
|
|
25
|
-
### skey
|
|
26
|
-
|
|
27
|
-
> **skey**: `string`
|
|
28
|
-
|
|
29
|
-
Defined in: [index.ts:121](https://github.com/maiyunnet/kebab/blob/master/index.ts#L121)
|