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
|
@@ -7,8 +7,6 @@ use WP_CLI\ExitException;
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Fetch a WordPress entity for use in a subcommand.
|
|
10
|
-
*
|
|
11
|
-
* @template T
|
|
12
10
|
*/
|
|
13
11
|
abstract class Base {
|
|
14
12
|
|
|
@@ -21,7 +19,7 @@ abstract class Base {
|
|
|
21
19
|
|
|
22
20
|
/**
|
|
23
21
|
* @param string|int $arg The raw CLI argument.
|
|
24
|
-
* @return
|
|
22
|
+
* @return mixed|false The item if found; false otherwise.
|
|
25
23
|
*/
|
|
26
24
|
abstract public function get( $arg );
|
|
27
25
|
|
|
@@ -29,10 +27,8 @@ abstract class Base {
|
|
|
29
27
|
* Like get(), but calls WP_CLI::error() instead of returning false.
|
|
30
28
|
*
|
|
31
29
|
* @param string $arg The raw CLI argument.
|
|
32
|
-
* @return
|
|
30
|
+
* @return mixed The item if found.
|
|
33
31
|
* @throws ExitException If the item is not found.
|
|
34
|
-
*
|
|
35
|
-
* @phpstan-assert-if-true !false $this->get()
|
|
36
32
|
*/
|
|
37
33
|
public function get_check( $arg ) {
|
|
38
34
|
$item = $this->get( $arg );
|
|
@@ -48,7 +44,7 @@ abstract class Base {
|
|
|
48
44
|
* Get multiple items.
|
|
49
45
|
*
|
|
50
46
|
* @param array $args The raw CLI arguments.
|
|
51
|
-
* @return
|
|
47
|
+
* @return array The list of found items.
|
|
52
48
|
*/
|
|
53
49
|
public function get_many( $args ) {
|
|
54
50
|
$items = [];
|
package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Comment.php
CHANGED
|
@@ -6,8 +6,6 @@ use WP_Comment;
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Fetch a WordPress comment based on one of its attributes.
|
|
9
|
-
*
|
|
10
|
-
* @extends Base<\WP_Comment>
|
|
11
9
|
*/
|
|
12
10
|
class Comment extends Base {
|
|
13
11
|
|
|
@@ -21,8 +19,8 @@ class Comment extends Base {
|
|
|
21
19
|
/**
|
|
22
20
|
* Get a comment object by ID
|
|
23
21
|
*
|
|
24
|
-
* @param string
|
|
25
|
-
* @return WP_Comment|false The item if found; false otherwise.
|
|
22
|
+
* @param string $arg The raw CLI argument.
|
|
23
|
+
* @return WP_Comment|array|false The item if found; false otherwise.
|
|
26
24
|
*/
|
|
27
25
|
public function get( $arg ) {
|
|
28
26
|
$comment_id = (int) $arg;
|
|
@@ -6,8 +6,6 @@ use WP_Post;
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Fetch a WordPress post based on one of its attributes.
|
|
9
|
-
*
|
|
10
|
-
* @extends Base<\WP_Post>
|
|
11
9
|
*/
|
|
12
10
|
class Post extends Base {
|
|
13
11
|
|
|
@@ -21,14 +19,11 @@ class Post extends Base {
|
|
|
21
19
|
/**
|
|
22
20
|
* Get a post object by ID
|
|
23
21
|
*
|
|
24
|
-
* @param string
|
|
25
|
-
* @return WP_Post|false The item if found; false otherwise.
|
|
22
|
+
* @param string $arg The raw CLI argument.
|
|
23
|
+
* @return WP_Post|array|false The item if found; false otherwise.
|
|
26
24
|
*/
|
|
27
25
|
public function get( $arg ) {
|
|
28
|
-
|
|
29
|
-
* @var WP_Post|null $post
|
|
30
|
-
*/
|
|
31
|
-
$post = get_post( (int) $arg );
|
|
26
|
+
$post = get_post( $arg );
|
|
32
27
|
|
|
33
28
|
if ( null === $post ) {
|
|
34
29
|
return false;
|
package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Signup.php
CHANGED
|
@@ -4,8 +4,6 @@ namespace WP_CLI\Fetchers;
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Fetch a signup based on one of its attributes.
|
|
7
|
-
*
|
|
8
|
-
* @extends Base<object>
|
|
9
7
|
*/
|
|
10
8
|
class Signup extends Base {
|
|
11
9
|
|
|
@@ -29,7 +27,7 @@ class Signup extends Base {
|
|
|
29
27
|
/**
|
|
30
28
|
* Get a signup by one of its identifying attributes.
|
|
31
29
|
*
|
|
32
|
-
* @param
|
|
30
|
+
* @param string $arg The raw CLI argument.
|
|
33
31
|
* @return object|false The item if found; false otherwise.
|
|
34
32
|
*/
|
|
35
33
|
protected function get_signup( $arg ) {
|
|
@@ -4,10 +4,6 @@ namespace WP_CLI\Fetchers;
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Fetch a WordPress site based on one of its attributes.
|
|
7
|
-
*
|
|
8
|
-
* @phpstan-type SiteObject object{blog_id: int, site_id: int, domain: string, path: string, registered: string, last_updated: string, public: int, archived: int, mature: int, spam: int, deleted: int, lang_id: int}
|
|
9
|
-
*
|
|
10
|
-
* @extends Base<SiteObject>
|
|
11
7
|
*/
|
|
12
8
|
class Site extends Base {
|
|
13
9
|
|
|
@@ -21,13 +17,11 @@ class Site extends Base {
|
|
|
21
17
|
/**
|
|
22
18
|
* Get a site object by ID
|
|
23
19
|
*
|
|
24
|
-
* @param
|
|
20
|
+
* @param int $site_id
|
|
25
21
|
* @return object|false
|
|
26
|
-
*
|
|
27
|
-
* @phpstan-return SiteObject|false
|
|
28
22
|
*/
|
|
29
23
|
public function get( $site_id ) {
|
|
30
|
-
return $this->get_site(
|
|
24
|
+
return $this->get_site( $site_id );
|
|
31
25
|
}
|
|
32
26
|
|
|
33
27
|
/**
|
|
@@ -35,10 +29,8 @@ class Site extends Base {
|
|
|
35
29
|
*
|
|
36
30
|
* @global wpdb $wpdb WordPress database abstraction object.
|
|
37
31
|
*
|
|
38
|
-
* @param string
|
|
39
|
-
* @return
|
|
40
|
-
*
|
|
41
|
-
* @phpstan-return SiteObject|false
|
|
32
|
+
* @param string $arg The raw CLI argument.
|
|
33
|
+
* @return array|false The item if found; false otherwise.
|
|
42
34
|
*/
|
|
43
35
|
private function get_site( $arg ) {
|
|
44
36
|
global $wpdb;
|
|
@@ -7,8 +7,6 @@ use WP_User;
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Fetch a WordPress user based on one of its attributes.
|
|
10
|
-
*
|
|
11
|
-
* @extends Base<\WP_User>
|
|
12
10
|
*/
|
|
13
11
|
class User extends Base {
|
|
14
12
|
|
|
@@ -22,7 +20,7 @@ class User extends Base {
|
|
|
22
20
|
/**
|
|
23
21
|
* Get a user object by one of its identifying attributes.
|
|
24
22
|
*
|
|
25
|
-
* @param string
|
|
23
|
+
* @param string $arg The raw CLI argument.
|
|
26
24
|
* @return WP_User|false The item if found; false otherwise.
|
|
27
25
|
*/
|
|
28
26
|
public function get( $arg ) {
|
|
@@ -15,10 +15,7 @@ namespace WP_CLI;
|
|
|
15
15
|
|
|
16
16
|
use DateTime;
|
|
17
17
|
use Exception;
|
|
18
|
-
use
|
|
19
|
-
use RecursiveDirectoryIterator;
|
|
20
|
-
use RecursiveIteratorIterator;
|
|
21
|
-
use SplFileInfo;
|
|
18
|
+
use Symfony\Component\Finder\Finder;
|
|
22
19
|
use WP_CLI;
|
|
23
20
|
|
|
24
21
|
/**
|
|
@@ -54,7 +51,7 @@ class FileCache {
|
|
|
54
51
|
* @param string $whitelist List of characters that are allowed in path names (used in a regex character class)
|
|
55
52
|
*/
|
|
56
53
|
public function __construct( $cache_dir, $ttl, $max_size, $whitelist = 'a-z0-9._-' ) {
|
|
57
|
-
$this->root =
|
|
54
|
+
$this->root = Utils\trailingslashit( $cache_dir );
|
|
58
55
|
$this->ttl = (int) $ttl;
|
|
59
56
|
$this->max_size = (int) $max_size;
|
|
60
57
|
$this->whitelist = $whitelist;
|
|
@@ -88,9 +85,7 @@ class FileCache {
|
|
|
88
85
|
*
|
|
89
86
|
* @param string $key cache key
|
|
90
87
|
* @param int $ttl time to live
|
|
91
|
-
* @return
|
|
92
|
-
*
|
|
93
|
-
* @phpstan-assert-if-true string $this->read()
|
|
88
|
+
* @return bool|string filename or false
|
|
94
89
|
*/
|
|
95
90
|
public function has( $key, $ttl = null ) {
|
|
96
91
|
if ( ! $this->enabled ) {
|
|
@@ -112,12 +107,8 @@ class FileCache {
|
|
|
112
107
|
$ttl = (int) $ttl;
|
|
113
108
|
}
|
|
114
109
|
|
|
115
|
-
|
|
116
|
-
if (
|
|
117
|
-
$modified_time = 0;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
if ( $ttl > 0 && ( $modified_time + $ttl ) < time() ) {
|
|
110
|
+
//
|
|
111
|
+
if ( $ttl > 0 && ( filemtime( $filename ) + $ttl ) < time() ) {
|
|
121
112
|
if ( $this->ttl > 0 && $ttl >= $this->ttl ) {
|
|
122
113
|
unlink( $filename );
|
|
123
114
|
}
|
|
@@ -149,13 +140,13 @@ class FileCache {
|
|
|
149
140
|
*
|
|
150
141
|
* @param string $key cache key
|
|
151
142
|
* @param int $ttl time to live
|
|
152
|
-
* @return
|
|
143
|
+
* @return bool|string file contents or false
|
|
153
144
|
*/
|
|
154
145
|
public function read( $key, $ttl = null ) {
|
|
155
146
|
$filename = $this->has( $key, $ttl );
|
|
156
147
|
|
|
157
148
|
if ( $filename ) {
|
|
158
|
-
return
|
|
149
|
+
return file_get_contents( $filename );
|
|
159
150
|
}
|
|
160
151
|
|
|
161
152
|
return false;
|
|
@@ -238,13 +229,10 @@ class FileCache {
|
|
|
238
229
|
try {
|
|
239
230
|
$expire = new DateTime();
|
|
240
231
|
$expire->modify( '-' . $ttl . ' seconds' );
|
|
241
|
-
$expire_time = $expire->getTimestamp();
|
|
242
232
|
|
|
243
|
-
$
|
|
244
|
-
foreach ( $
|
|
245
|
-
|
|
246
|
-
unlink( $file->getRealPath() );
|
|
247
|
-
}
|
|
233
|
+
$finder = $this->get_finder()->date( 'until ' . $expire->format( 'Y-m-d H:i:s' ) );
|
|
234
|
+
foreach ( $finder as $file ) {
|
|
235
|
+
unlink( $file->getRealPath() );
|
|
248
236
|
}
|
|
249
237
|
} catch ( Exception $e ) {
|
|
250
238
|
WP_CLI::error( $e->getMessage() );
|
|
@@ -253,16 +241,7 @@ class FileCache {
|
|
|
253
241
|
|
|
254
242
|
// Unlink older files if max cache size is exceeded.
|
|
255
243
|
if ( $max_size > 0 ) {
|
|
256
|
-
$files = $this->
|
|
257
|
-
|
|
258
|
-
// Sort files by accessed time (newest first)
|
|
259
|
-
usort(
|
|
260
|
-
$files,
|
|
261
|
-
static function ( $a, $b ) {
|
|
262
|
-
return $b->getATime() <=> $a->getATime();
|
|
263
|
-
}
|
|
264
|
-
);
|
|
265
|
-
|
|
244
|
+
$files = array_reverse( iterator_to_array( $this->get_finder()->sortByAccessedTime()->getIterator() ) );
|
|
266
245
|
$total = 0;
|
|
267
246
|
|
|
268
247
|
foreach ( $files as $file ) {
|
|
@@ -287,9 +266,9 @@ class FileCache {
|
|
|
287
266
|
return false;
|
|
288
267
|
}
|
|
289
268
|
|
|
290
|
-
$
|
|
269
|
+
$finder = $this->get_finder();
|
|
291
270
|
|
|
292
|
-
foreach ( $
|
|
271
|
+
foreach ( $finder as $file ) {
|
|
293
272
|
unlink( $file->getRealPath() );
|
|
294
273
|
}
|
|
295
274
|
|
|
@@ -306,78 +285,28 @@ class FileCache {
|
|
|
306
285
|
return false;
|
|
307
286
|
}
|
|
308
287
|
|
|
309
|
-
|
|
288
|
+
/** @var Finder $finder */
|
|
289
|
+
$finder = $this->get_finder()->sortByName();
|
|
310
290
|
|
|
311
|
-
|
|
312
|
-
usort(
|
|
313
|
-
$cache_files,
|
|
314
|
-
static function ( $a, $b ) {
|
|
315
|
-
return strcmp( $a->getFilename(), $b->getFilename() );
|
|
316
|
-
}
|
|
317
|
-
);
|
|
318
|
-
|
|
319
|
-
$files_by_base = [];
|
|
320
|
-
|
|
321
|
-
// Group files by their base name (stripping version/timestamp).
|
|
322
|
-
foreach ( $cache_files as $file ) {
|
|
323
|
-
$basename = $file->getBasename();
|
|
324
|
-
$pieces = explode( '-', $file->getBasename( $file->getExtension() ) );
|
|
325
|
-
$last_piece = end( $pieces );
|
|
326
|
-
|
|
327
|
-
// Try to identify a version or timestamp suffix.
|
|
328
|
-
$basename_without_suffix = $basename;
|
|
329
|
-
$version_string = null;
|
|
330
|
-
|
|
331
|
-
// Check if last piece is purely numeric (original timestamp format).
|
|
332
|
-
if ( is_numeric( $last_piece ) ) {
|
|
333
|
-
$basename_without_suffix = str_replace( '-' . $last_piece, '', $basename );
|
|
334
|
-
$version_string = $last_piece; // Store as string for comparison.
|
|
335
|
-
} elseif ( preg_match( '/^(\d+(?:\.\d+)*)/', $last_piece, $matches ) ) {
|
|
336
|
-
// Handle version numbers like "8.6.1" in "jetpack-8.6.1.zip".
|
|
337
|
-
$basename_without_suffix = str_replace( '-' . $last_piece, '', $basename );
|
|
338
|
-
$version_string = $matches[0]; // Store the version string.
|
|
339
|
-
}
|
|
291
|
+
$files_to_delete = [];
|
|
340
292
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
293
|
+
foreach ( $finder as $file ) {
|
|
294
|
+
$pieces = explode( '-', $file->getBasename( $file->getExtension() ) );
|
|
295
|
+
$timestamp = end( $pieces );
|
|
345
296
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
'mtime' => $file->getMTime(),
|
|
349
|
-
'version' => $version_string,
|
|
350
|
-
];
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// For each group, keep only the newest file and delete the rest.
|
|
354
|
-
foreach ( $files_by_base as $files ) {
|
|
355
|
-
if ( count( $files ) <= 1 ) {
|
|
297
|
+
// No way to compare versions, do nothing.
|
|
298
|
+
if ( ! is_numeric( $timestamp ) ) {
|
|
356
299
|
continue;
|
|
357
300
|
}
|
|
358
301
|
|
|
359
|
-
|
|
360
|
-
usort(
|
|
361
|
-
$files,
|
|
362
|
-
static function ( $a, $b ) {
|
|
363
|
-
// If both have version strings, use version_compare().
|
|
364
|
-
if ( null !== $a['version'] && null !== $b['version'] ) {
|
|
365
|
-
$cmp = version_compare( $b['version'], $a['version'] );
|
|
366
|
-
if ( 0 !== $cmp ) {
|
|
367
|
-
return $cmp;
|
|
368
|
-
}
|
|
369
|
-
// If versions are equal, fall through to mtime comparison.
|
|
370
|
-
}
|
|
371
|
-
// Otherwise, compare by modification time.
|
|
372
|
-
return $b['mtime'] <=> $a['mtime'];
|
|
373
|
-
}
|
|
374
|
-
);
|
|
302
|
+
$basename_without_timestamp = str_replace( '-' . $timestamp, '', $file->getBasename() );
|
|
375
303
|
|
|
376
|
-
//
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
unlink( $files[ $i ]['path'] );
|
|
304
|
+
// There's a file with an older timestamp, delete it.
|
|
305
|
+
if ( isset( $files_to_delete[ $basename_without_timestamp ] ) ) {
|
|
306
|
+
unlink( $files_to_delete[ $basename_without_timestamp ] );
|
|
380
307
|
}
|
|
308
|
+
|
|
309
|
+
$files_to_delete[ $basename_without_timestamp ] = $file->getRealPath();
|
|
381
310
|
}
|
|
382
311
|
|
|
383
312
|
return true;
|
|
@@ -414,7 +343,7 @@ class FileCache {
|
|
|
414
343
|
* Prepare cache write
|
|
415
344
|
*
|
|
416
345
|
* @param string $key cache key
|
|
417
|
-
* @return
|
|
346
|
+
* @return bool|string The destination filename or false when cache disabled or directory creation fails.
|
|
418
347
|
*/
|
|
419
348
|
protected function prepare_write( $key ) {
|
|
420
349
|
if ( ! $this->enabled ) {
|
|
@@ -438,7 +367,7 @@ class FileCache {
|
|
|
438
367
|
*/
|
|
439
368
|
protected function validate_key( $key ) {
|
|
440
369
|
$url_parts = Utils\parse_url( $key, -1, false );
|
|
441
|
-
if (
|
|
370
|
+
if ( array_key_exists( 'path', $url_parts ) && ! empty( $url_parts['scheme'] ) ) { // is url
|
|
442
371
|
$parts = [ 'misc' ];
|
|
443
372
|
$parts[] = $url_parts['scheme'] .
|
|
444
373
|
( empty( $url_parts['host'] ) ? '' : '-' . $url_parts['host'] ) .
|
|
@@ -466,42 +395,11 @@ class FileCache {
|
|
|
466
395
|
}
|
|
467
396
|
|
|
468
397
|
/**
|
|
469
|
-
* Get
|
|
398
|
+
* Get a Finder that iterates in cache root only the files
|
|
470
399
|
*
|
|
471
|
-
* @return
|
|
400
|
+
* @return Finder
|
|
472
401
|
*/
|
|
473
|
-
protected function
|
|
474
|
-
$files
|
|
475
|
-
|
|
476
|
-
if ( ! is_dir( $this->root ) ) {
|
|
477
|
-
return $files;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
try {
|
|
481
|
-
// Match Symfony Finder behavior: do not follow symlinks.
|
|
482
|
-
// We explicitly do NOT include FilesystemIterator::FOLLOW_SYMLINKS flag.
|
|
483
|
-
// This prevents the iterator from traversing into symlinked directories.
|
|
484
|
-
// We also filter out symlink files themselves with !isLink() check.
|
|
485
|
-
$iterator = new RecursiveIteratorIterator(
|
|
486
|
-
new RecursiveDirectoryIterator(
|
|
487
|
-
$this->root,
|
|
488
|
-
FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS
|
|
489
|
-
),
|
|
490
|
-
RecursiveIteratorIterator::LEAVES_ONLY
|
|
491
|
-
);
|
|
492
|
-
|
|
493
|
-
foreach ( $iterator as $file ) {
|
|
494
|
-
if ( $file instanceof SplFileInfo && $file->isFile() && ! $file->isLink() ) {
|
|
495
|
-
$files[] = $file;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
} catch ( Exception $e ) {
|
|
499
|
-
// If directory iteration fails (e.g., permissions issue, directory deleted),
|
|
500
|
-
// return empty array. This matches the behavior of Symfony Finder which
|
|
501
|
-
// would also return an empty result for inaccessible directories.
|
|
502
|
-
return [];
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
return $files;
|
|
402
|
+
protected function get_finder() {
|
|
403
|
+
return Finder::create()->in( $this->root )->files();
|
|
506
404
|
}
|
|
507
405
|
}
|