@maiyunnet/kebab 7.6.0 → 7.6.1
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/README.sc.md +201 -0
- package/doc/README.tc.md +203 -0
- package/doc/icon.png +0 -0
- package/doc/kebab-rag.md +23161 -0
- package/doc/sc/api/index/index.md +47 -0
- package/doc/sc/api/index/interfaces/IConfig.md +165 -0
- package/doc/sc/api/index/interfaces/IConfigAi.md +29 -0
- package/doc/sc/api/index/interfaces/IConfigConst.md +201 -0
- package/doc/sc/api/index/interfaces/IConfigDb.md +59 -0
- package/doc/sc/api/index/interfaces/IConfigDns.md +27 -0
- package/doc/sc/api/index/interfaces/IConfigJwt.md +51 -0
- package/doc/sc/api/index/interfaces/IConfigKv.md +59 -0
- package/doc/sc/api/index/interfaces/IConfigLang.md +27 -0
- package/doc/sc/api/index/interfaces/IConfigS3.md +53 -0
- package/doc/sc/api/index/interfaces/IConfigSql.md +19 -0
- package/doc/sc/api/index/interfaces/IConfigTurnstile.md +51 -0
- package/doc/sc/api/index/interfaces/IConfigVector.md +51 -0
- package/doc/sc/api/index/interfaces/IPostFile.md +43 -0
- package/doc/sc/api/index/interfaces/IUrlParse.md +97 -0
- package/doc/sc/api/index/interfaces/IVhost.md +43 -0
- package/doc/sc/api/index/type-aliases/DbValue.md +13 -0
- package/doc/sc/api/index/type-aliases/Json.md +13 -0
- package/doc/sc/api/index/variables/CERT_CWD.md +11 -0
- package/doc/sc/api/index/variables/CONF_CWD.md +11 -0
- package/doc/sc/api/index/variables/FTMP_CWD.md +11 -0
- package/doc/sc/api/index/variables/IND_CWD.md +11 -0
- package/doc/sc/api/index/variables/LIB_CWD.md +11 -0
- package/doc/sc/api/index/variables/LIB_PATH.md +11 -0
- package/doc/sc/api/index/variables/LOG_CWD.md +11 -0
- package/doc/sc/api/index/variables/MOD_CWD.md +11 -0
- package/doc/sc/api/index/variables/ROOT_CWD.md +13 -0
- package/doc/sc/api/index/variables/ROOT_PATH.md +13 -0
- package/doc/sc/api/index/variables/SYS_PATH.md +11 -0
- package/doc/sc/api/index/variables/VER.md +13 -0
- package/doc/sc/api/index/variables/VHOST_CWD.md +11 -0
- package/doc/sc/api/index/variables/WWW_CWD.md +11 -0
- package/doc/sc/api/index.md +48 -0
- package/doc/sc/api/lib/ai/classes/Ai.md +103 -0
- package/doc/sc/api/lib/ai/enumerations/ESERVICE.md +61 -0
- package/doc/sc/api/lib/ai/functions/get.md +29 -0
- package/doc/sc/api/lib/ai/index.md +23 -0
- package/doc/sc/api/lib/ai/interfaces/IOptions.md +65 -0
- package/doc/sc/api/lib/buffer/classes/Reader.md +177 -0
- package/doc/sc/api/lib/buffer/classes/Writer.md +147 -0
- package/doc/sc/api/lib/buffer/functions/getReader.md +25 -0
- package/doc/sc/api/lib/buffer/functions/getWriter.md +25 -0
- package/doc/sc/api/lib/buffer/index.md +17 -0
- package/doc/sc/api/lib/captcha/classes/Captcha.md +79 -0
- package/doc/sc/api/lib/captcha/functions/get.md +37 -0
- package/doc/sc/api/lib/captcha/index.md +15 -0
- package/doc/sc/api/lib/consistent/classes/Consistent.md +135 -0
- package/doc/sc/api/lib/consistent/functions/addToCircle.md +37 -0
- package/doc/sc/api/lib/consistent/functions/fast.md +37 -0
- package/doc/sc/api/lib/consistent/functions/findInCircle.md +37 -0
- package/doc/sc/api/lib/consistent/functions/get.md +21 -0
- package/doc/sc/api/lib/consistent/functions/getRange.md +37 -0
- package/doc/sc/api/lib/consistent/functions/hash.md +25 -0
- package/doc/sc/api/lib/consistent/index.md +20 -0
- package/doc/sc/api/lib/core/functions/checkType.md +37 -0
- package/doc/sc/api/lib/core/functions/clone.md +31 -0
- package/doc/sc/api/lib/core/functions/convert62.md +25 -0
- package/doc/sc/api/lib/core/functions/debug.md +31 -0
- package/doc/sc/api/lib/core/functions/display.md +31 -0
- package/doc/sc/api/lib/core/functions/emptyObject.md +31 -0
- package/doc/sc/api/lib/core/functions/exec.md +31 -0
- package/doc/sc/api/lib/core/functions/getLog.md +71 -0
- package/doc/sc/api/lib/core/functions/ip.md +27 -0
- package/doc/sc/api/lib/core/functions/log.md +37 -0
- package/doc/sc/api/lib/core/functions/ls.md +39 -0
- package/doc/sc/api/lib/core/functions/muid.md +59 -0
- package/doc/sc/api/lib/core/functions/objectSort.md +31 -0
- package/doc/sc/api/lib/core/functions/passThroughAppend.md +37 -0
- package/doc/sc/api/lib/core/functions/purify.md +25 -0
- package/doc/sc/api/lib/core/functions/rand.md +37 -0
- package/doc/sc/api/lib/core/functions/random.md +37 -0
- package/doc/sc/api/lib/core/functions/realIP.md +29 -0
- package/doc/sc/api/lib/core/functions/removeGlobal.md +31 -0
- package/doc/sc/api/lib/core/functions/sendNpm.md +31 -0
- package/doc/sc/api/lib/core/functions/sendPm2.md +37 -0
- package/doc/sc/api/lib/core/functions/sendReload.md +24 -0
- package/doc/sc/api/lib/core/functions/sendRestart.md +24 -0
- package/doc/sc/api/lib/core/functions/setCookie.md +43 -0
- package/doc/sc/api/lib/core/functions/setGlobal.md +37 -0
- package/doc/sc/api/lib/core/functions/sleep.md +25 -0
- package/doc/sc/api/lib/core/functions/unconvert62.md +25 -0
- package/doc/sc/api/lib/core/functions/updateCode.md +49 -0
- package/doc/sc/api/lib/core/functions/write.md +31 -0
- package/doc/sc/api/lib/core/functions/writeEventStreamHead.md +21 -0
- package/doc/sc/api/lib/core/functions/writeHead.md +37 -0
- package/doc/sc/api/lib/core/index.md +66 -0
- package/doc/sc/api/lib/core/interfaces/ICookieOptions.md +59 -0
- package/doc/sc/api/lib/core/interfaces/ILogOptions.md +75 -0
- package/doc/sc/api/lib/core/type-aliases/TPm2Action.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_L.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_LN.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_LU.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_LUN.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_LUNS.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_N.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_U.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_UN.md +13 -0
- package/doc/sc/api/lib/core/variables/RANDOM_V.md +13 -0
- package/doc/sc/api/lib/core/variables/REAL_IP_CF.md +13 -0
- package/doc/sc/api/lib/core/variables/REAL_IP_X.md +13 -0
- package/doc/sc/api/lib/core/variables/global.md +13 -0
- package/doc/sc/api/lib/core/variables/globalConfig.md +47 -0
- package/doc/sc/api/lib/cron/functions/getRegulars.md +17 -0
- package/doc/sc/api/lib/cron/functions/regular.md +31 -0
- package/doc/sc/api/lib/cron/index.md +17 -0
- package/doc/sc/api/lib/cron/interfaces/IRegular.md +59 -0
- package/doc/sc/api/lib/cron/interfaces/IRegularData.md +101 -0
- package/doc/sc/api/lib/crypto/functions/aesDecrypt.md +91 -0
- package/doc/sc/api/lib/crypto/functions/aesEncrypt.md +95 -0
- package/doc/sc/api/lib/crypto/functions/base64Decode.md +59 -0
- package/doc/sc/api/lib/crypto/functions/base64Encode.md +25 -0
- package/doc/sc/api/lib/crypto/functions/cipherDecrypt.md +49 -0
- package/doc/sc/api/lib/crypto/functions/cipherEncrypt.md +49 -0
- package/doc/sc/api/lib/crypto/functions/gcmDecrypt.md +71 -0
- package/doc/sc/api/lib/crypto/functions/gcmEncrypt.md +71 -0
- package/doc/sc/api/lib/crypto/functions/generateKeyPair.md +61 -0
- package/doc/sc/api/lib/crypto/functions/hashHmac.md +79 -0
- package/doc/sc/api/lib/crypto/functions/hashHmacFile.md +79 -0
- package/doc/sc/api/lib/crypto/functions/privateDecrypt.md +31 -0
- package/doc/sc/api/lib/crypto/functions/privateEncrypt.md +31 -0
- package/doc/sc/api/lib/crypto/functions/publicDecrypt.md +31 -0
- package/doc/sc/api/lib/crypto/functions/publicEncrypt.md +31 -0
- package/doc/sc/api/lib/crypto/functions/sign.md +83 -0
- package/doc/sc/api/lib/crypto/functions/sm4Decrypt.md +91 -0
- package/doc/sc/api/lib/crypto/functions/sm4Encrypt.md +91 -0
- package/doc/sc/api/lib/crypto/functions/uuid.md +25 -0
- package/doc/sc/api/lib/crypto/functions/verify.md +43 -0
- package/doc/sc/api/lib/crypto/index.md +40 -0
- package/doc/sc/api/lib/crypto/variables/AES_256_CBC.md +13 -0
- package/doc/sc/api/lib/crypto/variables/AES_256_CTR.md +13 -0
- package/doc/sc/api/lib/crypto/variables/AES_256_ECB.md +13 -0
- package/doc/sc/api/lib/crypto/variables/AES_256_GCM.md +13 -0
- package/doc/sc/api/lib/crypto/variables/SM4_CBC.md +11 -0
- package/doc/sc/api/lib/crypto/variables/SM4_CFB.md +13 -0
- package/doc/sc/api/lib/crypto/variables/SM4_ECB.md +13 -0
- package/doc/sc/api/lib/db/conn/classes/Connection.md +315 -0
- package/doc/sc/api/lib/db/conn/index.md +11 -0
- package/doc/sc/api/lib/db/enumerations/ESERVICE.md +27 -0
- package/doc/sc/api/lib/db/functions/get.md +37 -0
- package/doc/sc/api/lib/db/index.md +50 -0
- package/doc/sc/api/lib/db/interfaces/IData.md +57 -0
- package/doc/sc/api/lib/db/interfaces/IPacket.md +75 -0
- package/doc/sc/api/lib/db/pool/classes/Pool.md +143 -0
- package/doc/sc/api/lib/db/pool/functions/getConnectionList.md +17 -0
- package/doc/sc/api/lib/db/pool/index.md +19 -0
- package/doc/sc/api/lib/db/pool/interfaces/IConnectionInfo.md +91 -0
- package/doc/sc/api/lib/db/tran/classes/Transaction.md +137 -0
- package/doc/sc/api/lib/db/tran/index.md +11 -0
- package/doc/sc/api/lib/dns/classes/Dns.md +187 -0
- package/doc/sc/api/lib/dns/enumerations/ERECORDLINE.md +59 -0
- package/doc/sc/api/lib/dns/enumerations/ERECORDTYPE.md +67 -0
- package/doc/sc/api/lib/dns/enumerations/ESERVICE.md +27 -0
- package/doc/sc/api/lib/dns/functions/get.md +29 -0
- package/doc/sc/api/lib/dns/index.md +27 -0
- package/doc/sc/api/lib/dns/interfaces/IAddDomainRecord.md +27 -0
- package/doc/sc/api/lib/dns/interfaces/IDomainList.md +43 -0
- package/doc/sc/api/lib/dns/interfaces/IOptions.md +41 -0
- package/doc/sc/api/lib/fs/functions/chmod.md +31 -0
- package/doc/sc/api/lib/fs/functions/copyFile.md +31 -0
- package/doc/sc/api/lib/fs/functions/copyFolder.md +37 -0
- package/doc/sc/api/lib/fs/functions/createReadStream.md +31 -0
- package/doc/sc/api/lib/fs/functions/createWriteStream.md +31 -0
- package/doc/sc/api/lib/fs/functions/getContent.md +63 -0
- package/doc/sc/api/lib/fs/functions/isDir.md +25 -0
- package/doc/sc/api/lib/fs/functions/isFile.md +25 -0
- package/doc/sc/api/lib/fs/functions/mkdir.md +31 -0
- package/doc/sc/api/lib/fs/functions/pipe.md +39 -0
- package/doc/sc/api/lib/fs/functions/putContent.md +47 -0
- package/doc/sc/api/lib/fs/functions/readDir.md +29 -0
- package/doc/sc/api/lib/fs/functions/readLink.md +31 -0
- package/doc/sc/api/lib/fs/functions/readToResponse.md +43 -0
- package/doc/sc/api/lib/fs/functions/rename.md +31 -0
- package/doc/sc/api/lib/fs/functions/rmdir.md +25 -0
- package/doc/sc/api/lib/fs/functions/rmdirDeep.md +25 -0
- package/doc/sc/api/lib/fs/functions/stats.md +25 -0
- package/doc/sc/api/lib/fs/functions/symlink.md +37 -0
- package/doc/sc/api/lib/fs/functions/unlink.md +25 -0
- package/doc/sc/api/lib/fs/index.md +30 -0
- package/doc/sc/api/lib/kv/classes/Kv.md +1161 -0
- package/doc/sc/api/lib/kv/functions/get.md +41 -0
- package/doc/sc/api/lib/kv/index.md +20 -0
- package/doc/sc/api/lib/kv/interfaces/IConnectionInfo.md +43 -0
- package/doc/sc/api/lib/kv/interfaces/IZRangeOptions.md +52 -0
- package/doc/sc/api/lib/lan/functions/card.md +17 -0
- package/doc/sc/api/lib/lan/functions/scan.md +17 -0
- package/doc/sc/api/lib/lan/index.md +12 -0
- package/doc/sc/api/lib/lang/functions/getCodeByAccept.md +25 -0
- package/doc/sc/api/lib/lang/index.md +17 -0
- package/doc/sc/api/lib/lang/variables/codes.md +13 -0
- package/doc/sc/api/lib/lang/variables/map.md +13 -0
- package/doc/sc/api/lib/lang/variables/names.md +11 -0
- package/doc/sc/api/lib/net/formdata/classes/FormData.md +157 -0
- package/doc/sc/api/lib/net/formdata/index.md +15 -0
- package/doc/sc/api/lib/net/formdata/interfaces/IItem.md +55 -0
- package/doc/sc/api/lib/net/functions/buildCookieQuery.md +31 -0
- package/doc/sc/api/lib/net/functions/fetch.md +31 -0
- package/doc/sc/api/lib/net/functions/filterHeaders.md +37 -0
- package/doc/sc/api/lib/net/functions/get.md +31 -0
- package/doc/sc/api/lib/net/functions/getCa.md +17 -0
- package/doc/sc/api/lib/net/functions/getFormData.md +17 -0
- package/doc/sc/api/lib/net/functions/mproxy.md +38 -0
- package/doc/sc/api/lib/net/functions/mproxyData.md +25 -0
- package/doc/sc/api/lib/net/functions/open.md +23 -0
- package/doc/sc/api/lib/net/functions/post.md +37 -0
- package/doc/sc/api/lib/net/functions/postJson.md +37 -0
- package/doc/sc/api/lib/net/functions/postJsonResponseJson.md +39 -0
- package/doc/sc/api/lib/net/functions/request.md +33 -0
- package/doc/sc/api/lib/net/functions/resetCookieSession.md +25 -0
- package/doc/sc/api/lib/net/functions/rproxy.md +37 -0
- package/doc/sc/api/lib/net/functions/setCookie.md +63 -0
- package/doc/sc/api/lib/net/index.md +37 -0
- package/doc/sc/api/lib/net/interfaces/ICookie.md +69 -0
- package/doc/sc/api/lib/net/interfaces/IMproxyOptions.md +85 -0
- package/doc/sc/api/lib/net/interfaces/IRequestOptions.md +133 -0
- package/doc/sc/api/lib/net/interfaces/IRproxyOptions.md +107 -0
- package/doc/sc/api/lib/net/request/classes/Request.md +297 -0
- package/doc/sc/api/lib/net/request/index.md +11 -0
- package/doc/sc/api/lib/net/response/classes/Response.md +109 -0
- package/doc/sc/api/lib/net/response/index.md +11 -0
- package/doc/sc/api/lib/net/type-aliases/THttpHeaders.md +27 -0
- package/doc/sc/api/lib/s3/classes/S3.md +220 -0
- package/doc/sc/api/lib/s3/enumerations/ESERVICE.md +43 -0
- package/doc/sc/api/lib/s3/functions/get.md +29 -0
- package/doc/sc/api/lib/s3/index.md +23 -0
- package/doc/sc/api/lib/s3/interfaces/IOptions.md +71 -0
- package/doc/sc/api/lib/scan/classes/Scan.md +127 -0
- package/doc/sc/api/lib/scan/functions/get.md +33 -0
- package/doc/sc/api/lib/scan/functions/scanned.md +37 -0
- package/doc/sc/api/lib/scan/functions/setData.md +35 -0
- package/doc/sc/api/lib/scan/index.md +22 -0
- package/doc/sc/api/lib/scan/interfaces/IOptions.md +43 -0
- package/doc/sc/api/lib/scan/interfaces/IStaticOptions.md +35 -0
- package/doc/sc/api/lib/session/classes/Session.md +103 -0
- package/doc/sc/api/lib/session/index.md +15 -0
- package/doc/sc/api/lib/session/interfaces/IOptions.md +41 -0
- package/doc/sc/api/lib/socket/functions/rwebsocket.md +37 -0
- package/doc/sc/api/lib/socket/index.md +15 -0
- package/doc/sc/api/lib/socket/interfaces/IRwebsocketOptions.md +91 -0
- package/doc/sc/api/lib/sql/classes/Sql.md +791 -0
- package/doc/sc/api/lib/sql/enumerations/EJSON.md +61 -0
- package/doc/sc/api/lib/sql/enumerations/ESERVICE.md +27 -0
- package/doc/sc/api/lib/sql/functions/aoMix.md +25 -0
- package/doc/sc/api/lib/sql/functions/column.md +35 -0
- package/doc/sc/api/lib/sql/functions/format.md +37 -0
- package/doc/sc/api/lib/sql/functions/get.md +43 -0
- package/doc/sc/api/lib/sql/index.md +23 -0
- package/doc/sc/api/lib/ssh/classes/Connection.md +123 -0
- package/doc/sc/api/lib/ssh/functions/get.md +25 -0
- package/doc/sc/api/lib/ssh/index.md +19 -0
- package/doc/sc/api/lib/ssh/interfaces/IExtOptions.md +33 -0
- package/doc/sc/api/lib/ssh/sftp/classes/Connection.md +628 -0
- package/doc/sc/api/lib/ssh/sftp/index.md +11 -0
- package/doc/sc/api/lib/ssh/shell/classes/Connection.md +189 -0
- package/doc/sc/api/lib/ssh/shell/index.md +11 -0
- package/doc/sc/api/lib/text/functions/getFilename.md +25 -0
- package/doc/sc/api/lib/text/functions/htmlescape.md +25 -0
- package/doc/sc/api/lib/text/functions/int2str.md +42 -0
- package/doc/sc/api/lib/text/functions/isAscii.md +25 -0
- package/doc/sc/api/lib/text/functions/isDomain.md +27 -0
- package/doc/sc/api/lib/text/functions/isEMail.md +23 -0
- package/doc/sc/api/lib/text/functions/isFalsy.md +25 -0
- package/doc/sc/api/lib/text/functions/isIPv4.md +23 -0
- package/doc/sc/api/lib/text/functions/isIPv6.md +23 -0
- package/doc/sc/api/lib/text/functions/isIdCardCN.md +25 -0
- package/doc/sc/api/lib/text/functions/isPhoneCN.md +25 -0
- package/doc/sc/api/lib/text/functions/isRealPath.md +25 -0
- package/doc/sc/api/lib/text/functions/isTruthy.md +31 -0
- package/doc/sc/api/lib/text/functions/logicalOr.md +41 -0
- package/doc/sc/api/lib/text/functions/match.md +31 -0
- package/doc/sc/api/lib/text/functions/nlReplace.md +31 -0
- package/doc/sc/api/lib/text/functions/parseDomain.md +25 -0
- package/doc/sc/api/lib/text/functions/parseJson.md +25 -0
- package/doc/sc/api/lib/text/functions/parseUrl.md +23 -0
- package/doc/sc/api/lib/text/functions/queryParse.md +25 -0
- package/doc/sc/api/lib/text/functions/queryStringify.md +69 -0
- package/doc/sc/api/lib/text/functions/sizeFormat.md +31 -0
- package/doc/sc/api/lib/text/functions/str2int.md +36 -0
- package/doc/sc/api/lib/text/functions/stringifyBuffer.md +25 -0
- package/doc/sc/api/lib/text/functions/stringifyJson.md +31 -0
- package/doc/sc/api/lib/text/functions/stringifyResult.md +25 -0
- package/doc/sc/api/lib/text/functions/trimJson.md +23 -0
- package/doc/sc/api/lib/text/functions/urlAtom.md +25 -0
- package/doc/sc/api/lib/text/functions/urlResolve.md +31 -0
- package/doc/sc/api/lib/text/index.md +55 -0
- package/doc/sc/api/lib/text/interfaces/IDomain.md +43 -0
- package/doc/sc/api/lib/text/type-aliases/TFalsy.md +13 -0
- package/doc/sc/api/lib/text/variables/REGEXP_ASCII.md +13 -0
- package/doc/sc/api/lib/text/variables/REGEXP_DOMAIN.md +11 -0
- package/doc/sc/api/lib/text/variables/REGEXP_EMAIL.md +11 -0
- package/doc/sc/api/lib/text/variables/REGEXP_IPV4.md +11 -0
- package/doc/sc/api/lib/text/variables/REGEXP_IPV6.md +11 -0
- package/doc/sc/api/lib/time/classes/Time.md +125 -0
- package/doc/sc/api/lib/time/functions/format.md +37 -0
- package/doc/sc/api/lib/time/functions/get.md +27 -0
- package/doc/sc/api/lib/time/functions/isMs.md +25 -0
- package/doc/sc/api/lib/time/functions/stamp.md +31 -0
- package/doc/sc/api/lib/time/index.md +28 -0
- package/doc/sc/api/lib/time/interfaces/IOptions.md +29 -0
- package/doc/sc/api/lib/time/variables/DAY.md +13 -0
- package/doc/sc/api/lib/time/variables/HOUR.md +13 -0
- package/doc/sc/api/lib/time/variables/YEAR.md +13 -0
- package/doc/sc/api/lib/turnstile/enumerations/EFACTORY.md +27 -0
- package/doc/sc/api/lib/turnstile/functions/verify.md +35 -0
- package/doc/sc/api/lib/turnstile/index.md +15 -0
- package/doc/sc/api/lib/vector/classes/Vector.md +141 -0
- package/doc/sc/api/lib/vector/functions/get.md +25 -0
- package/doc/sc/api/lib/vector/index.md +19 -0
- package/doc/sc/api/lib/vector/interfaces/IOptions.md +61 -0
- package/doc/sc/api/lib/ws/classes/Socket.md +331 -0
- package/doc/sc/api/lib/ws/enumerations/EFrameReceiveMode.md +35 -0
- package/doc/sc/api/lib/ws/enumerations/EOpcode.md +59 -0
- package/doc/sc/api/lib/ws/functions/connect.md +31 -0
- package/doc/sc/api/lib/ws/functions/createServer.md +45 -0
- package/doc/sc/api/lib/ws/functions/mproxy.md +38 -0
- package/doc/sc/api/lib/ws/functions/rproxy.md +37 -0
- package/doc/sc/api/lib/ws/functions/rsocket.md +37 -0
- package/doc/sc/api/lib/ws/index.md +30 -0
- package/doc/sc/api/lib/ws/interfaces/IConnectOptions.md +95 -0
- package/doc/sc/api/lib/ws/interfaces/IMproxyOptions.md +87 -0
- package/doc/sc/api/lib/ws/interfaces/IRproxyOptions.md +105 -0
- package/doc/sc/api/lib/zip/classes/Zip.md +392 -0
- package/doc/sc/api/lib/zip/functions/get.md +25 -0
- package/doc/sc/api/lib/zip/index.md +29 -0
- package/doc/sc/api/lib/zip/interfaces/IZipInputByType.md +81 -0
- package/doc/sc/api/lib/zip/interfaces/IZipItem.md +65 -0
- package/doc/sc/api/lib/zip/interfaces/IZipMetadata.md +25 -0
- package/doc/sc/api/lib/zip/interfaces/IZipOutputByType.md +81 -0
- package/doc/sc/api/lib/zip/interfaces/IZipStats.md +49 -0
- package/doc/sc/api/lib/zip/type-aliases/TZipInputFileFormat.md +11 -0
- package/doc/sc/api/lib/zip/type-aliases/TZipInputType.md +11 -0
- package/doc/sc/api/lib/zip/type-aliases/TZipOutputType.md +11 -0
- package/doc/sc/api/lib/zlib/functions/brotliCompress.md +31 -0
- package/doc/sc/api/lib/zlib/functions/brotliDecompress.md +25 -0
- package/doc/sc/api/lib/zlib/functions/compress.md +37 -0
- package/doc/sc/api/lib/zlib/functions/createBrotliCompress.md +25 -0
- package/doc/sc/api/lib/zlib/functions/createBrotliDecompress.md +17 -0
- package/doc/sc/api/lib/zlib/functions/createCompress.md +31 -0
- package/doc/sc/api/lib/zlib/functions/createDecompress.md +25 -0
- package/doc/sc/api/lib/zlib/functions/createDeflate.md +25 -0
- package/doc/sc/api/lib/zlib/functions/createGunzip.md +17 -0
- package/doc/sc/api/lib/zlib/functions/createGzip.md +25 -0
- package/doc/sc/api/lib/zlib/functions/createInflate.md +17 -0
- package/doc/sc/api/lib/zlib/functions/decompress.md +31 -0
- package/doc/sc/api/lib/zlib/functions/deflate.md +31 -0
- package/doc/sc/api/lib/zlib/functions/gunzip.md +25 -0
- package/doc/sc/api/lib/zlib/functions/gzip.md +31 -0
- package/doc/sc/api/lib/zlib/functions/inflate.md +25 -0
- package/doc/sc/api/lib/zlib/index.md +31 -0
- package/doc/sc/api/lib/zlib/interfaces/ICompress.md +27 -0
- package/doc/sc/api/lib/zlib/interfaces/ICompressBuffer.md +27 -0
- package/doc/sc/api/main/index.md +7 -0
- package/doc/sc/api/sys/ctr/classes/Ctr.md +1242 -0
- package/doc/sc/api/sys/ctr/functions/clearLocaleData.md +17 -0
- package/doc/sc/api/sys/ctr/index.md +15 -0
- package/doc/sc/api/sys/mod/classes/Rows.md +165 -0
- package/doc/sc/api/sys/mod/classes/default.md +2175 -0
- package/doc/sc/api/sys/mod/index.md +21 -0
- package/doc/sc/api/sys/mod/interfaces/IModUnionItem.md +25 -0
- package/doc/sc/api/sys/mod/interfaces/IRows.md +57 -0
- package/doc/sc/api/sys/mod/type-aliases/TOnlyProperties.md +19 -0
- package/doc/sc/api/sys/route/functions/clearKebabConfigs.md +17 -0
- package/doc/sc/api/sys/route/functions/getFormData.md +47 -0
- package/doc/sc/api/sys/route/functions/getPost.md +25 -0
- package/doc/sc/api/sys/route/functions/run.md +83 -0
- package/doc/sc/api/sys/route/functions/unlinkUploadFiles.md +25 -0
- package/doc/sc/api/sys/route/functions/waitCtr.md +26 -0
- package/doc/sc/api/sys/route/index.md +16 -0
- package/doc/sc/quick-start.md +30 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../index.md) / lib/crypto
|
|
6
|
+
|
|
7
|
+
# lib/crypto
|
|
8
|
+
|
|
9
|
+
## Variables
|
|
10
|
+
|
|
11
|
+
- [AES\_256\_CBC](variables/AES_256_CBC.md)
|
|
12
|
+
- [AES\_256\_CTR](variables/AES_256_CTR.md)
|
|
13
|
+
- [AES\_256\_ECB](variables/AES_256_ECB.md)
|
|
14
|
+
- [AES\_256\_GCM](variables/AES_256_GCM.md)
|
|
15
|
+
- [SM4\_CBC](variables/SM4_CBC.md)
|
|
16
|
+
- [SM4\_CFB](variables/SM4_CFB.md)
|
|
17
|
+
- [SM4\_ECB](variables/SM4_ECB.md)
|
|
18
|
+
|
|
19
|
+
## Functions
|
|
20
|
+
|
|
21
|
+
- [aesDecrypt](functions/aesDecrypt.md)
|
|
22
|
+
- [aesEncrypt](functions/aesEncrypt.md)
|
|
23
|
+
- [base64Decode](functions/base64Decode.md)
|
|
24
|
+
- [base64Encode](functions/base64Encode.md)
|
|
25
|
+
- [cipherDecrypt](functions/cipherDecrypt.md)
|
|
26
|
+
- [cipherEncrypt](functions/cipherEncrypt.md)
|
|
27
|
+
- [gcmDecrypt](functions/gcmDecrypt.md)
|
|
28
|
+
- [gcmEncrypt](functions/gcmEncrypt.md)
|
|
29
|
+
- [generateKeyPair](functions/generateKeyPair.md)
|
|
30
|
+
- [hashHmac](functions/hashHmac.md)
|
|
31
|
+
- [hashHmacFile](functions/hashHmacFile.md)
|
|
32
|
+
- [privateDecrypt](functions/privateDecrypt.md)
|
|
33
|
+
- [privateEncrypt](functions/privateEncrypt.md)
|
|
34
|
+
- [publicDecrypt](functions/publicDecrypt.md)
|
|
35
|
+
- [publicEncrypt](functions/publicEncrypt.md)
|
|
36
|
+
- [sign](functions/sign.md)
|
|
37
|
+
- [sm4Decrypt](functions/sm4Decrypt.md)
|
|
38
|
+
- [sm4Encrypt](functions/sm4Encrypt.md)
|
|
39
|
+
- [uuid](functions/uuid.md)
|
|
40
|
+
- [verify](functions/verify.md)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/crypto](../index.md) / AES\_256\_CBC
|
|
6
|
+
|
|
7
|
+
# Variable: AES\_256\_CBC
|
|
8
|
+
|
|
9
|
+
> `const` **AES\_256\_CBC**: `"aes-256-cbc"` = `'aes-256-cbc'`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/crypto.ts:146](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L146)
|
|
12
|
+
|
|
13
|
+
一般不用,兼容性场景下用
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/crypto](../index.md) / AES\_256\_CTR
|
|
6
|
+
|
|
7
|
+
# Variable: AES\_256\_CTR
|
|
8
|
+
|
|
9
|
+
> `const` **AES\_256\_CTR**: `"aes-256-ctr"` = `'aes-256-ctr'`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/crypto.ts:148](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L148)
|
|
12
|
+
|
|
13
|
+
设置 iv 会自动切换为 CTR,流式下使用,非流直接使用 GCM
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/crypto](../index.md) / AES\_256\_ECB
|
|
6
|
+
|
|
7
|
+
# Variable: AES\_256\_ECB
|
|
8
|
+
|
|
9
|
+
> `const` **AES\_256\_ECB**: `"aes-256-ecb"` = `'aes-256-ecb'`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/crypto.ts:144](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L144)
|
|
12
|
+
|
|
13
|
+
勿使用,无 iv 默认,但勿使用
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/crypto](../index.md) / AES\_256\_GCM
|
|
6
|
+
|
|
7
|
+
# Variable: AES\_256\_GCM
|
|
8
|
+
|
|
9
|
+
> `const` **AES\_256\_GCM**: `"aes-256-gcm"` = `'aes-256-gcm'`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/crypto.ts:150](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L150)
|
|
12
|
+
|
|
13
|
+
非流直接使用 GCM
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/crypto](../index.md) / SM4\_CBC
|
|
6
|
+
|
|
7
|
+
# Variable: SM4\_CBC
|
|
8
|
+
|
|
9
|
+
> `const` **SM4\_CBC**: `"sm4-cbc"` = `'sm4-cbc'`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/crypto.ts:154](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L154)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/crypto](../index.md) / SM4\_CFB
|
|
6
|
+
|
|
7
|
+
# Variable: SM4\_CFB
|
|
8
|
+
|
|
9
|
+
> `const` **SM4\_CFB**: `"sm4-cfb"` = `'sm4-cfb'`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/crypto.ts:156](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L156)
|
|
12
|
+
|
|
13
|
+
SM4 一般用这个,设置 iv,自动就切换成了这个
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/crypto](../index.md) / SM4\_ECB
|
|
6
|
+
|
|
7
|
+
# Variable: SM4\_ECB
|
|
8
|
+
|
|
9
|
+
> `const` **SM4\_ECB**: `"sm4-ecb"` = `'sm4-ecb'`
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/crypto.ts:153](https://github.com/maiyunnet/kebab/blob/master/lib/crypto.ts#L153)
|
|
12
|
+
|
|
13
|
+
SM4 如果未设置 iv,则默认这个
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../../index.md) / [lib/db/conn](../index.md) / Connection
|
|
6
|
+
|
|
7
|
+
# Class: Connection
|
|
8
|
+
|
|
9
|
+
Defined in: [lib/db/conn.ts:34](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L34)
|
|
10
|
+
|
|
11
|
+
数据库连接对象
|
|
12
|
+
|
|
13
|
+
## Constructors
|
|
14
|
+
|
|
15
|
+
### Constructor
|
|
16
|
+
|
|
17
|
+
> **new Connection**(`etc`, `link`): `Connection`
|
|
18
|
+
|
|
19
|
+
Defined in: [lib/db/conn.ts:59](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L59)
|
|
20
|
+
|
|
21
|
+
#### Parameters
|
|
22
|
+
|
|
23
|
+
##### etc
|
|
24
|
+
|
|
25
|
+
[`IConfigDb`](../../../../index/interfaces/IConfigDb.md)
|
|
26
|
+
|
|
27
|
+
##### link
|
|
28
|
+
|
|
29
|
+
`Connection` | `Client`
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
`Connection`
|
|
34
|
+
|
|
35
|
+
## Methods
|
|
36
|
+
|
|
37
|
+
### beginTransaction()
|
|
38
|
+
|
|
39
|
+
> **beginTransaction**(): `Promise`\<`boolean`\>
|
|
40
|
+
|
|
41
|
+
Defined in: [lib/db/conn.ts:317](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L317)
|
|
42
|
+
|
|
43
|
+
#### Returns
|
|
44
|
+
|
|
45
|
+
`Promise`\<`boolean`\>
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### commit()
|
|
50
|
+
|
|
51
|
+
> **commit**(): `Promise`\<`boolean`\>
|
|
52
|
+
|
|
53
|
+
Defined in: [lib/db/conn.ts:338](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L338)
|
|
54
|
+
|
|
55
|
+
#### Returns
|
|
56
|
+
|
|
57
|
+
`Promise`\<`boolean`\>
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
61
|
+
### end()
|
|
62
|
+
|
|
63
|
+
> **end**(): `Promise`\<`boolean`\>
|
|
64
|
+
|
|
65
|
+
Defined in: [lib/db/conn.ts:306](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L306)
|
|
66
|
+
|
|
67
|
+
关闭连接,一般情况下不使用
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`Promise`\<`boolean`\>
|
|
72
|
+
|
|
73
|
+
***
|
|
74
|
+
|
|
75
|
+
### execute()
|
|
76
|
+
|
|
77
|
+
> **execute**(`sql`, `values?`): `Promise`\<[`IPacket`](../../interfaces/IPacket.md)\>
|
|
78
|
+
|
|
79
|
+
Defined in: [lib/db/conn.ts:233](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L233)
|
|
80
|
+
|
|
81
|
+
执行一条 SQL 并获得影响行数对象 packet
|
|
82
|
+
|
|
83
|
+
#### Parameters
|
|
84
|
+
|
|
85
|
+
##### sql
|
|
86
|
+
|
|
87
|
+
`string`
|
|
88
|
+
|
|
89
|
+
执行的 SQL 字符串
|
|
90
|
+
|
|
91
|
+
##### values?
|
|
92
|
+
|
|
93
|
+
[`DbValue`](../../../../index/type-aliases/DbValue.md)[]
|
|
94
|
+
|
|
95
|
+
要替换的 data 数据
|
|
96
|
+
|
|
97
|
+
#### Returns
|
|
98
|
+
|
|
99
|
+
`Promise`\<[`IPacket`](../../interfaces/IPacket.md)\>
|
|
100
|
+
|
|
101
|
+
***
|
|
102
|
+
|
|
103
|
+
### getEtc()
|
|
104
|
+
|
|
105
|
+
> **getEtc**(): [`IConfigDb`](../../../../index/interfaces/IConfigDb.md)
|
|
106
|
+
|
|
107
|
+
Defined in: [lib/db/conn.ts:68](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L68)
|
|
108
|
+
|
|
109
|
+
获取连接 etc 信息
|
|
110
|
+
|
|
111
|
+
#### Returns
|
|
112
|
+
|
|
113
|
+
[`IConfigDb`](../../../../index/interfaces/IConfigDb.md)
|
|
114
|
+
|
|
115
|
+
***
|
|
116
|
+
|
|
117
|
+
### getLast()
|
|
118
|
+
|
|
119
|
+
> **getLast**(): `number`
|
|
120
|
+
|
|
121
|
+
Defined in: [lib/db/conn.ts:80](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L80)
|
|
122
|
+
|
|
123
|
+
获取最后一次获取连接的时间
|
|
124
|
+
|
|
125
|
+
#### Returns
|
|
126
|
+
|
|
127
|
+
`number`
|
|
128
|
+
|
|
129
|
+
***
|
|
130
|
+
|
|
131
|
+
### getLastSql()
|
|
132
|
+
|
|
133
|
+
> **getLastSql**(): `object`[]
|
|
134
|
+
|
|
135
|
+
Defined in: [lib/db/conn.ts:87](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L87)
|
|
136
|
+
|
|
137
|
+
获取最后两次执行的 sql 字符串
|
|
138
|
+
|
|
139
|
+
#### Returns
|
|
140
|
+
|
|
141
|
+
`object`[]
|
|
142
|
+
|
|
143
|
+
***
|
|
144
|
+
|
|
145
|
+
### getService()
|
|
146
|
+
|
|
147
|
+
> **getService**(): [`ESERVICE`](../../enumerations/ESERVICE.md)
|
|
148
|
+
|
|
149
|
+
Defined in: [lib/db/conn.ts:73](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L73)
|
|
150
|
+
|
|
151
|
+
获取数据库服务类型
|
|
152
|
+
|
|
153
|
+
#### Returns
|
|
154
|
+
|
|
155
|
+
[`ESERVICE`](../../enumerations/ESERVICE.md)
|
|
156
|
+
|
|
157
|
+
***
|
|
158
|
+
|
|
159
|
+
### isAvailable()
|
|
160
|
+
|
|
161
|
+
> **isAvailable**(`last`): `Promise`\<`boolean`\>
|
|
162
|
+
|
|
163
|
+
Defined in: [lib/db/conn.ts:154](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L154)
|
|
164
|
+
|
|
165
|
+
通过执行一条语句判断当前连接是否可用
|
|
166
|
+
|
|
167
|
+
#### Parameters
|
|
168
|
+
|
|
169
|
+
##### last
|
|
170
|
+
|
|
171
|
+
`boolean` = `true`
|
|
172
|
+
|
|
173
|
+
是否刷新最后使用时间(默认刷新)
|
|
174
|
+
|
|
175
|
+
#### Returns
|
|
176
|
+
|
|
177
|
+
`Promise`\<`boolean`\>
|
|
178
|
+
|
|
179
|
+
***
|
|
180
|
+
|
|
181
|
+
### isLost()
|
|
182
|
+
|
|
183
|
+
> **isLost**(): `boolean`
|
|
184
|
+
|
|
185
|
+
Defined in: [lib/db/conn.ts:104](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L104)
|
|
186
|
+
|
|
187
|
+
是否已经丢失
|
|
188
|
+
|
|
189
|
+
#### Returns
|
|
190
|
+
|
|
191
|
+
`boolean`
|
|
192
|
+
|
|
193
|
+
***
|
|
194
|
+
|
|
195
|
+
### isTransaction()
|
|
196
|
+
|
|
197
|
+
> **isTransaction**(): `boolean`
|
|
198
|
+
|
|
199
|
+
Defined in: [lib/db/conn.ts:111](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L111)
|
|
200
|
+
|
|
201
|
+
是否是开启事务状态
|
|
202
|
+
|
|
203
|
+
#### Returns
|
|
204
|
+
|
|
205
|
+
`boolean`
|
|
206
|
+
|
|
207
|
+
***
|
|
208
|
+
|
|
209
|
+
### isUsing()
|
|
210
|
+
|
|
211
|
+
> **isUsing**(): `boolean`
|
|
212
|
+
|
|
213
|
+
Defined in: [lib/db/conn.ts:118](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L118)
|
|
214
|
+
|
|
215
|
+
获取当前状态是否正在被使用中
|
|
216
|
+
|
|
217
|
+
#### Returns
|
|
218
|
+
|
|
219
|
+
`boolean`
|
|
220
|
+
|
|
221
|
+
***
|
|
222
|
+
|
|
223
|
+
### query()
|
|
224
|
+
|
|
225
|
+
> **query**(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\>
|
|
226
|
+
|
|
227
|
+
Defined in: [lib/db/conn.ts:177](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L177)
|
|
228
|
+
|
|
229
|
+
执行一条 SQL 并获得返回数据
|
|
230
|
+
|
|
231
|
+
#### Parameters
|
|
232
|
+
|
|
233
|
+
##### sql
|
|
234
|
+
|
|
235
|
+
`string`
|
|
236
|
+
|
|
237
|
+
执行的 SQL 字符串
|
|
238
|
+
|
|
239
|
+
##### values?
|
|
240
|
+
|
|
241
|
+
[`DbValue`](../../../../index/type-aliases/DbValue.md)[]
|
|
242
|
+
|
|
243
|
+
要替换的 data 数据
|
|
244
|
+
|
|
245
|
+
#### Returns
|
|
246
|
+
|
|
247
|
+
`Promise`\<[`IData`](../../interfaces/IData.md)\>
|
|
248
|
+
|
|
249
|
+
***
|
|
250
|
+
|
|
251
|
+
### refreshLast()
|
|
252
|
+
|
|
253
|
+
> **refreshLast**(): `void`
|
|
254
|
+
|
|
255
|
+
Defined in: [lib/db/conn.ts:146](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L146)
|
|
256
|
+
|
|
257
|
+
设定最后使用时间
|
|
258
|
+
|
|
259
|
+
#### Returns
|
|
260
|
+
|
|
261
|
+
`void`
|
|
262
|
+
|
|
263
|
+
***
|
|
264
|
+
|
|
265
|
+
### rollback()
|
|
266
|
+
|
|
267
|
+
> **rollback**(): `Promise`\<`boolean`\>
|
|
268
|
+
|
|
269
|
+
Defined in: [lib/db/conn.ts:356](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L356)
|
|
270
|
+
|
|
271
|
+
#### Returns
|
|
272
|
+
|
|
273
|
+
`Promise`\<`boolean`\>
|
|
274
|
+
|
|
275
|
+
***
|
|
276
|
+
|
|
277
|
+
### setLost()
|
|
278
|
+
|
|
279
|
+
> **setLost**(): `void`
|
|
280
|
+
|
|
281
|
+
Defined in: [lib/db/conn.ts:97](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L97)
|
|
282
|
+
|
|
283
|
+
将本条连接设置为不可用
|
|
284
|
+
|
|
285
|
+
#### Returns
|
|
286
|
+
|
|
287
|
+
`void`
|
|
288
|
+
|
|
289
|
+
***
|
|
290
|
+
|
|
291
|
+
### used()
|
|
292
|
+
|
|
293
|
+
> **used**(): `void`
|
|
294
|
+
|
|
295
|
+
Defined in: [lib/db/conn.ts:139](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L139)
|
|
296
|
+
|
|
297
|
+
取消占用
|
|
298
|
+
|
|
299
|
+
#### Returns
|
|
300
|
+
|
|
301
|
+
`void`
|
|
302
|
+
|
|
303
|
+
***
|
|
304
|
+
|
|
305
|
+
### using()
|
|
306
|
+
|
|
307
|
+
> **using**(): `boolean`
|
|
308
|
+
|
|
309
|
+
Defined in: [lib/db/conn.ts:125](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L125)
|
|
310
|
+
|
|
311
|
+
判断是否可用(丢失的也算不可用),返回 true 代表获取成功并自动刷新最后时间
|
|
312
|
+
|
|
313
|
+
#### Returns
|
|
314
|
+
|
|
315
|
+
`boolean`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/db](../index.md) / ESERVICE
|
|
6
|
+
|
|
7
|
+
# Enumeration: ESERVICE
|
|
8
|
+
|
|
9
|
+
Defined in: [lib/db.ts:17](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L17)
|
|
10
|
+
|
|
11
|
+
服务商定义
|
|
12
|
+
|
|
13
|
+
## Enumeration Members
|
|
14
|
+
|
|
15
|
+
### MYSQL
|
|
16
|
+
|
|
17
|
+
> **MYSQL**: `0`
|
|
18
|
+
|
|
19
|
+
Defined in: [lib/db.ts:18](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L18)
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### PGSQL
|
|
24
|
+
|
|
25
|
+
> **PGSQL**: `1`
|
|
26
|
+
|
|
27
|
+
Defined in: [lib/db.ts:19](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L19)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/db](../index.md) / get
|
|
6
|
+
|
|
7
|
+
# Function: get()
|
|
8
|
+
|
|
9
|
+
> **get**(`ctrEtc`, `opt`): [`Pool`](../pool/classes/Pool.md)
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/db.ts:68](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L68)
|
|
12
|
+
|
|
13
|
+
获取 Db Pool 对象
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### ctrEtc
|
|
18
|
+
|
|
19
|
+
控制器对象或数据库配置信息
|
|
20
|
+
|
|
21
|
+
[`IConfigDb`](../../../index/interfaces/IConfigDb.md) | [`Ctr`](../../../sys/ctr/classes/Ctr.md)
|
|
22
|
+
|
|
23
|
+
### opt
|
|
24
|
+
|
|
25
|
+
选项
|
|
26
|
+
|
|
27
|
+
#### service?
|
|
28
|
+
|
|
29
|
+
[`ESERVICE`](../enumerations/ESERVICE.md)
|
|
30
|
+
|
|
31
|
+
服务商,默认 PGSQL
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
[`Pool`](../pool/classes/Pool.md)
|
|
36
|
+
|
|
37
|
+
Db Pool 对象
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../index.md) / lib/db
|
|
6
|
+
|
|
7
|
+
# lib/db
|
|
8
|
+
|
|
9
|
+
## Enumerations
|
|
10
|
+
|
|
11
|
+
- [ESERVICE](enumerations/ESERVICE.md)
|
|
12
|
+
|
|
13
|
+
## Interfaces
|
|
14
|
+
|
|
15
|
+
- [IData](interfaces/IData.md)
|
|
16
|
+
- [IPacket](interfaces/IPacket.md)
|
|
17
|
+
|
|
18
|
+
## Functions
|
|
19
|
+
|
|
20
|
+
- [get](functions/get.md)
|
|
21
|
+
|
|
22
|
+
## References
|
|
23
|
+
|
|
24
|
+
### Connection
|
|
25
|
+
|
|
26
|
+
Re-exports [Connection](conn/classes/Connection.md)
|
|
27
|
+
|
|
28
|
+
***
|
|
29
|
+
|
|
30
|
+
### getConnectionList
|
|
31
|
+
|
|
32
|
+
Re-exports [getConnectionList](pool/functions/getConnectionList.md)
|
|
33
|
+
|
|
34
|
+
***
|
|
35
|
+
|
|
36
|
+
### IConnectionInfo
|
|
37
|
+
|
|
38
|
+
Re-exports [IConnectionInfo](pool/interfaces/IConnectionInfo.md)
|
|
39
|
+
|
|
40
|
+
***
|
|
41
|
+
|
|
42
|
+
### Pool
|
|
43
|
+
|
|
44
|
+
Re-exports [Pool](pool/classes/Pool.md)
|
|
45
|
+
|
|
46
|
+
***
|
|
47
|
+
|
|
48
|
+
### Transaction
|
|
49
|
+
|
|
50
|
+
Re-exports [Transaction](tran/classes/Transaction.md)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/db](../index.md) / IData
|
|
6
|
+
|
|
7
|
+
# Interface: IData
|
|
8
|
+
|
|
9
|
+
Defined in: [lib/db.ts:23](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L23)
|
|
10
|
+
|
|
11
|
+
query 返回的数据
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### error
|
|
16
|
+
|
|
17
|
+
> **error**: \{ `errno`: `number`; `message`: `string`; \} \| `null`
|
|
18
|
+
|
|
19
|
+
Defined in: [lib/db.ts:31](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L31)
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### fields
|
|
24
|
+
|
|
25
|
+
> **fields**: `object`[]
|
|
26
|
+
|
|
27
|
+
Defined in: [lib/db.ts:25](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L25)
|
|
28
|
+
|
|
29
|
+
#### length
|
|
30
|
+
|
|
31
|
+
> **length**: `number`
|
|
32
|
+
|
|
33
|
+
字段格式长度
|
|
34
|
+
|
|
35
|
+
#### name
|
|
36
|
+
|
|
37
|
+
> **name**: `string`
|
|
38
|
+
|
|
39
|
+
字段名
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
### result
|
|
44
|
+
|
|
45
|
+
> **result**: `number`
|
|
46
|
+
|
|
47
|
+
Defined in: [lib/db.ts:36](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L36)
|
|
48
|
+
|
|
49
|
+
1-正常,-500-服务器错误
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### rows
|
|
54
|
+
|
|
55
|
+
> **rows**: `Record`\<`string`, `any`\>[] \| `null`
|
|
56
|
+
|
|
57
|
+
Defined in: [lib/db.ts:24](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L24)
|