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
package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Alias_Command.php
CHANGED
|
@@ -13,24 +13,7 @@ use WP_CLI\Utils;
|
|
|
13
13
|
*
|
|
14
14
|
* Aliases are shorthand references to WordPress installs. For instance,
|
|
15
15
|
* `@dev` could refer to a development install and `@prod` could refer to a production install.
|
|
16
|
-
* This command gives you
|
|
17
|
-
*
|
|
18
|
-
* Environment variables can be used in alias definitions using the syntax `${env.VARIABLE_NAME}`.
|
|
19
|
-
* This allows you to centralize configuration in environment variables or .env files.
|
|
20
|
-
*
|
|
21
|
-
* ## SECURITY CONSIDERATIONS
|
|
22
|
-
*
|
|
23
|
-
* When environment variables are used in aliases, their interpolated values will appear in command
|
|
24
|
-
* output (e.g., `wp cli alias list` or `wp cli alias get`). If you have sensitive data in environment
|
|
25
|
-
* variables (such as passwords or API keys), be aware that these values may be exposed in:
|
|
26
|
-
*
|
|
27
|
-
* - Terminal output when listing or viewing aliases
|
|
28
|
-
* - Log files if command output is redirected
|
|
29
|
-
* - Shell history if used in command arguments
|
|
30
|
-
*
|
|
31
|
-
* To view aliases without interpolating environment variables, use the `--raw` flag.
|
|
32
|
-
*
|
|
33
|
-
* Learn more about [running commands remotely](https://make.wordpress.org/cli/handbook/guides/running-commands-remotely/).
|
|
16
|
+
* This command gives you and option to add, update and delete, the registered aliases you have available.
|
|
34
17
|
*
|
|
35
18
|
* ## EXAMPLES
|
|
36
19
|
*
|
|
@@ -59,20 +42,6 @@ use WP_CLI\Utils;
|
|
|
59
42
|
* $ wp cli alias delete @prod
|
|
60
43
|
* Success: Deleted '@prod' alias.
|
|
61
44
|
*
|
|
62
|
-
* # Use environment variables in alias definitions.
|
|
63
|
-
* # In wp-cli.yml:
|
|
64
|
-
* # @prod:
|
|
65
|
-
* # ssh: ${env.PROD_USER}@${env.PROD_HOST}:${env.PROD_PATH}
|
|
66
|
-
* # user: ${env.PROD_WP_USER}
|
|
67
|
-
* $ export PROD_USER=myuser PROD_HOST=example.com PROD_PATH=/var/www PROD_WP_USER=admin
|
|
68
|
-
* $ wp @prod option get home
|
|
69
|
-
*
|
|
70
|
-
* # View aliases without environment variable interpolation.
|
|
71
|
-
* $ wp cli alias list --raw
|
|
72
|
-
*
|
|
73
|
-
* # Run a command against a group of aliases in parallel.
|
|
74
|
-
* $ WP_CLI_ALIAS_GROUPS_PARALLEL=1 wp @all plugin status
|
|
75
|
-
*
|
|
76
45
|
* @package wp-cli
|
|
77
46
|
* @when before_wp_load
|
|
78
47
|
*/
|
|
@@ -93,9 +62,6 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
93
62
|
* - var_export
|
|
94
63
|
* ---
|
|
95
64
|
*
|
|
96
|
-
* [--raw]
|
|
97
|
-
* : Display aliases without interpolating environment variables.
|
|
98
|
-
*
|
|
99
65
|
* ## EXAMPLES
|
|
100
66
|
*
|
|
101
67
|
* # List all available aliases.
|
|
@@ -110,44 +76,10 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
110
76
|
* - @prod
|
|
111
77
|
* - @dev
|
|
112
78
|
*
|
|
113
|
-
* # List aliases without environment variable interpolation.
|
|
114
|
-
* $ wp cli alias list --raw
|
|
115
|
-
*
|
|
116
79
|
* @subcommand list
|
|
117
|
-
*
|
|
118
|
-
* @param array $args Positional arguments. Unused.
|
|
119
|
-
* @param array{format: string, raw?: bool} $assoc_args Associative arguments.
|
|
120
80
|
*/
|
|
121
81
|
public function list_( $args, $assoc_args ) {
|
|
122
|
-
|
|
123
|
-
$aliases = $raw ? WP_CLI::get_runner()->raw_aliases : WP_CLI::get_runner()->aliases;
|
|
124
|
-
|
|
125
|
-
// Add @ prefix to aliases for display (backward compatibility)
|
|
126
|
-
$display_aliases = [];
|
|
127
|
-
foreach ( $aliases as $alias => $value ) {
|
|
128
|
-
$display_alias = '@' . $alias;
|
|
129
|
-
if ( is_array( $value ) ) {
|
|
130
|
-
// Check if it's a group (numeric indexed array)
|
|
131
|
-
if ( isset( $value[0] ) && is_string( $value[0] ) ) {
|
|
132
|
-
/** @var string[] $value */
|
|
133
|
-
// It's a group, add @ prefix to each member
|
|
134
|
-
$display_aliases[ $display_alias ] = array_map(
|
|
135
|
-
function ( $member ) {
|
|
136
|
-
return '@' . $member;
|
|
137
|
-
},
|
|
138
|
-
$value
|
|
139
|
-
);
|
|
140
|
-
} else {
|
|
141
|
-
// It's a regular alias config
|
|
142
|
-
$display_aliases[ $display_alias ] = $value;
|
|
143
|
-
}
|
|
144
|
-
} else {
|
|
145
|
-
// It's a string (like the 'all' description)
|
|
146
|
-
$display_aliases[ $display_alias ] = $value;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
WP_CLI::print_value( $display_aliases, $assoc_args );
|
|
82
|
+
WP_CLI::print_value( WP_CLI::get_runner()->aliases, $assoc_args );
|
|
151
83
|
}
|
|
152
84
|
|
|
153
85
|
/**
|
|
@@ -158,50 +90,19 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
158
90
|
* <key>
|
|
159
91
|
* : Key for the alias.
|
|
160
92
|
*
|
|
161
|
-
* [--field=<field>]
|
|
162
|
-
* : Get the value of a specific field.
|
|
163
|
-
*
|
|
164
|
-
* [--raw]
|
|
165
|
-
* : Display alias without interpolating environment variables.
|
|
166
|
-
*
|
|
167
93
|
* ## EXAMPLES
|
|
168
94
|
*
|
|
169
95
|
* # Get alias.
|
|
170
96
|
* $ wp cli alias get @prod
|
|
171
97
|
* ssh: dev@somedeve.env:12345/home/dev/
|
|
172
|
-
*
|
|
173
|
-
* # Get a specific field of an alias.
|
|
174
|
-
* $ wp cli alias get @prod --field=ssh
|
|
175
|
-
* dev@somedeve.env:12345/home/dev/
|
|
176
|
-
*
|
|
177
|
-
* # Get alias without environment variable interpolation.
|
|
178
|
-
* $ wp cli alias get @prod --raw
|
|
179
|
-
* ssh: ${env.PROD_USER}@${env.PROD_HOST}:${env.PROD_PATH}
|
|
180
|
-
*
|
|
181
|
-
* @param array{string} $args Positional arguments.
|
|
182
|
-
* @param array{field?: string, raw?: bool} $assoc_args Associative arguments.
|
|
183
98
|
*/
|
|
184
|
-
public function get( $args, $assoc_args
|
|
99
|
+
public function get( $args, $assoc_args ) {
|
|
185
100
|
list( $alias ) = $args;
|
|
186
101
|
|
|
187
|
-
|
|
188
|
-
$alias = ltrim( $alias, '@' );
|
|
189
|
-
|
|
190
|
-
$raw = Utils\get_flag_value( $assoc_args, 'raw', false );
|
|
191
|
-
$aliases = $raw ? WP_CLI::get_runner()->raw_aliases : WP_CLI::get_runner()->aliases;
|
|
102
|
+
$aliases = WP_CLI::get_runner()->aliases;
|
|
192
103
|
|
|
193
104
|
if ( empty( $aliases[ $alias ] ) ) {
|
|
194
|
-
WP_CLI::error( "No alias found with key '
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
$field = Utils\get_flag_value( $assoc_args, 'field', null );
|
|
198
|
-
|
|
199
|
-
if ( null !== $field ) {
|
|
200
|
-
if ( ! array_key_exists( $field, $aliases[ $alias ] ) ) {
|
|
201
|
-
WP_CLI::error( "The '{$field}' property does not exist for '@{$alias}'." );
|
|
202
|
-
}
|
|
203
|
-
WP_CLI::log( $aliases[ $alias ][ $field ] );
|
|
204
|
-
return;
|
|
105
|
+
WP_CLI::error( "No alias found with key '{$alias}'." );
|
|
205
106
|
}
|
|
206
107
|
|
|
207
108
|
foreach ( $aliases[ $alias ] as $key => $value ) {
|
|
@@ -257,9 +158,6 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
257
158
|
* # Add group of aliases.
|
|
258
159
|
* $ wp cli alias add @multiservers --grouping=servera,serverb
|
|
259
160
|
* Success: Added '@multiservers' alias.
|
|
260
|
-
*
|
|
261
|
-
* @param array{string} $args Positional arguments.
|
|
262
|
-
* @param array{'set-user'?: string, 'set-url'?: string, 'set-path'?: string, 'set-ssh'?: string, 'set-http'?: string, grouping?: string, config?: string} $assoc_args Associative arguments.
|
|
263
161
|
*/
|
|
264
162
|
public function add( $args, $assoc_args ) {
|
|
265
163
|
|
|
@@ -269,24 +167,19 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
269
167
|
|
|
270
168
|
$this->validate_config_file( $config_path );
|
|
271
169
|
|
|
272
|
-
$alias
|
|
273
|
-
|
|
170
|
+
$alias = $args[0];
|
|
274
171
|
$grouping = Utils\get_flag_value( $assoc_args, 'grouping' );
|
|
275
172
|
|
|
276
173
|
$this->validate_input( $assoc_args, $grouping );
|
|
277
174
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
WP_CLI::error( "Key '@" . $this->normalize_alias( $alias ) . "' exists already." );
|
|
175
|
+
if ( isset( $aliases[ $alias ] ) ) {
|
|
176
|
+
WP_CLI::error( "Key '{$alias}' exists already." );
|
|
281
177
|
}
|
|
282
178
|
|
|
283
|
-
// When adding new aliases, normalize the key (no @ prefix)
|
|
284
|
-
$normalized_alias = $this->normalize_alias( $alias );
|
|
285
|
-
|
|
286
179
|
if ( null === $grouping ) {
|
|
287
|
-
$aliases = $this->build_aliases( $aliases, $
|
|
180
|
+
$aliases = $this->build_aliases( $aliases, $alias, $assoc_args, false );
|
|
288
181
|
} else {
|
|
289
|
-
$aliases = $this->build_aliases( $aliases, $
|
|
182
|
+
$aliases = $this->build_aliases( $aliases, $alias, $assoc_args, true, $grouping );
|
|
290
183
|
}
|
|
291
184
|
|
|
292
185
|
$this->process_aliases( $aliases, $alias, $config_path, 'Added' );
|
|
@@ -317,9 +210,6 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
317
210
|
* # Delete project alias.
|
|
318
211
|
* $ wp cli alias delete @prod --config=project
|
|
319
212
|
* Success: Deleted '@prod' alias.
|
|
320
|
-
*
|
|
321
|
-
* @param array{string} $args Positional arguments.
|
|
322
|
-
* @param array{config?: string} $assoc_args Associative arguments
|
|
323
213
|
*/
|
|
324
214
|
public function delete( $args, $assoc_args ) {
|
|
325
215
|
|
|
@@ -331,12 +221,11 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
331
221
|
|
|
332
222
|
$this->validate_config_file( $config_path );
|
|
333
223
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
WP_CLI::error( "No alias found with key '@" . $this->normalize_alias( $alias ) . "'." );
|
|
224
|
+
if ( empty( $aliases[ $alias ] ) ) {
|
|
225
|
+
WP_CLI::error( "No alias found with key '{$alias}'." );
|
|
337
226
|
}
|
|
338
227
|
|
|
339
|
-
unset( $aliases[ $
|
|
228
|
+
unset( $aliases[ $alias ] );
|
|
340
229
|
$this->process_aliases( $aliases, $alias, $config_path, 'Deleted' );
|
|
341
230
|
}
|
|
342
231
|
|
|
@@ -383,15 +272,11 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
383
272
|
* # Update project alias.
|
|
384
273
|
* $ wp cli alias update @prod --set-user=newuser --set-path=/new/path/to/wordpress/install/ --config=project
|
|
385
274
|
* Success: Updated 'prod' alias.
|
|
386
|
-
*
|
|
387
|
-
* @param array{string} $args Positional arguments.
|
|
388
|
-
* @param array{'set-user'?: string, 'set-url'?: string, 'set-path'?: string, 'set-ssh'?: string, 'set-http'?: string, grouping?: string, config?: string} $assoc_args Associative arguments.
|
|
389
275
|
*/
|
|
390
276
|
public function update( $args, $assoc_args ) {
|
|
391
277
|
|
|
392
|
-
$config
|
|
393
|
-
$alias
|
|
394
|
-
|
|
278
|
+
$config = ( ! empty( $assoc_args['config'] ) ? $assoc_args['config'] : '' );
|
|
279
|
+
$alias = $args[0];
|
|
395
280
|
$grouping = Utils\get_flag_value( $assoc_args, 'grouping' );
|
|
396
281
|
|
|
397
282
|
list( $config_path, $aliases ) = $this->get_aliases_data( $config, $alias, true );
|
|
@@ -400,18 +285,14 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
400
285
|
|
|
401
286
|
$this->validate_input( $assoc_args, $grouping );
|
|
402
287
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
WP_CLI::error( "No alias found with key '@" . $this->normalize_alias( $alias ) . "'." );
|
|
288
|
+
if ( empty( $aliases[ $alias ] ) ) {
|
|
289
|
+
WP_CLI::error( "No alias found with key '{$alias}'." );
|
|
406
290
|
}
|
|
407
291
|
|
|
408
|
-
// For updates, we need to work with the actual YAML key
|
|
409
|
-
// Pass the alias_key to build_aliases which will be normalized internally
|
|
410
|
-
// But we need to remove the old key and add with the new one if structure changed
|
|
411
292
|
if ( null === $grouping ) {
|
|
412
|
-
$aliases = $this->build_aliases( $aliases, $
|
|
293
|
+
$aliases = $this->build_aliases( $aliases, $alias, $assoc_args, false, '', true );
|
|
413
294
|
} else {
|
|
414
|
-
$aliases = $this->build_aliases( $aliases, $
|
|
295
|
+
$aliases = $this->build_aliases( $aliases, $alias, $assoc_args, true, $grouping, true );
|
|
415
296
|
}
|
|
416
297
|
|
|
417
298
|
$this->process_aliases( $aliases, $alias, $config_path, 'Updated' );
|
|
@@ -435,22 +316,23 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
435
316
|
* @subcommand is-group
|
|
436
317
|
*/
|
|
437
318
|
public function is_group( $args, $assoc_args = array() ) {
|
|
438
|
-
$alias =
|
|
319
|
+
$alias = $args[0];
|
|
439
320
|
|
|
440
321
|
$aliases = WP_CLI::get_runner()->aliases;
|
|
441
322
|
|
|
442
323
|
if ( empty( $aliases[ $alias ] ) ) {
|
|
443
|
-
WP_CLI::error( "No alias found with key '
|
|
324
|
+
WP_CLI::error( "No alias found with key '{$alias}'." );
|
|
444
325
|
}
|
|
445
326
|
|
|
446
327
|
// how do we know the alias is a group?
|
|
447
328
|
// + array keys are numeric
|
|
448
|
-
// + array values
|
|
329
|
+
// + array values begin with '@'
|
|
449
330
|
|
|
450
|
-
$first_item
|
|
451
|
-
$first_item_key
|
|
331
|
+
$first_item = $aliases[ $alias ];
|
|
332
|
+
$first_item_key = key( $first_item );
|
|
333
|
+
$first_item_value = $first_item[ $first_item_key ];
|
|
452
334
|
|
|
453
|
-
if ( is_numeric( $first_item_key ) ) {
|
|
335
|
+
if ( is_numeric( $first_item_key ) && substr( $first_item_value, 0, 1 ) === '@' ) {
|
|
454
336
|
WP_CLI::halt( 0 );
|
|
455
337
|
}
|
|
456
338
|
WP_CLI::halt( 1 );
|
|
@@ -483,11 +365,11 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
483
365
|
$aliases = $project_aliases;
|
|
484
366
|
} else {
|
|
485
367
|
|
|
486
|
-
$is_global_alias =
|
|
487
|
-
$is_project_alias =
|
|
368
|
+
$is_global_alias = array_key_exists( $alias, $global_aliases );
|
|
369
|
+
$is_project_alias = array_key_exists( $alias, $project_aliases );
|
|
488
370
|
|
|
489
371
|
if ( $is_global_alias && $is_project_alias ) {
|
|
490
|
-
WP_CLI::error( "Key '
|
|
372
|
+
WP_CLI::error( "Key '{$alias}' found in more than one path. Please pass --config param." );
|
|
491
373
|
} elseif ( $is_global_alias ) {
|
|
492
374
|
$config_path = $global_config_path;
|
|
493
375
|
$aliases = $global_aliases;
|
|
@@ -504,8 +386,10 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
504
386
|
* Check if the config file exists and is writable.
|
|
505
387
|
*
|
|
506
388
|
* @param string $config_path Path to config file.
|
|
389
|
+
*
|
|
390
|
+
* @return void
|
|
507
391
|
*/
|
|
508
|
-
private function validate_config_file( $config_path )
|
|
392
|
+
private function validate_config_file( $config_path ) {
|
|
509
393
|
if ( ! file_exists( $config_path ) || ! is_writable( $config_path ) ) {
|
|
510
394
|
WP_CLI::error( "Config file does not exist: {$config_path}" );
|
|
511
395
|
}
|
|
@@ -521,12 +405,10 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
521
405
|
* @param string $grouping Grouping value.
|
|
522
406
|
* @param bool $is_update Is this an update operation?
|
|
523
407
|
*
|
|
524
|
-
* @return
|
|
408
|
+
* @return mixed
|
|
525
409
|
*/
|
|
526
410
|
private function build_aliases( $aliases, $alias, $assoc_args, $is_grouping, $grouping = '', $is_update = false ) {
|
|
527
|
-
|
|
528
|
-
// Normalize it for consistency
|
|
529
|
-
$normalized_alias = $this->normalize_alias( $alias );
|
|
411
|
+
$alias = $this->normalize_alias( $alias );
|
|
530
412
|
|
|
531
413
|
if ( $is_grouping ) {
|
|
532
414
|
$valid_assoc_args = [ 'config', 'grouping' ];
|
|
@@ -539,65 +421,30 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
539
421
|
}
|
|
540
422
|
}
|
|
541
423
|
|
|
542
|
-
// Validate BEFORE modifying the aliases array
|
|
543
424
|
if ( $is_update ) {
|
|
544
425
|
$this->validate_alias_type( $aliases, $alias, $assoc_args, $grouping );
|
|
545
426
|
}
|
|
546
427
|
|
|
547
|
-
// If updating, we need to preserve existing data and only update specified fields
|
|
548
|
-
$existing_data = [];
|
|
549
|
-
if ( $is_update ) {
|
|
550
|
-
// Find the existing alias data to preserve it
|
|
551
|
-
$alias_key = $this->find_alias_key( $aliases, $alias );
|
|
552
|
-
if ( null !== $alias_key ) {
|
|
553
|
-
// Get existing data based on format
|
|
554
|
-
if ( isset( $aliases['aliases'][ $normalized_alias ] ) ) {
|
|
555
|
-
$existing_data = $aliases['aliases'][ $normalized_alias ];
|
|
556
|
-
} elseif ( isset( $aliases[ $alias_key ] ) ) {
|
|
557
|
-
$existing_data = $aliases[ $alias_key ];
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
// Remove the old key structure
|
|
562
|
-
if ( isset( $aliases[ $alias ] ) ) {
|
|
563
|
-
unset( $aliases[ $alias ] );
|
|
564
|
-
}
|
|
565
|
-
// Also check if it's in the @format
|
|
566
|
-
$at_key = '@' . $normalized_alias;
|
|
567
|
-
if ( isset( $aliases[ $at_key ] ) ) {
|
|
568
|
-
unset( $aliases[ $at_key ] );
|
|
569
|
-
}
|
|
570
|
-
// Check if it's under aliases:
|
|
571
|
-
if ( isset( $aliases['aliases'][ $normalized_alias ] ) ) {
|
|
572
|
-
unset( $aliases['aliases'][ $normalized_alias ] );
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
|
|
576
428
|
if ( ! $is_grouping ) {
|
|
577
|
-
// Start with existing data for updates, or empty array for new aliases
|
|
578
|
-
if ( ! isset( $aliases[ $normalized_alias ] ) ) {
|
|
579
|
-
$aliases[ $normalized_alias ] = $existing_data;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
429
|
foreach ( $assoc_args as $key => $value ) {
|
|
583
430
|
if ( strpos( $key, 'set-' ) !== false ) {
|
|
584
431
|
$alias_key_info = explode( '-', $key );
|
|
585
432
|
$alias_key = empty( $alias_key_info[1] ) ? '' : $alias_key_info[1];
|
|
586
433
|
if ( ! empty( $alias_key ) && ! empty( $value ) ) {
|
|
587
|
-
$aliases[ $
|
|
434
|
+
$aliases[ $alias ][ $alias_key ] = $value;
|
|
588
435
|
}
|
|
589
436
|
}
|
|
590
437
|
}
|
|
591
438
|
} elseif ( ! empty( $grouping ) ) {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
439
|
+
|
|
440
|
+
$group_alias_list = explode( ',', $grouping );
|
|
441
|
+
$group_alias = array_map(
|
|
442
|
+
function ( $current_alias ) {
|
|
443
|
+
return '@' . ltrim( $current_alias, '@' );
|
|
444
|
+
},
|
|
445
|
+
$group_alias_list
|
|
446
|
+
);
|
|
447
|
+
$aliases[ $alias ] = $group_alias;
|
|
601
448
|
}
|
|
602
449
|
|
|
603
450
|
return $aliases;
|
|
@@ -606,14 +453,14 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
606
453
|
/**
|
|
607
454
|
* Validate input of passed arguments.
|
|
608
455
|
*
|
|
609
|
-
* @param array
|
|
610
|
-
* @param string
|
|
456
|
+
* @param array $assoc_args Arguments array.
|
|
457
|
+
* @param string $grouping Grouping argument value.
|
|
611
458
|
*
|
|
612
459
|
* @throws ExitException
|
|
613
460
|
*/
|
|
614
461
|
private function validate_input( $assoc_args, $grouping ) {
|
|
615
462
|
// Check if valid arguments were passed.
|
|
616
|
-
$arg_match =
|
|
463
|
+
$arg_match = preg_grep( '/^set-(\w+)/i', array_keys( $assoc_args ) );
|
|
617
464
|
|
|
618
465
|
// Verify passed-arguments.
|
|
619
466
|
if ( empty( $grouping ) && empty( $arg_match ) ) {
|
|
@@ -632,7 +479,7 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
632
479
|
* Validate alias type before update.
|
|
633
480
|
*
|
|
634
481
|
* @param array $aliases Existing aliases data.
|
|
635
|
-
* @param string $alias Alias Name
|
|
482
|
+
* @param string $alias Alias Name.
|
|
636
483
|
* @param array $assoc_args Arguments array.
|
|
637
484
|
* @param string $grouping Grouping argument value.
|
|
638
485
|
*
|
|
@@ -640,37 +487,14 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
640
487
|
*/
|
|
641
488
|
private function validate_alias_type( $aliases, $alias, $assoc_args, $grouping ) {
|
|
642
489
|
|
|
643
|
-
|
|
644
|
-
$alias_key = $this->find_alias_key( $aliases, $alias );
|
|
645
|
-
if ( null === $alias_key ) {
|
|
646
|
-
$alias_data = null;
|
|
647
|
-
} elseif ( isset( $aliases['aliases'] ) && isset( $aliases['aliases'][ $alias_key ] ) ) {
|
|
648
|
-
$alias_data = $aliases['aliases'][ $alias_key ];
|
|
649
|
-
} else {
|
|
650
|
-
$alias_data = $aliases[ $alias_key ];
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
// Handle null or non-array data
|
|
654
|
-
if ( ! is_array( $alias_data ) ) {
|
|
655
|
-
$alias_data = [];
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
// Check if this is a group alias by looking for numeric keys with string values
|
|
659
|
-
// Group aliases are stored as arrays like ['foo', 'bar'] without @ prefix
|
|
660
|
-
$is_group_alias = false;
|
|
661
|
-
if ( ! empty( $alias_data ) ) {
|
|
662
|
-
$numeric_keys = array_filter( array_keys( $alias_data ), 'is_numeric' );
|
|
663
|
-
if ( count( $numeric_keys ) === count( $alias_data ) ) {
|
|
664
|
-
// All keys are numeric, so this is a group alias
|
|
665
|
-
$is_group_alias = true;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
490
|
+
$alias_data = $aliases[ $alias ];
|
|
668
491
|
|
|
669
|
-
$
|
|
492
|
+
$group_aliases_match = preg_grep( '/^@(\w+)/i', $alias_data );
|
|
493
|
+
$arg_match = preg_grep( '/^set-(\w+)/i', array_keys( $assoc_args ) );
|
|
670
494
|
|
|
671
|
-
if ( $
|
|
495
|
+
if ( ! empty( $group_aliases_match ) && ! empty( $arg_match ) ) {
|
|
672
496
|
WP_CLI::error( 'Trying to update group alias with invalid arguments.' );
|
|
673
|
-
} elseif (
|
|
497
|
+
} elseif ( empty( $group_aliases_match ) && ! empty( $grouping ) ) {
|
|
674
498
|
WP_CLI::error( 'Trying to update simple alias with invalid --grouping argument.' );
|
|
675
499
|
}
|
|
676
500
|
}
|
|
@@ -686,43 +510,11 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
686
510
|
private function process_aliases( $aliases, $alias, $config_path, $operation = '' ) {
|
|
687
511
|
$alias = $this->normalize_alias( $alias );
|
|
688
512
|
|
|
689
|
-
// Convert aliases to use the new 'aliases:' format for better cross-platform compatibility
|
|
690
|
-
// Move any @-prefixed keys into the aliases: section
|
|
691
|
-
$yaml_data = [];
|
|
692
|
-
$aliases_section = [];
|
|
693
|
-
|
|
694
|
-
foreach ( $aliases as $key => $value ) {
|
|
695
|
-
// Skip special config keys that aren't aliases
|
|
696
|
-
if ( in_array( $key, [ 'require', 'exec', 'disabled_commands', 'apache_modules', 'path', '_', 'url', 'user', 'ssh', 'http', 'color', 'debug', 'prompt', 'quiet', 'allow-root', 'skip-plugins', 'skip-themes', 'skip-packages', 'context', 'alias' ], true ) ) {
|
|
697
|
-
$yaml_data[ $key ] = $value;
|
|
698
|
-
} elseif ( 0 === strpos( $key, '@' ) ) {
|
|
699
|
-
// Convert @foo to aliases: { foo: } format
|
|
700
|
-
$normalized_key = substr( $key, 1 );
|
|
701
|
-
$aliases_section[ $normalized_key ] = $value;
|
|
702
|
-
} elseif ( 'aliases' === $key ) {
|
|
703
|
-
// Already in aliases format, merge it
|
|
704
|
-
if ( is_array( $value ) ) {
|
|
705
|
-
$aliases_section = array_merge( $aliases_section, $value );
|
|
706
|
-
}
|
|
707
|
-
} elseif ( is_array( $value ) ) {
|
|
708
|
-
// This is an alias (either config or group), add to aliases section
|
|
709
|
-
$aliases_section[ $key ] = $value;
|
|
710
|
-
} else {
|
|
711
|
-
// Non-alias config value
|
|
712
|
-
$yaml_data[ $key ] = $value;
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
// Add the aliases section if we have any
|
|
717
|
-
if ( ! empty( $aliases_section ) ) {
|
|
718
|
-
$yaml_data['aliases'] = $aliases_section;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
513
|
// Convert data to YAML string.
|
|
722
|
-
$
|
|
514
|
+
$yaml_data = Spyc::YAMLDump( $aliases );
|
|
723
515
|
|
|
724
516
|
// Add data in config file.
|
|
725
|
-
if ( file_put_contents( $config_path, $
|
|
517
|
+
if ( file_put_contents( $config_path, $yaml_data ) ) {
|
|
726
518
|
WP_CLI::success( "$operation '{$alias}' alias." );
|
|
727
519
|
}
|
|
728
520
|
}
|
|
@@ -730,41 +522,17 @@ class CLI_Alias_Command extends WP_CLI_Command {
|
|
|
730
522
|
/**
|
|
731
523
|
* Normalize the alias to an expected format.
|
|
732
524
|
*
|
|
733
|
-
* -
|
|
525
|
+
* - Add @ if not present.
|
|
734
526
|
*
|
|
735
527
|
* @param string $alias Name of alias.
|
|
736
528
|
*/
|
|
737
529
|
private function normalize_alias( $alias ) {
|
|
738
|
-
//
|
|
530
|
+
// Check if the alias starts with the @.
|
|
739
531
|
// See: https://github.com/wp-cli/wp-cli/issues/5391
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* Find the actual key used for an alias in YAML data.
|
|
745
|
-
*
|
|
746
|
-
* Handles both @foo format and aliases: { foo: } format.
|
|
747
|
-
*
|
|
748
|
-
* @param array $yaml_data The raw YAML data.
|
|
749
|
-
* @param string $alias The alias name (with or without @).
|
|
750
|
-
* @return string|null The actual key in YAML, or null if not found.
|
|
751
|
-
*/
|
|
752
|
-
private function find_alias_key( $yaml_data, $alias ) {
|
|
753
|
-
$normalized = $this->normalize_alias( $alias );
|
|
754
|
-
|
|
755
|
-
// Check for @foo format
|
|
756
|
-
$at_key = '@' . $normalized;
|
|
757
|
-
if ( array_key_exists( $at_key, $yaml_data ) ) {
|
|
758
|
-
return $at_key;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
// Check for aliases: { foo: } format
|
|
762
|
-
if ( isset( $yaml_data['aliases'] ) && is_array( $yaml_data['aliases'] ) ) {
|
|
763
|
-
if ( array_key_exists( $normalized, $yaml_data['aliases'] ) ) {
|
|
764
|
-
return $normalized;
|
|
765
|
-
}
|
|
532
|
+
if ( strpos( $alias, '@' ) !== 0 ) {
|
|
533
|
+
$alias = '@' . ltrim( $alias, '@' );
|
|
766
534
|
}
|
|
767
535
|
|
|
768
|
-
return
|
|
536
|
+
return $alias;
|
|
769
537
|
}
|
|
770
538
|
}
|