wp-studio 1.7.8-beta2 → 1.7.8-beta3
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/README.md +33 -0
- package/assets/demo.gif +0 -0
- package/dist/cli/{_events-BRGCap7g.mjs → _events-C60cNJ1W.mjs} +1 -1
- package/dist/cli/{index-9Oz-0bqF.mjs → index-D9syEMMz.mjs} +4 -4
- package/dist/cli/{index-CT4S2538.mjs → index-Ru6CUP6w.mjs} +24 -12
- package/dist/cli/{login-D4E3GoXe.mjs → login-C3QlGVbr.mjs} +1 -1
- package/dist/cli/{logout-DE-RoshK.mjs → logout-B63eZwJZ.mjs} +1 -1
- package/dist/cli/main.mjs +2 -1
- package/dist/cli/{resume-DLoXmzNG.mjs → resume-DQT_MK6A.mjs} +1 -1
- package/dist/cli/{set-B0L-QiXT.mjs → set-C805heQS.mjs} +1 -1
- package/dist/cli/{set-B8YYUENH.mjs → set-CjTbueyB.mjs} +1 -1
- package/dist/cli/{status-DEOAA0yx.mjs → status-SnKm1rRP.mjs} +1 -1
- package/dist/cli/{wp-CobSX6C6.mjs → wp-D0HZdudM.mjs} +1 -1
- package/dist/cli/wp-files/sqlite-command/composer.json +4 -3
- package/dist/cli/wp-files/sqlite-command/composer.lock +132 -80
- package/dist/cli/wp-files/sqlite-command/vendor/autoload.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_classmap.php +58 -70
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_namespaces.php +1 -0
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_psr4.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_real.php +5 -5
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_static.php +78 -80
- package/dist/cli/wp-files/sqlite-command/vendor/composer/installed.json +104 -49
- package/dist/cli/wp-files/sqlite-command/vendor/composer/installed.php +29 -16
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/CHANGELOG.md +103 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/Comparator.php +62 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/DateComparator.php +50 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/NumberComparator.php +78 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Exception/AccessDeniedException.php +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Exception/DirectoryNotFoundException.php +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Finder.php +851 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Gitignore.php +91 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Glob.php +116 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/CustomFilterIterator.php +61 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +58 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php +48 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +110 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +51 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php +58 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FilenameFilterIterator.php +45 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/LazyIterator.php +32 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +107 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/PathFilterIterator.php +56 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +134 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +57 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/SortableIterator.php +115 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php +173 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/LICENSE +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/README.md +14 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/SplFileInfo.php +80 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/composer.json +31 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/.gitattributes +8 -0
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache → wp-cli}/mustache/LICENSE +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/README.md +76 -0
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache → wp-cli}/mustache/composer.json +6 -16
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/src/Mustache/Autoloader.php +88 -0
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/AbstractCache.php +7 -15
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/FilesystemCache.php +15 -20
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/NoopCache.php +4 -8
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache.php +7 -10
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Compiler.php +87 -144
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Context.php +19 -23
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Engine.php +134 -251
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/InvalidArgumentException.php +2 -6
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/LogicException.php +2 -6
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/RuntimeException.php +2 -6
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/SyntaxException.php +8 -7
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownFilterException.php +7 -7
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownHelperException.php +7 -7
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownTemplateException.php +7 -7
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception.php +5 -4
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/HelperCollection.php +17 -22
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/LambdaHelper.php +8 -28
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/ArrayLoader.php +9 -12
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/CascadingLoader.php +15 -18
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/FilesystemLoader.php +18 -24
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/InlineLoader.php +13 -19
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/MutableLoader.php +7 -4
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/ProductionFilesystemLoader.php +16 -23
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/StringLoader.php +4 -8
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader.php +7 -8
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger/AbstractLogger.php +26 -22
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger/StreamLogger.php +20 -25
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger.php +37 -13
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Parser.php +93 -100
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Source/FilesystemSource.php +7 -11
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Source.php +5 -4
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Template.php +32 -39
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Tokenizer.php +29 -33
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.actrc +3 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.gitattributes +6 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.mailmap +234 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/README.md +4 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/VERSION +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/CHANGELOG.md +0 -65
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/README.md +1 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/certificates/cacert.pem +372 -315
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/certificates/cacert.pem.sha256 +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/composer.json +5 -7
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Iri.php +18 -20
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Requests.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Response/Headers.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Transport/Curl.php +1 -5
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Transport/Fsockopen.php +0 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Utility/CaseInsensitiveDictionary.php +0 -12
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Utility/FilteredIterator.php +2 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/composer.json +13 -30
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/dependencies.yml +6 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/manifest.json +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Autoloader.php +2 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/AutoloaderStep.php +1 -10
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/CheckRoot.php +2 -20
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/DefineProtectedCommands.php +3 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/IncludeFrameworkAutoloader.php +4 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/IncludeRequestsAutoloader.php +3 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/InitializeContexts.php +0 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/InitializeLogger.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php +3 -6
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/{RegisterShutdownHandler.php → LoadDispatcher.php} +4 -6
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LoadRequiredCommand.php +5 -9
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LoadUtilityFunctions.php +0 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Completions.php +6 -149
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Configurator.php +49 -202
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php +21 -113
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Auto.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Cli.php +1 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Frontend.php +1 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php +26 -63
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php +9 -19
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php +19 -284
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php +5 -17
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Exception/NonExistentKeyException.php +3 -6
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Extractor.php +54 -30
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Base.php +3 -7
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Comment.php +2 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Post.php +3 -8
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Signup.php +1 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Site.php +4 -12
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/User.php +1 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/FileCache.php +33 -135
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Formatter.php +57 -221
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Inflector.php +4 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/CSV.php +1 -6
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Query.php +1 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Table.php +1 -7
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Transform.php +0 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Base.php +0 -15
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Quiet.php +3 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Regular.php +3 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/NoOp.php +0 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Process.php +7 -40
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/RequestsLibrary.php +1 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php +234 -795
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/SynopsisParser.php +26 -116
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/SynopsisValidator.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Traverser/RecursiveDataStructureTraverser.php +26 -69
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/UpgraderSkin.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/WpHttpCacheManager.php +5 -67
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/WpOrgApi.php +3 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/boot-fs.php +2 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/bootstrap.php +2 -5
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/class-wp-cli.php +62 -311
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Alias_Command.php +60 -292
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Cache_Command.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Command.php +31 -191
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/Help_Command.php +35 -177
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/config-spec.php +4 -28
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/utils-wp.php +47 -81
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/utils.php +200 -512
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/wp-cli.php +2 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/wp-settings-cli.php +465 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/templates/man-params.mustache +4 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/templates/man.mustache +0 -8
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ArgValidationTest.php +74 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/CommandFactoryTest.php +420 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ConfiguratorTest.php +87 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/DocParserTest.php +213 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ExtractorTest.php +293 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/FileCacheTest.php +207 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/HelpTest.php +119 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/InflectorTest.php +37 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/LoggingTest.php +124 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ProcessTest.php +30 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/SynopsisParserTest.php +194 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/UtilsTest.php +1092 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WPCLITest.php +16 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/Iterators/CSVTest.php +109 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/Traversers/RecursiveDataStructureTraverserTest.php +151 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/WpOrgApiTest.php +166 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WpVersionCompareTest.php +78 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/bootstrap.php +17 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-class-win.php +70 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-class.php +70 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-function-win.php +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-function.php +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/bar.ab2 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.ab1 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.ac1 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.efg2 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.ab1 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.ab2 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.efg1 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.efg2 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/mock-requests-transport.php +34 -0
- package/dist/cli/wp-files/sqlite-command/version +1 -1
- package/package.json +4 -3
- package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/.php-cs-fixer.php +0 -20
- package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/README.md +0 -94
- package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/src/RenderedString.php +0 -51
- package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/src/compat.php +0 -282
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.typos.toml +0 -14
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/AGENTS.md +0 -121
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/proxy.py +0 -5
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/start.sh +0 -19
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/stop.sh +0 -10
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Path.php +0 -260
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/ShutdownHandler.php +0 -329
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/schemas/wp-cli-config.json +0 -218
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/schemas/wp-cli.example.yml +0 -55
- /package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/{codecov.yml → tests/data/expand_globs/bar.ab1} +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* This file is part of the Symfony package.
|
|
5
|
+
*
|
|
6
|
+
* (c) Fabien Potencier <fabien@symfony.com>
|
|
7
|
+
*
|
|
8
|
+
* For the full copyright and license information, please view the LICENSE
|
|
9
|
+
* file that was distributed with this source code.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
namespace Symfony\Component\Finder\Iterator;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings).
|
|
16
|
+
*
|
|
17
|
+
* @author Fabien Potencier <fabien@symfony.com>
|
|
18
|
+
*
|
|
19
|
+
* @template-covariant TKey
|
|
20
|
+
* @template-covariant TValue
|
|
21
|
+
*
|
|
22
|
+
* @extends \FilterIterator<TKey, TValue>
|
|
23
|
+
*/
|
|
24
|
+
abstract class MultiplePcreFilterIterator extends \FilterIterator
|
|
25
|
+
{
|
|
26
|
+
protected array $matchRegexps = [];
|
|
27
|
+
protected array $noMatchRegexps = [];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @param \Iterator<TKey, TValue> $iterator The Iterator to filter
|
|
31
|
+
* @param string[] $matchPatterns An array of patterns that need to match
|
|
32
|
+
* @param string[] $noMatchPatterns An array of patterns that need to not match
|
|
33
|
+
*/
|
|
34
|
+
public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns)
|
|
35
|
+
{
|
|
36
|
+
foreach ($matchPatterns as $pattern) {
|
|
37
|
+
$this->matchRegexps[] = $this->toRegex($pattern);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
foreach ($noMatchPatterns as $pattern) {
|
|
41
|
+
$this->noMatchRegexps[] = $this->toRegex($pattern);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
parent::__construct($iterator);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Checks whether the string is accepted by the regex filters.
|
|
49
|
+
*
|
|
50
|
+
* If there is no regexps defined in the class, this method will accept the string.
|
|
51
|
+
* Such case can be handled by child classes before calling the method if they want to
|
|
52
|
+
* apply a different behavior.
|
|
53
|
+
*/
|
|
54
|
+
protected function isAccepted(string $string): bool
|
|
55
|
+
{
|
|
56
|
+
// should at least not match one rule to exclude
|
|
57
|
+
foreach ($this->noMatchRegexps as $regex) {
|
|
58
|
+
if (preg_match($regex, $string)) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// should at least match one rule
|
|
64
|
+
if ($this->matchRegexps) {
|
|
65
|
+
foreach ($this->matchRegexps as $regex) {
|
|
66
|
+
if (preg_match($regex, $string)) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// If there is no match rules, the file is accepted
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Checks whether the string is a regex.
|
|
80
|
+
*/
|
|
81
|
+
protected function isRegex(string $str): bool
|
|
82
|
+
{
|
|
83
|
+
$availableModifiers = 'imsxuADUn';
|
|
84
|
+
|
|
85
|
+
if (preg_match('/^(.{3,}?)['.$availableModifiers.']*$/', $str, $m)) {
|
|
86
|
+
$start = substr($m[1], 0, 1);
|
|
87
|
+
$end = substr($m[1], -1);
|
|
88
|
+
|
|
89
|
+
if ($start === $end) {
|
|
90
|
+
return !preg_match('/[*?[:alnum:] \\\\]/', $start);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) {
|
|
94
|
+
if ($start === $delimiters[0] && $end === $delimiters[1]) {
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Converts string into regexp.
|
|
105
|
+
*/
|
|
106
|
+
abstract protected function toRegex(string $str): string;
|
|
107
|
+
}
|
package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/PathFilterIterator.php
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* This file is part of the Symfony package.
|
|
5
|
+
*
|
|
6
|
+
* (c) Fabien Potencier <fabien@symfony.com>
|
|
7
|
+
*
|
|
8
|
+
* For the full copyright and license information, please view the LICENSE
|
|
9
|
+
* file that was distributed with this source code.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
namespace Symfony\Component\Finder\Iterator;
|
|
13
|
+
|
|
14
|
+
use Symfony\Component\Finder\SplFileInfo;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* PathFilterIterator filters files by path patterns (e.g. some/special/dir).
|
|
18
|
+
*
|
|
19
|
+
* @author Fabien Potencier <fabien@symfony.com>
|
|
20
|
+
* @author Włodzimierz Gajda <gajdaw@gajdaw.pl>
|
|
21
|
+
*
|
|
22
|
+
* @extends MultiplePcreFilterIterator<string, SplFileInfo>
|
|
23
|
+
*/
|
|
24
|
+
class PathFilterIterator extends MultiplePcreFilterIterator
|
|
25
|
+
{
|
|
26
|
+
/**
|
|
27
|
+
* Filters the iterator values.
|
|
28
|
+
*/
|
|
29
|
+
public function accept(): bool
|
|
30
|
+
{
|
|
31
|
+
$filename = $this->current()->getRelativePathname();
|
|
32
|
+
|
|
33
|
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
|
34
|
+
$filename = str_replace('\\', '/', $filename);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return $this->isAccepted($filename);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Converts strings to regexp.
|
|
42
|
+
*
|
|
43
|
+
* PCRE patterns are left unchanged.
|
|
44
|
+
*
|
|
45
|
+
* Default conversion:
|
|
46
|
+
* 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/'
|
|
47
|
+
*
|
|
48
|
+
* Use only / as directory separator (on Windows also).
|
|
49
|
+
*
|
|
50
|
+
* @param string $str Pattern: regexp or dirname
|
|
51
|
+
*/
|
|
52
|
+
protected function toRegex(string $str): string
|
|
53
|
+
{
|
|
54
|
+
return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* This file is part of the Symfony package.
|
|
5
|
+
*
|
|
6
|
+
* (c) Fabien Potencier <fabien@symfony.com>
|
|
7
|
+
*
|
|
8
|
+
* For the full copyright and license information, please view the LICENSE
|
|
9
|
+
* file that was distributed with this source code.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
namespace Symfony\Component\Finder\Iterator;
|
|
13
|
+
|
|
14
|
+
use Symfony\Component\Finder\Exception\AccessDeniedException;
|
|
15
|
+
use Symfony\Component\Finder\SplFileInfo;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Extends the \RecursiveDirectoryIterator to support relative paths.
|
|
19
|
+
*
|
|
20
|
+
* @author Victor Berchet <victor@suumit.com>
|
|
21
|
+
*
|
|
22
|
+
* @extends \RecursiveDirectoryIterator<string, SplFileInfo>
|
|
23
|
+
*/
|
|
24
|
+
class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
|
|
25
|
+
{
|
|
26
|
+
private bool $ignoreUnreadableDirs;
|
|
27
|
+
private bool $ignoreFirstRewind = true;
|
|
28
|
+
|
|
29
|
+
// these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations
|
|
30
|
+
private string $rootPath;
|
|
31
|
+
private string $subPath;
|
|
32
|
+
private string $directorySeparator = '/';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @throws \RuntimeException
|
|
36
|
+
*/
|
|
37
|
+
public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false)
|
|
38
|
+
{
|
|
39
|
+
if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
|
|
40
|
+
throw new \RuntimeException('This iterator only support returning current as fileinfo.');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
parent::__construct($path, $flags);
|
|
44
|
+
$this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
|
|
45
|
+
$this->rootPath = $path;
|
|
46
|
+
if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
|
|
47
|
+
$this->directorySeparator = \DIRECTORY_SEPARATOR;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Return an instance of SplFileInfo with support for relative paths.
|
|
53
|
+
*/
|
|
54
|
+
public function current(): SplFileInfo
|
|
55
|
+
{
|
|
56
|
+
// the logic here avoids redoing the same work in all iterations
|
|
57
|
+
|
|
58
|
+
if (!isset($this->subPath)) {
|
|
59
|
+
$this->subPath = $this->getSubPath();
|
|
60
|
+
}
|
|
61
|
+
$subPathname = $this->subPath;
|
|
62
|
+
if ('' !== $subPathname) {
|
|
63
|
+
$subPathname .= $this->directorySeparator;
|
|
64
|
+
}
|
|
65
|
+
$subPathname .= $this->getFilename();
|
|
66
|
+
$basePath = $this->rootPath;
|
|
67
|
+
|
|
68
|
+
if ('/' !== $basePath && !str_ends_with($basePath, $this->directorySeparator) && !str_ends_with($basePath, '/')) {
|
|
69
|
+
$basePath .= $this->directorySeparator;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public function hasChildren(bool $allowLinks = false): bool
|
|
76
|
+
{
|
|
77
|
+
$hasChildren = parent::hasChildren($allowLinks);
|
|
78
|
+
|
|
79
|
+
if (!$hasChildren || !$this->ignoreUnreadableDirs) {
|
|
80
|
+
return $hasChildren;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
parent::getChildren();
|
|
85
|
+
|
|
86
|
+
return true;
|
|
87
|
+
} catch (\UnexpectedValueException) {
|
|
88
|
+
// If directory is unreadable and finder is set to ignore it, skip children
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @throws AccessDeniedException
|
|
95
|
+
*/
|
|
96
|
+
public function getChildren(): \RecursiveDirectoryIterator
|
|
97
|
+
{
|
|
98
|
+
try {
|
|
99
|
+
$children = parent::getChildren();
|
|
100
|
+
|
|
101
|
+
if ($children instanceof self) {
|
|
102
|
+
// parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore
|
|
103
|
+
$children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs;
|
|
104
|
+
|
|
105
|
+
// performance optimization to avoid redoing the same work in all children
|
|
106
|
+
$children->rootPath = $this->rootPath;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return $children;
|
|
110
|
+
} catch (\UnexpectedValueException $e) {
|
|
111
|
+
throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
public function next(): void
|
|
116
|
+
{
|
|
117
|
+
$this->ignoreFirstRewind = false;
|
|
118
|
+
|
|
119
|
+
parent::next();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
public function rewind(): void
|
|
123
|
+
{
|
|
124
|
+
// some streams like FTP are not rewindable, ignore the first rewind after creation,
|
|
125
|
+
// as newly created DirectoryIterator does not need to be rewound
|
|
126
|
+
if ($this->ignoreFirstRewind) {
|
|
127
|
+
$this->ignoreFirstRewind = false;
|
|
128
|
+
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
parent::rewind();
|
|
133
|
+
}
|
|
134
|
+
}
|
package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* This file is part of the Symfony package.
|
|
5
|
+
*
|
|
6
|
+
* (c) Fabien Potencier <fabien@symfony.com>
|
|
7
|
+
*
|
|
8
|
+
* For the full copyright and license information, please view the LICENSE
|
|
9
|
+
* file that was distributed with this source code.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
namespace Symfony\Component\Finder\Iterator;
|
|
13
|
+
|
|
14
|
+
use Symfony\Component\Finder\Comparator\NumberComparator;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* SizeRangeFilterIterator filters out files that are not in the given size range.
|
|
18
|
+
*
|
|
19
|
+
* @author Fabien Potencier <fabien@symfony.com>
|
|
20
|
+
*
|
|
21
|
+
* @extends \FilterIterator<string, \SplFileInfo>
|
|
22
|
+
*/
|
|
23
|
+
class SizeRangeFilterIterator extends \FilterIterator
|
|
24
|
+
{
|
|
25
|
+
private array $comparators = [];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @param \Iterator<string, \SplFileInfo> $iterator
|
|
29
|
+
* @param NumberComparator[] $comparators
|
|
30
|
+
*/
|
|
31
|
+
public function __construct(\Iterator $iterator, array $comparators)
|
|
32
|
+
{
|
|
33
|
+
$this->comparators = $comparators;
|
|
34
|
+
|
|
35
|
+
parent::__construct($iterator);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Filters the iterator values.
|
|
40
|
+
*/
|
|
41
|
+
public function accept(): bool
|
|
42
|
+
{
|
|
43
|
+
$fileinfo = $this->current();
|
|
44
|
+
if (!$fileinfo->isFile()) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
$filesize = $fileinfo->getSize();
|
|
49
|
+
foreach ($this->comparators as $compare) {
|
|
50
|
+
if (!$compare->test($filesize)) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* This file is part of the Symfony package.
|
|
5
|
+
*
|
|
6
|
+
* (c) Fabien Potencier <fabien@symfony.com>
|
|
7
|
+
*
|
|
8
|
+
* For the full copyright and license information, please view the LICENSE
|
|
9
|
+
* file that was distributed with this source code.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
namespace Symfony\Component\Finder\Iterator;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* SortableIterator applies a sort on a given Iterator.
|
|
16
|
+
*
|
|
17
|
+
* @author Fabien Potencier <fabien@symfony.com>
|
|
18
|
+
*
|
|
19
|
+
* @implements \IteratorAggregate<string, \SplFileInfo>
|
|
20
|
+
*/
|
|
21
|
+
class SortableIterator implements \IteratorAggregate
|
|
22
|
+
{
|
|
23
|
+
public const SORT_BY_NONE = 0;
|
|
24
|
+
public const SORT_BY_NAME = 1;
|
|
25
|
+
public const SORT_BY_TYPE = 2;
|
|
26
|
+
public const SORT_BY_ACCESSED_TIME = 3;
|
|
27
|
+
public const SORT_BY_CHANGED_TIME = 4;
|
|
28
|
+
public const SORT_BY_MODIFIED_TIME = 5;
|
|
29
|
+
public const SORT_BY_NAME_NATURAL = 6;
|
|
30
|
+
public const SORT_BY_NAME_CASE_INSENSITIVE = 7;
|
|
31
|
+
public const SORT_BY_NAME_NATURAL_CASE_INSENSITIVE = 8;
|
|
32
|
+
public const SORT_BY_EXTENSION = 9;
|
|
33
|
+
public const SORT_BY_SIZE = 10;
|
|
34
|
+
|
|
35
|
+
/** @var \Traversable<string, \SplFileInfo> */
|
|
36
|
+
private \Traversable $iterator;
|
|
37
|
+
private \Closure|int $sort;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param \Traversable<string, \SplFileInfo> $iterator
|
|
41
|
+
* @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
|
|
42
|
+
*
|
|
43
|
+
* @throws \InvalidArgumentException
|
|
44
|
+
*/
|
|
45
|
+
public function __construct(\Traversable $iterator, int|callable $sort, bool $reverseOrder = false)
|
|
46
|
+
{
|
|
47
|
+
$this->iterator = $iterator;
|
|
48
|
+
$order = $reverseOrder ? -1 : 1;
|
|
49
|
+
|
|
50
|
+
if (self::SORT_BY_NAME === $sort) {
|
|
51
|
+
$this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
|
|
52
|
+
} elseif (self::SORT_BY_NAME_NATURAL === $sort) {
|
|
53
|
+
$this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
|
|
54
|
+
} elseif (self::SORT_BY_NAME_CASE_INSENSITIVE === $sort) {
|
|
55
|
+
$this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
|
|
56
|
+
} elseif (self::SORT_BY_NAME_NATURAL_CASE_INSENSITIVE === $sort) {
|
|
57
|
+
$this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcasecmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
|
|
58
|
+
} elseif (self::SORT_BY_TYPE === $sort) {
|
|
59
|
+
$this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
|
|
60
|
+
if ($a->isDir() && $b->isFile()) {
|
|
61
|
+
return -$order;
|
|
62
|
+
} elseif ($a->isFile() && $b->isDir()) {
|
|
63
|
+
return $order;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
|
|
67
|
+
};
|
|
68
|
+
} elseif (self::SORT_BY_ACCESSED_TIME === $sort) {
|
|
69
|
+
$this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getATime() - $b->getATime());
|
|
70
|
+
} elseif (self::SORT_BY_CHANGED_TIME === $sort) {
|
|
71
|
+
$this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getCTime() - $b->getCTime());
|
|
72
|
+
} elseif (self::SORT_BY_MODIFIED_TIME === $sort) {
|
|
73
|
+
$this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getMTime() - $b->getMTime());
|
|
74
|
+
} elseif (self::SORT_BY_EXTENSION === $sort) {
|
|
75
|
+
$this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strnatcmp($a->getExtension(), $b->getExtension());
|
|
76
|
+
} elseif (self::SORT_BY_SIZE === $sort) {
|
|
77
|
+
$this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * ($a->getSize() - $b->getSize());
|
|
78
|
+
} elseif (self::SORT_BY_NONE === $sort) {
|
|
79
|
+
$this->sort = $order;
|
|
80
|
+
} elseif (\is_callable($sort)) {
|
|
81
|
+
$this->sort = $reverseOrder ? static fn (\SplFileInfo $a, \SplFileInfo $b) => -$sort($a, $b) : $sort(...);
|
|
82
|
+
} else {
|
|
83
|
+
throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public function getIterator(): \Traversable
|
|
88
|
+
{
|
|
89
|
+
if (1 === $this->sort) {
|
|
90
|
+
yield from $this->iterator;
|
|
91
|
+
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
$keys = $values = [];
|
|
96
|
+
foreach ($this->iterator as $key => $value) {
|
|
97
|
+
$keys[] = $key;
|
|
98
|
+
$values[] = $value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (-1 === $this->sort) {
|
|
102
|
+
for ($i = \count($values) - 1; $i >= 0; --$i) {
|
|
103
|
+
yield $keys[$i] => $values[$i];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
uasort($values, $this->sort);
|
|
110
|
+
|
|
111
|
+
foreach ($values as $i => $v) {
|
|
112
|
+
yield $keys[$i] => $v;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* This file is part of the Symfony package.
|
|
5
|
+
*
|
|
6
|
+
* (c) Fabien Potencier <fabien@symfony.com>
|
|
7
|
+
*
|
|
8
|
+
* For the full copyright and license information, please view the LICENSE
|
|
9
|
+
* file that was distributed with this source code.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
namespace Symfony\Component\Finder\Iterator;
|
|
13
|
+
|
|
14
|
+
use Symfony\Component\Finder\Gitignore;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @extends \FilterIterator<string, \SplFileInfo>
|
|
18
|
+
*/
|
|
19
|
+
final class VcsIgnoredFilterIterator extends \FilterIterator
|
|
20
|
+
{
|
|
21
|
+
private string $baseDir;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @var array<string, array{0: string, 1: string}|null>
|
|
25
|
+
*/
|
|
26
|
+
private array $gitignoreFilesCache = [];
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @var array<string, bool>
|
|
30
|
+
*/
|
|
31
|
+
private array $ignoredPathsCache = [];
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @param \Iterator<string, \SplFileInfo> $iterator
|
|
35
|
+
*/
|
|
36
|
+
public function __construct(\Iterator $iterator, string $baseDir)
|
|
37
|
+
{
|
|
38
|
+
$this->baseDir = $this->normalizePath($baseDir);
|
|
39
|
+
|
|
40
|
+
foreach ([$this->baseDir, ...$this->parentDirectoriesUpwards($this->baseDir)] as $directory) {
|
|
41
|
+
if (@is_dir("{$directory}/.git")) {
|
|
42
|
+
$this->baseDir = $directory;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
parent::__construct($iterator);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public function accept(): bool
|
|
51
|
+
{
|
|
52
|
+
$file = $this->current();
|
|
53
|
+
|
|
54
|
+
$fileRealPath = $this->normalizePath($file->getRealPath());
|
|
55
|
+
|
|
56
|
+
return !$this->isIgnored($fileRealPath);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
private function isIgnored(string $fileRealPath): bool
|
|
60
|
+
{
|
|
61
|
+
if (is_dir($fileRealPath) && !str_ends_with($fileRealPath, '/')) {
|
|
62
|
+
$fileRealPath .= '/';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (isset($this->ignoredPathsCache[$fileRealPath])) {
|
|
66
|
+
return $this->ignoredPathsCache[$fileRealPath];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
$ignored = false;
|
|
70
|
+
|
|
71
|
+
foreach ($this->parentDirectoriesDownwards($fileRealPath) as $parentDirectory) {
|
|
72
|
+
if ($this->isIgnored($parentDirectory)) {
|
|
73
|
+
// rules in ignored directories are ignored, no need to check further.
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
$fileRelativePath = substr($fileRealPath, \strlen($parentDirectory) + 1);
|
|
78
|
+
|
|
79
|
+
if (null === $regexps = $this->readGitignoreFile("{$parentDirectory}/.gitignore")) {
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[$exclusionRegex, $inclusionRegex] = $regexps;
|
|
84
|
+
|
|
85
|
+
if (preg_match($exclusionRegex, $fileRelativePath)) {
|
|
86
|
+
$ignored = true;
|
|
87
|
+
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (preg_match($inclusionRegex, $fileRelativePath)) {
|
|
92
|
+
$ignored = false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return $this->ignoredPathsCache[$fileRealPath] = $ignored;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @return list<string>
|
|
101
|
+
*/
|
|
102
|
+
private function parentDirectoriesUpwards(string $from): array
|
|
103
|
+
{
|
|
104
|
+
$parentDirectories = [];
|
|
105
|
+
|
|
106
|
+
$parentDirectory = $from;
|
|
107
|
+
|
|
108
|
+
while (true) {
|
|
109
|
+
$newParentDirectory = \dirname($parentDirectory);
|
|
110
|
+
|
|
111
|
+
// dirname('/') = '/'
|
|
112
|
+
if ($newParentDirectory === $parentDirectory) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
$parentDirectories[] = $parentDirectory = $newParentDirectory;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return $parentDirectories;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
private function parentDirectoriesUpTo(string $from, string $upTo): array
|
|
123
|
+
{
|
|
124
|
+
return array_filter(
|
|
125
|
+
$this->parentDirectoriesUpwards($from),
|
|
126
|
+
static fn (string $directory): bool => str_starts_with($directory, $upTo)
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @return list<string>
|
|
132
|
+
*/
|
|
133
|
+
private function parentDirectoriesDownwards(string $fileRealPath): array
|
|
134
|
+
{
|
|
135
|
+
return array_reverse(
|
|
136
|
+
$this->parentDirectoriesUpTo($fileRealPath, $this->baseDir)
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @return array{0: string, 1: string}|null
|
|
142
|
+
*/
|
|
143
|
+
private function readGitignoreFile(string $path): ?array
|
|
144
|
+
{
|
|
145
|
+
if (\array_key_exists($path, $this->gitignoreFilesCache)) {
|
|
146
|
+
return $this->gitignoreFilesCache[$path];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (!file_exists($path)) {
|
|
150
|
+
return $this->gitignoreFilesCache[$path] = null;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (!is_file($path) || !is_readable($path)) {
|
|
154
|
+
throw new \RuntimeException("The \"ignoreVCSIgnored\" option cannot be used by the Finder as the \"{$path}\" file is not readable.");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
$gitignoreFileContent = file_get_contents($path);
|
|
158
|
+
|
|
159
|
+
return $this->gitignoreFilesCache[$path] = [
|
|
160
|
+
Gitignore::toRegex($gitignoreFileContent),
|
|
161
|
+
Gitignore::toRegexMatchingNegatedPatterns($gitignoreFileContent),
|
|
162
|
+
];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
private function normalizePath(string $path): string
|
|
166
|
+
{
|
|
167
|
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
|
168
|
+
return str_replace('\\', '/', $path);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return $path;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2004-present Fabien Potencier
|
|
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 furnished
|
|
8
|
+
to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
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,14 @@
|
|
|
1
|
+
Finder Component
|
|
2
|
+
================
|
|
3
|
+
|
|
4
|
+
The Finder component finds files and directories via an intuitive fluent
|
|
5
|
+
interface.
|
|
6
|
+
|
|
7
|
+
Resources
|
|
8
|
+
---------
|
|
9
|
+
|
|
10
|
+
* [Documentation](https://symfony.com/doc/current/components/finder.html)
|
|
11
|
+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
|
|
12
|
+
* [Report issues](https://github.com/symfony/symfony/issues) and
|
|
13
|
+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
|
|
14
|
+
in the [main Symfony repository](https://github.com/symfony/symfony)
|