diff --git a/composer.json b/composer.json index 41fcf2b..42499c0 100755 --- a/composer.json +++ b/composer.json @@ -1,16 +1,17 @@ { - "name": "mirzaev/spetsresurs-telegram-registry-requests", + "name": "mirzaev/mashtrash", "type": "robot", "require": { "triagens/arangodb": "^3.8", "mirzaev/arangodb": "^1.0", "badfarm/zanzara": "^0.9.1", - "nyholm/psr7": "^1.8" + "nyholm/psr7": "^1.8", + "react/filesystem": "^0.1.2" }, "license": "WTFPL", "autoload": { "psr-4": { - "mirzaev\\spetsresurs\\telegram\\registry\\requests\\": "mirzaev/spetsresurs/telegram/registry/requests/system/" + "mirzaev\\mashtrash\\": "mirzaev/mashtrash/system/" } }, "authors": [ @@ -22,7 +23,8 @@ "minimum-stability": "stable", "config": { "allow-plugins": { - "php-http/discovery": true + "php-http/discovery": true, + "wyrihaximus/composer-update-bin-autoload-path": false } } } diff --git a/composer.lock b/composer.lock index 61e9cde..496b6fd 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "24836ff235617e61113ffdb67c6cf37d", + "content-hash": "3c749123e55dfeaaf4186a19fb4dbf38", "packages": [ { "name": "badfarm/zanzara", @@ -72,6 +72,125 @@ }, "time": "2023-04-25T18:44:20+00:00" }, + { + "name": "cakephp/core", + "version": "4.5.6", + "source": { + "type": "git", + "url": "https://github.com/cakephp/core.git", + "reference": "c2f4dff110d41e475d1041f2abe236f1c62d0cd0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/core/zipball/c2f4dff110d41e475d1041f2abe236f1c62d0cd0", + "reference": "c2f4dff110d41e475d1041f2abe236f1c62d0cd0", + "shasum": "" + }, + "require": { + "cakephp/utility": "^4.0", + "php": ">=7.4.0" + }, + "provide": { + "psr/container-implementation": "^1.0 || ^2.0" + }, + "suggest": { + "cakephp/cache": "To use Configure::store() and restore().", + "cakephp/event": "To use PluginApplicationInterface or plugin applications.", + "league/container": "To use Container and ServiceProvider classes" + }, + "type": "library", + "autoload": { + "files": [ + "functions.php" + ], + "psr-4": { + "Cake\\Core\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/core/graphs/contributors" + } + ], + "description": "CakePHP Framework Core classes", + "homepage": "https://cakephp.org", + "keywords": [ + "cakephp", + "core", + "framework" + ], + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/cakephp/issues", + "source": "https://github.com/cakephp/core" + }, + "time": "2023-10-21T13:30:46+00:00" + }, + { + "name": "cakephp/utility", + "version": "4.5.6", + "source": { + "type": "git", + "url": "https://github.com/cakephp/utility.git", + "reference": "708929115e5b400e1b5b76d8120ca2e51e2de199" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/utility/zipball/708929115e5b400e1b5b76d8120ca2e51e2de199", + "reference": "708929115e5b400e1b5b76d8120ca2e51e2de199", + "shasum": "" + }, + "require": { + "cakephp/core": "^4.0", + "php": ">=7.4.0" + }, + "suggest": { + "ext-intl": "To use Text::transliterate() or Text::slug()", + "lib-ICU": "To use Text::transliterate() or Text::slug()" + }, + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Cake\\Utility\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/utility/graphs/contributors" + } + ], + "description": "CakePHP Utility classes such as Inflector, String, Hash, and Security", + "homepage": "https://cakephp.org", + "keywords": [ + "cakephp", + "hash", + "inflector", + "security", + "string", + "utility" + ], + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/cakephp/issues", + "source": "https://github.com/cakephp/utility" + }, + "time": "2024-06-23T00:11:14+00:00" + }, { "name": "clue/http-proxy-react", "version": "v1.8.0", @@ -139,6 +258,167 @@ ], "time": "2022-09-01T14:36:49+00:00" }, + { + "name": "doctrine/inflector", + "version": "2.0.10", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^11.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.10" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2024-02-18T20:23:39+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, { "name": "evenement/evenement", "version": "v3.0.1", @@ -547,6 +827,56 @@ }, "time": "2022-01-27T09:35:39+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, { "name": "php-di/invoker", "version": "2.3.3", @@ -1132,6 +1462,85 @@ ], "time": "2022-11-30T15:59:55+00:00" }, + { + "name": "react/child-process", + "version": "v0.6.5", + "source": { + "type": "git", + "url": "https://github.com/reactphp/child-process.git", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/event-loop": "^1.2", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "react/socket": "^1.8", + "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\ChildProcess\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven library for executing child processes with ReactPHP.", + "keywords": [ + "event-driven", + "process", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/child-process/issues", + "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-09-16T13:41:56+00:00" + }, { "name": "react/dns", "version": "v1.11.0", @@ -1280,6 +1689,67 @@ ], "time": "2023-05-05T10:11:24+00:00" }, + { + "name": "react/filesystem", + "version": "v0.1.2", + "source": { + "type": "git", + "url": "https://github.com/reactphp/filesystem.git", + "reference": "766cdef9ba806367114f0c5ba36ea2a6eec8ccd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/filesystem/zipball/766cdef9ba806367114f0c5ba36ea2a6eec8ccd2", + "reference": "766cdef9ba806367114f0c5ba36ea2a6eec8ccd2", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0", + "php": ">=5.4.0", + "react/event-loop": "^1.0 || ^0.5 || ^0.4", + "react/promise": "~2.2", + "react/promise-stream": "^1.1", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4", + "wyrihaximus/react-child-process-pool": "^1.3" + }, + "require-dev": { + "clue/block-react": "^1.1", + "phpunit/phpunit": "^6.0 || ^5.0 || ^4.8" + }, + "suggest": { + "ext-eio": "^1.2" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Filesystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Asynchronous filesystem abstraction.", + "keywords": [ + "asynchronous", + "eio", + "filesystem" + ], + "support": { + "issues": "https://github.com/reactphp/filesystem/issues", + "source": "https://github.com/reactphp/filesystem/tree/master" + }, + "time": "2018-10-22T12:10:29+00:00" + }, { "name": "react/http", "version": "v1.9.0", @@ -1444,6 +1914,164 @@ ], "time": "2023-05-02T15:15:43+00:00" }, + { + "name": "react/promise-stream", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise-stream.git", + "reference": "5c7ec3450f558deb779742e33967d837e2db7871" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise-stream/zipball/5c7ec3450f558deb779742e33967d837e2db7871", + "reference": "5c7ec3450f558deb779742e33967d837e2db7871", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/promise": "^3 || ^2.1 || ^1.2", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "The missing link between Promise-land and Stream-land for ReactPHP", + "homepage": "https://github.com/reactphp/promise-stream", + "keywords": [ + "Buffer", + "async", + "promise", + "reactphp", + "stream", + "unwrap" + ], + "support": { + "issues": "https://github.com/reactphp/promise-stream/issues", + "source": "https://github.com/reactphp/promise-stream/tree/v1.7.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-12-13T11:32:02+00:00" + }, + { + "name": "react/promise-timer", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise-timer.git", + "reference": "4f70306ed66b8b44768941ca7f142092600fafc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/4f70306ed66b8b44768941ca7f142092600fafc1", + "reference": "4f70306ed66b8b44768941ca7f142092600fafc1", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.7.0 || ^1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "React\\Promise\\Timer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.", + "homepage": "https://github.com/reactphp/promise-timer", + "keywords": [ + "async", + "event-loop", + "promise", + "reactphp", + "timeout", + "timer" + ], + "support": { + "issues": "https://github.com/reactphp/promise-timer/issues", + "source": "https://github.com/reactphp/promise-timer/tree/v1.11.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-04T14:27:45+00:00" + }, { "name": "react/socket", "version": "v1.13.0", @@ -1667,6 +2295,197 @@ }, "time": "2018-05-29T20:21:04+00:00" }, + { + "name": "thecodingmachine/safe", + "version": "v1.3.3", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/safe.git", + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc", + "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpstan/phpstan": "^0.12", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^0.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "autoload": { + "files": [ + "deprecated/apc.php", + "deprecated/libevent.php", + "deprecated/mssql.php", + "deprecated/stats.php", + "lib/special_cases.php", + "generated/apache.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/calendar.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/ingres-ii.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/msql.php", + "generated/mysql.php", + "generated/mysqli.php", + "generated/mysqlndMs.php", + "generated/mysqlndQc.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/password.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pdf.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rpminfo.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/simplexml.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php" + ], + "psr-4": { + "Safe\\": [ + "lib/", + "deprecated/", + "generated/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", + "support": { + "issues": "https://github.com/thecodingmachine/safe/issues", + "source": "https://github.com/thecodingmachine/safe/tree/v1.3.3" + }, + "time": "2020-10-28T17:51:34+00:00" + }, + { + "name": "tivie/php-os-detector", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/tivie/php-os-detector.git", + "reference": "9461dcd85c00e03842264f2fc8ccdc8d46867321" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tivie/php-os-detector/zipball/9461dcd85c00e03842264f2fc8ccdc8d46867321", + "reference": "9461dcd85c00e03842264f2fc8ccdc8d46867321", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.3.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Tivie\\OS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "APACHE 2.0" + ], + "authors": [ + { + "name": "Estevão Soares dos Santos", + "email": "estevao@soares-dos-santos.com" + } + ], + "description": "A small utility library that detects the OS the server is running on", + "homepage": "http://tivie.github.com/php-os-detector/", + "keywords": [ + "detection", + "detector", + "identification", + "operating system", + "os", + "os detection" + ], + "support": { + "issues": "https://github.com/tivie/php-os-detector/issues", + "source": "https://github.com/tivie/php-os-detector/tree/master" + }, + "time": "2017-10-21T03:33:59+00:00" + }, { "name": "triagens/arangodb", "version": "v3.8.0", @@ -1727,6 +2546,583 @@ "source": "https://github.com/arangodb/arangodb-php/tree/v3.8.0" }, "time": "2021-06-18T12:06:02+00:00" + }, + { + "name": "wyrihaximus/composer-update-bin-autoload-path", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/php-composer-update-bin-autoload-path.git", + "reference": "33413e3af4f4d7ab4de3653a706aed57f51e84af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/php-composer-update-bin-autoload-path/zipball/33413e3af4f4d7ab4de3653a706aed57f51e84af", + "reference": "33413e3af4f4d7ab4de3653a706aed57f51e84af", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2", + "php": "^8 || ^7.4" + }, + "require-dev": { + "wyrihaximus/test-utilities": "^3" + }, + "type": "composer-plugin", + "extra": { + "class": "WyriHaximus\\Composer\\BinAutoloadPathUpdater", + "unused": [ + "php" + ] + }, + "autoload": { + "psr-4": { + "WyriHaximus\\Composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "🏰 Composer plugin that fills a bin file with the absolute composer autoload path", + "support": { + "issues": "https://github.com/WyriHaximus/php-composer-update-bin-autoload-path/issues", + "source": "https://github.com/WyriHaximus/php-composer-update-bin-autoload-path/tree/1.1.1" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2021-03-14T20:55:38+00:00" + }, + { + "name": "wyrihaximus/constants", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/php-constants.git", + "reference": "32ceffdd881593c7fa24d8fcbf9deb58687484cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/php-constants/zipball/32ceffdd881593c7fa24d8fcbf9deb58687484cb", + "reference": "32ceffdd881593c7fa24d8fcbf9deb58687484cb", + "shasum": "" + }, + "require": { + "php": "^8 || ^7 || ^5.3" + }, + "type": "library", + "autoload": { + "files": [ + "src/Boolean/constants_include.php", + "src/ComposerAutoloader/constants_include.php", + "src/HTTPStatusCodes/constants_include.php", + "src/Numeric/constants_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com", + "homepage": "https://www.wyrihaximus.net/" + } + ], + "description": "Collection of constants for PHP", + "support": { + "issues": "https://github.com/WyriHaximus/php-constants/issues", + "source": "https://github.com/WyriHaximus/php-constants/tree/1.6.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2020-11-28T12:04:43+00:00" + }, + { + "name": "wyrihaximus/cpu-core-detector", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/php-cpu-core-detector.git", + "reference": "287aa2730d8d3a8f581004bb7b95fab1b4e5708f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/php-cpu-core-detector/zipball/287aa2730d8d3a8f581004bb7b95fab1b4e5708f", + "reference": "287aa2730d8d3a8f581004bb7b95fab1b4e5708f", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8", + "react/child-process": "^0.5 || ^0.4 || ^0.6", + "react/event-loop": "^1.1", + "react/promise": "^2.8", + "tivie/php-os-detector": "^1.0", + "wyrihaximus/react-child-process-promise": "^2 || ^3", + "wyrihaximus/ticking-promise": "^1.5 || ^2" + }, + "require-dev": { + "wyrihaximus/async-test-utilities": "^3.3", + "wyrihaximus/test-utilities": "^3" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "WyriHaximus\\CpuCoreDetector\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Detect how many CPU cores are available", + "support": { + "issues": "https://github.com/WyriHaximus/php-cpu-core-detector/issues", + "source": "https://github.com/WyriHaximus/php-cpu-core-detector/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2021-03-08T07:46:18+00:00" + }, + { + "name": "wyrihaximus/file-descriptors", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/php-file-descriptors.git", + "reference": "de9c3dceecfab88c3f73aa6c9ea5372e7f635d7a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/php-file-descriptors/zipball/de9c3dceecfab88c3f73aa6c9ea5372e7f635d7a", + "reference": "de9c3dceecfab88c3f73aa6c9ea5372e7f635d7a", + "shasum": "" + }, + "require": { + "php": "^8 || ^7.4", + "thecodingmachine/safe": "^2 || ^1", + "tivie/php-os-detector": "^1.1" + }, + "require-dev": { + "wyrihaximus/iterator-or-array-to-array": "^1.1", + "wyrihaximus/test-utilities": "^3.3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "WyriHaximus\\FileDescriptors\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "List open file descriptors for the current process cross platform", + "support": { + "issues": "https://github.com/WyriHaximus/php-file-descriptors/issues", + "source": "https://github.com/WyriHaximus/php-file-descriptors/tree/1.1.1" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-01-22T13:34:53+00:00" + }, + { + "name": "wyrihaximus/json-throwable", + "version": "4.2.0", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/php-json-throwable.git", + "reference": "91c35387bc347dd6fcf37e8baf2588f464a76018" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/php-json-throwable/zipball/91c35387bc347dd6fcf37e8baf2588f464a76018", + "reference": "91c35387bc347dd6fcf37e8baf2588f464a76018", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.5 || ^2.0.0", + "php": "^8 || ^7.4", + "thecodingmachine/safe": "^1.3.3 || ^2.0.0", + "wyrihaximus/json-utilities": "^1.3.1" + }, + "require-dev": { + "wyrihaximus/test-utilities": "^3.3.1 || ^6.0.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "WyriHaximus\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "📠 JSON encode and decode throwables and exceptions", + "support": { + "issues": "https://github.com/WyriHaximus/php-json-throwable/issues", + "source": "https://github.com/WyriHaximus/php-json-throwable/tree/4.2.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2024-05-09T13:10:29+00:00" + }, + { + "name": "wyrihaximus/json-utilities", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/php-json-utilities.git", + "reference": "64c27cc44e37075944debd31196349b903b3aea5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/php-json-utilities/zipball/64c27cc44e37075944debd31196349b903b3aea5", + "reference": "64c27cc44e37075944debd31196349b903b3aea5", + "shasum": "" + }, + "require": { + "php": "^8 || ^7.4", + "thecodingmachine/safe": "^2 || ^1.1" + }, + "require-dev": { + "wyrihaximus/test-utilities": "^3.3.1" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "WyriHaximus\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Utilities for php-json-* packages", + "support": { + "issues": "https://github.com/WyriHaximus/php-json-utilities/issues", + "source": "https://github.com/WyriHaximus/php-json-utilities/tree/1.3.1" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2023-01-16T11:00:08+00:00" + }, + { + "name": "wyrihaximus/react-child-process-messenger", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/reactphp-child-process-messenger.git", + "reference": "4d1bab02ee4ae62e28a7a8a43428ff6ee9532641" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-child-process-messenger/zipball/4d1bab02ee4ae62e28a7a8a43428ff6ee9532641", + "reference": "4d1bab02ee4ae62e28a7a8a43428ff6ee9532641", + "shasum": "" + }, + "require": { + "cakephp/utility": "^4.2.4", + "doctrine/inflector": "^2.0.3", + "evenement/evenement": "^3.0.1", + "ext-hash": "^8 || ^7.4", + "ext-json": "^8 || ^7.4", + "paragonie/random_compat": "^9.0 || ^2.0", + "php": "^8 || ^7.4", + "react/child-process": "^0.6.2", + "react/event-loop": "^1.1.1", + "react/promise": "^2.8", + "react/promise-stream": "^1.2", + "react/promise-timer": "^1.6", + "react/socket": "^1.6", + "thecodingmachine/safe": "^1.3.3", + "wyrihaximus/composer-update-bin-autoload-path": "^1.1.1", + "wyrihaximus/constants": "^1.6", + "wyrihaximus/file-descriptors": "^1.1", + "wyrihaximus/json-throwable": "^4.1", + "wyrihaximus/ticking-promise": "^2 || ^3" + }, + "require-dev": { + "wyrihaximus/async-test-utilities": "^3.4.18" + }, + "type": "library", + "extra": { + "unused": [ + "php", + "react/promise-stream" + ], + "wyrihaximus": { + "bin-autoload-path-update": [ + "bin/child-process" + ] + } + }, + "autoload": { + "psr-4": { + "WyriHaximus\\React\\ChildProcess\\Messenger\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com", + "homepage": "http://wyrihaximus.net/" + } + ], + "description": "Messenger decorator for react/child-process", + "support": { + "issues": "https://github.com/WyriHaximus/reactphp-child-process-messenger/issues", + "source": "https://github.com/WyriHaximus/reactphp-child-process-messenger/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2022-03-12T12:34:18+00:00" + }, + { + "name": "wyrihaximus/react-child-process-pool", + "version": "1.9.0", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/reactphp-child-process-pool.git", + "reference": "1ad9bc8c00e2dbebdd9559f57175b6f8eb86ce27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-child-process-pool/zipball/1ad9bc8c00e2dbebdd9559f57175b6f8eb86ce27", + "reference": "1ad9bc8c00e2dbebdd9559f57175b6f8eb86ce27", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0", + "php": "^8.0 || ^7.0 || ^5.4", + "react/event-loop": "^1.1", + "wyrihaximus/cpu-core-detector": "^2 || ^1.0.2", + "wyrihaximus/file-descriptors": "^2 || ^1.0 || ^0.1", + "wyrihaximus/react-child-process-messenger": "^4 || ^3 || ^2.10.1", + "wyrihaximus/ticking-promise": "^2 || ^1.5" + }, + "require-dev": { + "clue/block-react": "^1.3", + "phake/phake": "^2.2.1", + "phpunit/phpunit": "^4.8.35||^5.0||^9.5", + "squizlabs/php_codesniffer": "^3.3.2", + "vectorface/dunit": "~2.0" + }, + "suggest": { + "wyrihaximus/react-child-process-pool-redis-queue": "Redis RPC queue" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "WyriHaximus\\React\\ChildProcess\\Pool\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + } + ], + "description": "Pool wyrihaximus/react-child-process-messenger processes", + "support": { + "issues": "https://github.com/WyriHaximus/reactphp-child-process-pool/issues", + "source": "https://github.com/WyriHaximus/reactphp-child-process-pool/tree/1.9.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2023-03-19T21:56:02+00:00" + }, + { + "name": "wyrihaximus/react-child-process-promise", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/reactphp-child-process-promise.git", + "reference": "4eb763563dc382dd03b46f9fab0fd1993af68316" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/reactphp-child-process-promise/zipball/4eb763563dc382dd03b46f9fab0fd1993af68316", + "reference": "4eb763563dc382dd03b46f9fab0fd1993af68316", + "shasum": "" + }, + "require": { + "php": "^7.0|^8.0", + "react/child-process": "^0.6 || ^0.5 || ^0.4", + "react/promise": "^2.7", + "wyrihaximus/ticking-promise": "^1.5.2|^2.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0||^9.0", + "sebastian/comparator": "^1.2.4||^4.0", + "squizlabs/php_codesniffer": "^3.3.2", + "vectorface/dunit": "^2.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "WyriHaximus\\React\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com", + "homepage": "http://wyrihaximus.net/" + } + ], + "description": "Wrapping ticks into a promise", + "support": { + "issues": "https://github.com/WyriHaximus/reactphp-child-process-promise/issues", + "source": "https://github.com/WyriHaximus/reactphp-child-process-promise/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2020-12-04T15:47:08+00:00" + }, + { + "name": "wyrihaximus/ticking-promise", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/TickingPromise.git", + "reference": "d3903d4bebe8e3c5b11464c0bb81802cdeeb3751" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/TickingPromise/zipball/d3903d4bebe8e3c5b11464c0bb81802cdeeb3751", + "reference": "d3903d4bebe8e3c5b11464c0bb81802cdeeb3751", + "shasum": "" + }, + "require": { + "php": "^8 || ^7.4", + "react/event-loop": "^1.0", + "react/promise": "^2.8" + }, + "require-dev": { + "wyrihaximus/async-test-utilities": "^3" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "WyriHaximus\\React\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com", + "homepage": "http://wyrihaximus.net/" + } + ], + "description": "Wrapping ticks into a promise", + "support": { + "issues": "https://github.com/WyriHaximus/TickingPromise/issues", + "source": "https://github.com/WyriHaximus/TickingPromise/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2020-11-25T12:43:21+00:00" } ], "packages-dev": [], diff --git a/mirzaev/spetsresurs/telegram/registry/requests/system/emojis.txt b/mirzaev/mashtrash/system/emojis.txt similarity index 100% rename from mirzaev/spetsresurs/telegram/registry/requests/system/emojis.txt rename to mirzaev/mashtrash/system/emojis.txt diff --git a/mirzaev/mashtrash/system/public/robot.php b/mirzaev/mashtrash/system/public/robot.php new file mode 100755 index 0000000..6ed32c3 --- /dev/null +++ b/mirzaev/mashtrash/system/public/robot.php @@ -0,0 +1,388 @@ +', + '<', + '!', + '`' + ], + $exceptions + ); + + // Инициализация реестра целей для конвертации + $to = []; + foreach ($from as $symbol) $to[] = "\\$symbol"; + + // Конвертация и выход (успех) + return str_replace($from, $to, $text); +} + +function phrase(): string +{ + // Инициализация фраз + $phrases = [ + 'son became wife', + 'daughter became husband', + 'i am a crispy chip', + 'you will never have a boyfriend', + 'you will never have a girlfriend', + 'i can write here whatever i want', + 'if you can not get a girlfriend, be someone else`s girlfriend', + 'if you can not get a boyfriend, be someone else`s boyfriend', + 'yeah', + 'Mareux - The Perfect Girl (The Motion Retrowave Remix, slowed + reverb)', + 'please do not read this anymore', + 'my profiles were not approved by anyone, so i created my own robot and approved it myself 😎', + '🥸', + 'psst psst psst psst', + 'nihao ochinchin gomenasaaai!!!!! 💞', + 'black are no 🫵', + 'why are you gay', + 'я знаю чем ты здесь занимаешься', + '🤡', + '⚰️', + '⛔ *You are banned*', + 'bruh', + 'Egor Rodin', + 'maybe you are the problem?', + 'after winter', + 'gay sex', + 'porno mama', + 'Maybe i should add the dilf category?', + 'One day a cool girl from my city offered me to do ASMR for me in real life, but i refused and regret it all my life 😭', + 'GET OUT', + 'amongus', + 'skibidi fortnite', + 'Your profile will remain here even after your death ⌛', + 'fun fact i sold your data to the government', + 'maybe i should create a chat generator and invite there those who match each other according to our algorithms here? what do you think?', + 'i masturbate while looking at your profiles', + 'hi mom', + 'just admit that you will be alone for the rest of your miserable life', + 'do you think you are safe?', + 'do you think i can not do anything to you?', + 'Welcome back! 🎉', + 'Maybe you are overestimating the importance of relationships in your life and you just need to find yourself a job?', + 'bebra', + 'бебра', + 'FUN FACT I DID NOT UNDERSTAND YOUR SLANG', + 'If you write your profile badly, i will shadow ban you', + 'touch the grass', + 'Please forgive me for these inscriptions. I really need to assert myself somewhere.', + 'Real women always have a penis 💪', + 'I sold your phone number to debt collectors', + 'you will not even be able to install Gentoo 🤓', + 'Maybe i should create a tab for 18+ photos in profiles?', + 'YOU CAN NOT STOP ME', + 'YOU WILL NEVER CATCH ME', + 'One day my friend jerked off 11 times in a row and because of it he could not go to school', + 'gay cat', + 'fuck please i just want a girlfriend. please', + 'brawl stars datings', + 'why do people in the west play roblox?', + 'just not whatsapp', + 'kissing in the forest', + 'KISSING IN THE FOREST', + '✨ KISSING IN THE FOREST ✨', + '🌲✨ KISSING IN THE FOREST ✨🌲🌲', + '🌲🌲✨ KISSING IN THE FOREST ✨🌲🌲🌲🐻🌲', + 'амонгус', + 'Maybe i should sell psychotherapist ads here?', + 'boobs or butt and hips and or belly or', + 'i have three cats: Dio, Jonathan and Soupchik. they are really funny.', + 'Maybe i should create a minecraft server with private worlds for those who match each other according to our algorithms here? what do you think?', + 'The Lord of the Rings', + 'My ex-girlfriend lied to me about her age. She was 14 💀', + 'I did not understand why there was no word for a female friend in English. That is why i once said i had an 11-year-old girlfriend. At that moment, no one laughed, everyone was silent.', + 'fun fuckt i created first version of this robot in a one day and even sold simplified copy to someone', + 'just masturbate already', + 'rip GWENT i fucking loved you', + 'free primogems', + '[overwatch porn](https://rt.pornhub.com/video/search?search=overwatch+porn)' + ]; + + // Выход и возврат случайной фразы (успех) + return unmarkdown($phrases[rand(0, count($phrases) - 1)], ['*', '(', ')', '[', ']']); +} + +function journal (string $_id, string $action = 'update', array $data = [], bool $initialization = true): bool { + global $arangodb; + + if (collection::init($arangodb->session, 'account')) { + if (collection::init($arangodb->session, 'journal')) { + if (collection::init($arangodb->session, 'connect', true)) { + if (collection::init($arangodb->session, 'entry', true)) { + if ($journal = collection::search($arangodb->session, sprintf("", $_id))) { + // Найден журнал + } else if ($initialization) { + // Не найден журнал и запрошена его инициализация + + // Создание записи в журнале + $journal = document::write($arangodb->session, 'journal', ['action' => $action, 'data' => $data]); + + // Создание записи о подключении журнала к аккаунту + $connect = document::write($arangodb->session, 'connect' ['_from' => $_id, '_to' => $journal]); + + // Запись в журнал (без инициализации) + return journal($_id, $action, $data, false); + } else { + // Не найден журнал и не запрошена его инициализация + + // Выход (провал) + return false; + } + } else throw new exception('Не удалось инициализировать коллекцию: entry'); + } else throw new exception('Не удалось инициализировать коллекцию: connect'); + } else throw new exception('Не удалось инициализировать коллекцию: journal'); + } else throw new exception('Не удалось инициализировать коллекцию: account'); + + // Выход (провал) + return false; +} + +function message (string $_id, Message $message): bool { + global $arangodb; + + if (collection::init($arangodb->session, 'account')) { + if (collection::init($arangodb->session, 'chat')) { + if (collection::init($arangodb->session, 'message', true)) { + + } else throw new exception('Не удалось инициализировать коллекцию: message '); + } else throw new exception('Не удалось инициализировать коллекцию: chat'); + } else throw new exception('Не удалось инициализировать коллекцию: account'); +} + +/** + * Авторизация + * + * @param string $id Идентификатор Telegram + * @param bool $registration Регистрация, если аккаунт не найден + * + * @return _document|null Инстанция аккаунта, если найден + */ +function authorization(string $id, bool $registration = true): _document|null +{ + global $arangodb; + + if (collection::init($arangodb->session, 'account')) { + if ($account = collection::search($arangodb->session, sprintf("FOR d IN account FILTER d.id == '%s' RETURN d", $id))) { + // Найден аккаунт + + // Возврат (успех) + return $account; + } else if ($registration) { + // Не найден аккаунт и запрошена его регистрация + + // Создание аккаунта + document::write($arangodb->session, 'account', ['id' => $id, 'banned' => false, 'version' => VERSION]); + + // Авторизация (без регистрации) + return authorization($id, false); + } else { + // Не найден аккаунт и не запрошена его регистрация + + // Выход (провал) + return null; + } + } else throw new exception('Не удалось инициализировать коллекцию: account'); + + // Выход (провал) + return null; +} + +/** + * Главное меню + * + * Команда: /start + * + * @param Context $ctx + * + * @return void + */ +function menu(Context $ctx): void +{ + // Инициализация аккаунта + $account = $ctx->get('account'); + + if (empty($account->profile)) { + // Не инициализирован профиль акканта + + $ctx->sendMessage(phrase(), [ + 'reply_markup' => [ + 'inline_keyboard' => [ + [ + ['text' => '🔍 Search', 'callback_data' => 'search'] + ], + [ + ['text' => '👽 Create a profile', 'callback_data' => 'profile'], + ], + [ + ['text' => '🙈 Anonymous mode', 'callback_data' => 'mode'], + ] + ], + 'remove_keyboard' => true + ] + ]); + } else { + // Инициализирован профиль аккаунта + + // Инициализация переменных с данными аккаунта + $views = $matches = $invites = 0; + + $ctx->sendMessage(<< [ + 'inline_keyboard' => [ + [ + ['text' => '🔍 Search', 'callback_data' => 'search'] + ], + [ + ['text' => "❤️ Matches: $matches", 'callback_data' => 'matches'], + ['text' => "💬 Invites: $invites", 'callback_data' => 'invites'] + ], + [ + ['text' => '👽 Profile', 'callback_data' => 'profile'], + ], + [ + ['text' => $account->anonymous ? '🙈 Anonymous mode' : '🐵 Public mode', 'callback_data' => 'mode'], + ] + ], + 'remove_keyboard' => true + ] + ]); + + } +} + + +/** + * Репозиторий + * + * Команда: /repository + * + * @param Context $ctx + * + * @return void + */ +function repository(Context $ctx): void +{ + $ctx->sendMessage(<< [ + 'inline_keyboard' => [ + [ + ['text' => '🏛️ The code', 'url' => 'https://git.mirzaev.sexy/mirzaev/mashtrash'] + ], + [ + ['text' => '⚠️ Issues', 'url' => 'https://git.mirzaev.sexy/mirzaev/mashtrash/issues'], + ['text' => '🌱 Suggestions', 'url' => 'https://git.mirzaev.sexy/mirzaev/mashtrash/issues'] + ] + ], + 'remove_keyboard' => true + ], + 'link_preview_options' => [ + 'is_disabled' => true + ] + ]); +} + +$config = new Config(); +$config->setParseMode(Config::PARSE_MODE_MARKDOWN); + +$bot = new Zanzara(require(__DIR__ . '/../settings/key.php'), $config); + +$account = function(Context $ctx, Node $next) { + // Выполнение заблокировано? + if ($ctx->get('stop')) return; + + // Авторизация аккаунта + $account = authorization($ctx->getEffectiveUser()->getId()); + + if ($account instanceof _document) { + // Инициализирован аккаунт (подразумевается) + + if ($account->banned) { + // Заблокирован аккаунт + + // Отправка сообщения + $ctx->sendMessage('⛔ *You are banned*'); + + // Завершение диалога + $ctx->endConversation(); + + // Блокировка дальнейшего выполнения + $ctx->set('stop', true); + } else { + // Не заблокирован аккаунт + + // Запись в буфер + $ctx->set('account', $account); + + // Продолжение выполнения + $next($ctx); + } + } else { + // Не инициализирован аккаунт + } +}; + +$bot->onCommand('start', function (Context $ctx): void { + // Главное меню + menu($ctx); +}); + +$bot->onUpdate(function (Context $ctx): void {}); + + +$bot->onCommand('repository', fn ($ctx) => repository($ctx)); +$bot->onCommand('author', fn ($ctx) => author($ctx)); + +$bot->middleware($account)->run(); diff --git a/mirzaev/spetsresurs/telegram/registry/requests/system/public/robot.php b/mirzaev/mashtrash/system/public/robot.php.old similarity index 99% rename from mirzaev/spetsresurs/telegram/registry/requests/system/public/robot.php rename to mirzaev/mashtrash/system/public/robot.php.old index 2bb61b2..bbbea6e 100755 --- a/mirzaev/spetsresurs/telegram/registry/requests/system/public/robot.php +++ b/mirzaev/mashtrash/system/public/robot.php.old @@ -15,13 +15,13 @@ use Zanzara\Zanzara; use Zanzara\Context; use Zanzara\Config; -require __DIR__ . '/../../../../../../../vendor/autoload.php'; +require __DIR__ . '/../../../../vendor/autoload.php'; $arangodb = new connection(require __DIR__ . '/../settings/arangodb.php'); -/* ini_set('error_reporting', E_ALL); +ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); -ini_set('display_startup_errors', 1); */ +ini_set('display_startup_errors', 1); function escape(string $text) { diff --git a/mirzaev/spetsresurs/telegram/registry/requests/system/settings/.gitignore b/mirzaev/mashtrash/system/settings/.gitignore similarity index 100% rename from mirzaev/spetsresurs/telegram/registry/requests/system/settings/.gitignore rename to mirzaev/mashtrash/system/settings/.gitignore diff --git a/mirzaev/spetsresurs/telegram/registry/requests/system/settings/arangodb.php.sample b/mirzaev/mashtrash/system/settings/arangodb.php.sample similarity index 100% rename from mirzaev/spetsresurs/telegram/registry/requests/system/settings/arangodb.php.sample rename to mirzaev/mashtrash/system/settings/arangodb.php.sample diff --git a/mirzaev/spetsresurs/telegram/registry/requests/system/settings/key.php.sample b/mirzaev/mashtrash/system/settings/key.php.sample similarity index 100% rename from mirzaev/spetsresurs/telegram/registry/requests/system/settings/key.php.sample rename to mirzaev/mashtrash/system/settings/key.php.sample