@vtex/faststore 0.0.7 → 0.0.8
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/CHANGELOG.md +43 -0
- package/dist/actions.json +152 -1
- package/dist/catalog.json +1264 -142
- package/dist/cli/index.d.ts +512 -63
- package/dist/cli/index.js +2098 -686
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/server-runtime.js +44 -24
- package/dist/cli/server-runtime.js.map +1 -1
- package/dist/client.d.ts +5 -1
- package/dist/client.js +5 -1
- package/dist/components.d.ts +34 -7
- package/dist/components.js +38 -11
- package/dist/content-types.json +523 -0
- package/dist/core/dist/define-component.d.ts +6 -1
- package/dist/docs/account-access-gate.md +4 -4
- package/dist/docs/account-address-book.md +519 -0
- package/dist/docs/account-entry-point.md +1 -1
- package/dist/docs/account-menu.md +5 -5
- package/dist/docs/alert-dialog.md +2 -2
- package/dist/docs/billing-address.md +17 -9
- package/dist/docs/card-entry.md +37 -6
- package/dist/docs/cardholder-document.md +16 -14
- package/dist/docs/cart-item.md +1 -1
- package/dist/docs/cart.md +8 -8
- package/dist/docs/client-profile-fieldset.md +7 -5
- package/dist/docs/copy-text.md +84 -0
- package/dist/docs/document-field.md +8 -8
- package/dist/docs/footer-link-group.md +2 -2
- package/dist/docs/header-root.md +1 -1
- package/dist/docs/incentives.md +2 -2
- package/dist/docs/logo.md +5 -5
- package/dist/docs/my-account-profile.md +4 -4
- package/dist/docs/navigation-link-list.md +2 -2
- package/dist/docs/navigation-link.md +3 -3
- package/dist/docs/order-cancel.md +52 -0
- package/dist/docs/order-delivery-address.md +63 -0
- package/dist/docs/order-delivery-group.md +83 -0
- package/dist/docs/order-details-back.md +41 -0
- package/dist/docs/order-details-header.md +48 -0
- package/dist/docs/order-list-row.md +46 -0
- package/dist/docs/order-list-search.md +101 -0
- package/dist/docs/order-list-views.md +97 -0
- package/dist/docs/order-list.md +94 -0
- package/dist/docs/order-payment.md +94 -0
- package/dist/docs/order-placed-date.md +49 -0
- package/dist/docs/order-placed-payment-summary.md +13 -15
- package/dist/docs/order-placed.md +225 -0
- package/dist/docs/order-progress.md +88 -0
- package/dist/docs/order-status-badge.md +91 -0
- package/dist/docs/order-summary.md +53 -0
- package/dist/docs/payment-method-badges.md +14 -3
- package/dist/docs/place-order.md +13 -9
- package/dist/docs/saved-cards.md +2 -2
- package/dist/docs/select.md +19 -6
- package/dist/docs/session.md +1 -1
- package/dist/docs/shipping-address.md +1 -1
- package/dist/docs/sign-in-redirect.md +6 -6
- package/dist/docs/toast.md +7 -3
- package/dist/index.d.ts +6 -2
- package/dist/index.js +2 -1
- package/dist/internal/client.d.ts +6 -1
- package/dist/internal/client.js +7 -2
- package/dist/internal/server.d.ts +6 -2
- package/dist/internal/server.js +6 -2
- package/dist/matter/account-access-gate/account-access-gate.d.ts +2 -1
- package/dist/matter/account-access-gate/account-access-gate.js +19 -16
- package/dist/matter/account-access-gate/account-access-gate.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-delete.d.ts +60 -0
- package/dist/matter/account-address-book/account-address-book-delete.js +184 -0
- package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +19 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.js +50 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +42 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.js +146 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +25 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.js +72 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book.d.ts +120 -0
- package/dist/matter/account-address-book/account-address-book.js +469 -0
- package/dist/matter/account-address-book/account-address-book.js.map +1 -0
- package/dist/matter/account-address-book/account-address-country-switch.js +59 -0
- package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -0
- package/dist/matter/account-address-book/account-address-country.d.ts +36 -0
- package/dist/matter/account-address-book/account-address-country.js +151 -0
- package/dist/matter/account-address-book/account-address-country.js.map +1 -0
- package/dist/matter/account-address-book/account-address-first-line.js +11 -0
- package/dist/matter/account-address-book/account-address-first-line.js.map +1 -0
- package/dist/matter/account-address-book/account-address-form-context.d.ts +55 -0
- package/dist/matter/account-address-book/account-address-form-context.js +14 -0
- package/dist/matter/account-address-book/account-address-form-context.js.map +1 -0
- package/dist/matter/account-address-book/account-address-form.d.ts +85 -0
- package/dist/matter/account-address-book/account-address-form.js +946 -0
- package/dist/matter/account-address-book/account-address-form.js.map +1 -0
- package/dist/matter/account-address-book/account-address-postal-autofill.js +189 -0
- package/dist/matter/account-address-book/account-address-postal-autofill.js.map +1 -0
- package/dist/matter/account-address-book/account-address-record.d.ts +26 -0
- package/dist/matter/account-address-book/account-address-record.js +138 -0
- package/dist/matter/account-address-book/account-address-record.js.map +1 -0
- package/dist/matter/account-entry-point/account-entry-point.js +11 -11
- package/dist/matter/account-entry-point/account-entry-point.js.map +1 -1
- package/dist/matter/account-menu/account-menu.d.ts +7 -3
- package/dist/matter/account-menu/account-menu.js +69 -28
- package/dist/matter/account-menu/account-menu.js.map +1 -1
- package/dist/matter/billing-address/billing-address.d.ts +30 -17
- package/dist/matter/billing-address/billing-address.js +128 -33
- package/dist/matter/billing-address/billing-address.js.map +1 -1
- package/dist/matter/breadcrumb/breadcrumb.js +2 -2
- package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/matter/card-entry/card-capture.js +4 -3
- package/dist/matter/card-entry/card-capture.js.map +1 -1
- package/dist/matter/card-entry/card-entry.d.ts +5 -3
- package/dist/matter/card-entry/card-entry.js +77 -27
- package/dist/matter/card-entry/card-entry.js.map +1 -1
- package/dist/matter/cardholder-document/cardholder-document.d.ts +10 -9
- package/dist/matter/cardholder-document/cardholder-document.js +36 -16
- package/dist/matter/cardholder-document/cardholder-document.js.map +1 -1
- package/dist/matter/cart/cart.d.ts +7 -2
- package/dist/matter/cart/cart.js +29 -26
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-item/cart-item.js +2 -2
- package/dist/matter/cart-item/cart-item.js.map +1 -1
- package/dist/matter/client-preferences/client-preferences-fieldset.js +1 -1
- package/dist/matter/client-profile-form/client-profile-fieldset.js +8 -5
- package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
- package/dist/matter/identity-edit/identity-edit.js +3 -3
- package/dist/matter/identity-edit/identity-edit.js.map +1 -1
- package/dist/matter/identity-summary/identity-summary.js +2 -2
- package/dist/matter/identity-summary/identity-summary.js.map +1 -1
- package/dist/matter/my-account-profile/my-account-profile.d.ts +3 -3
- package/dist/matter/my-account-profile/my-account-profile.js +4 -4
- package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
- package/dist/matter/order-cancel/order-cancel.d.ts +110 -0
- package/dist/matter/order-cancel/order-cancel.js +344 -0
- package/dist/matter/order-cancel/order-cancel.js.map +1 -0
- package/dist/matter/order-delivery-address/order-delivery-address.d.ts +73 -0
- package/dist/matter/order-delivery-address/order-delivery-address.js +172 -0
- package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -0
- package/dist/matter/order-delivery-group/order-delivery-group.d.ts +128 -0
- package/dist/matter/order-delivery-group/order-delivery-group.js +408 -0
- package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -0
- package/dist/matter/order-details-header/order-details-header.d.ts +104 -0
- package/dist/matter/order-details-header/order-details-header.js +190 -0
- package/dist/matter/order-details-header/order-details-header.js.map +1 -0
- package/dist/matter/order-list/customer-orders-filter.d.ts +12 -0
- package/dist/matter/order-list/customer-orders-filter.js +30 -0
- package/dist/matter/order-list/customer-orders-filter.js.map +1 -0
- package/dist/matter/order-list/order-list.d.ts +121 -0
- package/dist/matter/order-list/order-list.js +395 -0
- package/dist/matter/order-list/order-list.js.map +1 -0
- package/dist/matter/order-list-row/order-list-row.d.ts +44 -0
- package/dist/matter/order-list-row/order-list-row.js +127 -0
- package/dist/matter/order-list-row/order-list-row.js.map +1 -0
- package/dist/matter/order-list-search/order-list-search.d.ts +72 -0
- package/dist/matter/order-list-search/order-list-search.js +296 -0
- package/dist/matter/order-list-search/order-list-search.js.map +1 -0
- package/dist/matter/order-list-views/order-list-views.d.ts +65 -0
- package/dist/matter/order-list-views/order-list-views.js +154 -0
- package/dist/matter/order-list-views/order-list-views.js.map +1 -0
- package/dist/matter/order-payment/order-payment.d.ts +83 -0
- package/dist/matter/order-payment/order-payment.js +258 -0
- package/dist/matter/order-payment/order-payment.js.map +1 -0
- package/dist/matter/order-placed/order-placed-deliveries.d.ts +145 -0
- package/dist/matter/order-placed/order-placed-deliveries.js +380 -0
- package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -0
- package/dist/matter/order-placed/order-placed.d.ts +122 -0
- package/dist/matter/order-placed/order-placed.js +452 -0
- package/dist/matter/order-placed/order-placed.js.map +1 -0
- package/dist/matter/order-placed-date/order-placed-date.d.ts +45 -0
- package/dist/matter/order-placed-date/order-placed-date.js +92 -0
- package/dist/matter/order-placed-date/order-placed-date.js.map +1 -0
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +5 -8
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +29 -81
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
- package/dist/matter/order-progress/order-progress.d.ts +85 -0
- package/dist/matter/order-progress/order-progress.js +203 -0
- package/dist/matter/order-progress/order-progress.js.map +1 -0
- package/dist/matter/order-summary/order-summary.d.ts +81 -0
- package/dist/matter/order-summary/order-summary.js +192 -0
- package/dist/matter/order-summary/order-summary.js.map +1 -0
- package/dist/matter/payment/cardholder-document-rule.d.ts +35 -0
- package/dist/matter/payment/cardholder-document-rule.js +35 -0
- package/dist/matter/payment/cardholder-document-rule.js.map +1 -0
- package/dist/matter/payment/payment-card-capture.js +38 -23
- package/dist/matter/payment/payment-card-capture.js.map +1 -1
- package/dist/matter/payment/payment-controller.js +11 -0
- package/dist/matter/payment/payment-controller.js.map +1 -1
- package/dist/matter/payment/payment-method-badges.js +4 -2
- package/dist/matter/payment/payment-method-badges.js.map +1 -1
- package/dist/matter/payment/payment.js +11 -0
- package/dist/matter/payment/payment.js.map +1 -1
- package/dist/matter/payment/use-payment-method-selection.d.ts +39 -0
- package/dist/matter/payment/use-payment-method-selection.js +30 -2
- package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
- package/dist/matter/payment/use-payment-submit-gate.d.ts +16 -2
- package/dist/matter/payment/use-payment-submit-gate.js +42 -14
- package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
- package/dist/matter/place-order/place-order.d.ts +12 -7
- package/dist/matter/place-order/place-order.js +126 -103
- package/dist/matter/place-order/place-order.js.map +1 -1
- package/dist/matter/pricing/pricing.js +5 -5
- package/dist/matter/pricing/pricing.js.map +1 -1
- package/dist/matter/region/region.js +1 -1
- package/dist/matter/saved-cards/saved-cards.js +26 -15
- package/dist/matter/saved-cards/saved-cards.js.map +1 -1
- package/dist/matter/session/session.js +2 -2
- package/dist/matter/session/session.js.map +1 -1
- package/dist/matter/shipping-address/country-descriptors.d.ts +1 -0
- package/dist/matter/shipping-address/country-descriptors.js +23 -1
- package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
- package/dist/matter/shipping-address/shipping-address.js +62 -14
- package/dist/matter/shipping-address/shipping-address.js.map +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
- package/dist/matter/sign-in-redirect/sign-in-redirect.js +48 -10
- package/dist/matter/sign-in-redirect/sign-in-redirect.js.map +1 -1
- package/dist/matter/variant-selector/variant-selector.js +2 -2
- package/dist/matter/variant-selector/variant-selector.js.map +1 -1
- package/dist/particles/address-summary/address-summary.js +2 -2
- package/dist/particles/address-summary/address-summary.js.map +1 -1
- package/dist/particles/alert-dialog/alert-dialog.d.ts +5 -1
- package/dist/particles/alert-dialog/alert-dialog.js +5 -2
- package/dist/particles/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/particles/copy-text/copy-text.d.ts +28 -0
- package/dist/particles/copy-text/copy-text.js +140 -0
- package/dist/particles/copy-text/copy-text.js.map +1 -0
- package/dist/particles/document-field/document-field.d.ts +34 -5
- package/dist/particles/document-field/document-field.js +115 -19
- package/dist/particles/document-field/document-field.js.map +1 -1
- package/dist/particles/field/field.js +1 -1
- package/dist/particles/field/field.js.map +1 -1
- package/dist/particles/footer-link-group/footer-link-group.d.ts +6 -2
- package/dist/particles/footer-link-group/footer-link-group.js +18 -7
- package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
- package/dist/particles/incentives/incentives.d.ts +6 -2
- package/dist/particles/incentives/incentives.js +7 -2
- package/dist/particles/incentives/incentives.js.map +1 -1
- package/dist/particles/logo/logo.d.ts +3 -2
- package/dist/particles/logo/logo.js +20 -8
- package/dist/particles/logo/logo.js.map +1 -1
- package/dist/particles/navigation-link/navigation-link.d.ts +2 -3
- package/dist/particles/navigation-link/navigation-link.js +4 -4
- package/dist/particles/navigation-link/navigation-link.js.map +1 -1
- package/dist/particles/navigation-link-list/navigation-link-list.d.ts +6 -2
- package/dist/particles/navigation-link-list/navigation-link-list.js +18 -7
- package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -1
- package/dist/particles/order-details-back/order-details-back.d.ts +28 -0
- package/dist/particles/order-details-back/order-details-back.js +52 -0
- package/dist/particles/order-details-back/order-details-back.js.map +1 -0
- package/dist/particles/order-status-badge/order-status-badge.d.ts +19 -0
- package/dist/particles/order-status-badge/order-status-badge.js +50 -0
- package/dist/particles/order-status-badge/order-status-badge.js.map +1 -0
- package/dist/particles/phone-field/phone-field.js +2 -2
- package/dist/particles/phone-field/phone-field.js.map +1 -1
- package/dist/particles/select/select.js +6 -6
- package/dist/particles/select/select.js.map +1 -1
- package/dist/particles/toast/toast.d.ts +1 -1
- package/dist/particles/toast/toast.js +32 -6
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +1014 -28
- package/dist/sdk/actions/address-action-provider.d.ts +16 -0
- package/dist/sdk/actions/address-action-provider.js +20 -0
- package/dist/sdk/actions/address-action-provider.js.map +1 -0
- package/dist/sdk/actions/analytics-action-provider.js +1 -1
- package/dist/sdk/actions/index.d.ts +3 -1
- package/dist/sdk/actions/index.js +3 -1
- package/dist/sdk/actions/order-action-provider.d.ts +12 -0
- package/dist/sdk/actions/order-action-provider.js +16 -0
- package/dist/sdk/actions/order-action-provider.js.map +1 -0
- package/dist/sdk/actions/types.d.ts +6 -2
- package/dist/sdk/address/address-fields.js +38 -0
- package/dist/sdk/address/address-fields.js.map +1 -0
- package/dist/sdk/address/checkout-readiness.js +17 -0
- package/dist/sdk/address/checkout-readiness.js.map +1 -0
- package/dist/sdk/address/constants.js +60 -0
- package/dist/sdk/address/constants.js.map +1 -0
- package/dist/sdk/address/country-display.js +19 -0
- package/dist/sdk/address/country-display.js.map +1 -0
- package/dist/sdk/address/country-rules.js +30 -0
- package/dist/sdk/address/country-rules.js.map +1 -0
- package/dist/sdk/address/format-address.js +18 -0
- package/dist/sdk/address/format-address.js.map +1 -0
- package/dist/sdk/address/iso-countries.js +262 -0
- package/dist/sdk/address/iso-countries.js.map +1 -0
- package/dist/sdk/address/layouts.js +56 -0
- package/dist/sdk/address/layouts.js.map +1 -0
- package/dist/sdk/address/messages.js +97 -0
- package/dist/sdk/address/messages.js.map +1 -0
- package/dist/sdk/address/operations.d.ts +54 -0
- package/dist/sdk/address/operations.js +83 -0
- package/dist/sdk/address/operations.js.map +1 -0
- package/dist/sdk/address/postal-code-lookup-operations.js +23 -0
- package/dist/sdk/address/postal-code-lookup-operations.js.map +1 -0
- package/dist/sdk/address/postal-code.js +11 -0
- package/dist/sdk/address/postal-code.js.map +1 -0
- package/dist/sdk/address/schema.js +14 -0
- package/dist/sdk/address/schema.js.map +1 -0
- package/dist/sdk/address/server-fields.js +25 -0
- package/dist/sdk/address/server-fields.js.map +1 -0
- package/dist/sdk/address/switch-country.js +57 -0
- package/dist/sdk/address/switch-country.js.map +1 -0
- package/dist/sdk/address/types.d.ts +26 -0
- package/dist/sdk/address/use-address-actions.d.ts +29 -0
- package/dist/sdk/address/use-address-actions.js +247 -0
- package/dist/sdk/address/use-address-actions.js.map +1 -0
- package/dist/sdk/address/use-address-by-postal-code.js +57 -0
- package/dist/sdk/address/use-address-by-postal-code.js.map +1 -0
- package/dist/sdk/address/validate-address.js +62 -0
- package/dist/sdk/address/validate-address.js.map +1 -0
- package/dist/sdk/cache/storefront-cache.js +29 -4
- package/dist/sdk/cache/storefront-cache.js.map +1 -1
- package/dist/sdk/client/fetch-page-data.d.ts +11 -0
- package/dist/sdk/client/fetch-page-data.js +12 -1
- package/dist/sdk/client/fetch-page-data.js.map +1 -1
- package/dist/sdk/content/create-content-runtime.js +1 -8
- package/dist/sdk/content/create-content-runtime.js.map +1 -1
- package/dist/sdk/data/failed-fields.js +23 -0
- package/dist/sdk/data/failed-fields.js.map +1 -0
- package/dist/sdk/data/index.js +2 -2
- package/dist/sdk/data/page-reactive-data-root.d.ts +45 -7
- package/dist/sdk/data/page-reactive-data-root.js +88 -12
- package/dist/sdk/data/page-reactive-data-root.js.map +1 -1
- package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
- package/dist/sdk/generated/fragment-types.js +2 -0
- package/dist/sdk/generated/fragment-types.js.map +1 -1
- package/dist/sdk/generated/gql.js +3 -1
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +8 -0
- package/dist/sdk/generated/graphql.js +212 -1
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/i18n/messages/en-US.js +138 -1
- package/dist/sdk/i18n/messages/en-US.json +138 -1
- package/dist/sdk/i18n/messages/en-US.json.d.ts +137 -0
- package/dist/sdk/i18n/messages/es-ES.js +138 -1
- package/dist/sdk/i18n/messages/es-ES.json +138 -1
- package/dist/sdk/i18n/messages/pt-BR.js +138 -1
- package/dist/sdk/i18n/messages/pt-BR.json +138 -1
- package/dist/sdk/navigation/current-page.js +30 -0
- package/dist/sdk/navigation/current-page.js.map +1 -0
- package/dist/sdk/navigation/not-found-log.d.ts +28 -0
- package/dist/sdk/navigation/not-found-log.js +133 -0
- package/dist/sdk/navigation/not-found-log.js.map +1 -0
- package/dist/sdk/navigation/path.js +25 -0
- package/dist/sdk/navigation/path.js.map +1 -0
- package/dist/sdk/navigation/redirect.d.ts +11 -0
- package/dist/sdk/navigation/redirect.js +22 -0
- package/dist/sdk/navigation/redirect.js.map +1 -0
- package/dist/sdk/navigation/report.js +70 -0
- package/dist/sdk/navigation/report.js.map +1 -0
- package/dist/sdk/navigation/resolve-storefront-href.d.ts +12 -0
- package/dist/sdk/navigation/resolve-storefront-href.js +214 -0
- package/dist/sdk/navigation/resolve-storefront-href.js.map +1 -0
- package/dist/sdk/navigation/route-identity-provider.d.ts +11 -0
- package/dist/sdk/navigation/route-identity-provider.js +20 -0
- package/dist/sdk/navigation/route-identity-provider.js.map +1 -0
- package/dist/sdk/navigation/route-map-provider.d.ts +19 -0
- package/dist/sdk/navigation/route-map-provider.js +29 -0
- package/dist/sdk/navigation/route-map-provider.js.map +1 -0
- package/dist/sdk/navigation/storefront-link.d.ts +16 -0
- package/dist/sdk/navigation/storefront-link.js +66 -0
- package/dist/sdk/navigation/storefront-link.js.map +1 -0
- package/dist/sdk/navigation/types.d.ts +45 -0
- package/dist/sdk/navigation/use-storefront-navigation.d.ts +26 -0
- package/dist/sdk/navigation/use-storefront-navigation.js +73 -0
- package/dist/sdk/navigation/use-storefront-navigation.js.map +1 -0
- package/dist/sdk/navigation/use-storefront-route.d.ts +26 -0
- package/dist/sdk/navigation/use-storefront-route.js +87 -0
- package/dist/sdk/navigation/use-storefront-route.js.map +1 -0
- package/dist/sdk/navigation/use-storefront-search-params.d.ts +11 -0
- package/dist/sdk/navigation/use-storefront-search-params.js +16 -0
- package/dist/sdk/navigation/use-storefront-search-params.js.map +1 -0
- package/dist/sdk/orders/completion-badge.d.ts +8 -0
- package/dist/sdk/orders/completion-badge.js +47 -0
- package/dist/sdk/orders/completion-badge.js.map +1 -0
- package/dist/sdk/orders/order-operations.d.ts +19 -0
- package/dist/sdk/orders/order-operations.js +21 -0
- package/dist/sdk/orders/order-operations.js.map +1 -0
- package/dist/sdk/orders/use-order-actions.d.ts +23 -0
- package/dist/sdk/orders/use-order-actions.js +62 -0
- package/dist/sdk/orders/use-order-actions.js.map +1 -0
- package/dist/sdk/payment/gateway-origin.js +26 -13
- package/dist/sdk/payment/gateway-origin.js.map +1 -1
- package/dist/sdk/payment/gateway.d.ts +14 -2
- package/dist/sdk/payment/gateway.js +32 -14
- package/dist/sdk/payment/gateway.js.map +1 -1
- package/dist/sdk/payment/operations.js +11 -0
- package/dist/sdk/payment/operations.js.map +1 -1
- package/dist/sdk/payment/submission-registry.d.ts +2 -1
- package/dist/sdk/payment/submission-registry.js +12 -8
- package/dist/sdk/payment/submission-registry.js.map +1 -1
- package/dist/sdk/payment/use-payment-actions.d.ts +5 -3
- package/dist/sdk/payment/use-payment-actions.js +5 -2
- package/dist/sdk/payment/use-payment-actions.js.map +1 -1
- package/dist/sdk/payment/use-place-order.d.ts +6 -3
- package/dist/sdk/payment/use-place-order.js +333 -143
- package/dist/sdk/payment/use-place-order.js.map +1 -1
- package/dist/sdk/seo/page-alternates.d.ts +55 -0
- package/dist/sdk/seo/page-alternates.js +132 -0
- package/dist/sdk/seo/page-alternates.js.map +1 -0
- package/dist/utils/own-value.js +19 -0
- package/dist/utils/own-value.js.map +1 -0
- package/dist/utils/safe-href.d.ts +4 -4
- package/dist/utils/safe-href.js +31 -22
- package/dist/utils/safe-href.js.map +1 -1
- package/package.json +5 -1
- package/skills/storefront-asset/SKILL.md +111 -0
- package/skills/storefront-asset/references/api-side.md +153 -0
- package/skills/storefront-asset/references/findings.md +40 -0
- package/skills/storefront-asset/references/ui-side.md +94 -0
- package/src/styles/tailwind.css +27 -0
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,5 +1,365 @@
|
|
|
1
1
|
import { GraphQLFieldResolver, GraphQLScalarType, GraphQLSchema } from "graphql";
|
|
2
|
-
|
|
2
|
+
//#region ../../node_modules/.pnpm/@vtex+extension-cli-kit@0.1.1/node_modules/@vtex/extension-cli-kit/dist/finding.d.ts
|
|
3
|
+
type Severity = 'error' | 'warning' | 'info';
|
|
4
|
+
/** A place in a file, 1-based, as editors show it. */
|
|
5
|
+
type Position = {
|
|
6
|
+
line: number;
|
|
7
|
+
column: number;
|
|
8
|
+
};
|
|
9
|
+
type Range = {
|
|
10
|
+
start: Position;
|
|
11
|
+
end: Position;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Every result of a check, from the core or from a kind provider (RFC-0003 §Conventions). It renders
|
|
15
|
+
* as text, as JSON and as an editor problem.
|
|
16
|
+
*/
|
|
17
|
+
type Finding = {
|
|
18
|
+
/** Stable, kebab-case: what was found, not where. */
|
|
19
|
+
code: string;
|
|
20
|
+
severity: Severity;
|
|
21
|
+
message: string;
|
|
22
|
+
/** A JSON pointer inside `file`; `''` is the whole file. */
|
|
23
|
+
path: string;
|
|
24
|
+
/** Relative to the Account Repo root. */
|
|
25
|
+
file: string;
|
|
26
|
+
range?: Range;
|
|
27
|
+
/** One line that says what the available fix does. */
|
|
28
|
+
fix?: string;
|
|
29
|
+
/** A URL that explains the rule. */
|
|
30
|
+
docs: string;
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region ../../node_modules/.pnpm/@vtex+extension-cli-kit@0.1.1/node_modules/@vtex/extension-cli-kit/dist/command.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* A flag a command declares. The core adds the global flags, gives every flag a
|
|
36
|
+
* `VTEX_EXTENSION_FLAG_*` variable, and applies `default`, `required` and `options`.
|
|
37
|
+
*/
|
|
38
|
+
type FlagDefinition = {
|
|
39
|
+
type: 'boolean';
|
|
40
|
+
description: string;
|
|
41
|
+
default?: boolean;
|
|
42
|
+
} | {
|
|
43
|
+
type: 'string';
|
|
44
|
+
description: string;
|
|
45
|
+
default?: string;
|
|
46
|
+
required?: boolean;
|
|
47
|
+
options?: readonly string[];
|
|
48
|
+
};
|
|
49
|
+
/** Resolved flag values by flag name: from argv, then the variable, then `default`. */
|
|
50
|
+
type FlagValues = Record<string, string | boolean | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* What `run` returns: data, or the Findings of a check. `text` is the data as a terminal shows it;
|
|
53
|
+
* without it the core prints the data as JSON.
|
|
54
|
+
*/
|
|
55
|
+
type CommandResult<T = unknown> = {
|
|
56
|
+
data: T;
|
|
57
|
+
text?: string;
|
|
58
|
+
} | {
|
|
59
|
+
findings: Finding[];
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* A command as plain data. The core parses its flags, renders its result and sets the exit code;
|
|
63
|
+
* `run` never prints.
|
|
64
|
+
*/
|
|
65
|
+
type CommandDefinition<Input, Context> = {
|
|
66
|
+
/** A kebab-case verb. */
|
|
67
|
+
name: string;
|
|
68
|
+
/** One sentence, shown in every command list. */
|
|
69
|
+
summary: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
/** Full command lines, starting with `vtex extension <name>`, without a `$`. */
|
|
72
|
+
examples: readonly string[];
|
|
73
|
+
flags: Record<string, FlagDefinition>;
|
|
74
|
+
run(input: Input, ctx: Context): Promise<CommandResult>;
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region ../../node_modules/.pnpm/@vtex+extension-cli-kit@0.1.1/node_modules/@vtex/extension-cli-kit/dist/kinds.d.ts
|
|
78
|
+
/** RFC-0001's closed set of kinds. A new kind arrives by its own RFC. */
|
|
79
|
+
export declare const kinds: readonly ['storefront', 'widget', 'instructions', 'workflow', 'agent', 'function'];
|
|
80
|
+
/** One of the six kinds an `asset.yaml` may declare. */
|
|
81
|
+
type Kind = (typeof kinds)[number];
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region ../../node_modules/.pnpm/@vtex+extension-cli-kit@0.1.1/node_modules/@vtex/extension-cli-kit/dist/provider.d.ts
|
|
84
|
+
/**
|
|
85
|
+
* The kind provider contract version this kit describes. A provider declares the version it
|
|
86
|
+
* implements as `contract`; the CLI checks it against the range it supports.
|
|
87
|
+
*/
|
|
88
|
+
export declare const providerContractVersion = 0;
|
|
89
|
+
/** A JSON Schema (draft 2020-12), as a plain value. */
|
|
90
|
+
type JsonSchema = boolean | Readonly<Record<string, unknown>>;
|
|
91
|
+
/** One Asset as a provider sees it: plain data, a copy. Its envelope is valid. */
|
|
92
|
+
type ProviderAsset = {
|
|
93
|
+
/** `<ext>/<asset>`, as targets name it. */
|
|
94
|
+
target: string;
|
|
95
|
+
/** Its extension; `path` is `extensions/<folder>`. */
|
|
96
|
+
extension: {
|
|
97
|
+
name: string;
|
|
98
|
+
vendor?: string;
|
|
99
|
+
version?: string;
|
|
100
|
+
path: string;
|
|
101
|
+
};
|
|
102
|
+
name: string;
|
|
103
|
+
kind: Kind;
|
|
104
|
+
apiVersion: string;
|
|
105
|
+
/** The Asset's folder, absolute. */
|
|
106
|
+
dir: string;
|
|
107
|
+
/** Its `asset.yaml`, relative to the Account Repo root: the `file` of a Finding about it. */
|
|
108
|
+
file: string;
|
|
109
|
+
/** Relative to the extension's folder. */
|
|
110
|
+
path: string;
|
|
111
|
+
/** On disk, not listed in the inventory. */
|
|
112
|
+
staged: boolean;
|
|
113
|
+
/** The whole `asset.yaml` value, envelope included. */
|
|
114
|
+
manifest: Readonly<Record<string, unknown>>;
|
|
115
|
+
/** The Asset folder's own `package.json`, when it has one. */
|
|
116
|
+
packageJson?: Readonly<Record<string, unknown>>;
|
|
117
|
+
/**
|
|
118
|
+
* In `dev`, `build` and kind commands, the Asset's environment: `.env` then `.env.local` in the
|
|
119
|
+
* repo root, the extension's folder and the Asset's folder (a later file wins), then the
|
|
120
|
+
* environment the CLI runs with, which wins. Absent in `validate`.
|
|
121
|
+
*/
|
|
122
|
+
env?: Readonly<Record<string, string>>;
|
|
123
|
+
};
|
|
124
|
+
/** One Asset a provider build gets: a `ProviderAsset` with the folder to write into. */
|
|
125
|
+
type BuildAsset = ProviderAsset & {
|
|
126
|
+
/**
|
|
127
|
+
* Where to write the Asset's output, absolute: its staging folder,
|
|
128
|
+
* `<output root>/<ext>/<asset>.building/`. The core creates it empty before the call, renames it
|
|
129
|
+
* to the Asset's output folder, `<output root>/<ext>/<asset>/`, when the Asset is built, and
|
|
130
|
+
* removes it when the Asset fails. Do not record this path in the output: it is gone once the
|
|
131
|
+
* Asset is built.
|
|
132
|
+
*/
|
|
133
|
+
outDir: string;
|
|
134
|
+
};
|
|
135
|
+
/** The whole Account Repo as plain data: inventory Assets only, no YAML objects. */
|
|
136
|
+
type ProviderRepo = {
|
|
137
|
+
/** Absolute. */
|
|
138
|
+
root: string;
|
|
139
|
+
accounts: readonly {
|
|
140
|
+
name?: string;
|
|
141
|
+
/** `stores/<store>`. */
|
|
142
|
+
store?: string;
|
|
143
|
+
/** The `installed:` entries as written, `vendor.name@<range>`. */
|
|
144
|
+
installed: readonly string[];
|
|
145
|
+
}[];
|
|
146
|
+
extensions: readonly {
|
|
147
|
+
name: string;
|
|
148
|
+
vendor?: string;
|
|
149
|
+
version?: string;
|
|
150
|
+
/** `extensions/<folder>`. */
|
|
151
|
+
path: string;
|
|
152
|
+
/** In inventory order. `path` is relative to the extension's folder. */
|
|
153
|
+
assets: readonly {
|
|
154
|
+
name?: string;
|
|
155
|
+
kind?: string;
|
|
156
|
+
path: string;
|
|
157
|
+
packageName?: string;
|
|
158
|
+
}[];
|
|
159
|
+
}[];
|
|
160
|
+
stores: readonly {
|
|
161
|
+
name: string;
|
|
162
|
+
/** `stores/<name>`. */
|
|
163
|
+
path: string;
|
|
164
|
+
packageName?: string;
|
|
165
|
+
/** The keys of its `package.json › dependencies`. */
|
|
166
|
+
dependencies: readonly string[];
|
|
167
|
+
}[];
|
|
168
|
+
};
|
|
169
|
+
/** Everything the core hands a provider. */
|
|
170
|
+
type ProviderContext = {
|
|
171
|
+
/** The Account Repo root, absolute. */
|
|
172
|
+
root: string;
|
|
173
|
+
repo: ProviderRepo;
|
|
174
|
+
/** `--account`, when given. */
|
|
175
|
+
account?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Environment for code the provider runs. `{}` in `validate`. In `dev`, `build` and kind
|
|
178
|
+
* commands, the repo root's `.env` and `.env.local`, then the environment the CLI runs with. Each
|
|
179
|
+
* Asset's own is `ProviderAsset.env`.
|
|
180
|
+
*/
|
|
181
|
+
env: Readonly<Record<string, string>>;
|
|
182
|
+
/** A progress message. The core labels it with the provider and routes it; a provider never prints. */
|
|
183
|
+
log(message: string): void;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* One RFC 6902 operation on the `asset.yaml` a Finding names, by JSON pointer into its kind body.
|
|
187
|
+
* The core never applies one to an envelope field (`apiVersion`, `name`, `kind`, `policies`).
|
|
188
|
+
*/
|
|
189
|
+
type PatchOperation = {
|
|
190
|
+
op: 'add' | 'replace';
|
|
191
|
+
path: string;
|
|
192
|
+
value: unknown;
|
|
193
|
+
} | {
|
|
194
|
+
op: 'remove';
|
|
195
|
+
path: string;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* What `validate` and `build` return: a Finding that, with `fix`, may carry the edits that apply
|
|
199
|
+
* it. The core drops a `patch` from a `build` Finding.
|
|
200
|
+
*/
|
|
201
|
+
type ProviderFinding = Finding & {
|
|
202
|
+
patch?: readonly PatchOperation[];
|
|
203
|
+
};
|
|
204
|
+
/** What a template is written for. */
|
|
205
|
+
type TemplateInput = {
|
|
206
|
+
vendor: string;
|
|
207
|
+
extension: string;
|
|
208
|
+
asset: string;
|
|
209
|
+
/**
|
|
210
|
+
* The new Asset's `package.json › name`, `@<vendor>/<extension>-<asset>`. A declarative Asset has
|
|
211
|
+
* no `package.json`: this is the name it would have.
|
|
212
|
+
*/
|
|
213
|
+
packageName: string;
|
|
214
|
+
apiVersion: string;
|
|
215
|
+
};
|
|
216
|
+
/** The `package.json` fields a template's `packages` installs into. */
|
|
217
|
+
type TemplateDependencyField = 'dependencies' | 'devDependencies' | 'peerDependencies';
|
|
218
|
+
/** The packages a template installs, by dependency field: package name → spec, as `pnpm add` takes it. */
|
|
219
|
+
type TemplatePackages = Readonly<Partial<Record<TemplateDependencyField, Readonly<Record<string, string>>>>>;
|
|
220
|
+
/** What `vtex extension add --kind <kind> --template <name>` writes for a new Asset. */
|
|
221
|
+
type Template = {
|
|
222
|
+
/** Kebab-case. `default` is the one `add` uses without `--template`. */
|
|
223
|
+
name: string;
|
|
224
|
+
/** One sentence, shown in a list of templates. */
|
|
225
|
+
summary: string;
|
|
226
|
+
/**
|
|
227
|
+
* The kind body fields of the new `asset.yaml`, below the envelope: never `apiVersion`, `name`,
|
|
228
|
+
* `kind` or `policies`.
|
|
229
|
+
*/
|
|
230
|
+
body(input: TemplateInput): Record<string, unknown>;
|
|
231
|
+
/**
|
|
232
|
+
* Files to write, by path relative to the Asset's folder (`/`-separated) → content. Never
|
|
233
|
+
* `asset.yaml` or `package.json`, which the core writes. The core never overwrites a file.
|
|
234
|
+
*/
|
|
235
|
+
files?(input: TemplateInput): Record<string, string>;
|
|
236
|
+
/**
|
|
237
|
+
* For a runnable kind: the packages `add` installs into the new Asset's package once the body
|
|
238
|
+
* and files are written, by dependency field, each `<name>: <spec>`. One `pnpm add` per field,
|
|
239
|
+
* plain for `dependencies` and `-D` for the other two, so `package.json` records the range pnpm
|
|
240
|
+
* writes for a dependency or a devDependency. A peer is different: `add` writes its range to
|
|
241
|
+
* `peerDependencies` as given, since it declares what the host must have, and `pnpm add -D`
|
|
242
|
+
* installs its dev copy. Never the kind's SDK, which `add` installs before it loads the provider.
|
|
243
|
+
* A declarative kind's template has none: its Asset has no `package.json`.
|
|
244
|
+
*/
|
|
245
|
+
packages?: TemplatePackages;
|
|
246
|
+
/**
|
|
247
|
+
* For a runnable kind: other `package.json` fields `add` sets in the new Asset's package, such as
|
|
248
|
+
* `type`, `exports` and `scripts`, merged at the top level as plain JSON. Never `name`, `version`
|
|
249
|
+
* or `private`, which the core writes, nor a dependency field (`dependencies`, `devDependencies`,
|
|
250
|
+
* `peerDependencies`, `optionalDependencies`), which `packages` and pnpm own. A declarative
|
|
251
|
+
* kind's template has none.
|
|
252
|
+
*/
|
|
253
|
+
packageJson?: Readonly<Record<string, unknown>>;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* A provider skill: an Agent Skills folder that teaches a coding agent working in the Account Repo
|
|
257
|
+
* how to write Assets of the kind. The folder ships in the provider's package and holds a
|
|
258
|
+
* `SKILL.md`, plus any file it points to. `vtex extension skills`, and `add` when you agree, copy it
|
|
259
|
+
* to `.agents/skills/<name>/` and link `.claude/skills/<name>` to that copy.
|
|
260
|
+
*/
|
|
261
|
+
type ProviderSkill = {
|
|
262
|
+
/** Kebab-case, as `SKILL.md`'s `name`; the folder name in the repo. Prefix it with the kind. */
|
|
263
|
+
name: string;
|
|
264
|
+
/** The folder in the provider's package, absolute: `fileURLToPath(new URL(..., import.meta.url))`. */
|
|
265
|
+
dir: string;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* How far an Asset of a dev session has come. The core sets `starting` right before it calls the
|
|
269
|
+
* provider instance's `dev`; the adapter reports `ready` or `failed`. Provisional, as the session
|
|
270
|
+
* file is.
|
|
271
|
+
*/
|
|
272
|
+
type AssetState = 'starting' | 'ready' | 'failed';
|
|
273
|
+
/**
|
|
274
|
+
* What a dev adapter reports through, by Asset target (`<ext>/<asset>`), for the Assets its `dev`
|
|
275
|
+
* was handed. The core writes each status and Findings change to the session file and prints every
|
|
276
|
+
* call in the session's stream. A call for another Asset, a state outside `AssetState`, or
|
|
277
|
+
* `details` JSON cannot hold is ignored, with a line in the stream saying why; calls after the
|
|
278
|
+
* session stopped are ignored. Provisional.
|
|
279
|
+
*/
|
|
280
|
+
type DevSession = {
|
|
281
|
+
/** One line, or several, in the stream under the Asset's target. */
|
|
282
|
+
log(target: string, message: string): void;
|
|
283
|
+
/** The Asset's state; `details` (a URL, the functions it serves) replaces the last ones. */
|
|
284
|
+
status(target: string, state: AssetState, details?: Readonly<Record<string, unknown>>): void;
|
|
285
|
+
/**
|
|
286
|
+
* Replaces the Asset's Findings. Each one is checked as `validate` checks a provider's; an
|
|
287
|
+
* invalid one becomes a `provider-invalid` Finding. A `patch` is dropped.
|
|
288
|
+
*/
|
|
289
|
+
findings(target: string, findings: readonly Finding[]): void;
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* A running dev adapter. The core calls `stop` once, when the session ends (Ctrl-C), for every
|
|
293
|
+
* adapter at the same time, and waits for it. A rejection is reported, never retried. Provisional.
|
|
294
|
+
*/
|
|
295
|
+
type AdapterHandle = {
|
|
296
|
+
stop(): Promise<void>;
|
|
297
|
+
};
|
|
298
|
+
/** What a kind command runs on: the provider instance's selected Assets and the parsed flags. */
|
|
299
|
+
type KindCommandInput = {
|
|
300
|
+
/** The selected Assets of the kind that load this provider instance, in repo order. */
|
|
301
|
+
assets: readonly ProviderAsset[];
|
|
302
|
+
/**
|
|
303
|
+
* The verb's own flags only, resolved: argv, then `VTEX_EXTENSION_FLAG_*`, then `default`.
|
|
304
|
+
* `--account` reaches the verb as `ctx.account`.
|
|
305
|
+
*/
|
|
306
|
+
flags: FlagValues;
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* A verb a provider adds under `vtex extension <kind> <verb>`. Its `name` is kebab-case and unique
|
|
310
|
+
* among the provider's commands; it has a `summary` and at least one example, each starting with
|
|
311
|
+
* `vtex extension <kind> <name>`. Its `flags` are kebab-case, and none is `json`, `quiet`,
|
|
312
|
+
* `fields`, `dry-run`, `yes`, `account` or `help`, which the core owns. The core runs it once per
|
|
313
|
+
* provider instance, with that instance's selected Assets. `run` returns data, which the core
|
|
314
|
+
* prints as the command's output, or Findings, which it renders as `validate` does (a `patch` is
|
|
315
|
+
* ignored). With Assets on several SDK versions, the output is one item per provider instance.
|
|
316
|
+
*/
|
|
317
|
+
type KindCommand = CommandDefinition<KindCommandInput, ProviderContext>;
|
|
318
|
+
/**
|
|
319
|
+
* The code that understands one kind (RFC-0003 §The kind provider contract). A runnable kind's
|
|
320
|
+
* provider is the default export of its SDK's `./cli` entry; a declarative kind's comes from the
|
|
321
|
+
* declarative package at the repo root, as the default export of its `./<kind>/cli` entry.
|
|
322
|
+
* The core calls `validate`, `dev`, `build` and kind commands once per provider instance, with all
|
|
323
|
+
* of that instance's selected Assets.
|
|
324
|
+
*/
|
|
325
|
+
type KindProvider = {
|
|
326
|
+
/** The contract version it implements. */
|
|
327
|
+
contract: typeof providerContractVersion;
|
|
328
|
+
kind: Kind;
|
|
329
|
+
/** The `asset.yaml` apiVersions it understands. */
|
|
330
|
+
apiVersions: readonly string[];
|
|
331
|
+
/** Where the kind is documented; layer-3 Findings link here. */
|
|
332
|
+
docs: string;
|
|
333
|
+
/** The kind body's schema: `asset.yaml` without `apiVersion`, `name`, `kind` and `policies`. */
|
|
334
|
+
schema(apiVersion: string): JsonSchema;
|
|
335
|
+
templates: readonly Template[];
|
|
336
|
+
/** The provider skills it offers; none when absent. */
|
|
337
|
+
skills?: readonly ProviderSkill[];
|
|
338
|
+
/** Kind lints. Never prints and never writes; a Finding with `fix` may carry a `patch`. */
|
|
339
|
+
validate?(assets: readonly ProviderAsset[], ctx: ProviderContext): ProviderFinding[] | Promise<ProviderFinding[]>;
|
|
340
|
+
/**
|
|
341
|
+
* Starts one dev adapter for all of its Assets in a dev session (`vtex extension dev`), or says
|
|
342
|
+
* it has nothing to run (`'none'`). Called once per provider instance, with the instance's
|
|
343
|
+
* selected Assets that passed validation, in repo order, each with its `env`; the instances start
|
|
344
|
+
* side by side. It reports through `session` and never prints. A throw or a rejection is a
|
|
345
|
+
* `provider-failed` Finding on each of its Assets, which then do not start; the session goes on
|
|
346
|
+
* with the others. Provisional.
|
|
347
|
+
*/
|
|
348
|
+
dev?(assets: readonly ProviderAsset[], session: DevSession, ctx: ProviderContext): Promise<AdapterHandle> | 'none';
|
|
349
|
+
/**
|
|
350
|
+
* Builds its Assets for `vtex extension build`. Called once per provider instance, with the
|
|
351
|
+
* instance's selected Assets that validation did not block, in repo order, each with its `env`
|
|
352
|
+
* and `outDir`, the staging folder the core renames to the Asset's output folder once the Asset
|
|
353
|
+
* is built; the instances build side by side. It writes each Asset's output into its `outDir`
|
|
354
|
+
* only, and never prints. It returns Findings, checked as `validate`'s; a `patch` is
|
|
355
|
+
* dropped. A throw or a rejection is `provider-failed`, and a return that is not a list of valid
|
|
356
|
+
* Findings is `provider-invalid`, on each of its Assets. Absent: its Assets have nothing to build.
|
|
357
|
+
*/
|
|
358
|
+
build?(assets: readonly BuildAsset[], ctx: ProviderContext): ProviderFinding[] | Promise<ProviderFinding[]>;
|
|
359
|
+
/** Verbs only this kind has: `vtex extension <kind> <verb>` runs them. */
|
|
360
|
+
commands?: readonly KindCommand[];
|
|
361
|
+
};
|
|
362
|
+
//#endregion
|
|
3
363
|
//#region ../graphql-compose/dist/subgraph-names.d.ts
|
|
4
364
|
/**
|
|
5
365
|
* Subgraph name the bundled core SDL is composed under. Shared by the composer
|
|
@@ -9,59 +369,102 @@ import * as esbuild from "esbuild";
|
|
|
9
369
|
*/
|
|
10
370
|
export declare const CORE_SUBGRAPH_NAME = "storefront-api-core";
|
|
11
371
|
//#endregion
|
|
12
|
-
//#region src/cli/
|
|
372
|
+
//#region src/cli/log.d.ts
|
|
13
373
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
374
|
+
* The sink the runner reports through. Nothing under `src/cli/` prints: a host
|
|
375
|
+
* passes one of these and decides where each line goes (ADR-0026). Three
|
|
376
|
+
* levels because the runner distinguishes them — progress, `⚠` warnings and
|
|
377
|
+
* failures — and the stand-in host keeps its stdout/stderr split; the kind
|
|
378
|
+
* provider collapses all three into the contract's single `log`.
|
|
18
379
|
*/
|
|
19
|
-
type
|
|
20
|
-
|
|
380
|
+
type RunnerLog = {
|
|
381
|
+
info(message: string): void;
|
|
382
|
+
warn(message: string): void;
|
|
383
|
+
error(message: string): void;
|
|
21
384
|
};
|
|
22
385
|
//#endregion
|
|
23
386
|
//#region src/cli/build.d.ts
|
|
24
387
|
/**
|
|
25
|
-
* The
|
|
26
|
-
*
|
|
27
|
-
* never in `dist/`.
|
|
388
|
+
* The API side of a build: the server and the SDL slice inside `outDir`, and
|
|
389
|
+
* the composed artifacts — which live in scratch, never in `outDir`.
|
|
28
390
|
*/
|
|
29
|
-
type
|
|
30
|
-
distDir: string;
|
|
391
|
+
type ApiBuildOutput = {
|
|
31
392
|
serverFile: string;
|
|
32
393
|
sdlPath: string;
|
|
33
394
|
supergraphFile: string;
|
|
34
395
|
publicSchemaFile: string;
|
|
35
396
|
};
|
|
397
|
+
/**
|
|
398
|
+
* The UI side of a build: the catalog and, when the addon emitted one, the
|
|
399
|
+
* content types, both at the top of `outDir`; the flat `docs/` folder and how
|
|
400
|
+
* many component docs landed in it.
|
|
401
|
+
*/
|
|
402
|
+
type UiBuildOutput = {
|
|
403
|
+
catalogPath: string;
|
|
404
|
+
contentTypesPath: string | null;
|
|
405
|
+
docsDir: string;
|
|
406
|
+
catalogEntries: number;
|
|
407
|
+
docs: number;
|
|
408
|
+
};
|
|
409
|
+
/** The result of a successful build: the folder it emitted into, and a side for each the Asset has. */
|
|
410
|
+
type BuildResult = {
|
|
411
|
+
outDir: string;
|
|
412
|
+
api?: ApiBuildOutput;
|
|
413
|
+
ui?: UiBuildOutput;
|
|
414
|
+
};
|
|
36
415
|
/** Raised when `validate` fails as `build`'s fail-closed gate — carries the aggregated report lines. */
|
|
37
416
|
export declare class ValidationGateError extends Error {
|
|
38
417
|
readonly reportLines: string[];
|
|
39
418
|
constructor(reportLines: string[]);
|
|
40
419
|
}
|
|
420
|
+
type BuildOptions = {
|
|
421
|
+
/** Where the composed-artifact lines go. Silent when omitted: nothing in the runner prints (ADR-0026). */
|
|
422
|
+
log?: RunnerLog;
|
|
423
|
+
/** The output folder, absolute or relative to the Asset root; `dist` when omitted. `vtex extension build` passes `.vtex/build/<ext>/<asset>/`. */
|
|
424
|
+
outDir?: string;
|
|
425
|
+
};
|
|
41
426
|
/** Raised when the TypeScript compiler reports diagnostics — carries them formatted for verbatim output. */
|
|
42
427
|
export declare class CompileError extends Error {
|
|
43
428
|
constructor(message: string);
|
|
44
429
|
}
|
|
45
430
|
/**
|
|
46
|
-
* Produces the deployable
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
431
|
+
* Produces the deployable output for a storefront Asset, both sides into the
|
|
432
|
+
* folder the caller names: `server.mjs` and the SDL slice for the API side,
|
|
433
|
+
* `catalog.json` (and `content-types.json` when the addon emitted one) with
|
|
434
|
+
* the component docs flat under `docs/` for the UI side (ADR-0026). `outDir`
|
|
435
|
+
* is `dist` under the root unless passed; `vtex extension build` passes the
|
|
436
|
+
* folder it chose, `.vtex/build/<ext>/<asset>/` by default. An `outDir` equal
|
|
437
|
+
* to the root or containing it is refused before anything runs, since the swap
|
|
438
|
+
* below empties it. An Asset with neither side throws: there is nothing to
|
|
439
|
+
* build.
|
|
440
|
+
*
|
|
441
|
+
* The UI side's `catalog.json` (and `content-types.json`) also land in the
|
|
442
|
+
* folder the Asset's `exports["./catalog.json"]` names, `dist/` by the
|
|
443
|
+
* template: that export is how a store finds the Asset (ADR-0007), so a store
|
|
444
|
+
* builds against a built Asset with no `dev` loop having run. Nothing is
|
|
445
|
+
* copied when `outDir` already is that folder.
|
|
446
|
+
*
|
|
447
|
+
* Everything that can fail runs before a byte of output exists: the API side's
|
|
448
|
+
* `validate` gate, type-check, declaration load and compose; the UI side's
|
|
449
|
+
* addon load and docs plan (a basename collision throws here). Both sides then
|
|
450
|
+
* write into one staging dir under the `.vtex/storefront/` scratch dir — the
|
|
451
|
+
* SDL and the bundled server, the catalog built with `kind: 'extension'` (an
|
|
452
|
+
* Asset named `@vtex/faststore` fails as the Core package it is not) and the
|
|
453
|
+
* docs copy — and only then is the staging dir swapped into `outDir`. `outDir`
|
|
454
|
+
* is therefore only ever absent, the previous complete output, or the new
|
|
455
|
+
* complete output — a failed build never leaves partial output or keeps stale
|
|
456
|
+
* files from an earlier build. The UI side emits no JavaScript: the store
|
|
457
|
+
* compiles the components it imports. No `router.json`, and no composed
|
|
458
|
+
* artifact (Decision 1). Throws on any failure so the caller can surface it
|
|
459
|
+
* and exit non-zero.
|
|
57
460
|
*
|
|
58
461
|
* The composed artifacts go to `.vtex/storefront/` scratch instead, so a
|
|
59
462
|
* store's CI compile has a fresh client schema without a running `dev` loop.
|
|
60
463
|
* They are composed from the same slice `server.mjs` serves and written only
|
|
61
|
-
* after `
|
|
62
|
-
* output.
|
|
464
|
+
* after `outDir` is in place, so an emitted artifact always describes emitted
|
|
465
|
+
* output. A UI-only Asset composes nothing.
|
|
63
466
|
*/
|
|
64
|
-
export declare function buildExtension(extensionRoot: string,
|
|
467
|
+
export declare function buildExtension(extensionRoot: string, { log, outDir: outDirOption }?: BuildOptions): Promise<BuildResult>;
|
|
65
468
|
//#endregion
|
|
66
469
|
//#region src/cli/capability-lint.d.ts
|
|
67
470
|
/** The three forbidden reaches the capability lint enforces on first-party source. */
|
|
@@ -96,7 +499,25 @@ type RunnerEnv = {
|
|
|
96
499
|
subgraphPort: number;
|
|
97
500
|
routerPort: number;
|
|
98
501
|
insecureSkipTlsVerify: boolean;
|
|
502
|
+
/** The Hive Router release `dev` runs: `VTEX_STOREFRONT_ROUTER_VERSION`, else the pin kramer runs. */
|
|
503
|
+
routerVersion: string;
|
|
504
|
+
/** `VTEX_STOREFRONT_ROUTER_BINARY`: a router binary to run verbatim instead of the cached or downloaded one. */
|
|
505
|
+
routerBinary?: string;
|
|
506
|
+
/**
|
|
507
|
+
* The boot snapshot of the map the host passed: `captureSecrets` reads the
|
|
508
|
+
* declared secrets from it on boot and on every reload, and the router child
|
|
509
|
+
* inherits it minus those secrets (`routerEnvironment`). Never the live
|
|
510
|
+
* `process.env`.
|
|
511
|
+
*/
|
|
512
|
+
variables: Readonly<Record<string, string | undefined>>;
|
|
99
513
|
};
|
|
514
|
+
/**
|
|
515
|
+
* Reads the runner's env contract from the map the host passes — the runner
|
|
516
|
+
* reads no `.env` and no `process.env` itself (ADR-0026). Throws when neither
|
|
517
|
+
* `VTEX_ACCOUNT` nor `STOREFRONT_CORE_URL` is set — the runner cannot derive a
|
|
518
|
+
* core routing URL without one of the two.
|
|
519
|
+
*/
|
|
520
|
+
export declare function loadRunnerEnv(env: Readonly<Record<string, string | undefined>>): RunnerEnv;
|
|
100
521
|
//#endregion
|
|
101
522
|
//#region src/cli/dev.d.ts
|
|
102
523
|
type DevRunHandle = {
|
|
@@ -112,12 +533,8 @@ type DevRunHandle = {
|
|
|
112
533
|
reload: () => Promise<void>;
|
|
113
534
|
};
|
|
114
535
|
type RunDevOptions = {
|
|
115
|
-
/**
|
|
116
|
-
|
|
117
|
-
* True for a standalone `dev`; watch mode passes false and owns a single
|
|
118
|
-
* handler set across reloads (see `runDevWatch`).
|
|
119
|
-
*/
|
|
120
|
-
registerSignals?: boolean;
|
|
536
|
+
/** Where progress, warnings and failures go. Silent when omitted: nothing in the runner prints (ADR-0026). */
|
|
537
|
+
log?: RunnerLog;
|
|
121
538
|
/**
|
|
122
539
|
* When set, generate the router config with a supergraph poll interval (in
|
|
123
540
|
* seconds). Watch mode sets it so the router hot-swaps a recomposed
|
|
@@ -130,18 +547,23 @@ type RunDevOptions = {
|
|
|
130
547
|
* the subgraph server, composes it offline with the embedded core SDL, resolves
|
|
131
548
|
* the pinned Hive Router binary, and launches the router against the composed
|
|
132
549
|
* supergraph. Returns a handle so callers (the host, or tests) can await
|
|
133
|
-
* readiness and tear the loop down.
|
|
134
|
-
*
|
|
550
|
+
* readiness and tear the loop down. The host passes `env` (`loadRunnerEnv` over
|
|
551
|
+
* the map it assembled) and owns signals and exit: `stop()` is the only
|
|
552
|
+
* teardown (ADR-0026).
|
|
135
553
|
*
|
|
136
554
|
* `watchSupergraphSeconds` writes the router config with a supergraph poll
|
|
137
555
|
* interval, so a subsequently recomposed `supergraph.graphql` is hot-swapped in
|
|
138
556
|
* place (watch mode uses this instead of restarting the router).
|
|
139
557
|
*/
|
|
140
|
-
export declare function runDev(extensionRoot: string,
|
|
558
|
+
export declare function runDev(extensionRoot: string, env: RunnerEnv, { log, watchSupergraphSeconds }?: RunDevOptions): Promise<DevRunHandle>;
|
|
141
559
|
type DevWatchHandle = {
|
|
142
560
|
routerUrl: string;
|
|
143
561
|
stop: () => Promise<void>;
|
|
144
562
|
};
|
|
563
|
+
type DevWatchOptions = {
|
|
564
|
+
/** Where progress, warnings and failures go. Silent when omitted: nothing in the runner prints (ADR-0026). */
|
|
565
|
+
log?: RunnerLog;
|
|
566
|
+
};
|
|
145
567
|
/**
|
|
146
568
|
* Runs the dev loop under a file watcher rooted at the declaration entry's
|
|
147
569
|
* directory. On save it restarts the subgraph (new resolvers/schema) and
|
|
@@ -154,10 +576,9 @@ type DevWatchHandle = {
|
|
|
154
576
|
* change callback — otherwise the run's own writes into `.vtex/storefront/`
|
|
155
577
|
* would feed the loop back into itself.
|
|
156
578
|
*
|
|
157
|
-
*
|
|
158
|
-
* with `registerSignals: false`).
|
|
579
|
+
* Like `runDev`, it installs no signal handler: the host calls `stop()`.
|
|
159
580
|
*/
|
|
160
|
-
export declare function runDevWatch(extensionRoot: string,
|
|
581
|
+
export declare function runDevWatch(extensionRoot: string, env: RunnerEnv, { log }?: DevWatchOptions): Promise<DevWatchHandle>;
|
|
161
582
|
//#endregion
|
|
162
583
|
//#region src/graphql/types.d.ts
|
|
163
584
|
/**
|
|
@@ -252,6 +673,29 @@ type SubgraphDefinition = {
|
|
|
252
673
|
*/
|
|
253
674
|
export declare function resolveDeclarationEntry(extensionRoot: string): string;
|
|
254
675
|
//#endregion
|
|
676
|
+
//#region src/cli/provider.d.ts
|
|
677
|
+
/**
|
|
678
|
+
* The storefront kind provider: the default export of `@vtex/faststore/cli`, written to contract
|
|
679
|
+
* version 0 (`@vtex/extension-cli-kit`), which `vtex extension` loads from each storefront Asset's
|
|
680
|
+
* own `@vtex/faststore` (ADR-0026). It wraps the runner's named exports.
|
|
681
|
+
*
|
|
682
|
+
* Like the rest of the runner, it prints nothing, reads no `process.env` and installs no signal
|
|
683
|
+
* handler: `process-isolation.test.ts` walks this file with the others.
|
|
684
|
+
*/
|
|
685
|
+
declare const storefrontProvider: KindProvider;
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region src/cli/skills.d.ts
|
|
688
|
+
/**
|
|
689
|
+
* The provider's skills, written to contract version 0 (`@vtex/extension-cli-kit`): the Agent Skills
|
|
690
|
+
* folders that teach a coding agent in an Account Repo to write storefront Assets. `vtex extension
|
|
691
|
+
* skills`, and `add` once you agree, copy each folder to `.agents/skills/<name>/` and link
|
|
692
|
+
* `.claude/skills/<name>` to it; nothing in a folder is code this package runs. `dir` is resolved
|
|
693
|
+
* against the built entry, `dist/cli/index.js`, which tsdown bundles this module into, so `../../`
|
|
694
|
+
* lands on the package root from source and from `dist/` alike.
|
|
695
|
+
*/
|
|
696
|
+
/** The one skill: `skills/storefront-asset/`, a `SKILL.md` and the references it points to. */
|
|
697
|
+
export declare const skills: readonly ProviderSkill[];
|
|
698
|
+
//#endregion
|
|
255
699
|
//#region src/cli/subgraph/build-subgraph.d.ts
|
|
256
700
|
/**
|
|
257
701
|
* Turns a `SubgraphDefinition` into an executable Federation v2 subgraph
|
|
@@ -285,38 +729,43 @@ export declare function printSubgraphSdl(definition: SubgraphDefinition): string
|
|
|
285
729
|
//#endregion
|
|
286
730
|
//#region src/cli/templates.d.ts
|
|
287
731
|
/**
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
732
|
+
* The two templates: `default`, the API side `add` writes without `--template`, and `ui`. The
|
|
733
|
+
* storefront body is empty, so each `body` is `{}`. A `vendor` that violates the vendor grammar
|
|
734
|
+
* is rejected up front, so a template never renders a declaration that would fail `validate`.
|
|
735
|
+
*
|
|
736
|
+
* `typescript` is pinned to the SDK's optional peer range: `validate` and `dev` load the compiler
|
|
737
|
+
* from the Asset's devDependencies. `graphql` is pinned to the SDK's own range so the Asset holds
|
|
738
|
+
* one copy: graphql-js rejects a schema built by another copy of itself, which is exactly what
|
|
739
|
+
* the scaffolded test does. `react` is a peer because the store app renders the components.
|
|
292
740
|
*/
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
files(options: {
|
|
297
|
-
name: string;
|
|
298
|
-
vendor: string;
|
|
299
|
-
}): Record<string, string>;
|
|
300
|
-
};
|
|
741
|
+
export declare const templates: readonly Template[];
|
|
742
|
+
//#endregion
|
|
743
|
+
//#region src/cli/typescript.d.ts
|
|
301
744
|
/**
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
745
|
+
* Raised when the Asset's `typescript` cannot serve the capability lint or the
|
|
746
|
+
* type-check: it is not installed, or the module that loads has no compiler
|
|
747
|
+
* API (`typescript@7` exports `lib/version.cjs` and no `createSourceFile`).
|
|
748
|
+
* `validateExtension` turns it into `ValidationReport.typescript` instead of
|
|
749
|
+
* failing the whole run (ADR-0026, TypeScript 5 through the peer).
|
|
306
750
|
*/
|
|
307
|
-
export declare
|
|
751
|
+
export declare class TypeScriptUnavailableError extends Error {
|
|
752
|
+
constructor(message: string);
|
|
753
|
+
}
|
|
308
754
|
//#endregion
|
|
309
755
|
//#region src/cli/validate.d.ts
|
|
310
756
|
/**
|
|
311
757
|
* The aggregated "am I shippable?" report: every capability finding, every
|
|
312
758
|
* composition error, and — when `buildSubgraph` itself rejects the
|
|
313
759
|
* declaration (allow-list, `vendor`, malformed typeDefs) — the build error.
|
|
314
|
-
* `
|
|
760
|
+
* `typescript` is set when the Asset's `typescript` is missing or has no
|
|
761
|
+
* TypeScript 5 compiler API: the capability lint did not run, and
|
|
762
|
+
* `capability` is empty. `ok` is true only when all four are clean.
|
|
315
763
|
*/
|
|
316
764
|
type ValidationReport = {
|
|
317
765
|
capability: CapabilityFinding[];
|
|
318
766
|
composition: Error[];
|
|
319
767
|
buildError?: Error;
|
|
768
|
+
typescript?: Error;
|
|
320
769
|
ok: boolean;
|
|
321
770
|
};
|
|
322
771
|
/**
|
|
@@ -324,7 +773,7 @@ type ValidationReport = {
|
|
|
324
773
|
* report — the shared core behind the host's `validate` verb and `build`'s
|
|
325
774
|
* fail-closed gate. It:
|
|
326
775
|
*
|
|
327
|
-
* 1. loads the declaration through the
|
|
776
|
+
* 1. loads the declaration through the runner's esbuild (the same
|
|
328
777
|
* `loadDeclaration` `dev` uses),
|
|
329
778
|
* 2. builds the subgraph (allow-list rejection and `vendor` validation surface
|
|
330
779
|
* here as a thrown error, captured into `buildError`),
|
|
@@ -337,14 +786,14 @@ type ValidationReport = {
|
|
|
337
786
|
* composition check is `@theguild/federation-composition` in-process, the same
|
|
338
787
|
* composer `dev` and the core SDL CI gate call (ADR-0004, D1).
|
|
339
788
|
*/
|
|
340
|
-
export declare function validateExtension(extensionRoot: string
|
|
789
|
+
export declare function validateExtension(extensionRoot: string): Promise<ValidationReport>;
|
|
341
790
|
/**
|
|
342
791
|
* Renders a `ValidationReport`'s failures as human-readable lines, grouped by
|
|
343
|
-
* category (build/allow-list, capability, composition) — every
|
|
344
|
-
* pass, never short-circuited at the first. Returns an empty
|
|
345
|
-
* report so the caller prints its own success line.
|
|
792
|
+
* category (typescript, build/allow-list, capability, composition) — every
|
|
793
|
+
* failure in one pass, never short-circuited at the first. Returns an empty
|
|
794
|
+
* array for a clean report so the caller prints its own success line.
|
|
346
795
|
*/
|
|
347
796
|
export declare function formatValidationReport(report: ValidationReport): string[];
|
|
348
797
|
//#endregion
|
|
349
|
-
export type
|
|
798
|
+
export { type AdapterHandle, type ApiBuildOutput, type AssetState, type BuildAsset, type BuildOptions, type BuildResult, type CapabilityFinding, type CapabilityRule, type CommandDefinition, type CommandResult, type DevRunHandle, type DevSession, type DevWatchHandle, type DevWatchOptions, type Finding, type FlagDefinition, type FlagValues, type JsonSchema, type Kind, type KindCommand, type KindCommandInput, type KindProvider, type PatchOperation, type Position, type ProviderAsset, type ProviderContext, type ProviderFinding, type ProviderRepo, type ProviderSkill, type Range, type RunDevOptions, type RunnerEnv, type RunnerLog, type Severity, type Template, type TemplateDependencyField, type TemplateInput, type TemplatePackages, type UiBuildOutput, type ValidationReport, storefrontProvider as default };
|
|
350
799
|
//# sourceMappingURL=index.d.ts.map
|