wp-studio 1.7.8-beta2 → 1.7.8-beta4
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 +54 -1
- package/assets/demo.gif +0 -0
- package/dist/cli/{_events-BRGCap7g.mjs → _events-C2dFSpKE.mjs} +2 -2
- package/dist/cli/{certificate-manager-Dd4zv2_k.mjs → certificate-manager-BMngpL-s.mjs} +12 -4
- package/dist/cli/{index-9Oz-0bqF.mjs → index-CkFXAp-n.mjs} +5 -5
- package/dist/cli/{index-CT4S2538.mjs → index-odShRBgM.mjs} +171 -117
- package/dist/cli/{login-D4E3GoXe.mjs → login-BeT1uKwW.mjs} +2 -2
- package/dist/cli/{logout-DE-RoshK.mjs → logout-BFQJBJD0.mjs} +2 -2
- package/dist/cli/main.mjs +3 -2
- package/dist/cli/proxy-daemon.mjs +1 -1
- package/dist/cli/{resume-DLoXmzNG.mjs → resume-D_K0QEl5.mjs} +1 -1
- package/dist/cli/{set-B8YYUENH.mjs → set-C5l116L7.mjs} +2 -2
- package/dist/cli/{set-B0L-QiXT.mjs → set-DzcR6sFr.mjs} +2 -2
- package/dist/cli/{status-DEOAA0yx.mjs → status-CbXnAskz.mjs} +1 -1
- package/dist/cli/{wp-CobSX6C6.mjs → wp-CUKyZNTP.mjs} +1 -1
- package/dist/cli/wp-files/latest/available-site-translations.json +1 -1
- package/dist/cli/wp-files/latest/languages/admin-de_DE.l10n.php +2 -2
- package/dist/cli/wp-files/latest/languages/admin-network-de_DE.l10n.php +1 -1
- package/dist/cli/wp-files/latest/languages/admin-pl_PL.l10n.php +2 -2
- package/dist/cli/wp-files/latest/languages/de_DE-0cc31205f20441b3df1d1b46100f6b8d.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-0ce75ad2f775d1cac9696967d484808c.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-0eebe503220d4a00341eb011b92769b4.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-17179a5f2930647c89151e365f843b6e.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1780a2033cf98d69ce13c2e5c8510004.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1a0cd6a7128913b15c1a10dd68951869.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1bba9045bb07c89671c88a3f328548e8.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1c4303f02ff93b290e9faad991eeb06f.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1d17475f620f63a92e2c5d2681c51ee8.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-2617ce121227a46077ede6c69aa9fcb5.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-270d72d1cff17227d37f3244759cbecb.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-28b3c3d595952907e08d98287077426c.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-2b390f85a3048c5b4255fb45960b6514.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-2c5d274ea625dd91556554ad82901529.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-320f4ad9792aaa6dedb1e71cbdf85d57.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-440127dd25bde48a531ded36f33e927b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-49c6d4acf36cf3aca9f0b2a77617304f.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-4a38fe1c0c45989e44682ba6109d9f46.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-4bfa11da57ff2600004bb500368247f4.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-50278328b502f4eb3f2b8b7ab49324a1.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-5251f7623766a714c8207c7edb938628.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-529362903a5a05b34b06b5e793fb4cf8.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-569e85ef168299eb8c8f24d8ef8c8a78.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-6025add6bde16aaeb12787d250f9b414.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-60d06fac6f98e8e8f0ec5a945738b660.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-68f2cec7514bf8563c723a4d675fcfe6.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7233008897033de5ee0d14f86a42a65a.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7289286ed59e90a8f36ae797df62220b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7436b7ee9e4f11ac0d618d8cc886eb66.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-77fdfadaf2e1ca3a027d1956b910bc50.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7b74c8457eaa7fcc50db41b431f8a003.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7c90cd4398ee2d9d3628c387a87a70e5.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7d5ca435e60d92f024d46c9257aaa0f7.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7f13c36c641b114bf18cd0bcc9ecc7e0.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-803bf1ce2131e13efc590c1bc47851fc.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-81c889563f09dd13de1701135dc62941.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-81d6f084cb273e02e15b01bd9ece87f7.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-8240df461220d1d3a028a9a4c5652a5b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-8860e58c20c6a2ab5876a0f07be43bd9.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-93882e8f9976382d7f724ac595ed7151.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-947c76bb5095da30e16668eec15406b2.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-9b256ea9cd54df92095e04c76758ceb0.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-9c3519f4870fac83dc0dbf18cb6bd4c4.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-9d47a87c240c1d10701cd6a02b28aa1b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-a25d1cc7bf7ca0b4e114f6bea64943f4.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-a2796e57f680e25d84c4b352ee6d7280.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-a9dc201dcd011fe71849743133052619.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-aabfce98c410957228848dc581e3c420.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-ac23eee47530ac63a1178c827db28087.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-bf0f094965d3d4a95b47babcb35fc136.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-bf23b24175490c2e46aaf92ff6a0c70f.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-c31d5f185753910c14afebc6deb2ce24.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-ca28138671823450e87dfd354f7afc6b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-daeb084aab42199d26393a56c3465bc0.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-e2791ba830489d23043be8650a22a22b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-e2e4c4b80f3adf2c70b431bfdb1b4872.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-e53526243551a102928735ec9eed4edf.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-f575f481034e90e21d832e415fd95fcf.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-f70806bf0c7d62f2908bd5a1c3fe4efc.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-f8f49d9fc4a9cf7d78ec99285417bd9c.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE.l10n.php +27 -27
- package/dist/cli/wp-files/latest/languages/pl_PL-0cc31205f20441b3df1d1b46100f6b8d.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-0eebe503220d4a00341eb011b92769b4.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-1c4303f02ff93b290e9faad991eeb06f.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-1d17475f620f63a92e2c5d2681c51ee8.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-2b390f85a3048c5b4255fb45960b6514.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-4a38fe1c0c45989e44682ba6109d9f46.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-4bfa11da57ff2600004bb500368247f4.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-50278328b502f4eb3f2b8b7ab49324a1.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-5251f7623766a714c8207c7edb938628.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-529362903a5a05b34b06b5e793fb4cf8.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-569e85ef168299eb8c8f24d8ef8c8a78.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-6025add6bde16aaeb12787d250f9b414.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-7436b7ee9e4f11ac0d618d8cc886eb66.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-77fdfadaf2e1ca3a027d1956b910bc50.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-7b74c8457eaa7fcc50db41b431f8a003.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-7d5ca435e60d92f024d46c9257aaa0f7.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-81d6f084cb273e02e15b01bd9ece87f7.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-8240df461220d1d3a028a9a4c5652a5b.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-9b256ea9cd54df92095e04c76758ceb0.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-9c3519f4870fac83dc0dbf18cb6bd4c4.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-9d47a87c240c1d10701cd6a02b28aa1b.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-a9dc201dcd011fe71849743133052619.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-aabfce98c410957228848dc581e3c420.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-ca28138671823450e87dfd354f7afc6b.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-e2e4c4b80f3adf2c70b431bfdb1b4872.json +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/patches/archiver+7.0.1.patch +14 -0
- 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
|
@@ -4,8 +4,7 @@ namespace WP_CLI\Context;
|
|
|
4
4
|
|
|
5
5
|
use WP_CLI;
|
|
6
6
|
use WP_CLI\Context;
|
|
7
|
-
use
|
|
8
|
-
use WP_User;
|
|
7
|
+
use WP_Session_Tokens;
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Context which simulates the administrator backend.
|
|
@@ -20,7 +19,6 @@ final class Admin implements Context {
|
|
|
20
19
|
*/
|
|
21
20
|
public function process( $config ) {
|
|
22
21
|
if ( defined( 'WP_ADMIN' ) ) {
|
|
23
|
-
// @phpstan-ignore phpstanWP.wpConstant.fetch
|
|
24
22
|
if ( ! WP_ADMIN ) {
|
|
25
23
|
WP_CLI::warning( 'Could not fake admin request.' );
|
|
26
24
|
}
|
|
@@ -36,104 +34,21 @@ final class Admin implements Context {
|
|
|
36
34
|
|
|
37
35
|
// Set a fake entry point to ensure wp-includes/vars.php does not throw
|
|
38
36
|
// notices/errors. This will be reflected in the global `$pagenow`
|
|
39
|
-
// variable
|
|
40
|
-
|
|
41
|
-
$_SERVER['PHP_SELF'] = '/wp-admin/' . $this->get_fake_admin_page();
|
|
37
|
+
// variable being set to 'wp-cli-fake-admin-file.php'.
|
|
38
|
+
$_SERVER['PHP_SELF'] = '/wp-admin/wp-cli-fake-admin-file.php';
|
|
42
39
|
|
|
43
40
|
// Bootstrap the WordPress administration area.
|
|
44
41
|
WP_CLI::add_wp_hook(
|
|
45
|
-
'
|
|
46
|
-
function () use ( $config ) {
|
|
47
|
-
if ( isset( $config['user'] ) ) {
|
|
48
|
-
$fetcher = new User();
|
|
49
|
-
$user = $fetcher->get_check( $config['user'] );
|
|
50
|
-
$admin_user_id = $user->ID;
|
|
51
|
-
} else {
|
|
52
|
-
$admin_user_id = $this->find_admin_user_id();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @var int<1, max> $admin_user_id
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
WP_CLI::debug( sprintf( 'Continuing as admin user %d', $admin_user_id ), Context::DEBUG_GROUP );
|
|
60
|
-
|
|
61
|
-
$this->log_in_as_admin_user( $admin_user_id );
|
|
62
|
-
},
|
|
63
|
-
defined( 'PHP_INT_MIN' ) ? PHP_INT_MIN : -2147483648, // phpcs:ignore PHPCompatibility.Constants.NewConstants.php_int_minFound
|
|
64
|
-
0
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
WP_CLI::add_wp_hook(
|
|
68
|
-
'wp_loaded',
|
|
42
|
+
'init',
|
|
69
43
|
function () {
|
|
44
|
+
$this->log_in_as_admin_user();
|
|
70
45
|
$this->load_admin_environment();
|
|
71
46
|
},
|
|
72
|
-
defined( '
|
|
47
|
+
defined( 'PHP_INT_MIN' ) ? PHP_INT_MIN : -2147483648, // phpcs:ignore PHPCompatibility.Constants.NewConstants.php_int_minFound
|
|
73
48
|
0
|
|
74
49
|
);
|
|
75
50
|
}
|
|
76
51
|
|
|
77
|
-
/**
|
|
78
|
-
* Find a suitable admin user ID for the current environment.
|
|
79
|
-
*
|
|
80
|
-
* On multisite, resolves a super admin via get_super_admins().
|
|
81
|
-
* On single site, finds a user with the administrator role.
|
|
82
|
-
*
|
|
83
|
-
* @return int<1, max> Admin user ID.
|
|
84
|
-
*/
|
|
85
|
-
private function find_admin_user_id() {
|
|
86
|
-
if ( is_multisite() ) {
|
|
87
|
-
$super_admins = get_super_admins();
|
|
88
|
-
|
|
89
|
-
foreach ( $super_admins as $super_admin_login ) {
|
|
90
|
-
$user = get_user_by( 'login', $super_admin_login );
|
|
91
|
-
if ( $user instanceof WP_User ) {
|
|
92
|
-
/** @var int<1, max> */
|
|
93
|
-
return $user->ID;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
WP_CLI::error( 'No super admin user found. Specify one with --user=<login>.' );
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
$admins = get_users(
|
|
101
|
-
[
|
|
102
|
-
'role' => 'administrator',
|
|
103
|
-
'number' => 1,
|
|
104
|
-
'orderby' => 'ID',
|
|
105
|
-
'order' => 'ASC',
|
|
106
|
-
]
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
if ( ! empty( $admins ) ) {
|
|
110
|
-
return $admins[0]->ID;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
WP_CLI::error( 'No administrator user found. Specify one with --user=<login>.' );
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Get a fake admin page filename that reflects the current command.
|
|
118
|
-
*
|
|
119
|
-
* Returns 'plugins.php' for `wp plugin` commands, 'themes.php' for
|
|
120
|
-
* `wp theme` commands, and 'wp-cli-fake-admin-file.php' otherwise.
|
|
121
|
-
*
|
|
122
|
-
* @return string Admin page filename.
|
|
123
|
-
*/
|
|
124
|
-
private function get_fake_admin_page(): string {
|
|
125
|
-
$command = WP_CLI::get_runner()->arguments;
|
|
126
|
-
|
|
127
|
-
$command_map = [
|
|
128
|
-
'plugin' => 'plugins.php',
|
|
129
|
-
'theme' => 'themes.php',
|
|
130
|
-
];
|
|
131
|
-
|
|
132
|
-
$command_name = $command[0] ?? '';
|
|
133
|
-
|
|
134
|
-
return $command_map[ $command_name ] ?? 'wp-cli-fake-admin-file.php';
|
|
135
|
-
}
|
|
136
|
-
|
|
137
52
|
/**
|
|
138
53
|
* Ensure the current request is done under a logged-in administrator
|
|
139
54
|
* account.
|
|
@@ -141,11 +56,12 @@ final class Admin implements Context {
|
|
|
141
56
|
* A lot of premium plugins/themes have their custom update routines locked
|
|
142
57
|
* behind an is_admin() call.
|
|
143
58
|
*
|
|
144
|
-
* @param int<1, max> $admin_user_id to log in as
|
|
145
|
-
*
|
|
146
59
|
* @return void
|
|
147
60
|
*/
|
|
148
|
-
private function log_in_as_admin_user(
|
|
61
|
+
private function log_in_as_admin_user() {
|
|
62
|
+
// TODO: Add logic to find an administrator user.
|
|
63
|
+
$admin_user_id = 1;
|
|
64
|
+
|
|
149
65
|
wp_set_current_user( $admin_user_id );
|
|
150
66
|
|
|
151
67
|
$expiration = time() + DAY_IN_SECONDS;
|
|
@@ -176,14 +92,11 @@ final class Admin implements Context {
|
|
|
176
92
|
* @global string $pagenow
|
|
177
93
|
* @global int $wp_db_version
|
|
178
94
|
* @global array $_wp_submenu_nopriv
|
|
179
|
-
*
|
|
180
|
-
* @
|
|
181
|
-
* @global array $menu
|
|
182
|
-
* @global array $submenu
|
|
183
|
-
* @global array $compat
|
|
95
|
+
*
|
|
96
|
+
* @return void
|
|
184
97
|
*/
|
|
185
|
-
private function load_admin_environment()
|
|
186
|
-
global $
|
|
98
|
+
private function load_admin_environment() {
|
|
99
|
+
global $hook_suffix, $pagenow, $wp_db_version, $_wp_submenu_nopriv;
|
|
187
100
|
|
|
188
101
|
if ( ! isset( $hook_suffix ) ) {
|
|
189
102
|
$hook_suffix = 'index'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
|
@@ -191,12 +104,7 @@ final class Admin implements Context {
|
|
|
191
104
|
|
|
192
105
|
// Make sure we don't trigger a DB upgrade as that tries to redirect
|
|
193
106
|
// the page.
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* @var string $wp_db_version
|
|
197
|
-
*/
|
|
198
|
-
$wp_db_version = get_option( 'db_version' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
|
199
|
-
$wp_db_version = (int) $wp_db_version; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
|
107
|
+
$wp_db_version = (int) get_option( 'db_version' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
|
200
108
|
|
|
201
109
|
// Ensure WP does not iterate over an undefined variable in
|
|
202
110
|
// `user_can_access_admin_page()`.
|
|
@@ -204,20 +112,20 @@ final class Admin implements Context {
|
|
|
204
112
|
$_wp_submenu_nopriv = []; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
|
205
113
|
}
|
|
206
114
|
|
|
207
|
-
$admin_php_file =
|
|
115
|
+
$admin_php_file = file_get_contents( ABSPATH . 'wp-admin/admin.php' );
|
|
208
116
|
|
|
209
117
|
// First we remove the opening and closing PHP tags.
|
|
210
|
-
$admin_php_file =
|
|
211
|
-
$admin_php_file =
|
|
118
|
+
$admin_php_file = preg_replace( '/^<\?php\s+/', '', $admin_php_file );
|
|
119
|
+
$admin_php_file = preg_replace( '/\s+\?>$/', '', $admin_php_file );
|
|
212
120
|
|
|
213
121
|
// Then we remove the loading of either wp-config.php or wp-load.php.
|
|
214
|
-
$admin_php_file =
|
|
122
|
+
$admin_php_file = preg_replace( '/^\s*(?:include|require).*[\'"]\/?wp-(?:load|config)\.php[\'"]\s*\)?;\s*$/m', '', $admin_php_file );
|
|
215
123
|
|
|
216
124
|
// We also remove the authentication redirect.
|
|
217
|
-
$admin_php_file =
|
|
125
|
+
$admin_php_file = preg_replace( '/^\s*auth_redirect\(\);$/m', '', $admin_php_file );
|
|
218
126
|
|
|
219
127
|
// Finally, we avoid sending headers.
|
|
220
|
-
$admin_php_file =
|
|
128
|
+
$admin_php_file = preg_replace( '/^\s*nocache_headers\(\);$/m', '', $admin_php_file );
|
|
221
129
|
$_GET['noheader'] = true;
|
|
222
130
|
|
|
223
131
|
eval( $admin_php_file ); // phpcs:ignore Squiz.PHP.Eval.Discouraged
|
|
@@ -69,7 +69,7 @@ final class Auto implements Context {
|
|
|
69
69
|
*
|
|
70
70
|
* @return bool Whether the current command should be run as admin.
|
|
71
71
|
*/
|
|
72
|
-
private function is_command_to_run_as_admin()
|
|
72
|
+
private function is_command_to_run_as_admin() {
|
|
73
73
|
$command = WP_CLI::get_runner()->arguments;
|
|
74
74
|
|
|
75
75
|
foreach ( self::COMMANDS_TO_RUN_AS_ADMIN as $command_to_run_as_admin ) {
|
|
@@ -23,9 +23,9 @@ class CommandFactory {
|
|
|
23
23
|
/**
|
|
24
24
|
* Create a new CompositeCommand (or Subcommand if class has __invoke())
|
|
25
25
|
*
|
|
26
|
-
* @param string
|
|
27
|
-
* @param string|callable-string|callable|array
|
|
28
|
-
* @param
|
|
26
|
+
* @param string $name Represents how the command should be invoked
|
|
27
|
+
* @param string|callable-string|callable|array $callable A subclass of WP_CLI_Command, a function, or a closure
|
|
28
|
+
* @param mixed $parent The new command's parent Composite (or Root) command
|
|
29
29
|
*/
|
|
30
30
|
public static function create( $name, $callable, $parent ) {
|
|
31
31
|
|
|
@@ -34,7 +34,6 @@ class CommandFactory {
|
|
|
34
34
|
$reflection = new ReflectionFunction( $callable );
|
|
35
35
|
$command = self::create_subcommand( $parent, $name, $callable, $reflection );
|
|
36
36
|
} elseif ( is_array( $callable ) && ( is_callable( $callable ) || Utils\is_valid_class_and_method_pair( $callable ) ) ) {
|
|
37
|
-
/** @var array{0:object|class-string,1:string} $callable */
|
|
38
37
|
$reflection = new ReflectionClass( $callable[0] );
|
|
39
38
|
$command = self::create_subcommand(
|
|
40
39
|
$parent,
|
|
@@ -43,9 +42,6 @@ class CommandFactory {
|
|
|
43
42
|
$reflection->getMethod( $callable[1] )
|
|
44
43
|
);
|
|
45
44
|
} else {
|
|
46
|
-
/**
|
|
47
|
-
* @var class-string $callable
|
|
48
|
-
*/
|
|
49
45
|
$reflection = new ReflectionClass( $callable );
|
|
50
46
|
if ( $reflection->isSubclassOf( '\WP_CLI\Dispatcher\CommandNamespace' ) ) {
|
|
51
47
|
$command = self::create_namespace( $parent, $name, $callable );
|
|
@@ -75,18 +71,15 @@ class CommandFactory {
|
|
|
75
71
|
/**
|
|
76
72
|
* Create a new Subcommand instance.
|
|
77
73
|
*
|
|
78
|
-
* @param mixed
|
|
79
|
-
* @param string|
|
|
80
|
-
*
|
|
81
|
-
* @param mixed
|
|
82
|
-
* @param
|
|
83
|
-
*
|
|
84
|
-
* @template T of object
|
|
85
|
-
* @phpstan-param ReflectionClass<T>|ReflectionMethod|ReflectionFunction $reflection
|
|
74
|
+
* @param mixed $parent The new command's parent Composite command
|
|
75
|
+
* @param string|bool $name Represents how the command should be invoked.
|
|
76
|
+
* If false, will be determined from the documented subject, represented by `$reflection`.
|
|
77
|
+
* @param mixed $callable A callable function or closure, or class name and method
|
|
78
|
+
* @param object $reflection Reflection instance, for doc parsing
|
|
86
79
|
*/
|
|
87
80
|
private static function create_subcommand( $parent, $name, $callable, $reflection ) {
|
|
88
81
|
$doc_comment = self::get_doc_comment( $reflection );
|
|
89
|
-
$docparser = new DocParser( $doc_comment
|
|
82
|
+
$docparser = new DocParser( $doc_comment );
|
|
90
83
|
|
|
91
84
|
if ( is_array( $callable ) ) {
|
|
92
85
|
if ( ! $name ) {
|
|
@@ -104,49 +97,27 @@ class CommandFactory {
|
|
|
104
97
|
$when_invoked = function ( $args, $assoc_args ) use ( $callable ) {
|
|
105
98
|
if ( is_array( $callable ) ) {
|
|
106
99
|
$callable[0] = is_object( $callable[0] ) ? $callable[0] : new $callable[0]();
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* @var callable $command
|
|
110
|
-
*/
|
|
111
|
-
$command = [ $callable[0], $callable[1] ];
|
|
112
|
-
|
|
113
|
-
call_user_func( $command, $args, $assoc_args );
|
|
100
|
+
call_user_func( [ $callable[0], $callable[1] ], $args, $assoc_args );
|
|
114
101
|
} else {
|
|
115
|
-
/**
|
|
116
|
-
* @var callable $callable
|
|
117
|
-
*/
|
|
118
102
|
call_user_func( $callable, $args, $assoc_args );
|
|
119
103
|
}
|
|
120
104
|
};
|
|
121
105
|
|
|
122
|
-
|
|
123
|
-
* @var string $name
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
$subcommand = new Subcommand( $parent, $name, $docparser, $when_invoked );
|
|
127
|
-
|
|
128
|
-
// Check for global argument conflicts
|
|
129
|
-
$path = \WP_CLI\Dispatcher\get_path( $subcommand );
|
|
130
|
-
$command_name = implode( ' ', array_slice( $path, 1 ) );
|
|
131
|
-
\WP_CLI::check_global_arg_conflicts( $command_name, $subcommand );
|
|
132
|
-
|
|
133
|
-
return $subcommand;
|
|
106
|
+
return new Subcommand( $parent, $name, $docparser, $when_invoked );
|
|
134
107
|
}
|
|
135
108
|
|
|
136
109
|
/**
|
|
137
110
|
* Create a new Composite command instance.
|
|
138
111
|
*
|
|
139
|
-
* @param
|
|
140
|
-
* @param string
|
|
141
|
-
* @param
|
|
112
|
+
* @param mixed $parent The new command's parent Root or Composite command
|
|
113
|
+
* @param string $name Represents how the command should be invoked
|
|
114
|
+
* @param mixed $callable
|
|
142
115
|
*/
|
|
143
116
|
private static function create_composite_command( $parent, $name, $callable ) {
|
|
144
117
|
$reflection = new ReflectionClass( $callable );
|
|
145
118
|
$doc_comment = self::get_doc_comment( $reflection );
|
|
146
119
|
if ( ! $doc_comment ) {
|
|
147
120
|
WP_CLI::debug( null === $doc_comment ? "Failed to get doc comment for {$name}." : "No doc comment for {$name}.", 'commandfactory' );
|
|
148
|
-
|
|
149
|
-
$doc_comment = '';
|
|
150
121
|
}
|
|
151
122
|
$docparser = new DocParser( $doc_comment );
|
|
152
123
|
|
|
@@ -171,19 +142,16 @@ class CommandFactory {
|
|
|
171
142
|
/**
|
|
172
143
|
* Create a new command namespace instance.
|
|
173
144
|
*
|
|
174
|
-
* @param
|
|
175
|
-
* @param string
|
|
176
|
-
* @param
|
|
145
|
+
* @param mixed $parent The new namespace's parent Root or Composite command.
|
|
146
|
+
* @param string $name Represents how the command should be invoked
|
|
147
|
+
* @param mixed $callable
|
|
177
148
|
*/
|
|
178
149
|
private static function create_namespace( $parent, $name, $callable ) {
|
|
179
150
|
$reflection = new ReflectionClass( $callable );
|
|
180
151
|
$doc_comment = self::get_doc_comment( $reflection );
|
|
181
152
|
if ( ! $doc_comment ) {
|
|
182
153
|
WP_CLI::debug( null === $doc_comment ? "Failed to get doc comment for {$name}." : "No doc comment for {$name}.", 'commandfactory' );
|
|
183
|
-
|
|
184
|
-
$doc_comment = '';
|
|
185
154
|
}
|
|
186
|
-
|
|
187
155
|
$docparser = new DocParser( $doc_comment );
|
|
188
156
|
|
|
189
157
|
return new CommandNamespace( $parent, $name, $docparser );
|
|
@@ -204,9 +172,6 @@ class CommandFactory {
|
|
|
204
172
|
*
|
|
205
173
|
* @param ReflectionMethod|ReflectionClass|ReflectionFunction $reflection Reflection instance.
|
|
206
174
|
* @return string|false|null Doc comment string if any, false if none (same as `Reflection*::getDocComment()`), null if error.
|
|
207
|
-
*
|
|
208
|
-
* @template T of object
|
|
209
|
-
* @phpstan-param ReflectionClass<T>|ReflectionMethod|ReflectionFunction $reflection
|
|
210
175
|
*/
|
|
211
176
|
private static function get_doc_comment( $reflection ) {
|
|
212
177
|
$contents = null;
|
|
@@ -221,20 +186,18 @@ class CommandFactory {
|
|
|
221
186
|
|
|
222
187
|
$filename = $reflection->getFileName();
|
|
223
188
|
|
|
224
|
-
if ( $filename ) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
self::$file_contents[ $filename ] = $contents;
|
|
232
|
-
}
|
|
189
|
+
if ( isset( self::$file_contents[ $filename ] ) ) {
|
|
190
|
+
$contents = self::$file_contents[ $filename ];
|
|
191
|
+
} elseif ( is_readable( $filename ) ) {
|
|
192
|
+
$contents = file_get_contents( $filename );
|
|
193
|
+
if ( is_string( $contents ) && '' !== $contents ) {
|
|
194
|
+
$contents = explode( "\n", $contents );
|
|
195
|
+
self::$file_contents[ $filename ] = $contents;
|
|
233
196
|
}
|
|
234
197
|
}
|
|
235
198
|
|
|
236
199
|
if ( ! empty( $contents ) ) {
|
|
237
|
-
return self::extract_last_doc_comment( implode( "\n", array_slice( $contents, 0, $reflection->getStartLine()
|
|
200
|
+
return self::extract_last_doc_comment( implode( "\n", array_slice( $contents, 0, $reflection->getStartLine() ) ) );
|
|
238
201
|
}
|
|
239
202
|
|
|
240
203
|
WP_CLI::debug( "Could not read contents for filename '{$filename}'.", 'commandfactory' );
|
|
@@ -245,7 +208,7 @@ class CommandFactory {
|
|
|
245
208
|
* Returns the last doc comment if any in `$content`.
|
|
246
209
|
*
|
|
247
210
|
* @param string $content The content, which should end at the class or function declaration.
|
|
248
|
-
* @return string|
|
|
211
|
+
* @return string|bool The last doc comment if any, or false if none.
|
|
249
212
|
*/
|
|
250
213
|
private static function extract_last_doc_comment( $content ) {
|
|
251
214
|
$content = trim( $content );
|
|
@@ -27,19 +27,19 @@ class CompositeCommand {
|
|
|
27
27
|
/**
|
|
28
28
|
* Instantiate a new CompositeCommand
|
|
29
29
|
*
|
|
30
|
-
* @param
|
|
31
|
-
* @param string
|
|
32
|
-
* @param DocParser
|
|
30
|
+
* @param mixed $parent Parent command (either Root or Composite)
|
|
31
|
+
* @param string $name Represents how command should be invoked
|
|
32
|
+
* @param DocParser $docparser
|
|
33
33
|
*/
|
|
34
|
-
public function __construct( $
|
|
35
|
-
$this->parent = $
|
|
34
|
+
public function __construct( $parent, $name, $docparser ) {
|
|
35
|
+
$this->parent = $parent;
|
|
36
36
|
|
|
37
37
|
$this->name = $name;
|
|
38
38
|
|
|
39
39
|
$this->shortdesc = $docparser->get_shortdesc();
|
|
40
40
|
$this->longdesc = $docparser->get_longdesc();
|
|
41
41
|
$this->docparser = $docparser;
|
|
42
|
-
$this->hook = $
|
|
42
|
+
$this->hook = $parent->get_hook();
|
|
43
43
|
|
|
44
44
|
$when_to_invoke = $docparser->get_tag( 'when' );
|
|
45
45
|
if ( $when_to_invoke ) {
|
|
@@ -51,7 +51,7 @@ class CompositeCommand {
|
|
|
51
51
|
/**
|
|
52
52
|
* Get the parent composite (or root) command
|
|
53
53
|
*
|
|
54
|
-
* @return
|
|
54
|
+
* @return mixed
|
|
55
55
|
*/
|
|
56
56
|
public function get_parent() {
|
|
57
57
|
return $this->parent;
|
|
@@ -88,7 +88,7 @@ class CompositeCommand {
|
|
|
88
88
|
/**
|
|
89
89
|
* Composite commands always contain subcommands.
|
|
90
90
|
*
|
|
91
|
-
* @return
|
|
91
|
+
* @return true
|
|
92
92
|
*/
|
|
93
93
|
public function can_have_subcommands() {
|
|
94
94
|
return true;
|
|
@@ -135,15 +135,6 @@ class CompositeCommand {
|
|
|
135
135
|
return $this->hook;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
/**
|
|
139
|
-
* Get the DocParser instance for this command.
|
|
140
|
-
*
|
|
141
|
-
* @return DocParser|null
|
|
142
|
-
*/
|
|
143
|
-
public function get_docparser() {
|
|
144
|
-
return $this->docparser;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
138
|
/**
|
|
148
139
|
* Set the short description for this composite command.
|
|
149
140
|
*
|
|
@@ -187,7 +178,6 @@ class CompositeCommand {
|
|
|
187
178
|
/**
|
|
188
179
|
* Get the usage for this composite command.
|
|
189
180
|
*
|
|
190
|
-
* @param string $prefix
|
|
191
181
|
* @return string
|
|
192
182
|
*/
|
|
193
183
|
public function get_usage( $prefix ) {
|
|
@@ -327,7 +317,7 @@ class CompositeCommand {
|
|
|
327
317
|
}
|
|
328
318
|
|
|
329
319
|
// Check if global parameters synopsis should be displayed or not.
|
|
330
|
-
if ( 'true' !==
|
|
320
|
+
if ( 'true' !== getenv( 'WP_CLI_SUPPRESS_GLOBAL_PARAMS' ) ) {
|
|
331
321
|
$binding['parameters'][] = [
|
|
332
322
|
'synopsis' => $synopsis,
|
|
333
323
|
'desc' => $details['desc'],
|