From 9470bc444622a575f1602e40900c6a6d064a624e Mon Sep 17 00:00:00 2001 From: Shyim Date: Thu, 23 Jan 2025 14:26:27 +0100 Subject: [PATCH] feat: add shopware-cli documentation (#1657) * feat: add shopware-cli documentation * Update products/cli/project-commands/project-config-sync.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: markdown errors * fix: markdown errors * fix: spellchecker issues * docs: add bundle info * fix: make markdown linter happy * docs: add hint for worker * feat: adopt dump page to new flags * feat: add new environment variables to specify api connection * feat: add project create version info * feat: sort word list * Textual update * fix: comment stuff --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: su Co-authored-by: Su <112690947+sushmangupta@users.noreply.github.com> --- .wordlist.txt | 1910 +++++++++-------- .../cli/extension-commands/admin-watcher.md | 34 + products/cli/extension-commands/build.md | 171 ++ .../extension-commands/extract-meta-data.md | 32 + products/cli/extension-commands/validation.md | 42 + products/cli/index.md | 18 + products/cli/installation.md | 180 ++ products/cli/project-commands/build.md | 149 ++ .../cli/project-commands/helper-commands.md | 105 + products/cli/project-commands/mysql-dump.md | 103 + .../project-commands/project-config-sync.md | 83 + .../remote-extension-managment.md | 66 + .../authentication.md | 40 + .../configure-composer-repository.md | 30 + .../releasing-extension-to-shopware-store.md | 27 + .../updating-store-page.md | 79 + 16 files changed, 2120 insertions(+), 949 deletions(-) create mode 100644 products/cli/extension-commands/admin-watcher.md create mode 100644 products/cli/extension-commands/build.md create mode 100644 products/cli/extension-commands/extract-meta-data.md create mode 100644 products/cli/extension-commands/validation.md create mode 100644 products/cli/index.md create mode 100644 products/cli/installation.md create mode 100644 products/cli/project-commands/build.md create mode 100644 products/cli/project-commands/helper-commands.md create mode 100644 products/cli/project-commands/mysql-dump.md create mode 100644 products/cli/project-commands/project-config-sync.md create mode 100644 products/cli/project-commands/remote-extension-managment.md create mode 100644 products/cli/shopware-account-commands/authentication.md create mode 100644 products/cli/shopware-account-commands/configure-composer-repository.md create mode 100644 products/cli/shopware-account-commands/releasing-extension-to-shopware-store.md create mode 100644 products/cli/shopware-account-commands/updating-store-page.md diff --git a/.wordlist.txt b/.wordlist.txt index 81f8e23eb..3aabd3f05 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -1,6 +1,14 @@ +ACL +ACLs +ADDR +ADR +ADRs +AOF +API's +APIs +AUR AbstractCaptcha AbstractStockUpdateFilter -accel AccountEditOrderPage AccountGuestLoginPage AccountLoginPage @@ -10,111 +18,65 @@ AccountOverviewPage AccountPaymentMethodPage AccountProfilePage AccountRecoverPasswordPage -acl Acl -ACL AclContextProvider AclGrantContext -ACLs ActionButton ActionButtons ActivateContext -activateShopwareTheme AdapterFactory AddCustomerTagActionTest -ADDR AddressBookWidget AddressDetailPage AddressListingPage +AdminQueueWorker +AdminWorker Adminer AdministrationNewField AdministrationNewModule -AdminQueueWorker -AdminWorker -adr -ADR -ADRs Afile AfterLineItemAddedEvent AfterLineItemQuantityChangedEvent AfterLineItemRemovedEvent -afterSort -ag AggregationResultCollection -ajax AjaxModalPlugin Algolia AllowEmptyString AllowHtml AlwaysValidRule -amqp Analytics AndRule -anonymization -anonymize -anonymized -antipattern -AOF -api +Anonymizing ApiAware ApiContext ApiController -apiKey ApiKey -API's -APIs ApiService Aplaceholder AppRefundHandler AppScripts AppServer AppSystem -appVersion -args -arrayfacade +Archlinux ArrayFacade AssociationField -async -AsynchronousPaymentHandlerInterface AsyncPaymentTransactionStruct -atomicity +AsynchronousPaymentHandlerInterface AuditLogValueEntity -auth AuthenticationIdentityLoader -autocompletion -autogenerate -autogenerated AutoIncrementField -autoload -autoloaded -autoloader -autoloading -autom -autoprefixer -autowire -autowiring AvailableCombinationLoader AvgResult -awaitAndCheckNotification -axios B2B Component B2B Components B2B Suite +BBundle +BDD +BITV BackedEnum -backend Backend -backends -backface -backoff -backported -bAcl -bAjaxPanel BaseContext BasicExample -bAuditLog -bAuth -BBundle -BDD BeforeCartMergeEvent BeforeLineItemAddedEvent BeforeLineItemQuantityChangedEvent @@ -126,77 +88,48 @@ BeforeShopDeletionEvent BillingCountryRule BillingStreetRule BillingZipCodeRule -binlog Bitbucket -BITV -blackbox -blackfire Blackfire BlacklistRule BlacklistRuleField BlobField -blockquote Blockquote -blockquotes Blockquotes -bLogin -bolded -bool -boolean -booleans BoolField -bottleJs -bottleJS BottleJS -bourgau -bPlatform -brainer BreadcrumbField -bRestApi -browserslist -bruteforce -bServiceExtension -bTemplateExtension -bugfix -bugfixes -bundler +Browserlist BusinessEvent BusinessEventCollector -buyable -cacheable +CDN +CDNs +CHANGELOG +CKEditor +CLI +CMS +CORS +CPUs +CSP +CSPs +CSRF +CSV CachedProductListingRouteTest -cacheinvalidatorfacade -cacheKey -cachix Cachix Caddy Caddyfile -calculatedCheapestPrice -calculatedPrice CalculatedPrice CalculatedPriceField -calculatedPrices -callables -camelcase -camelCase -caniuse -capitalizeString -capsulate -captcha Captcha Captchas -captureId CartAmountRule CartConvertedEvent CartCreatedEvent CartDataCollection CartDeletedEvent -cartfacade CartHasDeliveryFreeItemRule CartLoadedEvent CartMergedEvent CartPrice -cartpricefacade CartPriceFacade CartPriceField CartPromotionsCollector @@ -206,27 +139,15 @@ CartWeightRule CascadeDelete CashRounding CashRoundingConfigField -catchable -catched CategoryRoute -CDN -CDNs CentOS Cerebro -cetera Chai ChangeCustomerSpecificFeaturesAction ChangeEmployeeStatusAction -changelog Changelog -CHANGELOG -changelogs Changelogs -changeset -changesets -chargeback Chargeback -checkboxes CheckoutCartPage CheckoutCartPageLoadedEvent CheckoutConfirmPage @@ -242,401 +163,1076 @@ ChildCount ChildCountField ChildrenAssociation ChildrenAssociationField -ci -CKEditor -classmap -classname -cleanUpPreviousState -clearTypeAndCheck -cli -CLI -clickContextMenuItem -clickMainMenuItem ClientInterface -cloneDeep Cloudflare Cmd -cms -CMS CmsPage -cmss -cmsService -codebase -codeblock -codeblocks -codemods Codemods -codereview +Codespaces Codestyle -colorpicker CommercialB CommercialBundle -compatability ComponentFactory -componentSectionRenderer -composable Composables -config -configComponent ConfigJson ConfigJsonField -configs -configurator -Configurator ConfigValidator -confirmUrl +Configurator ConfirmUrlAware ConfirmUrlStorer -const -const's ContactController -contactFormData ContactFormDataAware ContactFormDataStorer ContactRole ContainerBuilder -containerfacade ContainerFacade ContentsAware ContentsStorer ContextResolver ContextTokenAware ContextTokenStorer -control CookiePermission -copyable -copyToClipboard -cors -CORS CountryStateDataPagelet -CPUs -createActionResponse -createCategoryFixture -createCmsFixture -createCustomerFixture +CreateFromTrait +CreateTagAction CreatedAt CreatedAtField CreatedBy CreatedByField -createDefaultContext -createDefaultFixture -CreateFromTrait -createGuestOrder -createId -createLanguageFixture -createProductFixture -createPropertyFixture -createSalesChannelFixture -createShippingFixture -createSnippetFixture -CreateTagAction -createValidatorDefinition CredentialsBuilder CredentialsEntity CriteriaEvent CriteriaParser CriteriaTest -cron -croninterval CronIntervalField Cronjobs CrossSellingDataSet -cryptographic -CSP -CSPs -csrf -CSRF -css -CSV Ctrl CurrencyRule CustomAppAware CustomAppEvent CustomAppStorer CustomEntityKernelLoader -customerAware +CustomField CustomerAware CustomerBeforeLoginEvent -customerGroup -customerGroupAware CustomerGroupAware CustomerGroupRegistrationPage CustomerGroupRule CustomerGroupStorer -customerHasFeature CustomerLoginEvent CustomerNumberRule -customerRecovery CustomerRecoveryAware CustomerRecoveryStorer CustomerStorer CustomerTagRule -CustomField -customFields -customizability -customizable -customizations -customizer -cyclus +DAL +DBAL +DDL +DESC +DIC +DIC EntityRepository +DOM +DOMPurify +DS +DSGVO +DSN +DSR +DTO +DTOs +DX Daily.co -dailymotion Dailymotion -dal Dal -DAL -dannorth -dasistweb DataAbstractionLayer DataAware -datadog -Datadog DataResolver -dataSelection DataSelection -dataset -dataSet DataSet -datasets DataSets DataStorer +Datadog DateField -dateinterval DateIntervalField -datepicker -Datepicker DateRangeRule -datetime DateTime DateTimeField +Datepicker DaysSinceLastOrderRule -DBAL -DDL -de -debounce DebugStack -decoratable -decrementing Decrypts -deepCopyObject +DelayAction +DelayAware +DelegatingLoader +Deleter +Deno +Denormalization +Denylist +Dependabot +DependencyInjection +Deployer +Deprecations +Deutsch +DevOps +Devenv +DeviceHelper +Devops +Devtool +DifferentAddressesRule +Differentiator +DirectoryLoader +Direnv +DiscountFacade +Dockerfile +Dockware +DomainException +DomainExceptions +DynamoDB +ENUM +ENUMS +EOL +ERP +ESLint +EcmaScript +ElasticSearch +ElasticsearchDefinition +ElasticsearchEntityAggregator +ElasticsearchEntitySearcher +ElasticsearchProductDefinition +EmailAware +EmailField +EmailStorer +EmployeeAware +EmployeeOfBusinessPartnerRule +EmployeeOrderRule +EmployeeRoleRule +EmployeeStatusRule +Enqueue +EntityCollection +EntityContainerEvent +EntityDefinition +EntityExtension +EntityNotFound +EntityRepository +EntitySearchResult +EntityWrittenContainerEvent +EntityWrittenEvent +Enum +EnumField +Enums +EqualsAny +ErrorsFacade +EventListener +EventSubscriberInterface +Everytime +ExampleController +ExampleDefinition +ExampleDescription +ExampleEvent +ExampleExtensionDefinition +ExampleHandler +ExamplePagelet +ExamplePageletLoadedEvent +ExamplePageletLoader +ExamplePlugin +ExampleTranslationDefinition +ExcludeMultiWarehouseStockUpdateFilter +Extensibility +ExtensionAPI +FPM +FQCN +FastRoute +Fastly +Fastorder +FieldCollection +FieldSerializer +FileLocator +FileReader +Filesystem +Fk +FkField +FloatField +FlowAction +FlowBuilder +FlowBuilderActionApp +FlowBuilderTriggerApp +FlowDispatcher +FlowEventAware +FlowExecutor +FlowStore +FlowStorer +Flysystem +Fontawesome +FooterPagelet +FrameworkBundle +FriendsOfShopware +FroshDevelopmentHelper +FroshPluginUploader +Fullstack +GDPR +GIFs +GenericPage +GenericPageLoader +GitLab +Github +GlobFileLoader +GmbH +GoodsCountRule +GoodsPriceRule +GoogleReCaptchaV +Grafana +Grantable +GridHelper +GuestWishlistPage +GuestWishlistPagelet +HMAC +HMR +Homebrew +Hono +HookClasses +HookExecutor +HowTos +IDEs +IPV +IPv +IdField +IdSearchResult +Ideate +Iframe +Inclusivity +IndexerService +Init +Initialisms +IntField +IntelliSense +InterfaceHooks +IsCompanyRule +IsEmployeeRule +IsNewCustomerRule +ItemFacade +ItemsFacade +JSON +JVM +JWT +JavaScript +JestJS +JetBrains +Jira +Jit +Jonge +JsonField +JsonResponse +KV +KeyDB +Kibana +LONGTEXT +LUA +LandingPage +LastNameRule +Lerna +Lifecycle +LineItemClearanceSaleRule +LineItemCreationDateRule +LineItemCustomFieldRule +LineItemDimensionHeightRule +LineItemDimensionLengthRule +LineItemDimensionWeightRule +LineItemDimensionWidthRule +LineItemFactoryRegistry +LineItemGroupRule +LineItemHandler +LineItemInCategoryRule +LineItemIsNewRule +LineItemList +LineItemListPriceRule +LineItemOfManufacturerRule +LineItemOfTypeRule +LineItemPromotedRule +LineItemPropertyRule +LineItemPurchasePriceRule +LineItemReleaseDateRule +LineItemRemovedEvent +LineItemRule +LineItemTagRule +LineItemTaxationRule +LineItemTotalPriceRule +LineItemUnitPriceRule +LineItemWithQuantityRule +LineItemWrapperRule +LineItemsInCartCountRule +LineItemsInCartRule +ListField +ListingPrice +ListingPriceField +LoaderResolver +LockedField +LogEntry +Logfiles +LoggingService +LoginContextService +LoginRequired +LongText +LongTextField +Lychee +MACOSX +MRs +MVC +MailAware +MailHog +MailService +MailStorer +Mailcatcher +Mailhog +MaintenancePage +ManufacturerAttributeDataSet +ManyToMany +ManyToManyAssociation +ManyToManyAssociationField +ManyToManyId +ManyToManyIdField +ManyToOne +ManyToOneAssociation +ManyToOneAssociationField +MediaDataSelection +MediaDataSet +MediaFolderDataSet +MemcachedSessionHandler +MenuOffcanvasPagelet +Mercure +MessageAware +MessageQueue +MessageStorer +MeteorAdminSDK +Methodize +Middleware +MigrationCollection +Minio +Mixin +Mixins +Modularity +ModuleFactory +MongoDbSessionHandler +Monolog +Monorepo +Monorepos +MoveShopPermanently +MultiWarehouse +MyExampleApp +MyExtension +MyPlugin +MyTestClass +MyTestInterface +NPM +NameAware +NameStorer +NavigationPage +NelmioCorsBundle +NewFeature +NewRelic +NewsletterRecipientAware +NewsletterRecipientStorer +Nginx +NixOS +NoSQL +Noback +NodeJS +NotFoundHttpException +NotRule +NullObject +Nullsafe +Nuxt +Nvidia +OAuth +OPENSEARCH +ORM +ORMs +OTEL +OTLP +ObjectField +ObjectType +OffCanvas +OffcanvasCartPageLoadedEvent +OldFeature +OneToMany +OneToManyAssociation +OneToManyAssociationField +OneToOne +OneToOneAssociation +OneToOneAssociationField +OpenAPI +OpenApi +OpenSSH +OpenSSL +OpenSearch +OpenTelemetry +Openapi +Opensearch +Opensearch's +OrRule +OrderAware +OrderCountRule +OrderEntity +OrderEvents +OrderLineItem +OrderLineItemEntity +OrderStorer +OrderTransaction +OrderTransactionAware +OrderTransactionCapture +OrderTransactionCaptureCollection +OrderTransactionCaptureEntity +OrderTransactionCaptureRefund +OrderTransactionCaptureRefundEntity +OrderTransactionCaptureRefundPosition +OrderTransactionCaptureRefundPositionCollection +OrderTransactionEntity +OrderTransactionRefundCollection +OrderTransactionStorer +PHPStan +PHPStorm +PHPUnit +PHPunit +PII +POC +POS +PRs +PSH +PSP +PSR +PWA +PaaS +Paas +Packagist +PageEvent +PageLoaded +PageLoadedEvent +PageLoadedEvents +PageLoader +PageLoader structs +PageType +Pagelet +PageletLoader +Pagelets +Pageloaders +ParentAssociation +ParentAssociationField +ParentFk +ParentFkField +PasswordField +PaymentGatewayApp +PaymentHandlerIdentifierSubscriber +PaymentMethod +PaymentMethodRoute +PaymentMethodRule +PaymentRefundHandlerInterface +PaymentRefundProcessor +PdoSessionHandler +Percona +Persistable +PhpRedis +PhpStan +PhpUnit +Pinia +PluginManager +PositionID +PositionIDs +PositionIdentifier +PostInstall +PostMessage +PostUpdate +PreWriteValidationEvent +Predis +Preload +Premapping +PreparedPaymentHandlerInterface +Preselect +PriceCollectionFacade +PriceDefinition +PriceDefinitionField +PriceFacade +PriceField +PriceFieldSerializer +PrimaryKey +ProductAttributeDataSet +ProductAware +ProductCartProcessor +ProductCartTest +ProductCategoryDefinition +ProductController +ProductCountRouteResponse +ProductDataSelection +ProductDataSet +ProductListRoute +ProductManufacturerDefinition +ProductMedia +ProductMediaDefinition +ProductNumber +ProductOptionRelationDataSet +ProductPage +ProductPriceAttributeDataSet +ProductPriceCalculator +ProductPropertyRelationDataSet +ProductQuickViewWidget +ProductReviewsWidget +ProductSearchBuilder +ProductStorer +ProductSubscriber +ProductUpdater +ProductVisibility +ProductWarehouse +ProductWarehouses +ProductsFacade +Profiler +PropertyGroupOptionDataSet +ProseMirror +Prosemirror +Pseudocode +Punctuations +Quickstart +QuillJS +RDB +RDBMS +README +RabbitMQ +RabbitMq +Readonly +RecipientsAware +RecipientsStorer +RecurringPaymentHandlerInterface +RedHat +Redict +RedirectResponse +ReferenceVersion +ReferenceVersionField +RefundPaymentHandlerInterface +RegEx +RegistrationCompletedEvent +RegistrationService +Reindexes +ReinstallApps +RemoteAddress +RemoteAddressField +Repo +RepositoryIterator +ResetUrlAware +ResetUrlStorer +RestAPI +RestrictDelete +Reusability +ReverseInherited +ReviewFormDataAware +ReviewFormDataStorer +Reviewdog +Roadmap +RouteResponse +RuleConditionService +RuntimeException +SCSS +SDK +SDK's +SDKs +SEO +SEOs +SFC +SFTP +SHA +SKEs +SMS +SMTP +SPA's +SPAs +SQS +SSHes +SSL +STP +SVG +SVGs +SaaS +Sales Rooms +SalesAgent +SalesChannel +SalesChannelAware +SalesChannelContext +SalesChannelContextCreatedEvent +SalesChannelContextResolvedEvent +SalesChannelContextRestoredEvent +SalesChannelContextRestorerOrderCriteriaEvent +SalesChannelId +SalesChannelProductEntity +SalesChannelRule +SameSite +ScalarValuesAware +ScalarValuesStorer +ScheduledTask +ScriptEventRegistry +SearchCriteria +SearchPage +SearchRanking +SearchWidget +SecretKey +Sendfile +SeoUrlRoute +SeoUrlTemplate +SerializedField +SetNullOnDelete +ShippingCountryRule +ShippingMethodPriceCollector +ShippingMethodRoute +ShippingMethodRule +ShippingStreetRule +ShippingZipCodeRule +ShopActivatedEvent +ShopDeactivatedEvent +ShopDeletedEvent +ShopNameAware +ShopNameStorer +Shopware +Shopware's +SimpleHttpClient +Sinon +SitemapPage +SnippetFileInterface +SomeCoreClassTest +SonarQube +Sonarcube +StackHero +StackOverflow +Stackhero +StateMachineRegistry +StateMachineState +StateMachineStateEntity +StateMachineStateField +StatesFacade +StaticEntityRepository +StockUpdate +StockUpdateFilterProvider +StockUpdater +Storable +StorableFlow +StorageAware +StoreApiResponse +StoreApiRoute +StorefrontController +StorefrontResponse +Storer +StringField +StringFields +Struct +SubjectAware +SubjectStorer +Subprocessor +SuggestPage +SwagAdvDevBundle +SwagB +SwagBasicExample +SwagBasicExampleTheme +SwagDigitalSalesRooms +SwagMigrationBundleExample +SwagMyPlugin +SwagMyPluginSW +Symfony +Symfony's +SyncApi +SynchronousPaymentHandlerInterface +Synopsys +TCP +TLS +TTL +TaxFreeConfigField +TaxProvider +TaxProviderStruct +TaxProviders +TemplateDataAware +TemplateDataStorer +TemplateNamespaceHierarchyBuilder +TestCase +TestStockUpdateFilter +TimeRangeRule +TimeZoneField +TinyMCE +TipTap +TipTap's +ToMany +ToOne +Tooltips +TransactionalAction +TranslatedField +TranslationDataSet +TranslationsAssociation +TranslationsAssociationField +TreeBreadcrumb +TreeBreadcrumbField +TreeLevel +TreeLevelField +TreePath +TreePathField +TreeSelect +TriggerReload +TwigJS +TypeError +TypeError's +TypeScript +UI +UML +USD +UUID +UUIDs +UUIDv +UX +Unassigning +UninstallApps +UnitCollection +UnitEntity +UnitTests +UnoCSS +Unregistering +Untrusted +UpdateContext +UpdateHtaccess +UpdatedAt +UpdatedAtField +UpdatedBy +UpdatedByField +UpperCamelCase +Upserting +UrlAware +UrlStorer +UserAware +UserStorer +Util +Utils +Uuid +VARCHAR +VCL +VCS +VM +VSCode +Validator +Valkey +VariantListingConfigField +Vercel +VersionDataPayload +VersionDataPayloadField +VersionField +VirtualHosts +Vite +Vitepress +Vitest +Vue +Vue's +VueJS +VueJs +VueX +Vuei +Vuex +WCAG +WSL +WarehouseGroup +WarehouseGroups +WebAssembly +WebKit +WebSocket +Webhook +Webkit +Webpack +Webserver +WeekdayRule +WhitelistRule +WhitelistRuleField +WishlistPage +WishlistWidget +WriteEvents +WriteProtected +XDebug +XHR +XKey +XLIFF +XMLHttpRequest +XPath +XQuartz +XSS +XVFB +Xdebug +XmlHttpRequest +XmlUtils +XorRule +YYYY +YamlFileLoader +ZSH +accel +acl +activateShopwareTheme +adr +afterSort +ag +ajax +amqp +anonymization +anonymize +anonymized +antipattern +api +apiKey +apk +appVersion +args +arrayfacade +async +atomicity +auth +autocompletion +autogenerate +autogenerated +autoload +autoloaded +autoloader +autoloading +autom +autoprefixer +autowire +autowiring +awaitAndCheckNotification +axios +bAcl +bAjaxPanel +bAuditLog +bAuth +bLogin +bPlatform +bRestApi +bServiceExtension +bTemplateExtension +backend +backends +backface +backoff +backported +binlog +blackbox +blackfire +blockquote +blockquotes +bolded +bool +boolean +booleans +bottleJS +bottleJs +bourgau +brainer +browserslist +bruteforce +bugfix +bugfixes +bundler +buyable +cacheKey +cacheable +cacheinvalidatorfacade +cachix +calculatedCheapestPrice +calculatedPrice +calculatedPrices +callables +camelCase +camelcase +caniuse +capitalizeString +capsulate +captcha +captureId +cartfacade +cartpricefacade +catchable +catched +cetera +changelog +changelogs +changeset +changesets +chargeback +checkboxes +ci +classmap +classname +cleanUpPreviousState +clearTypeAndCheck +cli +clickContextMenuItem +clickMainMenuItem +cloneDeep +cms +cmsService +cmss +codebase +codeblock +codeblocks +codemods +codereview +colorpicker +compatability +componentSectionRenderer +composable +config +configComponent +configs +configurator +confirmUrl +const +const's +contactFormData +containerfacade +control +copyToClipboard +copyable +cors +createActionResponse +createCategoryFixture +createCmsFixture +createCustomerFixture +createDefaultContext +createDefaultFixture +createGuestOrder +createId +createLanguageFixture +createProductFixture +createPropertyFixture +createSalesChannelFixture +createShippingFixture +createSnippetFixture +createValidatorDefinition +cron +croninterval +cryptographic +csrf +css +customFields +customerAware +customerGroup +customerGroupAware +customerHasFeature +customerRecovery +customizability +customizable +customizations +customizer +cyclus +dTH +dailymotion +dal +dannorth +dasistweb +dataSelection +dataSet +datadog +dataset +datasets +dateinterval +datepicker +datetime +ddev +de +debounce +decoratable +decrementing +deepCopyObject deepMergeObject defaultConfig defaultValue -DelayAction delayAware -DelayAware -DelegatingLoader deletable -Deleter demodemo demoshop deno -Deno -Denormalization denylist -Denylist -Dependabot dependencyInjection -DependencyInjection deployer -Deployer deprecations -Deprecations dereference dereferenced -DESC describeFeatures destructure destructuring -Deutsch dev devenv -Devenv -DeviceHelper devops -Devops -DevOps devs -Devtool devtool's devtools di -DIC -DIC EntityRepository -DifferentAddressesRule differentiator -Differentiator dir -DirectoryLoader direnv -Direnv direnv's discountfacade -DiscountFacade discoverability docblock -Dockerfile dockware -Dockware dom -DOM -DomainException -DomainExceptions -DOMPurify -dont don'ts +dont dont's dr dragTo dropdown -DS -DSGVO -DSN dsr -DSR -dTH -DTO -DTOs dunglas duplications -DX -DynamoDB ean -EcmaScript ecommerce editorconfig eg elasticsearch -ElasticSearch -ElasticsearchDefinition -ElasticsearchEntityAggregator -ElasticsearchEntitySearcher -ElasticsearchProductDefinition -EmailAware -EmailField -EmailStorer -EmployeeAware employeeId -EmployeeOfBusinessPartnerRule -EmployeeOrderRule -EmployeeRoleRule -EmployeeStatusRule enqueue -Enqueue -EntityCollection -EntityContainerEvent -EntityDefinition -EntityExtension entityIds entityName -EntityNotFound -EntityRepository -EntitySearchResult -EntityWrittenContainerEvent -EntityWrittenEvent entrypoint entrypoints enum -Enum -ENUM -EnumField enums -Enums -ENUMS env envs -EOL equalsAny -EqualsAny -ERP errored errorsfacade -ErrorsFacade erros +esbuild eslint -ESLint et -EventListener -EventSubscriberInterface everytime -Everytime evolvability -ExampleController -ExampleDefinition -ExampleDescription -ExampleEvent -ExampleExtensionDefinition -ExampleHandler -ExamplePagelet -ExamplePageletLoadedEvent -ExamplePageletLoader -ExamplePlugin exampler -ExampleTranslationDefinition -ExcludeMultiWarehouseStockUpdateFilter explainer extendability extensibility -Extensibility -ExtensionAPI externalReference fallbacks fastly -Fastly -Fastorder -FastRoute favicon fetchable -FieldCollection -FieldSerializer fieldset -fileinfo -FileLocator -FileReader fileSize +fileinfo filesystem -Filesystem filesystems firstname fk -Fk -FkField flattenDeep -FloatField -FlowAction -FlowBuilder -FlowBuilderActionApp -FlowBuilderTriggerApp -FlowDispatcher -FlowEventAware -FlowExecutor -FlowStore -FlowStorer flyout -Flysystem focussed focussing -Fontawesome fontFamily -FooterPagelet formatters -FPM -FQCN -FrameworkBundle frankdejonge frontend frontends frontmatter -FroshDevelopmentHelper -FroshPluginUploader -Fullstack func +gRPC gd -GDPR -GenericPage -GenericPageLoader german getArrayChanges -getbootstrap getChildren getConstraints getCreationTimestamp @@ -662,40 +1258,27 @@ getScrollbarHeight getScrollbarWidth getSeoUrls getTaxes -getter -getters getTotal getType getUnit getUrls +getbootstrap +getter +getters ghcr gif -GIFs github -Github gitignore gitkeep gitlab -GitLab globals -GlobFileLoader -GmbH -GoodsCountRule -GoodsPriceRule -GoogleReCaptchaV goto -Grafana grantable -Grantable granularly graphviz gridActions gridColumns -GridHelper grpc -gRPC -GuestWishlistPage -GuestWishlistPagelet guid gz gzip @@ -707,72 +1290,47 @@ helpText herokuapp hideCookieBar hmac -HMAC -HMR -Homebrew hono -Hono -HookClasses -HookExecutor hosters hostname -HowTos html http httpCache https hydrator +iFrame +iFrames +iOs iconv -Ideate -IDEs -IdField -IdSearchResult ified iframe -iFrame -Iframe iframes -iFrames inclusivity -Inclusivity incrementer incrementing indexActions -IndexerService infoIt ini init -Init initialisms -Initialisms initializer initializers installable instantiation integrations -IntelliSense -InterfaceHooks -IntField intl invalidations io -iOs -IPv -IPV isActive isArray isBoolean isCloseout -IsCompanyRule isDate -IsEmployeeRule isEmpty isEmptyOrSpaces isEqual isFunction -IsNewCustomerRule isNumber -iso isObject isPlainObject isPropagationStopped @@ -782,132 +1340,51 @@ isUndefined isUrl isValid isValidIp +iso itemfacade -ItemFacade itemsfacade -ItemsFacade iterable iteratively +jQuery jargons javascript -JavaScript -JestJS -JetBrains -Jira -Jit -Jonge -jQuery js +js's json -JSON jsonEncode -JsonField -JsonResponse -js's -JVM jwt -JWT kebabCase -KeyDB keyframes -Kibana -KV -LandingPage lang -LastNameRule lazysizes -Lerna libxml lifecycle -Lifecycle lifecycles lifecylce lineItem -LineItemClearanceSaleRule -LineItemCreationDateRule -LineItemCustomFieldRule -LineItemDimensionHeightRule -LineItemDimensionLengthRule -LineItemDimensionWeightRule -LineItemDimensionWidthRule -LineItemFactoryRegistry -LineItemGroupRule -LineItemHandler lineItemId -LineItemInCategoryRule -LineItemIsNewRule -LineItemList -LineItemListPriceRule -LineItemOfManufacturerRule -LineItemOfTypeRule -LineItemPromotedRule -LineItemPropertyRule -LineItemPurchasePriceRule -LineItemReleaseDateRule -LineItemRemovedEvent -LineItemRule -LineItemsInCartCountRule -LineItemsInCartRule -LineItemTagRule -LineItemTaxationRule -LineItemTotalPriceRule -LineItemUnitPriceRule -LineItemWithQuantityRule -LineItemWrapperRule linter linux -ListField -ListingPrice -ListingPriceField -LoaderResolver +localVue localhost localhost's -localVue locationID locationIDs -LockedField -LogEntry logfiles -Logfiles -LoggingService logics -LoginContextService loginRequired -LoginRequired loginViaApi longtext -LongText -LONGTEXT -LongTextField lookups lowerCamelCase -LUA lychee -Lychee macOS -MACOSX mailAware -MailAware -Mailcatcher -Mailhog -MailHog -MailService -MailStorer mailTemplates -MaintenancePage makefile mandatorily -ManufacturerAttributeDataSet manufacturerId -ManyToMany -ManyToManyAssociation -ManyToManyAssociationField manytomanyid -ManyToManyId -ManyToManyIdField -ManyToOne -ManyToOneAssociation -ManyToOneAssociationField mapErrors martinfowler masternode @@ -916,218 +1393,93 @@ matthiasnoback maxPurchase mbstring md -MediaDataSelection -MediaDataSet -MediaFolderDataSet mediaId mediaService -MemcachedSessionHandler memoization memoized -MenuOffcanvasPagelet mercure -Mercure mergeWith -MessageAware -MessageQueue -MessageStorer -MeteorAdminSDK -Methodize middleware -Middleware middlewares -MigrationCollection +minPurchase minified minimalistic -Minio -minPurchase mixin -Mixin mixins -Mixins mocksArentStubs modifiability modularity -Modularity -ModuleFactory monday -MongoDbSessionHandler monolog -Monolog monorepo -Monorepo monorepos -Monorepos -MoveShopPermanently moz mozilla mpn mr -MRs -MultiWarehouse -MVC -MyExampleApp -MyExtension myNewMethod -MyPlugin myPluginLogHandler mysql mysqldump -MyTestClass -MyTestInterface -NameAware namespace namespaces -NameStorer natively nav -NavigationPage navigations nd -NelmioCorsBundle -NewFeature newQuantity -NewRelic newsletterRecipient -NewsletterRecipientAware -NewsletterRecipientStorer -Nginx ngrok nixos -NixOS nl -Noback -NodeJS nofollow noindex noopener -NoSQL -NotFoundHttpException -NotRule npm -NPM nullable -NullObject nullsafe -Nullsafe -Nuxt -Nvidia oauth -OAuth -ObjectField -ObjectType observability oder -offcanvas -OffCanvas offCanvasCart -OffcanvasCartPageLoadedEvent +offcanvas og ok -OldFeature -OneToMany -OneToManyAssociation -OneToManyAssociationField -OneToOne -OneToOneAssociation -OneToOneAssociationField onlyAvailable onlyOnFeature onwards oop opcache -Openapi -OpenApi -OpenAPI openInitialPage +openUserActionMenu opensearch -Opensearch -OpenSearch -OPENSEARCH -Opensearch's -OpenSSH openssl -OpenSSL -OpenTelemetry -openUserActionMenu orderAware -OrderAware -OrderCountRule -OrderEntity -OrderEvents orderIds -OrderLineItem -OrderLineItemEntity -OrderStorer orderTransaction -OrderTransaction -OrderTransactionAware -OrderTransactionCapture -OrderTransactionCaptureCollection -OrderTransactionCaptureEntity orderTransactionCaptureRefund -OrderTransactionCaptureRefund -OrderTransactionCaptureRefundEntity -OrderTransactionCaptureRefundPosition -OrderTransactionCaptureRefundPositionCollection -OrderTransactionEntity -OrderTransactionRefundCollection -OrderTransactionStorer org's -ORM -ORMs -OrRule otel -OTEL otlp -OTLP overrideComponentSetup oversales paas -Paas -PaaS packagist -Packagist -PageEvent +pageLoaders pagelet -Pagelet -PageletLoader pageletloaders pagelets -Pagelets -PageLoaded -PageLoadedEvent -PageLoadedEvents pageloader -PageLoader -pageLoaders -Pageloaders -PageLoader structs -PageType parallelize param params -ParentAssociation -ParentAssociationField -ParentFk -ParentFkField +parsable parsers -PasswordField -PaymentGatewayApp -PaymentHandlerIdentifierSubscriber -PaymentMethod -PaymentMethodRoute -PaymentMethodRule -PaymentRefundHandlerInterface -PaymentRefundProcessor paypal pcre pdf pdo -PdoSessionHandler -Percona performant -Persistable persister phar philippe @@ -1135,121 +1487,50 @@ php phpdoc phpdocs phpinfo -PhpRedis phpstan -PhpStan -PHPStan -PHPStorm phpunit -PhpUnit -PHPunit -PHPUnit phpunit's phpunitx -PII -Pinia pluginlogger -PluginManager png pnpm -POC +polyfill pos -POS positionID -PositionID -PositionIdentifier positionIDs -PositionIDs -PostInstall -PostMessage -PostUpdate pre prebuild prebuilt precompile preconfigured -Predis prefetch prefixer preload -Preload preloaded prem premapping -Premapping -PreparedPaymentHandlerInterface prepend preprocessor preprocessors preselect -Preselect preselection prettierrc -previewable -previewable previewComponent -PreWriteValidationEvent +previewable pricecollectionfacade -PriceCollectionFacade -PriceDefinition -PriceDefinitionField pricefacade -PriceFacade pricefactory -PriceField -PriceFieldSerializer -PrimaryKey -ProductAttributeDataSet -ProductAware -ProductCartProcessor -ProductCartTest -ProductCategoryDefinition -ProductController productCountRoute -ProductCountRouteResponse -ProductDataSelection -ProductDataSet productId -ProductListRoute -ProductManufacturerDefinition -ProductMedia -ProductMediaDefinition productNumber -ProductNumber -ProductOptionRelationDataSet -ProductPage -ProductPriceAttributeDataSet -ProductPriceCalculator -ProductPropertyRelationDataSet productproxy -ProductQuickViewWidget -ProductReviewsWidget -ProductSearchBuilder productsfacade -ProductsFacade -ProductStorer -ProductSubscriber -ProductUpdater -ProductVisibility -ProductWarehouse -ProductWarehouses profiler -Profiler profilers programmatically -PropertyGroupOptionDataSet -Prosemirror -ProseMirror -PRs pseudocode -Pseudocode psh -PSH -PSP -PSR -Punctuations pwa -PWA px py qa @@ -1257,254 +1538,127 @@ qa@shopware.com qty's quantityBefore quantityDelta -Quickstart -QuillJS rabbitmq -RabbitMq -RabbitMQ randomHex -RDB -RDBMS +reCAPTCHA readAsArrayBuffer readAsDataURL readAsText -README -Readonly realtime rebasing rebranded recalculable -reCAPTCHA -RecipientsAware -RecipientsStorer -RecurringPaymentHandlerInterface -Redict -RedirectResponse redis refactorings referenceField -ReferenceVersion -ReferenceVersionField refundAmount refundId -RefundPaymentHandlerInterface refundPositions refundPrice -RegEx regexes -RegistrationCompletedEvent -RegistrationService reindex -Reindexes reinitializing -ReinstallApps reinstallation remoteaddress -RemoteAddress -RemoteAddressField removeBy renameMedia renderer renderers -Repo repos -repositoryfacade repositoryFactory -RepositoryIterator +repositoryfacade repositorywriterfacade reproducibility requestAdminApi resetUrl -ResetUrlAware -ResetUrlStorer resolvers -RestAPI -RestrictDelete resubmittable rethrown returnUrl -Reusability revalidation -ReverseInherited -Reviewdog -ReviewFormDataAware -ReviewFormDataStorer rfc roadmap -Roadmap rollbacking -RouteResponse routeScope -RuleConditionService runtime -RuntimeException runtimes -SaaS -SalesAgent -saleschannel salesChannel -SalesChannel salesChannelAware -SalesChannelAware salesChannelContext -SalesChannelContext -SalesChannelContextCreatedEvent -SalesChannelContextResolvedEvent -SalesChannelContextRestoredEvent -SalesChannelContextRestorerOrderCriteriaEvent salesChannelId -SalesChannelId salesChannelLoaded -SalesChannelProductEntity +saleschannel saleschannelrepositoryfacade -SalesChannelRule -Sales Rooms -SameSite sandboxed sarven scalability scalable -ScalarValuesAware -ScalarValuesStorer -ScheduledTask schemas -ScriptEventRegistry scriptResponse scriptresponsefactoryfacade scrollbar scss -SCSS sdk -SDK -SDK's -SDKs -SearchCriteria searchMedia -SearchPage -SearchRanking searchViaAdminApi -SearchWidget secretKey -SecretKey selectable selectbox sellable -Sendfile sendmail seo -SEO -SEOs -SeoUrlRoute -SeoUrlTemplate seperate seperated serializable -SerializedField serializer setFlags setLocaleToEnGb -SetNullOnDelete setProductFixtureVisibility setSalesChannelDomain -settingsItem setToInitialState -SFC -SFTP +settingsItem sha -SHA shakable shallowMount shippable -ShippingCountryRule -ShippingMethodPriceCollector -ShippingMethodRoute -ShippingMethodRule -ShippingStreetRule -ShippingZipCodeRule sho -ShopActivatedEvent -ShopDeactivatedEvent -ShopDeletedEvent shopId shopName -ShopNameAware -ShopNameStorer shopUrl shopware -Shopware +shopware's shopwarelabs shopwarepartners -shopware's -Shopware's shorthands -SimpleHttpClient simples simplexml -Sinon -SitemapPage -SKEs skipOnFeature skipTestIfInActive sku slowlog sm smartbar -SMS -SMTP snakeCase -SnippetFileInterface -SomeCoreClassTest -Sonarcube -SonarQube sortings -SPA's -SPAs sql -SQS src srcset -SSHes -SSL stableVersion stackable -Stackhero -StackHero -StackOverflow stacktrace stateId -StateMachineRegistry stateMachineState -StateMachineState -StateMachineStateEntity -StateMachineStateField statesfacade -StatesFacade -StaticEntityRepository statusCode stdout stemmer stemmers -StockUpdate -StockUpdateFilterProvider -StockUpdater stopwords -Storable -StorableFlow -StorageAware storages -StoreApiResponse -StoreApiRoute storefrontApiRequest -StorefrontController -StorefrontResponse storer -Storer -STP -StringField -StringFields strlen struct -Struct structs stylesheet stylesheets @@ -1515,55 +1669,26 @@ subcontent subdirectories subdirectory subfolder -SubjectAware -SubjectStorer suboptimal subprocessor -Subprocessor subprocessors -SuggestPage supervisord svg -SVG -SVGs sw -SwagAdvDevBundle -SwagB -SwagBasicExample -SwagBasicExampleTheme -SwagDigitalSalesRooms -SwagMigrationBundleExample -SwagMyPlugin -SwagMyPluginSW -swoole swSelect +swoole symfony -Symfony symfony's -Symfony's symlink symlinks -SyncApi -SynchronousPaymentHandlerInterface -Synopsys systemconfigfacade systemd -TaxFreeConfigField -TaxProvider -TaxProviders -TaxProviderStruct -TCP teardown templated -TemplateDataAware -TemplateDataStorer -TemplateNamespaceHierarchyBuilder templating +testFoo testability -TestCase testenv -testFoo -TestStockUpdateFilter testsuite testsuites textarea @@ -1571,212 +1696,99 @@ th theming themself timeframe -TimeRangeRule -TimeZoneField tinyint -TinyMCE tipps -TipTap -TipTap's tl -TLS +to's todo tokenized -ToMany tooltip tooltips -Tooltips -ToOne -to's totalAmount tradeoff -transactional -TransactionalAction transactionCapture transactionId -TranslatedField -TranslationDataSet -TranslationsAssociation -TranslationsAssociationField +transactional transpiling -TreeBreadcrumb -TreeBreadcrumbField -TreeLevel -TreeLevelField treepath -TreePath -TreePathField -TreeSelect triggerDeprecated -TriggerReload truthy tsx -TTL twigjs -TwigJS typeAndCheck typeAndCheckSearchField -TypeError -TypeError's -typehint -typehinted typeLegacySelectAndCheck typeMultiSelectAndCheck -TypeScript typeSingleSelect typeSingleSelectAndCheck +typehint +typehinted ui -UI -UML un -Unassigning uncomment uncommenting uncompiled und unhandled -UninstallApps uninstallation uniqBy -UnitCollection -UnitEntity -UnitTests unminified -UnoCSS unprefixed unregister -Unregistering unsecure unserialize unstorage unstyled untrusted -Untrusted untyped -UpdateContext -UpdatedAt -UpdatedAtField -UpdatedBy -UpdatedByField updateDestructive -UpdateHtaccess updateViaAdminApi -UpperCamelCase upsert -Upserting url -UrlAware urls -UrlStorer -USD userAware -UserAware -userland userRecovery -UserStorer -Util +userland utils -Utils uuid -Uuid -UUID -UUIDs -UUIDv -UX validator -Validator validators -Valkey varchar -VARCHAR -VariantListingConfigField -VCL -VCS ve -Vercel verifier -versionable -VersionDataPayload -VersionDataPayloadField -VersionField versionId +versionable viewport viewportHeight viewports vimeo -VirtualHosts -Vite -Vitepress -Vitest -VM vscode -VSCode vue -Vue -Vuei -VueJs -VueJS -Vue's vuex -Vuex -VueX -WarehouseGroup -WarehouseGroups -WCAG webhook -Webhook webhooks webkit -Webkit -WebKit webpack -Webpack webpackMerge webserver -Webserver -WebSocket wednesday -WeekdayRule -WhitelistRule -WhitelistRuleField whitespace whitespaces wil wishlist -WishlistPage -WishlistWidget -WriteEvents -WriteProtected -WSL www xasjkyld -Xdebug -XDebug xhost's -XHR -XKey xkeys xl -XLIFF xml -XmlHttpRequest -XMLHttpRequest -XmlUtils -XorRule xpath -XPath -XQuartz xs xsd -XSS -XVFB yaml -YamlFileLoader yml youtube -YYYY zipignore zlib zsh -ZSH zstd diff --git a/products/cli/extension-commands/admin-watcher.md b/products/cli/extension-commands/admin-watcher.md new file mode 100644 index 000000000..8ddd60232 --- /dev/null +++ b/products/cli/extension-commands/admin-watcher.md @@ -0,0 +1,34 @@ +--- +nav: + title: Standalone Admin Watcher + position: 3 + +--- + +# Standalone Admin Watcher + +::: info +`shopware-cli extension admin-watch` can be different to the regular Admin Watcher. You can start the regular Admin Watcher with `shopware-cli project admin-watch` +::: + +Shopware-CLI has an integrated Standalone Admin Watcher. This is useful if the regular Admin Watcher struggles with the amount of installed extensions and you only want to watch one single extension. The Standalone Watcher works by using the regular build Administration and injects only the changed files of the extension. + +Therefore the Watcher starts in few milliseconds and is very fast. Additionally, it can be targeted to an external Shopware 6 Instance to debug JavaScript or CSS changes with the external data. + +## Starting the Standalone Admin Watcher + +To start the Standalone Admin Watcher, you can use the following command: + +```bash +shopware-cli extension admin-watch +``` + +The first parameter is the **path to extension** you want to watch and the last parameter is the URL to the Shopware 6 instance. The URL must be reachable from the machine where the CLI is executed. You can watch also multiple extensions by providing multiple paths, but the last parameter must be the URL to the Shopware 6 instance. + +You can also pass **path of a Shopware project** to the command. In this case, the CLI will automatically detect the extensions. + +The listing port of the Admin Watcher can be changed with `--listen :`. + +## Usage behind a proxy + +If you want to use the Standalone Admin Watcher behind a proxy, for example, SSL, you should set `--external-url` to the URL where the Admin Watcher will be reachable in the Browser. diff --git a/products/cli/extension-commands/build.md b/products/cli/extension-commands/build.md new file mode 100644 index 000000000..71f52dac1 --- /dev/null +++ b/products/cli/extension-commands/build.md @@ -0,0 +1,171 @@ +--- +nav: + title: Building extensions and creating archives + position: 2 + +--- + +# Building extensions and creating archives + +Extensions consists of PHP Changes, JavaScript and CSS. To release an extension to the Shopware Store or upload it to a Shopware 6 instance without having to rebuild Storefront and Administration your extension needs to provide the compiled assets. + +## Building an extension + +Shopware-CLI allows you to easily build the assets of an extension. To build an extension, you can use the following command: + +```bash +shopware-cli extension build +``` + +Shopware-CLI reads the `shopware/core` requirement from `composer.json` or `manifest.xml` and builds the assets using the lowest compatible Shopware version. This ensures the extension remains usable across multiple Shopware versions. If the selected version is incorrect, you can override it using a `.shopware-extension.yml` file. + +```yaml +# .shopware-extension.yml +build: + shopwareVersionConstraint: '6.6.9.0' +``` + +This only affects the build process and not on the installation of the extension. For full control you can also specify the environment variable `SHOPWARE_PROJECT_ROOT` pointing to a Shopware 6 project, and it will use that Shopware to build the extension assets. + +## Additional bundles + +If your plugin consists of multiple bundles, usually when you have implemented `getAdditionalBundles` in your `Plugin` class, you have to provide the path to the bundle you want to build in the config: + +```yaml +# .shopware-extension.yml +build: + extraBundles: + # Assumes the bundle name is the same as the directory name + - path: src/Foo + # Explictly specify the bundle name + - path: src/Foo + name: Foo +``` + +## Using esbuild for JavaScript Bundling + +::: warning +Building with esbuild works completely standalone without the Shopware codebase. This means if you import files from Shopware, you have to copy it to your extension. +::: + +Esbuild can be utilized for JavaScript bundling, offering a significantly faster alternative to the standard Shopware bundling process, as it eliminates the need to involve Shopware for asset building. + +```yaml +# .shopware-extension.yml +build: + zip: + assets: + # Use esbuild for Administration + enable_es_build_for_admin: true + # Use esbuild for Storefront + enable_es_build_for_storefront: true +``` + +## Creating an archive + +To create an archive of an extension, you can use the following command: + +```bash +shopware-cli extension zip +``` + +The command copies the extension to a temporary directory, builds the assets, deletes unnecessary files and creates a zip archive of the extension. The archive is placed in the current working directory. + +**By default the command picks the latest released git tag**, use `--disable-git` as flag to disable this behavior and use the current source code. Besides disabling it completely, you can also specify a specific tag or commit using `--git-commit`. + +### Bundling composer dependencies + +Before Shopware 6.5, bundling the composer dependencies into the zip file is required. Shopware-CLI automatically runs `composer install` and removes duplicate composer dependencies to avoid conflicts. + +To disable this behavior, you can adjust the configuration: + +```yaml +# .shopware-extension.yml +build: + zip: + composer: + enabled: false +``` + +This is automatically disabled for plugins targeting Shopware 6.5 and above and `executeComposerCommands` should be used instead. + +### Delete files before zipping + +Shopware-CLI deletes a lot of known files before zipping the extension. If you want to delete more files, you can adjust the configuration: + +```yaml +# .shopware-extension.yml +build: + zip: + pack: + excludes: + paths: + - +``` + +### JavaScript Build optimization + +If you bring additional NPM packages, make sure that you added only runtime dependencies to `dependencies` inside `package.json` and tooling to `devDependencies` and enabled `npm_strict` in the configuration: + +```yaml +# .shopware-extension.yml +build: + zip: + assets: + npm_strict: true +``` + +This skips unnecessary `npm install` and `npm ci` commands and only installs the runtime dependencies. + +### Release mode + +If you are building an archive for distribution, you can enable the release mode with the flag `--release`. This will remove the App secret from the `manifest.xml` and generate changelog files if enabled. + +The changelog generation can be enabled with the configuration: + +```yaml +# .shopware-extension.yml +changelog: + enabled: true +``` + +It utilizes the commits between the last tag and the current commit to generate the changelog. Additionally, it can be configured to filter commits and build the changelog differently. + +```yaml +changelog: + enabled: true + # only the commits matching to this regex will be used + pattern: '^NEXT-\d+' + # variables allows to extract metadata out of the commit message + variables: + ticket: '^(NEXT-\d+)\s' + # go template for the changelog, it loops over all commits + template: | + {{range .Commits}}- [{{ .Message }}](https://issues.shopware.com/issues/{{ .Variables.ticket }}) + {{end}} +``` + +This example checks that all commits in the changelog needs to start with `NEXT-` in the beginning. The `variables` section allows to extract metadata out of the commit message. The `template` is a go template which loops over all commits and generates the changelog. +With the combination of `pattern`, `variables` and `template` we link the commit message to the Shopware ticket system. + +### Overwrites + +Extension configuration can be overwritten during the zipping process, allowing changes to aspects such as the version and app-related settings. + +```yaml +shopware-cli extension zip --overwrite-version=1.0.0 +``` + +Replaces the version in `composer.json` or `manifest.xml` with the given version. + +```yaml +shopware-cli extension zip --overwrite-app-backend-url=https://example.com +``` + +Replaces all external URLs in `manifest.xml` to that given URL. + +```yaml +shopware-cli extension zip --overwrite-app-backend-secret=MySecret +``` + +Replaces the App secret in `manifest.xml` with the given secret. diff --git a/products/cli/extension-commands/extract-meta-data.md b/products/cli/extension-commands/extract-meta-data.md new file mode 100644 index 000000000..fe5ad0ae8 --- /dev/null +++ b/products/cli/extension-commands/extract-meta-data.md @@ -0,0 +1,32 @@ +--- +nav: + title: Extracting Meta Data + position: 4 + +--- + +# Extracting Meta Data + +There are helpers in Shopware-CLI to extract data of an extension. This is useful in your CI/CD pipeline to get the extension version or the changelog for the automated release. + +## Extracting the version + +To extract the version of an extension, you can use the following command: + +```bash +shopware-cli extension get-version +``` + +The path can be absolute or relative to the current working directory. The command will output the version of the extension. + +## Extracting the changelog + +To extract the changelog of an extension, you can use the following command: + +```bash +shopware-cli extension get-changelog +``` + +The path can be absolute or relative to the current working directory. The command will output the changelog of the extension. + +It will output always the English changelog. diff --git a/products/cli/extension-commands/validation.md b/products/cli/extension-commands/validation.md new file mode 100644 index 000000000..1e882b99f --- /dev/null +++ b/products/cli/extension-commands/validation.md @@ -0,0 +1,42 @@ +--- +nav: + title: Extension Validation + position: 1 + +--- + +# Extension Validation + +Shopware-CLI has a built-in validation for extensions. This is useful in your CI/CD pipeline to validate the extension before you release it. + +## Validating an extension + +To validate an extension, you can use the following command: + +```bash +shopware-cli extension validate +``` + +The path can be absolute or relative to the directory containing the extension or the zip file. The command exists with a non-zero exit code if the validation fails with a error level message. + +## What is validated? + +- The `composer.json` has an `shopware/core` requirement and constraint is parsable +- The extension metadata is filled with: + - `name` + - `label` (German and English) + - `description` (German and English) and longer than 150 characters and shorter than 185 characters +- Translations have equality translated in the given languages +- PHP can be correctly linted with the minimum PHP version +- The `theme.json` can be parsed and included assets can be found + +## Supported PHP versions for linting + +Following PHP versions are supported for linting: + +- 7.3 +- 7.4 +- 8.1 +- 8.2 + +These versions don't need to be installed locally, they are downloaded on demand and executed using WebAssembly without any dependencies. diff --git a/products/cli/index.md b/products/cli/index.md new file mode 100644 index 000000000..ca7914265 --- /dev/null +++ b/products/cli/index.md @@ -0,0 +1,18 @@ +--- +nav: + title: Shopware-CLI + position: 40 + +--- + +# Shopware-CLI + +Shopware-CLI is an open-source external command-line interface for Shopware 6. It provides a set of commands to interact with your Shopware instance, build extensions, dump databases and more. The CLI **is a external tool** and needs to be set up separately from your Shopware instance. + +The CLI consists of three main components: + +- Project commands: Commands to interact with your Shopware project +- Extension commands: Commands to build Shopware extensions +- Store commands: Commands to publish extensions to the Shopware Store or update + +If you want to use the CLI, you need to [install it first](installation.md) or take a look at each area of the CLI. diff --git a/products/cli/installation.md b/products/cli/installation.md new file mode 100644 index 000000000..befa396ea --- /dev/null +++ b/products/cli/installation.md @@ -0,0 +1,180 @@ +--- +nav: + title: Installation + position: 1 + +--- + +# Installation + +You can install the pre-compiled binary (in several different ways), use Docker or compile from the source. + +Below you can find the steps for each of them. + +## Install the pre-compiled binary + +Shopware-CLI is published in various package managers. You can install it using the following commands. + +### Homebrew + +```bash +brew install shopware/tap/shopware-cli +``` + +### Debian/Ubuntu — APT based Linux + +```bash +curl -1sLf \ + 'https://dl.cloudsmith.io/public/friendsofshopware/stable/setup.deb.sh' \ + | sudo -E bash +sudo apt install shopware-cli +``` + +### Fedora/CentOS/SUSE/RedHat — YUM based Linux + +```bash +curl -1sLf \ + 'https://dl.cloudsmith.io/public/friendsofshopware/stable/setup.rpm.sh' \ + | sudo -E bash +sudo dnf install shopware-cli +``` + +### Archlinux User Repository (AUR) + +```bash +yay -S shopware-cli-bin +``` + +### Manually: deb,rpm apt packages + +Download the `.deb`, `.rpm` or `.apk` packages from the [releases](https://github.com/FriendsOfShopware/shopware-cli/releases/) page and install them with the appropriate tools. + +### Nix + +Install **Nix** package from here: + +```shell +nix profile install nixpkgs#shopware-cli +``` + +or directly from the **FriendsOfShopware** repository (more up to date) + +```shell +nix profile install github:FriendsOfShopware/nur-packages#shopware-cli +``` + +### Devenv + +Update `devenv.yaml` with a new input: + +```yaml +inputs: + nixpkgs: + url: github:NixOS/nixpkgs/nixpkgs-unstable + froshpkgs: + url: github:FriendsOfShopware/nur-packages + inputs: + nixpkgs: + follows: "nixpkgs" +``` + +Then you can use the new input in the `devenv.nix` file. Don't forget to add the `inputs` argument, to the first line. + +```nix +{ pkgs, inputs, ... }: { + packages = [ + inputs.froshpkgs.packages.${pkgs.system}.shopware-cli + ]; +} +``` + +### GitHub Codespaces + +```json +{ + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "ghcr.io/shyim/devcontainers-features/shopware-cli:latest": {} + } +} +``` + +### GitHub Action + +Using Shopware CLI Action : + +```yaml +- name: Install shopware-cli + uses: shopware/shopware-cli-action@v1 +``` + +### Gitlab CI + +```yaml +build: + stage: build + image: + name: shopware/shopware-cli:latest + entrypoint: [ "/bin/sh", "-c" ] + script: + - shopware-cli --version +``` + +### ddev + +Add a file `.ddev/web-build/Dockerfile.shopware-cli` + +```Dockerfile +# .ddev/web-build/Dockerfile.shopware-cli +COPY --from=shopware/shopware-cli:bin /shopware-cli /usr/local/bin/shopware-cli +``` + +### Docker Image + +Add the following line to your docker image to copy the binary into your image. + +```Dockerfile +# Dockerfile +COPY --from=shopware/shopware-cli:bin /shopware-cli /usr/local/bin/shopware-cli +``` + +## Manually + +Download the pre-compiled binaries from the [releases](https://github.com/FriendsOfShopware/shopware-cli/releases/) page and copy them to the desired location. + +## Running with Docker + +You can also use it within a Docker container. To do that, you will need to execute something more or less like the examples below. + +Registries: + +- [shopware/shopware-cli](https://hub.docker.com/r/shopware/shopware-cli) + +Example usage: + +Builds assets of an extension + +```bash +docker run \ + --rm \ + -v $(pwd):$(pwd) \ + -w $(pwd) \ + -u $(id -u) \ + shopware/shopware-cli \ + extension build FroshPlatformAdminer +``` + +## Compiling from source + +If you just want to build from source for whatever reason, follow these steps: + +```bash +git clone https://github.com/shopware/shopware-cli +cd shopware-cli + +go mod tidy + +go build -o shopware-cli . + +./shopware-cli --version +``` diff --git a/products/cli/project-commands/build.md b/products/cli/project-commands/build.md new file mode 100644 index 000000000..89e664ef8 --- /dev/null +++ b/products/cli/project-commands/build.md @@ -0,0 +1,149 @@ +--- +nav: + title: Build a complete Project + position: 3 + +--- + +# Build a complete Project + +Usually, when you want to deploy your project, you have to run `composer install` and compile the assets of the project. Shopware-CLI provides a single command which does all of this for you. + +::: warning +This command modifies the given directory and deletes files. Make sure you have committed all your changes before running this command. +::: + +```bash +shopware-cli project ci +``` + +## What it does? + +- It runs `composer install` (by default only installs the production dependencies, use `--with-dev-dependencies` to install the dev dependencies as well) +- Looks for missing assets of extensions and only compiles the missing assets to speed up the build process +- Deletes unnecessary files like `node_modules` and many more to save disk space +- Deletes source code of compiled assets to save disk space +- Merges snippets of extensions to speed up Administration + +## Using private Composer repositories + +If you want to use `packages.shopware.com` as a private Composer repository, make sure you have set `SHOPWARE_PACKAGES_TOKEN` environment variable to your Composer token. This can be found in your Shopware Account. + +For other private Composer repositories, you can use the `auth.json` file in the root of your project or set `COMPOSER_AUTH` environment variable with the content of the `auth.json` file. + +For more information, see the [Composer documentation](https://getcomposer.org/doc/articles/authentication-for-private-packages.md). + +## Reducing JavaScript in Storefront + +Shopware's default `browserlist` still supports older browsers like Internet Explorer 11. If you want to reduce JavaScript polyfill and CSS prefixes, you can adjust the `browserlist` configuration in the `.shopware-project.yml` file. + +```yaml +build: + # Browserlist configuration for Storefront + browserslist: 'defaults' +``` + +You can check [here which browsers would be affected](https://browsersl.ist/#q=defaults). + +## Configuration options + +You can configure the build process with a `.shopware-project.yml` file. The following options are available: + +```yaml +build: + # Browserlist configuration for Storefront + browserslist: 'defaults' + # Which paths should be deleted + cleanup_paths: + - 'node_modules' + # At the end of the process, bin/console asset:install is executed, this can be disabled here + disable_asset_copy: false + # Exclude following extensions from the build process + exclude_extensions: + - 'SwagExample' + # Keep the extension Administration and Storefront source code + keep_extension_source: false + # Keep the source maps of the compiled assets + keep_source_maps: false + # Delete after bin/console asset:install all assets in the extensions, so only live in public folder. + # This only works when the assets are served directly from the public folder. + remove_extension_assets: false +``` + +## Supporting bundles + +Plugins and Apps are automatically detected by Shopware-CLI. Custom bundles (classes that extend bundle class from Shopware) cannot be automatically detected as Shopware-CLI does not execute any PHP code. +Therefore you need to add the path of the custom bundle to your project `composer.json`: + +```json +{ + "extra": { + "shopware-bundles": { + // The key is the relative path from project root to the bundle + "src/MyBundle": {} + } + } +} +``` + +If your bundle folder names does not match your bundle name, you can use the `name` key to map the folder to the bundle name. + +```json +{ + "extra": { + "shopware-bundles": { + "src/MyBundle": { + "name": "MyFancyBundle" + } + } + } +} +``` + +### Bundle packaged in own composer package + +If your bundle is a own composer package, make sure your composer type is `shopware-bundle` and that you have set a `shopware-bundle-name` in the extra part of the config like this: + +```json +{ + "name": "my-vendor/my-bundle", + "type": "shopware-bundle", + "extra": { + "shopware-bundle-name": "MyBundle" + } +} +``` + +With this Composer type, `shopware-cli extension build` also works for your bundle, if you want to distribute compiled assets. + +## Example Docker Image + +This is an example Dockerfile which builds a Shopware project and copies the source code to the `/var/www/html` folder. + +```dockerfile +#syntax=docker/dockerfile:1.4 + +# pin versions +FROM shopware/docker-base:8.3 AS base-image +FROM shopware/shopware-cli:latest-php-8.3 AS shopware-cli + +# build + +FROM shopware-cli AS build + +ARG SHOPWARE_PACKAGES_TOKEN + +ADD . /src +WORKDIR /src + +RUN --mount=type=secret,id=composer_auth,dst=/src/auth.json \ + --mount=type=cache,target=/root/.composer \ + --mount=type=cache,target=/root/.npm \ + /usr/local/bin/entrypoint.sh shopware-cli project ci /src + +FROM base-image + +COPY --from=build --chown=82 --link /src /var/www/html +``` + +Besides Docker, it is also a perfect fit for any deployment variant. diff --git a/products/cli/project-commands/helper-commands.md b/products/cli/project-commands/helper-commands.md new file mode 100644 index 000000000..fb68c028d --- /dev/null +++ b/products/cli/project-commands/helper-commands.md @@ -0,0 +1,105 @@ +--- +nav: + title: Helper Commands + position: 5 + +--- + +# Helper Commands + +This is a curated list of helper commands that are useful for your daily work with Shopware-CLI in your Shopware project. + +## Create a new project + +To create a new project, you can use the following command: + +```bash +shopware-cli project create +``` + +It will ask you for the Shopware version. You can pass also the version as second parameter: + +```bash +shopware-cli project create +``` + +The version parameter can be also `latest` for the latest stable version or `dev-trunk` for the latest development version. + +## Replacements to include in shell scripts + +Shopware-CLI contains replacements for `bin/build-administration.sh` and `bin/build-storefront.sh`. + +| Shell Script | Shopware Command | +|-----------------------------|-----------------------------------------| +| bin/build-storefront.sh | `shopware-cli project storefront-build` | +| bin/build-administration.sh | `shopware-cli project admin-build` | +| bin/watch-storefront.sh | `shopware-cli project storefront-watch` | +| bin/watch-administration.sh | `shopware-cli project admin-watch` | + +Additionally to the replacement, Shopware-CLI allows to only watch a specific set of extensions or exclude few. + +To only watch specific: + +```bash +shopware-cli project admin-watch --only-extensions ,.... +``` + +To exclude specific: + +```bash +shopware-cli project admin-watch --skip-extensions ,.... +``` + +## Worker + +Usually you have to start the worker with `bin/console messenger:consume` in the project root directory. But if you want to have more than one worker at once, it gets a bit tricky. Shopware-CLI has a helper command for that: + +```bash +shopware-cli project worker +``` + +For production, you should let this handle **supervisord** or **systemd**. But for development, this is a quick way to start multiple workers. + +## Clear cache + +It is just a short cut for `bin/console cache:clear` without having to be in the project root directory. + +```bash +shopware-cli project clear-cache +``` + +If in the `.shopware-project.yml` a API connection is configured, it will clear the remote instance cache. + +## Console + +Similar to `clear-cache`, there is also a general shortcut for `bin/console`: + +```bash +shopware-cli project console +``` + +## Generate JWT secret + +To generate a new JWT secret, you can use the following command: + +```bash +shopware-cli project generate-jwt +``` + +It is similar to `bin/console system:generate-jwt-secret`, but requires no Shopware project to be present or PHP to be installed. + +## Admin API + +If you want to make requests against the Shopware-API using curl, you need to obtain a JWT token and add it as a header. Shopware-CLI has a helper command for that: + +```bash +shopware-cli project admin-api --output-token +``` + +This will output the JWT token to the console. You can also make directly API requests like: + +```bash +shopware-cli project admin-api GET /_info/version +``` + +You can also pass more options like `-d` for data or `-H` for headers as you would do with curl. diff --git a/products/cli/project-commands/mysql-dump.md b/products/cli/project-commands/mysql-dump.md new file mode 100644 index 000000000..749054e39 --- /dev/null +++ b/products/cli/project-commands/mysql-dump.md @@ -0,0 +1,103 @@ +--- +nav: + title: Generating MySQL dumps + position: 1 + +--- + +# Generating MySQL dumps + +Shopware-CLI has built-in support for generating MySQL dumps. The dump command is native implementation and does not use existing tools like `mysqldump`. + +Creating a MySQL dump is as simple as running the following command: + +```bash +shopware-cli project dump +``` + +This will create a `dump.sql` in the current directory. The dump command will use the database credentials from the `.env` file. If you want to use different credentials, you can use the following flags: + +```bash +shopware-cli project dump --host 127.0.0.1 --username root --password root --database sw6 +``` + +It is possible to use `--skip-lock-tables` to skip the lock tables command. This is useful for large databases or when the MySQL user has no rights to lock the table. + +## Compressing the dump + +Database dumps can be pretty large, it is possible to compress the dump using `gzip` or `zstd`. Use flag `--compression=gzip` for gzip compression or `--compression=zstd` for zstd compression. + +## Table locking + +By default Shopware-CLI will try to lock the table before dumping the data. This can fail if the MySQL user has no rights to lock the table. To skip the lock tables command, use the `--skip-lock-tables` flag. + +## Anonymizing data + +The `--anonymize` flag will anonymize known user data tables. The following tables are anonymized: + +[See here for the complete list](https://github.com/FriendsOfShopware/shopware-cli/blob/main/cmd/project/project_dump.go#L74) + +It is possible to customize the anonymization process by using the `dump.rewrite` configuration in the `shopware-cli.yml` file. + +```yaml +# .shopware-project.yml +dump: + rewrite: + : + # Rewrite column content to new value + : "'new-value'" + # Use go-faker to generate data + : "faker.Internet().Email()" # See https://github.com/jaswdr/faker for all available functions +``` + +## Ignoring table content + +Some tables are not relevant for dumps, like log tables. To ignore some default tables, use the `--clean` flag. This will ignore the content of the following tables: + +- `cart` +- `customer_recovery` +- `dead_message` +- `enqueue` +- `messenger_messages` +- `increment` +- `elasticsearch_index_task` +- `log_entry` +- `message_queue_stats` +- `notification` +- `payment_token` +- `refresh_token` +- `version` +- `version_commit` +- `version_commit_data` +- `webhook_event_log` + +To ignore additional tables, use the `dump.ignore` configuration in the `shopware-project.yml` file. + +```yaml +# .shopware-project.yml +dump: + nodata: + - +``` + +## Ignoring entire tables + +It is also possible to completely ignore a table **not only the content**. + +```yaml +# .shopware-project.yml +dump: + ignore: + - +``` + +## Adding a where clause + +It is possible to add a where clause to the export of a table. So only rows matching the where clause will be exported. + +```yaml +# .shopware-project.yml +dump: + where: + : 'id > 5' +``` diff --git a/products/cli/project-commands/project-config-sync.md b/products/cli/project-commands/project-config-sync.md new file mode 100644 index 000000000..e2d09f987 --- /dev/null +++ b/products/cli/project-commands/project-config-sync.md @@ -0,0 +1,83 @@ +--- +nav: + title: Project Config synchronization + position: 2 + +--- + +# Project config synchronization + +Shopware-CLI can synchronize the project configurations between different environments. This is useful for example to keep the configuration in the development and production environment in sync. + +Following things are possible to synchronize: + +- Theme Configuration +- System Configuration (including extension configuration) +- Mail Templates +- Entity + +## Setup + +To synchronize the project, you need to create a `.shopware-project.yml` file in the root of your project. This file contains the configuration for the synchronization. + +You can also use the command `shopware-cli project config init` to create a new `shopware-project.yml` file. Make sure that you configure the API access too as this is required for the synchronization. + +## Credentials with environment variables + +If you don't want to store the credentials in the `shopware-project.yml` file, you can use environment variables. + +- `SHOPWARE_CLI_API_URL` - The URL to the Shopware instance +- `SHOPWARE_CLI_API_CLIENT_ID` - The client ID for the API access +- `SHOPWARE_CLI_API_CLIENT_SECRET` - The client secret for the API access +- `SHOPWARE_CLI_API_USERNAME` - The username for the API access +- `SHOPWARE_CLI_API_PASSWORD` - The password for the API access + +Either you can fill `SHOPWARE_CLI_API_CLIENT_ID` and `SHOPWARE_CLI_API_CLIENT_SECRET` or `SHOPWARE_CLI_API_USERNAME` and `SHOPWARE_CLI_API_PASSWORD`. + +## Initial pulling + +To pull the configuration from the Shopware instance, you can use the command `shopware-cli project config pull`. This command pulls the configuration from the Shopware instance and stores it in the local `shopware-project.yml` file. + +## Pushing the configuration + +After you made the changes in the local `shopware-project.yml` file, you can push the changes to the Shopware instance with the command: + +```bash +shopware-cli project config push +``` + +This shows the difference between your local and the remote configuration and asks you if you want to push the changes. + +## Entity synchronization + +With entity synchronization, you can synchronize any kind of entity using directly the Shopware API. + +```yaml +sync: + entity: + - entity: tax + payload: + name: 'Tax' + taxRate: 19 +``` + +This example synchronizes a new tax entity with the name `Tax` and the tax rate `19`. + +The further synchronizations will create the same entity again, you may want to fix the entity ID to avoid duplicates. + +The further synchronizations will create the same entity again, you may want to fixed the entity ID to avoid duplicates. + +```yaml +sync: + entity: + - entity: tax + # build a criteria to check that the entity already exists. when exists this will be skipped + exists: + - type: equals + field: name + value: 'Tax' + # actual api payload to create something + payload: + name: 'Tax' + taxRate: 19 +``` diff --git a/products/cli/project-commands/remote-extension-managment.md b/products/cli/project-commands/remote-extension-managment.md new file mode 100644 index 000000000..85fba80e8 --- /dev/null +++ b/products/cli/project-commands/remote-extension-managment.md @@ -0,0 +1,66 @@ +--- +nav: + title: Remote Extension Management + position: 4 + +--- + +# Remote extension management + +Shopware-CLI has an extension manager to install and manage extensions in your Shopware project through the Shopware API like the Extension Manager in the Shopware 6 Administration panel, but for the CLI. + +::: info +This functionality was designed for Shopware SaaS and should not be used for self-hosted installations. [The recommendation is to use the Deployment Helper and install all plugins via Composer](../../../guides/hosting/installation-updates/deployments/deployment-helper.md) +::: + +To use the extension manager, you need a `.shopware-project.yml`, this can be created with the command `shopware-cli project config init`. + +## Commands + +### List all extensions + +```bash +shopware-cli project extension list +``` + +### Install an extension + +```bash +shopware-cli project extension install +``` + +### Uninstall an extension + +```bash +shopware-cli project extension uninstall +``` + +### Update an extension + +```bash +shopware-cli project extension update +``` + +### Outdated extensions + +Shows all extensions that have an update available. + +```bash +shopware-cli project extension outdated +``` + +### Upload extension + +Uploads an extension to the Shopware instance. + +```bash +shopware-cli project extension upload +``` + +### Delete extension + +Deletes an extension from the Shopware instance. + +```bash +shopware-cli project extension delete +``` diff --git a/products/cli/shopware-account-commands/authentication.md b/products/cli/shopware-account-commands/authentication.md new file mode 100644 index 000000000..0872b5606 --- /dev/null +++ b/products/cli/shopware-account-commands/authentication.md @@ -0,0 +1,40 @@ +--- +nav: + title: Authentication + position: 1 + +--- + +# Authentication + +To interact with the Shopware Account API, you need to authenticate yourself. + +For this you need to login using: + +```bash +shopware-cli account login +``` + +and it will ask you interactively for your credentials. + +For CI/CD pipelines, you should pass `SHOPWARE_CLI_ACCOUNT_EMAIL` and `SHOPWARE_CLI_ACCOUNT_PASSWORD` as environment variables and call directly the command you want to use. + +::: info +For CI/CD tasks you should create a dedicated Shopware Account with limited access to the Shopware Store. +::: + +## Multiple companies + +A single Shopware Account can be part of multiple companies. You can only interact with one company at a time. + +You can use the following commands to list all companies you have access to: + +```bash +shopware-cli account company list +``` + +Next, select the active company with: + +```bash +shopware-cli account company use +``` diff --git a/products/cli/shopware-account-commands/configure-composer-repository.md b/products/cli/shopware-account-commands/configure-composer-repository.md new file mode 100644 index 000000000..178a87e76 --- /dev/null +++ b/products/cli/shopware-account-commands/configure-composer-repository.md @@ -0,0 +1,30 @@ +--- +nav: + title: Configure Composer Repository + position: 4 + +--- + +# Configure composer repository + +To install extensions from the Shopware Store, you need to configure the Composer repository in your `composer.json` file. Shopware-CLI can configure this for you automatically. + +First, make sure you have access to the given Shop in Shopware Account. You can check this with the following command: + +```bash +shopware-cli account merchant shop list +``` + +If you don't see the shop you want to use, you need to switch to the correct company with the following command. Check the [Authentication](./authentication.md) guide for more information. + +To create a `auth.json` file with the Composer repository configuration, you can use the following command: + +::: info +You can also use the tab completion in terminal to get the domains of the shops you have access to. +::: + +```bash +shopware-cli account merchant shop configure-composer +``` + +This will create `auth.json` and append the Composer repository configuration to your `composer.json` file. diff --git a/products/cli/shopware-account-commands/releasing-extension-to-shopware-store.md b/products/cli/shopware-account-commands/releasing-extension-to-shopware-store.md new file mode 100644 index 000000000..7786d1b6a --- /dev/null +++ b/products/cli/shopware-account-commands/releasing-extension-to-shopware-store.md @@ -0,0 +1,27 @@ +--- +nav: + title: Releasing automated extension to Shopware Store + position: 2 + +--- + +# Releasing automated extension to Shopware Store + +## Prerequisites + +- You are logged into the Shopware Store. Checkout the [Authentication](./authentication.md) guide for more information. +- You have a zip file of your extensions with all assets. Checkout the [Creating a zip](../extension-commands/build.md) guide for more information. +- The zip file contains a `CHANGELOG*.md` file with an Changelog entry for the new version. Having a German changelog is optional. +- You have validated the zip file with `shopware-cli extension validate `. See [Validating the zip](../extension-commands/validation.md) for more information. + +## Releasing the extension + +To release the extension to the Shopware Store, you need to upload the zip file to the store. This can be done with the `shopware-cli account producer extension upload` command. + +```bash +shopware-cli account producer extension upload +``` + +This command will check first if an extension with the same version already exists in the store. If not, it will upload the extension to the store. For the compatibility of the extension, the command will use the Composer constraint of `composer.json` or `maniofest.xml` file. + +After the upload, the command will wait for the result of the automatic validation. This can take a few minutes. If the validation fails, the command will output the error message and you need to fix the issue and upload the extension again. You can skip this check with the `--skip-for-review-result` option. diff --git a/products/cli/shopware-account-commands/updating-store-page.md b/products/cli/shopware-account-commands/updating-store-page.md new file mode 100644 index 000000000..eeee87a4d --- /dev/null +++ b/products/cli/shopware-account-commands/updating-store-page.md @@ -0,0 +1,79 @@ +--- +nav: + title: Updating Store Page of Extension + position: 3 + +--- + +# Updating store page of extension + +You can use Shopware-CLI to version your Store page representation of your extension. This includes the description, images, and all other assets. + +## Prerequisites + +- You are logged into the Shopware Store. Checkout the [Authentication](./authentication.md) guide for more information. + +## Fetching the current Store page + +It is recommended to start with the current Store page and update only the parts you want to change. You can fetch the current Store page with the following command: + +```bash +shopware-cli account producer extension info pull +``` + +This will download all uploaded Store images and create a `.shopware-extension.yml` with all metadata of the extension. + +This file can be checked-in into the version control and will be automatically removed when you create a zip file using Shopware-CLI. + +## Updating the Store page + +To push the changes to the Store page, you can use the following command: + +```bash +shopware-cli account producer extension info push +``` + +This will upload all images and metadata to the Store page. + +## Image configuration + +Images can be uploaded in two ways: + +Explicitly defined in the configuration like this: + +```yaml +store: + images: + - file: + # Priority of the image for ordering + priority: 1 + # In which language the image should be used + activate: + de: false + en: false + # Is the image an preview image, only one image can be a preview + preview: + de: false + en: false +``` + +or you can specify a single directory with all images: + +```yaml +store: + image_directory: +``` + +The images will be sorted by the file name. If you want to seperate the images by language, you can create subdirectories with the language code like so: + +```text +src/Resources/store/images/ +├── de +│ ├── 0.png +│ ├── 1.png +│ └── 2.png (preview image) +└── en + ├── 0.png + ├── 1.png + └── 2.png (preview image) +```