cloudcommerce 0.26.5 → 0.26.7
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 +26 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +4 -1
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/ecomplus-stores/barra-doce/scripts/install.sh +12 -2
- package/ecomplus-stores/iluminim/scripts/install.sh +12 -2
- package/ecomplus-stores/monocard/.firebaserc +1 -1
- package/ecomplus-stores/monocard/.github/build-and-deploy +1 -0
- package/ecomplus-stores/monocard/.github/workflows/build-and-deploy.yml +1 -0
- package/ecomplus-stores/monocard/README.md +11 -82
- package/ecomplus-stores/monocard/SETUP.md +129 -0
- package/ecomplus-stores/monocard/{README.pt-BR.md → SETUP.pt-BR.md} +39 -12
- package/ecomplus-stores/monocard/functions/config.json +1 -1
- package/ecomplus-stores/monocard/functions/{passport → many}/index.js +5 -0
- package/ecomplus-stores/monocard/functions/{events → many}/package.json +4 -3
- package/ecomplus-stores/monocard/functions/ssr/.eslintrc.cjs +1 -1
- package/ecomplus-stores/monocard/functions/ssr/content/blog/.gitkeep +0 -0
- package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/contato.json +11 -0
- package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/terms.json +11 -0
- package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/trocas.json +11 -0
- package/ecomplus-stores/monocard/functions/ssr/content/layout.json +25 -10
- package/ecomplus-stores/monocard/functions/ssr/content/pages/home.json +63 -0
- package/ecomplus-stores/monocard/functions/ssr/content/pages/products.json +19 -0
- package/ecomplus-stores/monocard/functions/ssr/content/settings.json +22 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +8 -9
- package/ecomplus-stores/monocard/functions/ssr/public/admin/.gitkeep +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/assets/card.css +99 -0
- package/ecomplus-stores/monocard/functions/ssr/src/assets/style.css +74 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +5 -14
- package/ecomplus-stores/monocard/functions/ssr/src/components/Banner.vue +59 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/BannersGrid.astro +25 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/Breadcrumbs.astro +44 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/CartItem.vue +64 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/CartSidebar.vue +66 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +8 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/DocDescription.astro +30 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +2 -2
- package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +12 -9
- package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +8 -105
- package/ecomplus-stores/monocard/functions/ssr/src/components/Prices.vue +10 -27
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductCard.vue +117 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductShelf.vue +57 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopFooter.vue +123 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +85 -32
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenav.vue +3 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +2 -2
- package/ecomplus-stores/monocard/functions/ssr/src/env.d.ts +9 -1
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +9 -44
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageFooter.astro +52 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageHeader.astro +35 -0
- package/ecomplus-stores/monocard/functions/ssr/src/main/Fallback.astro +0 -5
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +6 -12
- package/ecomplus-stores/monocard/functions/ssr/src/main/Sections.astro +38 -0
- package/ecomplus-stores/monocard/functions/ssr/src/main/Wildcard.astro +4 -18
- package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +15 -9
- package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +19 -9
- package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +16 -10
- package/ecomplus-stores/monocard/functions/ssr/src/pages/~fallback.astro +25 -0
- package/ecomplus-stores/monocard/functions/ssr/src/scripts/InlineScripts.astro +6 -6
- package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +1 -11
- package/ecomplus-stores/monocard/functions/{modules → with-apps}/index.js +3 -0
- package/ecomplus-stores/monocard/functions/{modules → with-apps}/package.json +4 -3
- package/ecomplus-stores/monocard/package.json +4 -1
- package/ecomplus-stores/monocard/scripts/install.sh +12 -2
- package/ecomplus-stores/tia-sonia/scripts/install.sh +12 -2
- package/package.json +4 -4
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +2 -2
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +3 -3
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +23 -8
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +2 -2
- package/packages/ssr/src/firebase/serve-storefront.ts +24 -8
- package/packages/storefront/dist/client/_astro/{Carousel.9ad2e1dc.js → Carousel.4bf71bce.js} +1 -1
- package/packages/storefront/dist/client/_astro/{CartSidebar.a6c6a885.js → CartSidebar.05b12b39.js} +1 -1
- package/packages/storefront/dist/client/_astro/{HeroSlider.ee1e6200.js → HeroSlider.fe108a14.js} +1 -1
- package/packages/storefront/dist/client/_astro/{PitchBar.6111676e.js → PitchBar.2c821b77.js} +1 -1
- package/packages/storefront/dist/client/_astro/{Prices.04ff8fce.js → Prices.78eb0a61.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductShelf.085721d6.js → ProductShelf.46d8a51c.js} +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.3694a82b.js +4 -0
- package/packages/storefront/dist/client/_astro/_...slug_.a4a7a874.css +1 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.8c541cce.js → firebase-app.3f59f3c7.js} +3 -3
- package/packages/storefront/dist/client/_astro/headphone_1Ekzdh.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1GbHcH.webp +0 -0
- package/packages/storefront/dist/client/_astro/{hoisted.85fdcf03.js → hoisted.648beb9d.js} +1 -1
- package/packages/storefront/dist/client/_astro/index.fadf28bd.js +1 -0
- package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
- package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
- package/packages/storefront/dist/client/_astro/{modules-info.e5d77bf3.js → modules-info.df822732.js} +1 -1
- package/packages/storefront/dist/client/_astro/passion_1LvKlp.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_2PSWs.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1A8K2Q.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1ND0he.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1mIaKd.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_LhopI.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1NFjiR.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z2a06Gx.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z2nulUU.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_ZH7hsH.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_ZorpIx.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1CcLjM.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1IVKep.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1zkdb4.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_299fN7.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_CnIof.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z1OtQaE.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_flB3g.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_rsWaw.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_sLbkT.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_1yf5jS.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect89_GQBli.webp +0 -0
- package/packages/storefront/dist/client/~fallback.html +67 -0
- package/packages/storefront/dist/client/~index.html +113 -0
- package/packages/storefront/dist/server/chunks/{CartSidebar.41b20543.mjs → CartSidebar.4179ad81.mjs} +4 -12
- package/packages/storefront/dist/server/chunks/{SearchModal.5f5e6a15.mjs → SearchModal.146ce2f7.mjs} +4 -11
- package/packages/storefront/dist/server/chunks/{endpoint@_@js.11be892a.mjs → _...05c626ea.mjs} +3 -10
- package/packages/storefront/dist/server/chunks/{account@_@astro.204fba92.mjs → account@_@astro.5eaddaf8.mjs} +2 -9
- package/packages/storefront/dist/server/chunks/{index@_@astro.19e0f502.mjs → index@_@astro.25a343cc.mjs} +3 -10
- package/packages/storefront/dist/server/chunks/{index@_@astro.b37a6ac9.mjs → index@_@astro.2d2f2e33.mjs} +3 -10
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.36e8882b.mjs → _...slug_.astro.0808946e.mjs} +1836 -450
- package/packages/storefront/dist/server/chunks/pages/index.astro.d4145872.mjs +186 -0
- package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.ba4c2475.mjs → ~fallback.astro.84d4765b.mjs} +6 -23
- package/packages/storefront/dist/server/chunks/{~fallback@_@astro.6bb4c4b4.mjs → ~fallback@_@astro.86d710c3.mjs} +3 -10
- package/packages/storefront/dist/server/entry.mjs +7 -14
- package/packages/storefront/dist/server/images.dist.csv +30 -0
- package/packages/storefront/dist/server/images.src.csv +11 -0
- package/packages/storefront/dist/server/renderers.mjs +2 -9
- package/packages/storefront/dist/server/static-builds.csv +51 -0
- package/packages/storefront/package.json +3 -3
- package/packages/storefront/scripts/build-prod.sh +3 -2
- package/packages/storefront/server.d.ts +1 -0
- package/packages/storefront/src/lib/assets/base.css +8 -0
- package/packages/storefront/src/lib/assets/reset.css +11 -2
- package/packages/storefront/src/lib/components/ContentClearfix.astro +4 -1
- package/packages/storefront/src/lib/components/Drawer.vue +1 -1
- package/packages/storefront/src/lib/layouts/BaseBody.astro +3 -1
- package/packages/storefront/src/lib/layouts/BaseHead.astro +8 -3
- package/packages/storefront/src/lib/layouts/use-page-header.ts +2 -2
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/pnpm-workspace.yaml +2 -0
- package/ecomplus-stores/monocard/functions/core/index.js +0 -9
- package/ecomplus-stores/monocard/functions/core/package.json +0 -20
- package/ecomplus-stores/monocard/functions/events/index.js +0 -9
- package/ecomplus-stores/monocard/functions/passport/package.json +0 -21
- package/ecomplus-stores/monocard/functions/ssr/content/blog.json +0 -18
- package/ecomplus-stores/monocard/functions/ssr/content/brands.json +0 -24
- package/ecomplus-stores/monocard/functions/ssr/content/categories.json +0 -24
- package/ecomplus-stores/monocard/functions/ssr/content/collections.json +0 -24
- package/ecomplus-stores/monocard/functions/ssr/content/home.json +0 -45
- package/ecomplus-stores/monocard/functions/ssr/content/maintenance.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/contato.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/entrega.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/faq.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/pagamentos.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/privacidade.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/sobre-nos.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/termos.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/pages/trocas.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/posts/esta-loja-e-um-pwa.json +0 -9
- package/ecomplus-stores/monocard/functions/ssr/content/products.json +0 -32
- package/ecomplus-stores/monocard/functions/ssr/content/search.json +0 -8
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/analytics.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/compre-confie.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/ebit.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/fb-pixel.json +0 -12
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/gmc-ratings.json +0 -12
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/minicart.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/offers-notification.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/opinioes-verificadas.json +0 -18
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/product-card.json +0 -10
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/product.json +0 -13
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/search-engine.json +0 -8
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/search.json +0 -6
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/tag-manager.json +0 -12
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/tawkto.json +0 -12
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/trustvox.json +0 -15
- package/ecomplus-stores/monocard/functions/ssr/content/widgets/user.json +0 -5
- package/ecomplus-stores/monocard/functions/ssr/public/admin/config.json +0 -1
- package/ecomplus-stores/monocard/functions/ssr/public/assets/cms-preview.css +0 -274
- package/ecomplus-stores/monocard/functions/ssr/public/assets/cms.css +0 -114
- package/ecomplus-stores/monocard/functions/ssr/public/assets/cvv.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/FavoritPro-Regular.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/MyriadPro-Regular.woff2 +0 -0
- package/ecomplus-stores/monocard/functions/ssr/public/assets/ssl-safe.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +0 -50
- package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +0 -21
- package/packages/storefront/dist/client/_astro/ShopHeader.7e485e35.js +0 -4
- package/packages/storefront/dist/client/_astro/_...slug_.b693913e.css +0 -1
- package/packages/storefront/dist/client/_astro/index.ea57babe.js +0 -1
- package/packages/storefront/dist/server/chunks/_...4a2548d2.mjs +0 -35
- package/packages/storefront/dist/server/chunks/pages/endpoint.js.f7a896a1.mjs +0 -119
- package/packages/storefront/dist/server/chunks/pages/index.astro.3145bd93.mjs +0 -1649
- /package/ecomplus-stores/monocard/functions/ssr/src/components/{FeatureTabs.astro → FeaturesSection.astro} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.26.7](https://github.com/ecomplus/cloud-commerce/compare/v0.26.6...v0.26.7) (2023-09-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **ssr:** Fallback redirect static built files on 404 hash mismtach ([494848b](https://github.com/ecomplus/cloud-commerce/commit/494848b5822f0bb5fd4e1dc9c800197b6c585e33))
|
|
11
|
+
* **storefront:** Edit `usePageHeader` to accept `listedCategoryFields` null skip categories fetch ([be563d7](https://github.com/ecomplus/cloud-commerce/commit/be563d746837c97972825d2db5cdf01fc3084238))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **deps:** Update dependency facebook-nodejs-business-sdk to v18 ([#239](https://github.com/ecomplus/cloud-commerce/issues/239)) ([464b0df](https://github.com/ecomplus/cloud-commerce/commit/464b0df1701f1e73e0c891ab8d64144f3c5e23cb))
|
|
17
|
+
* **deps:** Update non-major dependencies ([#238](https://github.com/ecomplus/cloud-commerce/issues/238)) ([e869660](https://github.com/ecomplus/cloud-commerce/commit/e869660e1796f1a78bbf98ab7b345909f61cc3cf))
|
|
18
|
+
* **storefront:** Hardfix for 100vh problem on mobile (`.h-screen`) with dvh unit ([c4a3fb7](https://github.com/ecomplus/cloud-commerce/commit/c4a3fb707a3668ec5ffdd8ae7a2b987da8a40ad7))
|
|
19
|
+
* **storefront:** New `Astro.locals.contextInlineClientJS` and body script to reset context n CSR ([eeab76c](https://github.com/ecomplus/cloud-commerce/commit/eeab76c30c5e3942d032d475459828872461eaf6))
|
|
20
|
+
* **storefront:** Set and reset <body> visibility to prevent FOUC ([6eb237f](https://github.com/ecomplus/cloud-commerce/commit/6eb237f7173072a3ee780fe7cd948faaa99dfec6))
|
|
21
|
+
* **storefront:** Update ContentClearfix to also limit child <iframe> width ([0b0031b](https://github.com/ecomplus/cloud-commerce/commit/0b0031bb4c10fd50d92c0ca2165446e760174c3a))
|
|
22
|
+
* **storefront:** Update reset.css to selector specificity 0 for button/a colors ([23b3870](https://github.com/ecomplus/cloud-commerce/commit/23b387066e96808fc59fbca40beffa1bad8227ca))
|
|
23
|
+
|
|
24
|
+
### [0.26.6](https://github.com/ecomplus/cloud-commerce/compare/v0.26.5...v0.26.6) (2023-09-13)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* **apps:** Ensure `@cloudcommerce/test-base` as dev dependency only ([020a23d](https://github.com/ecomplus/cloud-commerce/commit/020a23d474e20a6712e51a04f16bd293035d8929))
|
|
30
|
+
|
|
5
31
|
### [0.26.5](https://github.com/ecomplus/cloud-commerce/compare/v0.26.4...v0.26.5) (2023-09-13)
|
|
6
32
|
|
|
7
33
|
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.26.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.26.
|
|
20
|
-
"@cloudcommerce/passport": "^0.26.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.26.6",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.26.6",
|
|
20
|
+
"@cloudcommerce/passport": "^0.26.6"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.26.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.26.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.26.
|
|
20
|
+
"@cloudcommerce/api": "^0.26.6",
|
|
21
|
+
"@cloudcommerce/firebase": "^0.26.6",
|
|
22
|
+
"@cloudcommerce/ssr": "^0.26.6"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@cloudcommerce/i18n": "^0.26.
|
|
26
|
-
"@cloudcommerce/storefront": "^0.26.
|
|
27
|
-
"@cloudcommerce/types": "^0.26.
|
|
25
|
+
"@cloudcommerce/i18n": "^0.26.6",
|
|
26
|
+
"@cloudcommerce/storefront": "^0.26.6",
|
|
27
|
+
"@cloudcommerce/types": "^0.26.6",
|
|
28
28
|
"@fontsource/croissant-one": "^5.0.9",
|
|
29
29
|
"@iconify-json/mingcute": "^1.1.9"
|
|
30
30
|
}
|
|
@@ -105,7 +105,10 @@
|
|
|
105
105
|
:has-close-button="false"
|
|
106
106
|
position="absolute"
|
|
107
107
|
:class="isSticky ? 'mt-2 md:mt-3' : 'mt-3 sm:mt-4 md:mt-5'"
|
|
108
|
-
:style="{
|
|
108
|
+
:style="{
|
|
109
|
+
height: `calc(100vh - ${positionY}px + .5rem)`,
|
|
110
|
+
maxHeight: `calc(100dvh - ${positionY}px + .5rem)`,
|
|
111
|
+
}"
|
|
109
112
|
>
|
|
110
113
|
<ShopSidenav class="bg-white pt-6" v-bind="{ categoryTrees }" />
|
|
111
114
|
</Drawer>
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.26.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.26.
|
|
20
|
-
"@cloudcommerce/modules": "^0.26.
|
|
18
|
+
"@cloudcommerce/events": "^0.26.6",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.26.6",
|
|
20
|
+
"@cloudcommerce/modules": "^0.26.6"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "https://github.com/ecomplus/cloud-commerce/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cloudcommerce/cli": "^0.26.
|
|
26
|
+
"@cloudcommerce/cli": "^0.26.6"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@cloudcommerce/eslint": "^0.26.
|
|
29
|
+
"@cloudcommerce/eslint": "^0.26.6"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -2,13 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
if [ ! -d "./node_modules" ]; then
|
|
4
4
|
echo '>> Install root dev dependencies:'
|
|
5
|
-
|
|
5
|
+
if [ -f "./package-lock.json" ]; then
|
|
6
|
+
npm ci
|
|
7
|
+
else
|
|
8
|
+
npm i
|
|
9
|
+
fi
|
|
6
10
|
fi
|
|
7
11
|
echo '>> Install each function dependencies:'
|
|
8
12
|
cd functions
|
|
9
13
|
for d in */ ; do
|
|
10
14
|
cd $d
|
|
11
|
-
|
|
15
|
+
if [ ! -d "./node_modules" ]; then
|
|
16
|
+
if [ -f "./package-lock.json" ]; then
|
|
17
|
+
npm ci
|
|
18
|
+
else
|
|
19
|
+
npm i
|
|
20
|
+
fi
|
|
21
|
+
fi
|
|
12
22
|
cd ..
|
|
13
23
|
done
|
|
14
24
|
cd ..
|
|
@@ -2,13 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
if [ ! -d "./node_modules" ]; then
|
|
4
4
|
echo '>> Install root dev dependencies:'
|
|
5
|
-
|
|
5
|
+
if [ -f "./package-lock.json" ]; then
|
|
6
|
+
npm ci
|
|
7
|
+
else
|
|
8
|
+
npm i
|
|
9
|
+
fi
|
|
6
10
|
fi
|
|
7
11
|
echo '>> Install each function dependencies:'
|
|
8
12
|
cd functions
|
|
9
13
|
for d in */ ; do
|
|
10
14
|
cd $d
|
|
11
|
-
|
|
15
|
+
if [ ! -d "./node_modules" ]; then
|
|
16
|
+
if [ -f "./package-lock.json" ]; then
|
|
17
|
+
npm ci
|
|
18
|
+
else
|
|
19
|
+
npm i
|
|
20
|
+
fi
|
|
21
|
+
fi
|
|
12
22
|
cd ..
|
|
13
23
|
done
|
|
14
24
|
cd ..
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0
|
|
@@ -2,101 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
[Cloud Commerce](https://github.com/ecomplus/cloud-commerce): the new Store template
|
|
4
4
|
|
|
5
|
-
[:brazil: Tradução em português](./README.pt-BR.md)
|
|
6
|
-
|
|
7
5
|
## Getting started
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
2. Go to _Creation > Firestore Database_ page (on sidebar) and _create database_:
|
|
12
|
-
- Just bypass with default production mode and rules;
|
|
13
|
-
- Select region `us-east4` (recommended, or multi-region `nam5 (us-central)`);
|
|
14
|
-
|
|
15
|
-
3. Firebase free plan doesn't support sending external HTTP requests, so you'll need to upgrade to _Blaze_ (on demand) plan;
|
|
7
|
+
[:us: First deployment and setup](./SETUP.md)
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
[:brazil: Primeiro deploy e configuração](./SETUP.pt-BR.md)
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
- [Better way using command line](#first-deploy-on-cli)
|
|
21
|
-
- [Only in browser](#browser-only-setup) (may be easier but less safe, not recommended)
|
|
11
|
+
## Local development
|
|
22
12
|
|
|
23
|
-
#### First deploy on CLI
|
|
24
|
-
|
|
25
|
-
5. Setup and first deploy from your terminal with [Firebase CLI](https://firebase.google.com/docs/cli):
|
|
26
|
-
```bash
|
|
27
|
-
# Install `firebase-tools` and login
|
|
28
|
-
npm install -g firebase-tools && firebase login
|
|
29
|
-
```
|
|
30
13
|
```bash
|
|
31
|
-
# Clone your new store repository
|
|
32
|
-
git clone git@github.com:{gh-user}/{new-store}.git
|
|
33
|
-
cd {new-store}
|
|
34
14
|
npm i
|
|
35
15
|
```
|
|
36
16
|
|
|
37
|
-
<details open>
|
|
38
|
-
<summary>With <a href="https://cloud.google.com/sdk/docs/install">gcloud CLI</a> (optional) installed</summary>
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# Run project configuration and deploy on GitHub Actions
|
|
42
|
-
FIREBASE_PROJECT_ID={project-id} npm run setup
|
|
43
|
-
```
|
|
44
|
-
|
|
45
17
|
> **Note**
|
|
46
|
-
>
|
|
18
|
+
> Check VS Code (highly) recommend extensions in _store/.vscode/extensions.json_
|
|
47
19
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<details>
|
|
51
|
-
<summary>Without gcloud CLI</summary>
|
|
20
|
+
### Storefront
|
|
52
21
|
|
|
53
22
|
```bash
|
|
54
|
-
|
|
55
|
-
FIREBASE_PROJECT_ID={project-id} npm run setup -- --no-gcloud
|
|
56
|
-
npm run deploy
|
|
23
|
+
npm run dev
|
|
57
24
|
```
|
|
58
25
|
|
|
59
|
-
|
|
60
|
-
- Name it _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
61
|
-
- Describe it _A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase_;
|
|
62
|
-
- Continue and select the following roles to the service account:
|
|
63
|
-
1. _Firebase Admin_
|
|
64
|
-
2. _API Keys Viewer_
|
|
65
|
-
3. _Cloud Run Viewer_
|
|
66
|
-
4. _Cloud Functions Admin_
|
|
67
|
-
5. _Artifact Registry Admin_
|
|
68
|
-
6. _App Engine Creator_
|
|
69
|
-
7. _App Engine Admin_
|
|
70
|
-
8. _Cloud Scheduler Admin_
|
|
71
|
-
8. _Service Account User_
|
|
72
|
-
|
|
73
|
-
7. Back in the service accounts list, click the 3 dots (actions) and select _Manage keys_, generate and download a JSON key for the created account;
|
|
74
|
-
|
|
75
|
-
</details>
|
|
76
|
-
|
|
77
|
-
8. Set the following secrets to your GitHub repository (_Settings > Secrets > Actions_):
|
|
78
|
-
- `FIREBASE_SERVICE_ACCOUNT`: Paste the generated Google Cloud key JSON
|
|
79
|
-
- `ECOM_AUTHENTICATION_ID`: Get from CLI setup output
|
|
80
|
-
- `ECOM_API_KEY`: Get from CLI setup output
|
|
81
|
-
|
|
82
|
-
:checkered_flag: :checkered_flag: :checkered_flag: **All done, congrats!**
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
#### Browser-only setup
|
|
87
|
-
|
|
88
|
-
> **Warning**
|
|
89
|
-
> This configuration option is less secure, we recommend [first deploy on CLI](#first-deploy-on-cli) instead.
|
|
90
|
-
|
|
91
|
-
5. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform:
|
|
92
|
-
- Name it _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
93
|
-
- Describe it _A service account with ALL permissions to deploy Cloud Commerce from the GitHub to Firebase_;
|
|
94
|
-
- Continue and select the role _Quick access > Basic > Proprietary_;
|
|
95
|
-
|
|
96
|
-
6. Back in the service accounts list, click the 3 dots (actions) and select _Manage keys_, generate and download a JSON key for the created account;
|
|
26
|
+
It starts serving the site at http://localhost:3000/.
|
|
97
27
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
- `ECOM_API_KEY`: Copy your _API Key_ on the [E-Com Plus admin](https://ecomplus.app/)
|
|
28
|
+
Edit your store source in _functions/ssr_:
|
|
29
|
+
- _src_: pages, components, styles and scripts sources;
|
|
30
|
+
- _content_: JSON and Markdown content (editable with git-based CMS);
|
|
31
|
+
- _public_: images and not-parsed static assets;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Store
|
|
2
|
+
|
|
3
|
+
[Cloud Commerce](https://github.com/ecomplus/cloud-commerce): the new Store template
|
|
4
|
+
|
|
5
|
+
[:brazil: Tradução em português](./SETUP.pt-BR.md)
|
|
6
|
+
|
|
7
|
+
## Getting started
|
|
8
|
+
|
|
9
|
+
1. Start creating new project on [Firebase console](https://console.firebase.google.com/):
|
|
10
|
+
- Set a nice project name (ID) and remember it;
|
|
11
|
+
- Disable (recommended) Google Analytics for Firebase, will not be used by default;
|
|
12
|
+
|
|
13
|
+
2. Go to _Creation > Firestore Database_ page (on sidebar) and _Create database_:
|
|
14
|
+
- Just bypass with default production mode and rules;
|
|
15
|
+
- Select region `us-east4` (recommended, or multi-region `nam5 (us-central)`);
|
|
16
|
+
|
|
17
|
+
3. Go to _Creation > Authentication_ and click _Get started_:
|
|
18
|
+
- Click _Native providers > Email/password_ and enable _Email link (login without password)_;
|
|
19
|
+
- Optionally, add other provides by _Smartphone_ (SMS, generates additional costs) and/or social media;
|
|
20
|
+
|
|
21
|
+
4. Go to :gear: _> Project configurations_ e edit:
|
|
22
|
+
- _Default location for GCP resources_: Same Firestore region (`us-east4`);
|
|
23
|
+
- _Public settings > Publicly displayed name_: Your store name;
|
|
24
|
+
- _Public settings > Support email_ (optional);
|
|
25
|
+
- Under _Your apps_ create a new Web app:
|
|
26
|
+
+ Re-enter the store name and enable Firebase Hosting for the new app;
|
|
27
|
+
+ Copy only the value of the `firebaseConfig` object and replace at `functions/ssr/src/scripts/InlineScripts.astro`;
|
|
28
|
+
+ Just click to continue in the next steps until confirmation and return to the console;
|
|
29
|
+
|
|
30
|
+
5. Firebase free plan doesn't support sending external HTTP requests, so you'll need to upgrade to _Blaze_ (on demand) plan;
|
|
31
|
+
|
|
32
|
+
6. [Use this template](https://github.com/ecomplus/store/generate) to generate a new repository for your store;
|
|
33
|
+
|
|
34
|
+
Proceed with:
|
|
35
|
+
- [Better way using command line](#first-deploy-on-cli)
|
|
36
|
+
- [Only in browser](#browser-only-setup) (may be easier but less safe, not recommended)
|
|
37
|
+
|
|
38
|
+
#### First deploy on CLI
|
|
39
|
+
|
|
40
|
+
7. Setup and first deploy from your terminal with [Firebase CLI](https://firebase.google.com/docs/cli):
|
|
41
|
+
```bash
|
|
42
|
+
# Install `firebase-tools` and login
|
|
43
|
+
npm install -g firebase-tools && firebase login
|
|
44
|
+
```
|
|
45
|
+
```bash
|
|
46
|
+
# Clone your new store repository
|
|
47
|
+
git clone git@github.com:{gh-user}/{new-store}.git
|
|
48
|
+
cd {new-store}
|
|
49
|
+
npm i
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
<details open>
|
|
53
|
+
<summary>With <a href="https://cloud.google.com/sdk/docs/install">gcloud CLI</a> (optional) installed</summary>
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Run project configuration and deploy on GitHub Actions
|
|
57
|
+
FIREBASE_PROJECT_ID={project-id} npm run setup
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
> **Note**
|
|
61
|
+
> Account key created automatically with only required permissions using gcloud CLI (skip steps 6 and 7).
|
|
62
|
+
|
|
63
|
+
</details>
|
|
64
|
+
|
|
65
|
+
<details>
|
|
66
|
+
<summary>Without gcloud CLI</summary>
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Run project configuration and first deploy
|
|
70
|
+
FIREBASE_PROJECT_ID={project-id} npm run setup -- --no-gcloud
|
|
71
|
+
npm run deploy
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
7. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform:
|
|
75
|
+
- Name it _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
76
|
+
- Describe it _A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase_;
|
|
77
|
+
- Continue and select the following roles to the service account:
|
|
78
|
+
1. _Firebase Admin_
|
|
79
|
+
2. _API Keys Viewer_
|
|
80
|
+
3. _Cloud Run Viewer_
|
|
81
|
+
4. _Cloud Functions Admin_
|
|
82
|
+
5. _Artifact Registry Admin_
|
|
83
|
+
6. _App Engine Creator_
|
|
84
|
+
7. _App Engine Admin_
|
|
85
|
+
8. _Cloud Scheduler Admin_
|
|
86
|
+
8. _Service Account User_
|
|
87
|
+
|
|
88
|
+
8. Back in the service accounts list, click the 3 dots (actions) and select _Manage keys_, generate and download a JSON key for the created account;
|
|
89
|
+
|
|
90
|
+
</details>
|
|
91
|
+
|
|
92
|
+
9. Set the following secrets to your GitHub repository (_Settings > Secrets > Actions_):
|
|
93
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Paste the generated Google Cloud key JSON
|
|
94
|
+
- `ECOM_AUTHENTICATION_ID`: Get from CLI setup output
|
|
95
|
+
- `ECOM_API_KEY`: Get from CLI setup output
|
|
96
|
+
|
|
97
|
+
:checkered_flag: :checkered_flag: :checkered_flag: **All done, congrats!**
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
#### Browser-only setup
|
|
102
|
+
|
|
103
|
+
> **Warning**
|
|
104
|
+
> This configuration option is less secure, we recommend [first deploy on CLI](#first-deploy-on-cli) instead.
|
|
105
|
+
|
|
106
|
+
7. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform:
|
|
107
|
+
- Name it _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
108
|
+
- Describe it _A service account with ALL permissions to deploy Cloud Commerce from the GitHub to Firebase_;
|
|
109
|
+
- Continue and select the role _Quick access > Basic > Proprietary_;
|
|
110
|
+
|
|
111
|
+
8. Back in the service accounts list, click the 3 dots (actions) and select _Manage keys_, generate and download a JSON key for the created account;
|
|
112
|
+
|
|
113
|
+
9. Set the following secrets to your GitHub repository (_Settings > Secrets > Actions_):
|
|
114
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Paste the generated Google Cloud key JSON
|
|
115
|
+
- `ECOM_STORE_ID`: Copy your _Store ID_ on the [E-Com Plus admin](https://ecomplus.app/)
|
|
116
|
+
- `ECOM_AUTHENTICATION_ID`: Copy your _Authentication ID_ on the [E-Com Plus admin](https://ecomplus.app/)
|
|
117
|
+
- `ECOM_API_KEY`: Copy your _API Key_ on the [E-Com Plus admin](https://ecomplus.app/)
|
|
118
|
+
|
|
119
|
+
## Production best practices
|
|
120
|
+
|
|
121
|
+
Firebase Hosting CDN is fast, but [doesn't support cache _Stale-While-Revalidate_](https://firebase.google.com/docs/hosting/manage-cache) ([context and feature request](https://firebase.uservoice.com/forums/948424-general/suggestions/47179505-hosting-cdn-cache-stale-while-revalidate)) and Hosting proxy + Cloud Functions (even without cold starts) will never take less than 1s (TTFB will probably take ~2s). We like "instant" responses but want to keep dynamic server rendered views (for less client-side JS), so stale caching is a must and so we need another CDN layer on production.
|
|
122
|
+
|
|
123
|
+
[Cloudflare](https://www.cloudflare.com/) Worker is recommended on top of Firebase Hosting + Functions for production stores (when pointing the custom domain) with the following configuration:
|
|
124
|
+
|
|
125
|
+
- SSL full;
|
|
126
|
+
- Page rule for \*/\* (any route) with _Cache Level: Cache Everything_;
|
|
127
|
+
- [_Cache Reserve_](https://www.cloudflare.com/products/cache-reserve/) with Tiered Cache;
|
|
128
|
+
- DNS **proxied** A entry pointing to your Firebase Hosting IP;
|
|
129
|
+
- Worker _swr_ script with source (_quick edit_) copied from [`cloud-commerce/packages/ssr/cloudflare/swr-worker.js`](https://raw.githubusercontent.com/ecomplus/cloud-commerce/main/packages/ssr/cloudflare/swr-worker.js).
|
|
@@ -2,19 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
[Cloud Commerce](https://github.com/ecomplus/cloud-commerce): template para nova loja
|
|
4
4
|
|
|
5
|
-
[:us: English version](./
|
|
5
|
+
[:us: English version](./SETUP.md)
|
|
6
6
|
|
|
7
7
|
## Começando
|
|
8
8
|
|
|
9
|
-
1. Comece criando um novo projeto no [Firebase console](https://console.firebase.google.com/)
|
|
9
|
+
1. Comece criando um novo projeto no [Firebase console](https://console.firebase.google.com/):
|
|
10
|
+
- Insira um bom nome (ID) para o projeto e lembre-se dele;
|
|
11
|
+
- Desative (recomendado) Google Analytics for Firebase, não será utilizado por padrão;
|
|
10
12
|
|
|
11
|
-
2.
|
|
13
|
+
2. Com o projeto criado, vá para _Criação > Firestore Database_ (menu lateral) e clique em _Criar banco de dados_:
|
|
12
14
|
- Pule com o modo e as regras de produção padrão;
|
|
13
15
|
- Selecione a região `us-east4` ([recomendado](https://github.com/ecomplus/cloud-commerce/issues/164));
|
|
14
16
|
|
|
15
|
-
3.
|
|
17
|
+
3. Vá para _Criação > Authentication_ e clique em _Vamos começar_:
|
|
18
|
+
- Clique em _Provedores nativos > E-mail/senha_ e ative _Link do e-mail (login sem senha)_;
|
|
19
|
+
- Opcionalmente, adicione outros fornecedores por _Smartphone_ (SMS, gera custos adicionais) e/ou redes sociais;
|
|
16
20
|
|
|
17
|
-
4.
|
|
21
|
+
4. Vá para :gear: _> Configurações do projeto_ e edite:
|
|
22
|
+
- _Local padrão dos recursos do GCP_: mesma região do Firestore (`us-east4`);
|
|
23
|
+
- _Configurações públicas > Nome exibido ao público_: O nome da sua loja;
|
|
24
|
+
- _Configurações públicas > E-mail para suporte_ (opcional);
|
|
25
|
+
- Em _Seus aplicativos_ crie um app Web:
|
|
26
|
+
+ Insira novamente o nome da loja e ativa Firebase Hosting para o novo app;
|
|
27
|
+
+ Copie apenas o valor do objeto `firebaseConfig` e substitua em `functions/ssr/src/scripts/InlineScripts.astro`;
|
|
28
|
+
+ Apenas clique em prosseguir nos próximos passos até confirmar e voltar para o console;
|
|
29
|
+
|
|
30
|
+
5. O plano gratuito do Firebase não é compatível com o envio de solicitações HTTP externas, portanto você precisará fazer upgrade para o plano _Blaze_ (sob demanda) no canto inferior esquerdo do console do Firebase;
|
|
31
|
+
|
|
32
|
+
6. [Use esse template](https://github.com/ecomplus/store/generate) para gerar um novo repositório para sua loja;
|
|
18
33
|
|
|
19
34
|
Prossiga com:
|
|
20
35
|
- [Melhor maneira usando a linha de comando](#primeiro-deploy-em-cli)
|
|
@@ -22,7 +37,7 @@ Prossiga com:
|
|
|
22
37
|
|
|
23
38
|
#### Primeiro deploy em CLI
|
|
24
39
|
|
|
25
|
-
|
|
40
|
+
7. Setup e primeiro deploy pelo terminal com [Firebase CLI](https://firebase.google.com/docs/cli):
|
|
26
41
|
```bash
|
|
27
42
|
# Install `firebase-tools` and login
|
|
28
43
|
npm install -g firebase-tools && firebase login
|
|
@@ -56,7 +71,7 @@ FIREBASE_PROJECT_ID={project-id} npm run setup -- --no-gcloud
|
|
|
56
71
|
npm run deploy
|
|
57
72
|
```
|
|
58
73
|
|
|
59
|
-
|
|
74
|
+
7. [Crie uma conta de serviço](https://console.cloud.google.com/iam-admin/serviceaccounts) para seu projeto do Firebase diretamente no Google Cloud Platform:
|
|
60
75
|
- Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
61
76
|
- Descreva como _A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase_;
|
|
62
77
|
- Continue e selecione as seguintes permissões:
|
|
@@ -70,11 +85,11 @@ npm run deploy
|
|
|
70
85
|
8. _Administrador do Cloud Scheduler_
|
|
71
86
|
9. _Usuário da conta de serviço_
|
|
72
87
|
|
|
73
|
-
|
|
88
|
+
8. De volta na lista de contas de serviço, clique nos 3 pontos (ações) and selecione _Gerenciar chaves_, crie e faça o download de uma nova chave JSON para a conta recém criada;
|
|
74
89
|
|
|
75
90
|
</details>
|
|
76
91
|
|
|
77
|
-
|
|
92
|
+
9. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
|
|
78
93
|
- `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
|
|
79
94
|
- `ECOM_AUTHENTICATION_ID`: Pegue no output do setup no CLI
|
|
80
95
|
- `ECOM_API_KEY`: Pegue no output do setup no CLI
|
|
@@ -88,15 +103,27 @@ npm run deploy
|
|
|
88
103
|
> **Warning**
|
|
89
104
|
> Essa opção de configuração é menos segura, recomendamos o [primeiro deploy em CLI](#primeiro-deploy-em-cli).
|
|
90
105
|
|
|
91
|
-
|
|
106
|
+
7. [Crie uma conta de serviço](https://console.cloud.google.com/iam-admin/serviceaccounts) para seu projeto do Firebase diretamente no Google Cloud Platform:
|
|
92
107
|
- Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
93
108
|
- Descreva como _A service account with ALL permissions to deploy Cloud Commerce from the GitHub to Firebase_;
|
|
94
109
|
- Continue e selecione a permissão _Acesso rápido > Básico > Proprietário_;
|
|
95
110
|
|
|
96
|
-
|
|
111
|
+
8. Back in the service accounts list, click the 3 dots (actions) and select _Manage keys_, generate and download a JSON key for the created account;
|
|
97
112
|
|
|
98
|
-
|
|
113
|
+
9. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
|
|
99
114
|
- `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
|
|
100
115
|
- `ECOM_STORE_ID`: Copie seu _Store ID_ no [admin da E-Com Plus](https://ecomplus.app/)
|
|
101
116
|
- `ECOM_AUTHENTICATION_ID`: Copie seu _Authentication ID_ no [admin da E-Com Plus](https://ecomplus.app/)
|
|
102
117
|
- `ECOM_API_KEY`: Copie seu _API Key_ no [admin da E-Com Plus](https://ecomplus.app/)
|
|
118
|
+
|
|
119
|
+
## Práticas recomendadas de produção
|
|
120
|
+
|
|
121
|
+
O CDN do Firebase Hosting é rápido, mas [não suporta _Stale-While-Revalidate_](https://firebase.google.com/docs/hosting/manage-cache) ([contexto e feature request](https://firebase.uservoice.com/forums/948424-general/suggestions/47179505-hosting-cdn-cache-stale-while-revalidate)) e Hosting proxy + Cloud Functions (mesmo sem cold starts) nunca leva menos que 1s (TTFB provavelmente vai bater ~2s). Nós gostamos de respostas "instantâneas" mas queremos manter views dinâmicas renderizadas em servidor (por menos client-side JS), então stale caching é necessário e portanto precisamos de outra camada de CDN em produção.
|
|
122
|
+
|
|
123
|
+
[Cloudflare](https://www.cloudflare.com/) Worker é recomendado na frente do Firebase Hosting + Functions para lojas em produção (quando apontando o domínio próprio) com as configurações abaixo:
|
|
124
|
+
|
|
125
|
+
- SSL full;
|
|
126
|
+
- Page rule para \*/\* (qualquer rota) com _Cache Level: Cache Everything_;
|
|
127
|
+
- [_Cache Reserve_](https://www.cloudflare.com/products/cache-reserve/) com Tiered Cache;
|
|
128
|
+
- Entrada A no DNS com **proxy ativo** apontando para o IP do seu projeto no Firebase Hosting;
|
|
129
|
+
- Worker _swr_ com o código (_quick edit_) copiado de [`cloud-commerce/packages/ssr/cloudflare/swr-worker.js`](https://raw.githubusercontent.com/ecomplus/cloud-commerce/main/packages/ssr/cloudflare/swr-worker.js).
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@cloudcommerce/firebase/lib/init';
|
|
1
2
|
import config from '@cloudcommerce/firebase/config';
|
|
2
3
|
import mergeConfig from './config.json' assert { type: 'json' };
|
|
3
4
|
|
|
@@ -6,4 +7,8 @@ config.set({
|
|
|
6
7
|
hello: 'from store',
|
|
7
8
|
});
|
|
8
9
|
|
|
10
|
+
export * from '@cloudcommerce/firebase';
|
|
11
|
+
|
|
9
12
|
export * from '@cloudcommerce/passport/firebase';
|
|
13
|
+
|
|
14
|
+
export * from '@cloudcommerce/feeds/firebase';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "monocard-
|
|
2
|
+
"name": "monocard-many",
|
|
3
3
|
"private": true,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.26.6",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.26.6",
|
|
20
|
+
"@cloudcommerce/passport": "^0.26.6"
|
|
20
21
|
}
|
|
21
22
|
}
|
|
File without changes
|