cloudcommerce 0.22.0 → 0.22.2
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/.editorconfig +13 -0
- package/.gitmodules +3 -0
- package/.vscode/settings.json +2 -1
- package/CHANGELOG.md +28 -0
- package/ecomplus-stores/barra-doce/.devcontainer/devcontainer.json +30 -0
- package/ecomplus-stores/barra-doce/.editorconfig +13 -0
- package/ecomplus-stores/barra-doce/.eslintrc.cjs +3 -0
- package/ecomplus-stores/barra-doce/.firebaserc +5 -0
- package/ecomplus-stores/barra-doce/.github/build-and-deploy +1 -0
- package/ecomplus-stores/barra-doce/.github/renovate.json +5 -0
- package/ecomplus-stores/barra-doce/.github/workflows/build-and-deploy.yml +36 -0
- package/ecomplus-stores/barra-doce/.github/workflows/calibreapp-image-actions.yml +23 -0
- package/ecomplus-stores/barra-doce/.gitpod.yml +12 -0
- package/ecomplus-stores/barra-doce/.nvmrc +1 -0
- package/ecomplus-stores/barra-doce/.vscode/extensions.json +8 -0
- package/ecomplus-stores/barra-doce/.vscode/launch.json +11 -0
- package/ecomplus-stores/barra-doce/.vscode/settings.json +10 -0
- package/ecomplus-stores/barra-doce/LICENSE.md +230 -0
- package/ecomplus-stores/barra-doce/README.md +31 -0
- package/ecomplus-stores/barra-doce/SETUP.md +117 -0
- package/ecomplus-stores/{iluminim/README.pt-BR.md → barra-doce/SETUP.pt-BR.md} +5 -1
- package/ecomplus-stores/barra-doce/functions/config.json +3 -0
- package/ecomplus-stores/barra-doce/functions/example.env +10 -0
- package/ecomplus-stores/barra-doce/functions/many/index.js +14 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +22 -0
- package/ecomplus-stores/barra-doce/functions/ssr/.eslintrc.cjs +6 -0
- package/ecomplus-stores/barra-doce/functions/ssr/astro.config.mjs +4 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/.gitkeep +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/.gitkeep +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/layout.json +37 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/home.json +33 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +48 -0
- package/ecomplus-stores/barra-doce/functions/ssr/index.js +18 -0
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +31 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/admin/.gitkeep +2 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/assets/.gitkeep +2 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/icon.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/large-icon.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/banner-forma-decora.jpg +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/banner2.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/headphone.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/logo-barradoce.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/logo.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/og-image.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/passion.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect8589.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect859.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect89.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/robots.txt +8 -0
- package/ecomplus-stores/barra-doce/functions/ssr/scripts/build.sh +14 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +65 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +104 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +64 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/BannersGrid.astro +25 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +35 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/HeroSlider.vue +51 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +53 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +96 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +117 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductShelf.vue +60 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchModal.vue +6 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +136 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +58 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +88 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenav.vue +61 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenavCategory.vue +80 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/env.d.ts +13 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/Base.astro +15 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/Checkout.astro +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +38 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Fallback.astro +10 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +29 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Sections.astro +29 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Wildcard.astro +18 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +40 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/_vue.ts +3 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/account.astro +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/index.astro +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/fallback.astro +25 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +35 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/scripts/InlineScripts.astro +10 -0
- package/ecomplus-stores/barra-doce/functions/ssr/tailwind.config.cjs +19 -0
- package/ecomplus-stores/barra-doce/functions/ssr/tsconfig.json +12 -0
- package/ecomplus-stores/barra-doce/functions/ssr/uno.config.cjs +5 -0
- package/ecomplus-stores/barra-doce/functions/with-apps/index.js +12 -0
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +22 -0
- package/ecomplus-stores/barra-doce/package.json +28 -0
- package/ecomplus-stores/barra-doce/scripts/install.sh +14 -0
- package/ecomplus-stores/iluminim/.editorconfig +13 -0
- package/ecomplus-stores/iluminim/README.md +11 -93
- package/ecomplus-stores/iluminim/SETUP.md +117 -0
- package/ecomplus-stores/iluminim/SETUP.pt-BR.md +117 -0
- package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
- package/ecomplus-stores/iluminim/functions/ssr/package.json +6 -6
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderSubmenu.vue +1 -1
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +2 -2
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenavCategory.vue +4 -2
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +6 -1
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/iluminim/package.json +1 -1
- package/package.json +6 -6
- 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 +1 -1
- 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 +1 -1
- 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/lib/build.js +15 -4
- package/packages/cli/lib/cli.js +3 -3
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/build.ts +17 -4
- package/packages/cli/src/cli.ts +3 -3
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/lib/dirname.js +3 -1
- package/packages/i18n/lib/dirname.js.map +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/i18n/scripts/build-txt.mjs +2 -1
- package/packages/i18n/src/dirname.ts +3 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +2 -2
- package/packages/storefront/astro.config.mjs +2 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.cea1f361.js +1 -0
- package/packages/storefront/dist/client/_astro/{ProductShelf.9e290480.js → ProductShelf.35614736.js} +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.dbe9c1f1.js +4 -0
- package/packages/storefront/dist/client/_astro/{_...slug_.c85b8978.css → _...slug_.c13e0486.css} +1 -1
- package/packages/storefront/dist/client/assets/.gitkeep +2 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/{_...7e1df40a.mjs → _...fac94758.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{account@_@astro.5f1dba7a.mjs → account@_@astro.460623ee.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{astro.2d3ebf0f.mjs → astro.e0968ba7.mjs} +201 -156
- package/packages/storefront/dist/server/chunks/{endpoint@_@js.80de0568.mjs → endpoint@_@js.35380ea5.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{fallback@_@astro.02a45b47.mjs → fallback@_@astro.dbc26d2d.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{index@_@astro.7cb07e52.mjs → index@_@astro.c91e679e.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{index@_@astro.23b50301.mjs → index@_@astro.fec107b9.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.4358f614.mjs → _...slug_.astro.2e2d4770.mjs} +81 -39
- package/packages/storefront/dist/server/chunks/pages/{account.astro.afae5a12.mjs → account.astro.0003ca94.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{endpoint.js.60fd21aa.mjs → endpoint.js.6f0f4ede.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{fallback.astro.e5566925.mjs → fallback.astro.fc8bc7e7.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/pages/{index.astro.5bc6b9d8.mjs → index.astro.03adcc55.mjs} +6 -6
- package/packages/storefront/dist/server/entry.mjs +9 -9
- package/packages/storefront/dist/server/renderers.mjs +2 -2
- package/packages/storefront/package.json +5 -5
- package/packages/storefront/src/lib/$storefront.d.ts +1 -0
- package/packages/storefront/src/lib/components/SharedData.astro +13 -0
- package/packages/storefront/src/lib/composables/use-prices.ts +1 -1
- package/packages/storefront/src/lib/composables/use-shop-header-submenu.ts +10 -1
- package/packages/storefront/src/lib/composables/use-shop-header.ts +13 -13
- package/packages/storefront/src/lib/layouts/BaseHead.astro +1 -1
- package/packages/storefront/src/lib/layouts/use-page-header.ts +14 -2
- package/packages/storefront/src/lib/ssr-context.ts +1 -0
- package/packages/types/package.json +1 -1
- package/pnpm-workspace.yaml +2 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.0890631f.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.82ae97a5.js +0 -4
- package/packages/storefront/dist/client/assets/cms-preview.css +0 -274
- package/packages/storefront/dist/client/assets/cms.css +0 -114
- package/packages/storefront/dist/client/assets/cvv.png +0 -0
- package/packages/storefront/dist/client/assets/img-placeholder.png +0 -0
- package/packages/storefront/dist/client/assets/payments.png +0 -0
- package/packages/storefront/dist/client/assets/ssl-safe.png +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
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/)
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Store
|
|
2
|
+
|
|
3
|
+
[Cloud Commerce](https://github.com/ecomplus/cloud-commerce): template para nova loja
|
|
4
|
+
|
|
5
|
+
[:us: English version](./SETUP.md)
|
|
6
|
+
|
|
7
|
+
## Começando
|
|
8
|
+
|
|
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;
|
|
12
|
+
|
|
13
|
+
2. Com o projeto criado, vá para _Criação > Firestore Database_ (menu lateral) e clique em _Criar banco de dados_:
|
|
14
|
+
- Pule com o modo e as regras de produção padrão;
|
|
15
|
+
- Selecione a região `us-east4` ([recomendado](https://github.com/ecomplus/cloud-commerce/issues/164));
|
|
16
|
+
|
|
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;
|
|
20
|
+
|
|
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;
|
|
33
|
+
|
|
34
|
+
Prossiga com:
|
|
35
|
+
- [Melhor maneira usando a linha de comando](#primeiro-deploy-em-cli)
|
|
36
|
+
- [Apenas no navegador](#setup-somente-do-navegador) (pode ser mais fácil mas menos seguro, não recomendado)
|
|
37
|
+
|
|
38
|
+
#### Primeiro deploy em CLI
|
|
39
|
+
|
|
40
|
+
7. Setup e primeiro deploy pelo terminal com [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>Com <a href="https://cloud.google.com/sdk/docs/install">gcloud CLI</a> (opcional) instalado</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
|
+
> Chave de conta criada automaticamente apenas com as permissões necessárias usando gcloud CLI (pule as etapas 6 e 7).
|
|
62
|
+
|
|
63
|
+
</details>
|
|
64
|
+
|
|
65
|
+
<details>
|
|
66
|
+
<summary>Sem 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. [Crie uma conta de serviço](https://console.cloud.google.com/iam-admin/serviceaccounts) para seu projeto do Firebase diretamente no Google Cloud Platform:
|
|
75
|
+
- Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
76
|
+
- Descreva como _A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase_;
|
|
77
|
+
- Continue e selecione as seguintes permissões:
|
|
78
|
+
1. _Administrador do Firebase_
|
|
79
|
+
2. _Leitor de chaves de API_
|
|
80
|
+
3. _Leitor do Cloud Run_
|
|
81
|
+
4. _Administrador do Cloud Functions_
|
|
82
|
+
5. _Administrador do Artifact Registry_
|
|
83
|
+
6. _Criador do App Engine_
|
|
84
|
+
7. _Administrador do App Engine_
|
|
85
|
+
8. _Administrador do Cloud Scheduler_
|
|
86
|
+
9. _Usuário da conta de serviço_
|
|
87
|
+
|
|
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;
|
|
89
|
+
|
|
90
|
+
</details>
|
|
91
|
+
|
|
92
|
+
9. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
|
|
93
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
|
|
94
|
+
- `ECOM_AUTHENTICATION_ID`: Pegue no output do setup no CLI
|
|
95
|
+
- `ECOM_API_KEY`: Pegue no output do setup no CLI
|
|
96
|
+
|
|
97
|
+
:checkered_flag: :checkered_flag: :checkered_flag: **Tudo pronto, boa!**
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
#### Setup somente do navegador
|
|
102
|
+
|
|
103
|
+
> **Warning**
|
|
104
|
+
> Essa opção de configuração é menos segura, recomendamos o [primeiro deploy em CLI](#primeiro-deploy-em-cli).
|
|
105
|
+
|
|
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:
|
|
107
|
+
- Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
108
|
+
- Descreva como _A service account with ALL permissions to deploy Cloud Commerce from the GitHub to Firebase_;
|
|
109
|
+
- Continue e selecione a permissão _Acesso rápido > Básico > Proprietário_;
|
|
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. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
|
|
114
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
|
|
115
|
+
- `ECOM_STORE_ID`: Copie seu _Store ID_ no [admin da E-Com Plus](https://ecomplus.app/)
|
|
116
|
+
- `ECOM_AUTHENTICATION_ID`: Copie seu _Authentication ID_ no [admin da E-Com Plus](https://ecomplus.app/)
|
|
117
|
+
- `ECOM_API_KEY`: Copie seu _API Key_ no [admin da E-Com Plus](https://ecomplus.app/)
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
20
|
-
"@cloudcommerce/passport": "^0.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.22.1",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.22.1",
|
|
20
|
+
"@cloudcommerce/passport": "^0.22.1"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.
|
|
20
|
+
"@cloudcommerce/api": "^0.22.1",
|
|
21
|
+
"@cloudcommerce/firebase": "^0.22.1",
|
|
22
|
+
"@cloudcommerce/ssr": "^0.22.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@cloudcommerce/i18n": "^0.
|
|
26
|
-
"@cloudcommerce/storefront": "^0.
|
|
27
|
-
"@cloudcommerce/types": "^0.
|
|
25
|
+
"@cloudcommerce/i18n": "^0.22.1",
|
|
26
|
+
"@cloudcommerce/storefront": "^0.22.1",
|
|
27
|
+
"@cloudcommerce/types": "^0.22.1",
|
|
28
28
|
"@fontsource-variable/heebo": "^5.0.5",
|
|
29
29
|
"@iconify-json/carbon": "^1.1.18"
|
|
30
30
|
}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
<AImg
|
|
17
17
|
v-if="!isOpen && categoryTree.icon"
|
|
18
18
|
:picture="categoryTree.icon"
|
|
19
|
+
:alt="categoryTree.name"
|
|
19
20
|
class="w-auto h-5 inline mr-3"
|
|
20
21
|
/>
|
|
21
22
|
<h3 class="inline" :class="isOpen ? 'ml-4 text-base' : null">
|
|
@@ -28,8 +29,8 @@
|
|
|
28
29
|
tabindex="-1"
|
|
29
30
|
>
|
|
30
31
|
<ShopSidenavCategory
|
|
31
|
-
v-for="subcategoryTree in categoryTree.subcategories"
|
|
32
|
-
:key="
|
|
32
|
+
v-for="(subcategoryTree, i) in categoryTree.subcategories"
|
|
33
|
+
:key="i"
|
|
33
34
|
:category-tree="subcategoryTree"
|
|
34
35
|
/>
|
|
35
36
|
<li>
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
<AImg
|
|
51
52
|
v-if="!isOpen && categoryTree.icon"
|
|
52
53
|
:picture="categoryTree.icon"
|
|
54
|
+
:alt="categoryTree.name"
|
|
53
55
|
class="w-auto h-5 inline mr-3"
|
|
54
56
|
/>
|
|
55
57
|
<h3 class="inline">{{ categoryTree.name }}</h3>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import usePageHeader from '@@sf/layouts/use-page-header';
|
|
3
|
+
import SharedData from '@@sf/components/SharedData.astro';
|
|
3
4
|
import Picture from '@@sf/components/Picture.astro';
|
|
4
5
|
import PitchBar from '~/components/PitchBar.vue';
|
|
5
6
|
import ShopHeader from '~/components/ShopHeader.vue';
|
|
@@ -7,13 +8,17 @@ import ShopHeader from '~/components/ShopHeader.vue';
|
|
|
7
8
|
const { routeContext } = Astro.locals;
|
|
8
9
|
const { settings, isHomepage } = routeContext;
|
|
9
10
|
const LogoHeading = isHomepage ? 'h1' : 'h2';
|
|
10
|
-
const {
|
|
11
|
+
const {
|
|
12
|
+
pitchBar,
|
|
13
|
+
shopHeader: { categories, ...shopHeader },
|
|
14
|
+
} = await usePageHeader({ routeContext });
|
|
11
15
|
---
|
|
12
16
|
|
|
13
17
|
<slot name="pitch-bar">
|
|
14
18
|
{pitchBar.slides.length > 1 && <PitchBar {...pitchBar} client:idle />}
|
|
15
19
|
{pitchBar.slides.length === 1 && <PitchBar {...pitchBar} />}
|
|
16
20
|
</slot>
|
|
21
|
+
<SharedData field="categories" value={categories?.map(({ _id, ...c }) => c)} />
|
|
17
22
|
<ShopHeader {...shopHeader} client:load>
|
|
18
23
|
<Fragment slot="logo">
|
|
19
24
|
<a href="/">
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
20
|
-
"@cloudcommerce/modules": "^0.
|
|
18
|
+
"@cloudcommerce/events": "^0.22.1",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.22.1",
|
|
20
|
+
"@cloudcommerce/modules": "^0.22.1"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.22.
|
|
4
|
+
"version": "0.22.2",
|
|
5
5
|
"description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
|
|
6
6
|
"main": "packages/api/lib/index.js",
|
|
7
7
|
"author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"@commitlint/cli": "^17.6.7",
|
|
20
20
|
"@commitlint/config-conventional": "^17.6.7",
|
|
21
21
|
"@commitlint/rules": "^17.6.7",
|
|
22
|
-
"@types/node": "^18.
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
24
|
-
"@typescript-eslint/parser": "^
|
|
22
|
+
"@types/node": "^18.17.0",
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
24
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
25
25
|
"eslint": "^8.45.0",
|
|
26
26
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
27
27
|
"eslint-plugin-import": "^2.27.5",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"husky": "^8.0.3",
|
|
30
30
|
"standard-version": "^9.5.0",
|
|
31
31
|
"ts-node": "^10.9.1",
|
|
32
|
-
"turbo": "^1.10.
|
|
32
|
+
"turbo": "^1.10.9",
|
|
33
33
|
"typescript": "~5.0.4",
|
|
34
34
|
"uglify-js": "^3.17.4",
|
|
35
|
-
"vite": "^4.4.
|
|
35
|
+
"vite": "^4.4.6",
|
|
36
36
|
"vitest": "^0.33.0",
|
|
37
37
|
"zx": "^7.2.3"
|
|
38
38
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-fb-conversions",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.22.
|
|
4
|
+
"version": "0.22.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to send carts/orders to Facebook Conversions API",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
|
-
"facebook-nodejs-business-sdk": "^
|
|
24
|
+
"facebook-nodejs-business-sdk": "^17.0.1",
|
|
25
25
|
"firebase-admin": "^11.10.1",
|
|
26
26
|
"firebase-functions": "^4.4.1"
|
|
27
27
|
},
|