@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,220 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/s3](../index.md) / S3
|
|
6
|
+
|
|
7
|
+
# Class: S3
|
|
8
|
+
|
|
9
|
+
Defined in: [lib/s3.ts:43](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L43)
|
|
10
|
+
|
|
11
|
+
## Constructors
|
|
12
|
+
|
|
13
|
+
### Constructor
|
|
14
|
+
|
|
15
|
+
> **new S3**(`ctr`, `opt`): `S3`
|
|
16
|
+
|
|
17
|
+
Defined in: [lib/s3.ts:52](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L52)
|
|
18
|
+
|
|
19
|
+
#### Parameters
|
|
20
|
+
|
|
21
|
+
##### ctr
|
|
22
|
+
|
|
23
|
+
[`Ctr`](../../../sys/ctr/classes/Ctr.md)
|
|
24
|
+
|
|
25
|
+
##### opt
|
|
26
|
+
|
|
27
|
+
[`IOptions`](../interfaces/IOptions.md)
|
|
28
|
+
|
|
29
|
+
#### Returns
|
|
30
|
+
|
|
31
|
+
`S3`
|
|
32
|
+
|
|
33
|
+
## Methods
|
|
34
|
+
|
|
35
|
+
### deleteObject()
|
|
36
|
+
|
|
37
|
+
> **deleteObject**(`key`, `bucket?`): `Promise`\<`boolean`\>
|
|
38
|
+
|
|
39
|
+
Defined in: [lib/s3.ts:168](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L168)
|
|
40
|
+
|
|
41
|
+
删除对象
|
|
42
|
+
|
|
43
|
+
#### Parameters
|
|
44
|
+
|
|
45
|
+
##### key
|
|
46
|
+
|
|
47
|
+
`string`
|
|
48
|
+
|
|
49
|
+
对象路径
|
|
50
|
+
|
|
51
|
+
##### bucket?
|
|
52
|
+
|
|
53
|
+
`string`
|
|
54
|
+
|
|
55
|
+
bucket 名
|
|
56
|
+
|
|
57
|
+
#### Returns
|
|
58
|
+
|
|
59
|
+
`Promise`\<`boolean`\>
|
|
60
|
+
|
|
61
|
+
***
|
|
62
|
+
|
|
63
|
+
### deleteObjects()
|
|
64
|
+
|
|
65
|
+
> **deleteObjects**(`keys`, `bucket?`): `Promise`\<`boolean`\>
|
|
66
|
+
|
|
67
|
+
Defined in: [lib/s3.ts:188](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L188)
|
|
68
|
+
|
|
69
|
+
批量删除对象
|
|
70
|
+
|
|
71
|
+
#### Parameters
|
|
72
|
+
|
|
73
|
+
##### keys
|
|
74
|
+
|
|
75
|
+
`string`[]
|
|
76
|
+
|
|
77
|
+
批量对象路径
|
|
78
|
+
|
|
79
|
+
##### bucket?
|
|
80
|
+
|
|
81
|
+
`string`
|
|
82
|
+
|
|
83
|
+
bucket 名
|
|
84
|
+
|
|
85
|
+
#### Returns
|
|
86
|
+
|
|
87
|
+
`Promise`\<`boolean`\>
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
91
|
+
### destroy()
|
|
92
|
+
|
|
93
|
+
> **destroy**(): `void`
|
|
94
|
+
|
|
95
|
+
Defined in: [lib/s3.ts:230](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L230)
|
|
96
|
+
|
|
97
|
+
销毁连接,释放资源
|
|
98
|
+
一般会自动垃圾回收,但高频接口也可主动调用
|
|
99
|
+
|
|
100
|
+
#### Returns
|
|
101
|
+
|
|
102
|
+
`void`
|
|
103
|
+
|
|
104
|
+
***
|
|
105
|
+
|
|
106
|
+
### getObject()
|
|
107
|
+
|
|
108
|
+
> **getObject**(`key`, `bucket?`): `Promise`\<`false` \| `Readable` & `SdkStreamMixin` \| `Blob` & `SdkStreamMixin` \| `ReadableStream`\<`any`\> & `SdkStreamMixin` \| `undefined`\>
|
|
109
|
+
|
|
110
|
+
Defined in: [lib/s3.ts:148](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L148)
|
|
111
|
+
|
|
112
|
+
获取对象流,可通过流获取 buffer 或 text
|
|
113
|
+
|
|
114
|
+
#### Parameters
|
|
115
|
+
|
|
116
|
+
##### key
|
|
117
|
+
|
|
118
|
+
`string`
|
|
119
|
+
|
|
120
|
+
对象路径
|
|
121
|
+
|
|
122
|
+
##### bucket?
|
|
123
|
+
|
|
124
|
+
`string`
|
|
125
|
+
|
|
126
|
+
bucket 名
|
|
127
|
+
|
|
128
|
+
#### Returns
|
|
129
|
+
|
|
130
|
+
`Promise`\<`false` \| `Readable` & `SdkStreamMixin` \| `Blob` & `SdkStreamMixin` \| `ReadableStream`\<`any`\> & `SdkStreamMixin` \| `undefined`\>
|
|
131
|
+
|
|
132
|
+
***
|
|
133
|
+
|
|
134
|
+
### headObject()
|
|
135
|
+
|
|
136
|
+
> **headObject**(`key`, `bucket?`): `Promise`\<`false` \| `HeadObjectCommandOutput`\>
|
|
137
|
+
|
|
138
|
+
Defined in: [lib/s3.ts:210](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L210)
|
|
139
|
+
|
|
140
|
+
检测对象是否存在
|
|
141
|
+
|
|
142
|
+
#### Parameters
|
|
143
|
+
|
|
144
|
+
##### key
|
|
145
|
+
|
|
146
|
+
`string`
|
|
147
|
+
|
|
148
|
+
对象路径
|
|
149
|
+
|
|
150
|
+
##### bucket?
|
|
151
|
+
|
|
152
|
+
`string`
|
|
153
|
+
|
|
154
|
+
bucket 名
|
|
155
|
+
|
|
156
|
+
#### Returns
|
|
157
|
+
|
|
158
|
+
`Promise`\<`false` \| `HeadObjectCommandOutput`\>
|
|
159
|
+
|
|
160
|
+
***
|
|
161
|
+
|
|
162
|
+
### putObject()
|
|
163
|
+
|
|
164
|
+
> **putObject**(`key`, `content`, `length?`, `bucket?`): `Promise`\<`false` \| `CompleteMultipartUploadCommandOutput`\>
|
|
165
|
+
|
|
166
|
+
Defined in: [lib/s3.ts:103](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L103)
|
|
167
|
+
|
|
168
|
+
上传对象(可传流且也可无需设置 length) --
|
|
169
|
+
|
|
170
|
+
#### Parameters
|
|
171
|
+
|
|
172
|
+
##### key
|
|
173
|
+
|
|
174
|
+
`string`
|
|
175
|
+
|
|
176
|
+
对象路径
|
|
177
|
+
|
|
178
|
+
##### content
|
|
179
|
+
|
|
180
|
+
内容
|
|
181
|
+
|
|
182
|
+
`string` | `Buffer`\<`ArrayBufferLike`\> | `Readable`
|
|
183
|
+
|
|
184
|
+
##### length?
|
|
185
|
+
|
|
186
|
+
设置 contentLength,如果是流模式则需要设置此项,也可以设置为对象参数
|
|
187
|
+
|
|
188
|
+
`number` | \{ `bucket?`: `string`; `disposition?`: `string`; `length?`: `number`; `type?`: `string`; \}
|
|
189
|
+
|
|
190
|
+
##### bucket?
|
|
191
|
+
|
|
192
|
+
`string`
|
|
193
|
+
|
|
194
|
+
bucket 名
|
|
195
|
+
|
|
196
|
+
#### Returns
|
|
197
|
+
|
|
198
|
+
`Promise`\<`false` \| `CompleteMultipartUploadCommandOutput`\>
|
|
199
|
+
|
|
200
|
+
***
|
|
201
|
+
|
|
202
|
+
### setBucket()
|
|
203
|
+
|
|
204
|
+
> **setBucket**(`bucket`): `void`
|
|
205
|
+
|
|
206
|
+
Defined in: [lib/s3.ts:92](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L92)
|
|
207
|
+
|
|
208
|
+
修改预定义 bucket
|
|
209
|
+
|
|
210
|
+
#### Parameters
|
|
211
|
+
|
|
212
|
+
##### bucket
|
|
213
|
+
|
|
214
|
+
`string`
|
|
215
|
+
|
|
216
|
+
bucket 名
|
|
217
|
+
|
|
218
|
+
#### Returns
|
|
219
|
+
|
|
220
|
+
`void`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/s3](../index.md) / ESERVICE
|
|
6
|
+
|
|
7
|
+
# Enumeration: ESERVICE
|
|
8
|
+
|
|
9
|
+
Defined in: [lib/s3.ts:20](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L20)
|
|
10
|
+
|
|
11
|
+
服务商定义
|
|
12
|
+
|
|
13
|
+
## Enumeration Members
|
|
14
|
+
|
|
15
|
+
### ALIBABA
|
|
16
|
+
|
|
17
|
+
> **ALIBABA**: `2`
|
|
18
|
+
|
|
19
|
+
Defined in: [lib/s3.ts:23](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L23)
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### AMAZON
|
|
24
|
+
|
|
25
|
+
> **AMAZON**: `0`
|
|
26
|
+
|
|
27
|
+
Defined in: [lib/s3.ts:21](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L21)
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### CF
|
|
32
|
+
|
|
33
|
+
> **CF**: `3`
|
|
34
|
+
|
|
35
|
+
Defined in: [lib/s3.ts:24](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L24)
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### TENCENT
|
|
40
|
+
|
|
41
|
+
> **TENCENT**: `1`
|
|
42
|
+
|
|
43
|
+
Defined in: [lib/s3.ts:22](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L22)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/s3](../index.md) / get
|
|
6
|
+
|
|
7
|
+
# Function: get()
|
|
8
|
+
|
|
9
|
+
> **get**(`ctr`, `opt`): [`S3`](../classes/S3.md)
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/s3.ts:240](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L240)
|
|
12
|
+
|
|
13
|
+
创建一个对象存储对象
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### ctr
|
|
18
|
+
|
|
19
|
+
[`Ctr`](../../../sys/ctr/classes/Ctr.md)
|
|
20
|
+
|
|
21
|
+
### opt
|
|
22
|
+
|
|
23
|
+
[`IOptions`](../interfaces/IOptions.md)
|
|
24
|
+
|
|
25
|
+
选项
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
[`S3`](../classes/S3.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../index.md) / lib/s3
|
|
6
|
+
|
|
7
|
+
# lib/s3
|
|
8
|
+
|
|
9
|
+
## Enumerations
|
|
10
|
+
|
|
11
|
+
- [ESERVICE](enumerations/ESERVICE.md)
|
|
12
|
+
|
|
13
|
+
## Classes
|
|
14
|
+
|
|
15
|
+
- [S3](classes/S3.md)
|
|
16
|
+
|
|
17
|
+
## Interfaces
|
|
18
|
+
|
|
19
|
+
- [IOptions](interfaces/IOptions.md)
|
|
20
|
+
|
|
21
|
+
## Functions
|
|
22
|
+
|
|
23
|
+
- [get](functions/get.md)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/s3](../index.md) / IOptions
|
|
6
|
+
|
|
7
|
+
# Interface: IOptions
|
|
8
|
+
|
|
9
|
+
Defined in: [lib/s3.ts:28](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L28)
|
|
10
|
+
|
|
11
|
+
选项
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### account?
|
|
16
|
+
|
|
17
|
+
> `optional` **account**: `string`
|
|
18
|
+
|
|
19
|
+
Defined in: [lib/s3.ts:32](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L32)
|
|
20
|
+
|
|
21
|
+
cf r2 使用
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### bucket?
|
|
26
|
+
|
|
27
|
+
> `optional` **bucket**: `string`
|
|
28
|
+
|
|
29
|
+
Defined in: [lib/s3.ts:40](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L40)
|
|
30
|
+
|
|
31
|
+
预定义 bucket
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### region?
|
|
36
|
+
|
|
37
|
+
> `optional` **region**: `string`
|
|
38
|
+
|
|
39
|
+
Defined in: [lib/s3.ts:38](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L38)
|
|
40
|
+
|
|
41
|
+
区域
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### secretId?
|
|
46
|
+
|
|
47
|
+
> `optional` **secretId**: `string`
|
|
48
|
+
|
|
49
|
+
Defined in: [lib/s3.ts:34](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L34)
|
|
50
|
+
|
|
51
|
+
密钥键
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### secretKey?
|
|
56
|
+
|
|
57
|
+
> `optional` **secretKey**: `string`
|
|
58
|
+
|
|
59
|
+
Defined in: [lib/s3.ts:36](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L36)
|
|
60
|
+
|
|
61
|
+
密钥值
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### service
|
|
66
|
+
|
|
67
|
+
> **service**: [`ESERVICE`](../enumerations/ESERVICE.md)
|
|
68
|
+
|
|
69
|
+
Defined in: [lib/s3.ts:30](https://github.com/maiyunnet/kebab/blob/master/lib/s3.ts#L30)
|
|
70
|
+
|
|
71
|
+
服务商 -
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/scan](../index.md) / Scan
|
|
6
|
+
|
|
7
|
+
# Class: Scan
|
|
8
|
+
|
|
9
|
+
Defined in: [lib/scan.ts:44](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L44)
|
|
10
|
+
|
|
11
|
+
## Constructors
|
|
12
|
+
|
|
13
|
+
### Constructor
|
|
14
|
+
|
|
15
|
+
> **new Scan**(`link`, `token?`, `opt?`): `Scan`
|
|
16
|
+
|
|
17
|
+
Defined in: [lib/scan.ts:58](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L58)
|
|
18
|
+
|
|
19
|
+
#### Parameters
|
|
20
|
+
|
|
21
|
+
##### link
|
|
22
|
+
|
|
23
|
+
[`Pool`](../../db/pool/classes/Pool.md) | [`Kv`](../../kv/classes/Kv.md)
|
|
24
|
+
|
|
25
|
+
##### token?
|
|
26
|
+
|
|
27
|
+
`string`
|
|
28
|
+
|
|
29
|
+
##### opt?
|
|
30
|
+
|
|
31
|
+
[`IOptions`](../interfaces/IOptions.md) = `{}`
|
|
32
|
+
|
|
33
|
+
#### Returns
|
|
34
|
+
|
|
35
|
+
`Scan`
|
|
36
|
+
|
|
37
|
+
## Methods
|
|
38
|
+
|
|
39
|
+
### createToken()
|
|
40
|
+
|
|
41
|
+
> **createToken**(): `Promise`\<`boolean`\>
|
|
42
|
+
|
|
43
|
+
Defined in: [lib/scan.ts:156](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L156)
|
|
44
|
+
|
|
45
|
+
创建 token,直接应用到本类
|
|
46
|
+
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
`Promise`\<`boolean`\>
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### getTimeLeft()
|
|
54
|
+
|
|
55
|
+
> **getTimeLeft**(): `number` \| `null`
|
|
56
|
+
|
|
57
|
+
Defined in: [lib/scan.ts:223](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L223)
|
|
58
|
+
|
|
59
|
+
获取当前 token 可扫剩余有效期
|
|
60
|
+
|
|
61
|
+
#### Returns
|
|
62
|
+
|
|
63
|
+
`number` \| `null`
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
67
|
+
### getToken()
|
|
68
|
+
|
|
69
|
+
> **getToken**(): `string` \| `null`
|
|
70
|
+
|
|
71
|
+
Defined in: [lib/scan.ts:201](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L201)
|
|
72
|
+
|
|
73
|
+
获取当前 token
|
|
74
|
+
|
|
75
|
+
#### Returns
|
|
76
|
+
|
|
77
|
+
`string` \| `null`
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### getTTL()
|
|
82
|
+
|
|
83
|
+
> **getTTL**(): `number`
|
|
84
|
+
|
|
85
|
+
Defined in: [lib/scan.ts:216](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L216)
|
|
86
|
+
|
|
87
|
+
获取设置的有效期
|
|
88
|
+
|
|
89
|
+
#### Returns
|
|
90
|
+
|
|
91
|
+
`number`
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
95
|
+
### poll()
|
|
96
|
+
|
|
97
|
+
> **poll**(): `Promise`\<`any`\>
|
|
98
|
+
|
|
99
|
+
Defined in: [lib/scan.ts:85](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L85)
|
|
100
|
+
|
|
101
|
+
生成二维码处的轮询,检查是否被扫码、被录入数据
|
|
102
|
+
|
|
103
|
+
#### Returns
|
|
104
|
+
|
|
105
|
+
`Promise`\<`any`\>
|
|
106
|
+
|
|
107
|
+
-3 系统错误 -2 token 不存在或已过期 -1 无操作, 0 已扫码, 其他返回为存的数据并结束轮询
|
|
108
|
+
|
|
109
|
+
***
|
|
110
|
+
|
|
111
|
+
### setTTL()
|
|
112
|
+
|
|
113
|
+
> **setTTL**(`ttl`): `void`
|
|
114
|
+
|
|
115
|
+
Defined in: [lib/scan.ts:209](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L209)
|
|
116
|
+
|
|
117
|
+
设置有效期,设置后的新 token 被创建有效
|
|
118
|
+
|
|
119
|
+
#### Parameters
|
|
120
|
+
|
|
121
|
+
##### ttl
|
|
122
|
+
|
|
123
|
+
`number`
|
|
124
|
+
|
|
125
|
+
#### Returns
|
|
126
|
+
|
|
127
|
+
`void`
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/scan](../index.md) / get
|
|
6
|
+
|
|
7
|
+
# Function: get()
|
|
8
|
+
|
|
9
|
+
> **get**(`link`, `token?`, `opt?`): `Promise`\<[`Scan`](../classes/Scan.md)\>
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/scan.ts:251](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L251)
|
|
12
|
+
|
|
13
|
+
-- 创建 Scan 对象
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### link
|
|
18
|
+
|
|
19
|
+
[`Pool`](../../db/pool/classes/Pool.md) | [`Kv`](../../kv/classes/Kv.md)
|
|
20
|
+
|
|
21
|
+
### token?
|
|
22
|
+
|
|
23
|
+
`string`
|
|
24
|
+
|
|
25
|
+
Token
|
|
26
|
+
|
|
27
|
+
### opt?
|
|
28
|
+
|
|
29
|
+
[`IOptions`](../interfaces/IOptions.md) = `{}`
|
|
30
|
+
|
|
31
|
+
## Returns
|
|
32
|
+
|
|
33
|
+
`Promise`\<[`Scan`](../classes/Scan.md)\>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/scan](../index.md) / scanned
|
|
6
|
+
|
|
7
|
+
# Function: scanned()
|
|
8
|
+
|
|
9
|
+
> **scanned**(`link`, `token`, `opt`): `Promise`\<`boolean`\>
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/scan.ts:265](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L265)
|
|
12
|
+
|
|
13
|
+
对 token 执行访问操作,通常用户扫码后展示的网页所调用,代表已扫码
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### link
|
|
18
|
+
|
|
19
|
+
Db 或 Kv
|
|
20
|
+
|
|
21
|
+
[`Pool`](../../db/pool/classes/Pool.md) | [`Kv`](../../kv/classes/Kv.md)
|
|
22
|
+
|
|
23
|
+
### token
|
|
24
|
+
|
|
25
|
+
`string`
|
|
26
|
+
|
|
27
|
+
必填
|
|
28
|
+
|
|
29
|
+
### opt
|
|
30
|
+
|
|
31
|
+
[`IStaticOptions`](../interfaces/IStaticOptions.md) = `{}`
|
|
32
|
+
|
|
33
|
+
参数
|
|
34
|
+
|
|
35
|
+
## Returns
|
|
36
|
+
|
|
37
|
+
`Promise`\<`boolean`\>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/scan](../index.md) / setData
|
|
6
|
+
|
|
7
|
+
# Function: setData()
|
|
8
|
+
|
|
9
|
+
> **setData**(`link`, `token`, `data`, `opt`): `Promise`\<`boolean`\>
|
|
10
|
+
|
|
11
|
+
Defined in: [lib/scan.ts:323](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L323)
|
|
12
|
+
|
|
13
|
+
将数据写入 token,通常在客户的逻辑下去写,服务器会 poll 到
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### link
|
|
18
|
+
|
|
19
|
+
[`Pool`](../../db/pool/classes/Pool.md) | [`Kv`](../../kv/classes/Kv.md)
|
|
20
|
+
|
|
21
|
+
### token
|
|
22
|
+
|
|
23
|
+
`string`
|
|
24
|
+
|
|
25
|
+
### data
|
|
26
|
+
|
|
27
|
+
`string` | `number` | `Record`\<`string`, `any`\>
|
|
28
|
+
|
|
29
|
+
### opt
|
|
30
|
+
|
|
31
|
+
[`IStaticOptions`](../interfaces/IStaticOptions.md) = `{}`
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`Promise`\<`boolean`\>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../index.md) / lib/scan
|
|
6
|
+
|
|
7
|
+
# lib/scan
|
|
8
|
+
|
|
9
|
+
## Classes
|
|
10
|
+
|
|
11
|
+
- [Scan](classes/Scan.md)
|
|
12
|
+
|
|
13
|
+
## Interfaces
|
|
14
|
+
|
|
15
|
+
- [IOptions](interfaces/IOptions.md)
|
|
16
|
+
- [IStaticOptions](interfaces/IStaticOptions.md)
|
|
17
|
+
|
|
18
|
+
## Functions
|
|
19
|
+
|
|
20
|
+
- [get](functions/get.md)
|
|
21
|
+
- [scanned](functions/scanned.md)
|
|
22
|
+
- [setData](functions/setData.md)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[**Documents for @maiyunnet/kebab**](../../../index.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Documents for @maiyunnet/kebab](../../../index.md) / [lib/scan](../index.md) / IOptions
|
|
6
|
+
|
|
7
|
+
# Interface: IOptions
|
|
8
|
+
|
|
9
|
+
Defined in: [lib/scan.ts:30](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L30)
|
|
10
|
+
|
|
11
|
+
Scan 设置的选项
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### ctr?
|
|
16
|
+
|
|
17
|
+
> `optional` **ctr**: [`Ctr`](../../../sys/ctr/classes/Ctr.md)
|
|
18
|
+
|
|
19
|
+
Defined in: [lib/scan.ts:32](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L32)
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### name?
|
|
24
|
+
|
|
25
|
+
> `optional` **name**: `string`
|
|
26
|
+
|
|
27
|
+
Defined in: [lib/scan.ts:34](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L34)
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### pre?
|
|
32
|
+
|
|
33
|
+
> `optional` **pre**: `string`
|
|
34
|
+
|
|
35
|
+
Defined in: [lib/scan.ts:33](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L33)
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### ttl?
|
|
40
|
+
|
|
41
|
+
> `optional` **ttl**: `number`
|
|
42
|
+
|
|
43
|
+
Defined in: [lib/scan.ts:31](https://github.com/maiyunnet/kebab/blob/master/lib/scan.ts#L31)
|