cloudcommerce 0.21.0 → 0.22.1
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/.gitmodules +3 -0
- package/.nvmrc +1 -0
- package/.vscode/settings.json +2 -1
- package/CHANGELOG.md +36 -0
- package/action.yml +37 -13
- package/ecomplus-stores/iluminim/.devcontainer/devcontainer.json +30 -0
- package/ecomplus-stores/iluminim/.eslintrc.cjs +3 -0
- package/ecomplus-stores/iluminim/.firebaserc +5 -0
- package/ecomplus-stores/iluminim/.github/renovate.json +5 -0
- package/ecomplus-stores/iluminim/.github/workflows/build-and-deploy.yml +36 -0
- package/ecomplus-stores/iluminim/.github/workflows/calibreapp-image-actions.yml +23 -0
- package/ecomplus-stores/iluminim/.gitpod.yml +12 -0
- package/ecomplus-stores/iluminim/.nvmrc +1 -0
- package/ecomplus-stores/iluminim/.vscode/extensions.json +8 -0
- package/ecomplus-stores/iluminim/.vscode/launch.json +11 -0
- package/ecomplus-stores/iluminim/.vscode/settings.json +10 -0
- package/ecomplus-stores/iluminim/README.md +113 -0
- package/ecomplus-stores/iluminim/README.pt-BR.md +113 -0
- package/ecomplus-stores/iluminim/functions/config.json +3 -0
- package/ecomplus-stores/iluminim/functions/example.env +10 -0
- package/ecomplus-stores/iluminim/functions/many/index.js +14 -0
- package/ecomplus-stores/iluminim/functions/many/package.json +22 -0
- package/ecomplus-stores/iluminim/functions/ssr/.eslintrc.cjs +6 -0
- package/ecomplus-stores/iluminim/functions/ssr/astro.config.mjs +4 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/blog/.gitkeep +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/.gitkeep +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +33 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/pages/home.json +70 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/settings.json +49 -0
- package/ecomplus-stores/iluminim/functions/ssr/index.js +18 -0
- package/ecomplus-stores/iluminim/functions/ssr/package.json +31 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/admin/.gitkeep +2 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/icon.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/large-icon.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner-chamada-desktop-9x81zmd91q.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner2.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/chamada-mobile-q1c6om6jx4.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/headphone.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/logo.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/og-image.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/passion.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect8589.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect859.png +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect89.webp +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/public/robots.txt +8 -0
- package/ecomplus-stores/iluminim/functions/ssr/scripts/build.sh +14 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +65 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +104 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/Banner.vue +59 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/BannersGrid.astro +25 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/CartSidebar.vue +35 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/Countdown.vue +79 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/HeroSlider.vue +52 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/PitchBar.vue +57 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/Prices.vue +96 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductCard.vue +118 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductShelf.vue +60 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductsCountdown.vue +20 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/SearchModal.vue +6 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +137 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderMenu.vue +58 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderSubmenu.vue +88 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +61 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenavCategory.vue +78 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/env.d.ts +13 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Base.astro +16 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Checkout.astro +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +33 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/main/Fallback.astro +10 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/main/Home.astro +49 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/main/Sections.astro +42 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/main/Wildcard.astro +18 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/[...slug].astro +40 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/_vue.ts +3 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/account.astro +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/index.astro +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/fallback.astro +25 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +35 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/scripts/InlineScripts.astro +10 -0
- package/ecomplus-stores/iluminim/functions/ssr/tailwind.config.cjs +13 -0
- package/ecomplus-stores/iluminim/functions/ssr/tsconfig.json +12 -0
- package/ecomplus-stores/iluminim/functions/ssr/uno.config.cjs +5 -0
- package/ecomplus-stores/iluminim/functions/with-apps/index.js +12 -0
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +22 -0
- package/ecomplus-stores/iluminim/package.json +28 -0
- package/ecomplus-stores/iluminim/scripts/install.sh +14 -0
- package/ecomplus-stores/monocard/.eslintrc.cjs +3 -0
- package/ecomplus-stores/monocard/.nvmrc +1 -0
- package/ecomplus-stores/tia-sonia/.eslintrc.cjs +3 -0
- package/ecomplus-stores/tia-sonia/.nvmrc +1 -0
- package/package.json +6 -6
- package/packages/api/package.json +1 -1
- package/packages/api/types.d.ts +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/lib/en_us/i19hour.txt +1 -0
- package/packages/i18n/lib/en_us/i19hours.txt +1 -0
- package/packages/i18n/lib/en_us/i19milliseconds.txt +1 -0
- package/packages/i18n/lib/en_us/i19minute.txt +1 -0
- package/packages/i18n/lib/en_us/i19minutes.txt +1 -0
- package/packages/i18n/lib/en_us/i19second.txt +1 -0
- package/packages/i18n/lib/en_us/i19seconds.txt +1 -0
- package/packages/i18n/lib/en_us.d.ts +7 -0
- package/packages/i18n/lib/en_us.js +7 -0
- package/packages/i18n/lib/en_us.js.map +1 -1
- package/packages/i18n/lib/pt_br/i19home.txt +1 -1
- package/packages/i18n/lib/pt_br/i19hour.txt +1 -0
- package/packages/i18n/lib/pt_br/i19hours.txt +1 -0
- package/packages/i18n/lib/pt_br/i19milliseconds.txt +1 -0
- package/packages/i18n/lib/pt_br/i19minute.txt +1 -0
- package/packages/i18n/lib/pt_br/i19minutes.txt +1 -0
- package/packages/i18n/lib/pt_br/i19second.txt +1 -0
- package/packages/i18n/lib/pt_br/i19seconds.txt +1 -0
- package/packages/i18n/lib/pt_br.d.ts +8 -1
- package/packages/i18n/lib/pt_br.js +8 -1
- package/packages/i18n/lib/pt_br.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/i18n/src/en_us.ts +7 -0
- package/packages/i18n/src/pt_br.ts +8 -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/.eslintrc.cjs +8 -1
- package/packages/storefront/astro.config.mjs +2 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.0890631f.js +1 -0
- package/packages/storefront/dist/client/_astro/{_...slug_.c85b8978.css → _...slug_.2f4f6929.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/{_...49a92e87.mjs → _...d496b072.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/{account@_@astro.5388531b.mjs → account@_@astro.1b311a3d.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/{astro.161c5a41.mjs → astro.e0968ba7.mjs} +841 -765
- package/packages/storefront/dist/server/chunks/{endpoint@_@js.fe113d0d.mjs → endpoint@_@js.631ff6c5.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/{fallback@_@astro.23b17e3d.mjs → fallback@_@astro.12cf85ba.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/{index@_@astro.2527898d.mjs → index@_@astro.69eb5e8a.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/{index@_@astro.433809ce.mjs → index@_@astro.a20d91aa.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.1d0e7f10.mjs → _...slug_.astro.c93fc36d.mjs} +12 -12
- package/packages/storefront/dist/server/chunks/pages/{account.astro.7539e037.mjs → account.astro.0003ca94.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/pages/{endpoint.js.b71736ca.mjs → endpoint.js.630b1212.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{fallback.astro.15292657.mjs → fallback.astro.58c7e581.mjs} +5 -5
- package/packages/storefront/dist/server/chunks/pages/{index.astro.9592fbd6.mjs → index.astro.6efe85be.mjs} +32 -31
- package/packages/storefront/dist/server/entry.mjs +10 -10
- package/packages/storefront/dist/server/renderers.mjs +3 -3
- package/packages/storefront/package.json +5 -5
- package/packages/storefront/src/lib/layouts/use-page-main.ts +18 -5
- package/packages/types/package.json +1 -1
- package/pnpm-workspace.yaml +2 -2
- package/packages/storefront/dist/client/_astro/HeroSlider.eb156f18.js +0 -1
- package/packages/storefront/src/lib/composables/use-hero-slider.ts +0 -26
- /package/{packages/storefront/dist/client → ecomplus-stores/iluminim/functions/ssr/public}/assets/cms-preview.css +0 -0
- /package/{packages/storefront/dist/client → ecomplus-stores/iluminim/functions/ssr/public}/assets/cms.css +0 -0
- /package/{packages/storefront/dist/client → ecomplus-stores/iluminim/functions/ssr/public}/assets/cvv.png +0 -0
- /package/{packages/storefront/dist/client → ecomplus-stores/iluminim/functions/ssr/public}/assets/img-placeholder.png +0 -0
- /package/{packages/storefront/dist/client → ecomplus-stores/iluminim/functions/ssr/public}/assets/payments.png +0 -0
- /package/{packages/storefront/dist/client → ecomplus-stores/iluminim/functions/ssr/public}/assets/ssl-safe.png +0 -0
package/.gitmodules
CHANGED
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
18
|
package/.vscode/settings.json
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"packages/storefront/tailwind.config.cjs": "packages/**",
|
|
15
15
|
"store/functions/ssr/tailwind.config.cjs": "store/**",
|
|
16
16
|
"ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs": "ecomplus-stores/monocard/**",
|
|
17
|
-
"ecomplus-stores/tia-sonia/functions/ssr/tailwind.config.cjs": "ecomplus-stores/tia-sonia/**"
|
|
17
|
+
"ecomplus-stores/tia-sonia/functions/ssr/tailwind.config.cjs": "ecomplus-stores/tia-sonia/**",
|
|
18
|
+
"ecomplus-stores/iluminim/functions/ssr/tailwind.config.cjs": "ecomplus-stores/iluminim/**"
|
|
18
19
|
},
|
|
19
20
|
"typescript.tsdk": "node_modules/typescript/lib"
|
|
20
21
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,42 @@
|
|
|
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.22.1](https://github.com/ecomplus/cloud-commerce/compare/v0.22.0...v0.22.1) (2023-07-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **cli:** Check node_modules and install SSR dependencies on dev command if needed ([b60e94b](https://github.com/ecomplus/cloud-commerce/commit/b60e94b0315bf041392e2c322133d0cf77bd0d19))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **cli:** Create `functions/.env` with Store ID from config.json on first dev command ([17bf92b](https://github.com/ecomplus/cloud-commerce/commit/17bf92b67bfd29de57a2b1c0950c073b192370ca))
|
|
16
|
+
* **deps:** Update non-major dependencies ([#197](https://github.com/ecomplus/cloud-commerce/issues/197)) ([15715b1](https://github.com/ecomplus/cloud-commerce/commit/15715b1b587db364de627a35aafce4b34bb1c2ee))
|
|
17
|
+
* **fb-conversions:** Update dependency facebook-nodejs-business-sdk to v17 ([#199](https://github.com/ecomplus/cloud-commerce/issues/199)) ([5cac54e](https://github.com/ecomplus/cloud-commerce/commit/5cac54ee19b33d8f6b1e0ca9a6bab80decd99af6))
|
|
18
|
+
* **storefront:** Update dependency astro to v2.9.2 ([#196](https://github.com/ecomplus/cloud-commerce/issues/196)) ([7383674](https://github.com/ecomplus/cloud-commerce/commit/7383674c5980239d81bfa031066c09e948dc23d8))
|
|
19
|
+
|
|
20
|
+
## [0.22.0](https://github.com/ecomplus/cloud-commerce/compare/v0.21.0...v0.22.0) (2023-07-21)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### ⚠ BREAKING CHANGES
|
|
24
|
+
|
|
25
|
+
* **storefront:** `composables/use-hero-slider` removed in favor of `useBanner` only and <Banner> component
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* **i18n:** New time units related words ([eae4800](https://github.com/ecomplus/cloud-commerce/commit/eae4800e2b7da1ee6125b81a822bb18d728ce3ae))
|
|
30
|
+
* **storefront:** Update `useSections` with new `handleCustomSection` option ([30ab9ee](https://github.com/ecomplus/cloud-commerce/commit/30ab9ee09143771fe707c70138e052fe5156d562))
|
|
31
|
+
* **storefront:** Update Astro to v2.9.0 ([7b23afc](https://github.com/ecomplus/cloud-commerce/commit/7b23afc8ab5cb2fc5626d5339706f2e81279b95b))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* **api:** Fix handling fields typedefs for products search ([2096524](https://github.com/ecomplus/cloud-commerce/commit/2096524264c2674e51fd1c40df0412484927b30e))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
* **storefront:** Removing `useHeroSlider` as it is not needed and may intuit incorrect use ([15af280](https://github.com/ecomplus/cloud-commerce/commit/15af2805de648286ac8e22f42f7357ccd1bcbc16))
|
|
40
|
+
|
|
5
41
|
## [0.21.0](https://github.com/ecomplus/cloud-commerce/compare/v0.20.2...v0.21.0) (2023-07-19)
|
|
6
42
|
|
|
7
43
|
|
package/action.yml
CHANGED
|
@@ -91,13 +91,30 @@ runs:
|
|
|
91
91
|
cache-dependency-path: '**/package-lock.json'
|
|
92
92
|
|
|
93
93
|
- uses: actions/cache@v3
|
|
94
|
-
id: npm-cache
|
|
94
|
+
id: npm-cache-root
|
|
95
95
|
with:
|
|
96
|
-
path:
|
|
97
|
-
**/node_modules
|
|
96
|
+
path: node_modules
|
|
98
97
|
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
|
|
99
98
|
|
|
100
|
-
-
|
|
99
|
+
- uses: actions/cache@v3
|
|
100
|
+
id: npm-cache-many
|
|
101
|
+
with:
|
|
102
|
+
path: functions/many/node_modules
|
|
103
|
+
key: ${{ runner.os }}-npm-${{ hashFiles('functions/many/package-lock.json') }}
|
|
104
|
+
|
|
105
|
+
- uses: actions/cache@v3
|
|
106
|
+
id: npm-cache-ssr
|
|
107
|
+
with:
|
|
108
|
+
path: functions/ssr/node_modules
|
|
109
|
+
key: ${{ runner.os }}-npm-${{ hashFiles('functions/ssr/package-lock.json') }}
|
|
110
|
+
|
|
111
|
+
- uses: actions/cache@v3
|
|
112
|
+
id: npm-cache-with-apps
|
|
113
|
+
with:
|
|
114
|
+
path: functions/with-apps/node_modules
|
|
115
|
+
key: ${{ runner.os }}-npm-${{ hashFiles('functions/with-apps/package-lock.json') }}
|
|
116
|
+
|
|
117
|
+
- if: steps.npm-cache-root.outputs.cache-hit != 'true'
|
|
101
118
|
shell: bash
|
|
102
119
|
run: npm ci --omit=dev
|
|
103
120
|
|
|
@@ -122,16 +139,23 @@ runs:
|
|
|
122
139
|
shell: bash
|
|
123
140
|
run: npm i --location=global firebase-tools@12.3.1
|
|
124
141
|
|
|
125
|
-
- if: steps.npm-cache.outputs.cache-hit != 'true'
|
|
126
|
-
name: Install
|
|
142
|
+
- if: steps.npm-cache-many.outputs.cache-hit != 'true'
|
|
143
|
+
name: Install codebase "many" dependencies
|
|
127
144
|
shell: bash
|
|
128
|
-
working-directory: functions
|
|
129
|
-
run:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
145
|
+
working-directory: functions/many
|
|
146
|
+
run: npm ci
|
|
147
|
+
|
|
148
|
+
- if: steps.npm-cache-ssr.outputs.cache-hit != 'true'
|
|
149
|
+
name: Install codebase "ssr" dependencies
|
|
150
|
+
shell: bash
|
|
151
|
+
working-directory: functions/ssr
|
|
152
|
+
run: npm ci
|
|
153
|
+
|
|
154
|
+
- if: steps.npm-cache-with-apps.outputs.cache-hit != 'true'
|
|
155
|
+
name: Install codebase "with-apps" dependencies
|
|
156
|
+
shell: bash
|
|
157
|
+
working-directory: functions/with-apps
|
|
158
|
+
run: npm ci
|
|
135
159
|
|
|
136
160
|
- name: Set ECOM_STORE_ID and GITHUB_REF env
|
|
137
161
|
shell: bash
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"postCreateCommand": "npm i && npm i --prefix=functions/ssr",
|
|
3
|
+
"waitFor": "postCreateCommand",
|
|
4
|
+
"portsAttributes": {
|
|
5
|
+
"3000": {
|
|
6
|
+
"label": "Application",
|
|
7
|
+
"onAutoForward": "openPreview"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"forwardPorts": [
|
|
11
|
+
3000
|
|
12
|
+
],
|
|
13
|
+
"postAttachCommand": {
|
|
14
|
+
"Server": "npm run dev"
|
|
15
|
+
},
|
|
16
|
+
"customizations": {
|
|
17
|
+
"codespaces": {
|
|
18
|
+
"openFiles": [
|
|
19
|
+
"functions/ssr/src/main/Home.astro"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"vscode": {
|
|
23
|
+
"extensions": [
|
|
24
|
+
"astro-build.astro-vscode",
|
|
25
|
+
"vue.volar",
|
|
26
|
+
"bradlc.vscode-tailwindcss"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Build and deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'functions/**'
|
|
9
|
+
- 'package-lock.json'
|
|
10
|
+
- '.firebaserc'
|
|
11
|
+
- '.ecomplus/**'
|
|
12
|
+
- '.github/build-and-deploy'
|
|
13
|
+
- '.github/workflows/build-and-deploy.yml'
|
|
14
|
+
pull_request:
|
|
15
|
+
paths:
|
|
16
|
+
- 'functions/ssr/**'
|
|
17
|
+
- '.firebaserc'
|
|
18
|
+
- 'package-lock.json'
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build-and-deploy:
|
|
22
|
+
name: Cloud Commerce build and deploy
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
if: |
|
|
25
|
+
!contains(github.event.head_commit.message, '[skip ci]')
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v3
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
- uses: ecomplus/cloud-commerce@main
|
|
31
|
+
with:
|
|
32
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
firebase-service-account: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
|
|
34
|
+
ecom-authentication-id: ${{ secrets.ECOM_AUTHENTICATION_ID }}
|
|
35
|
+
ecom-api-key: ${{ secrets.ECOM_API_KEY }}
|
|
36
|
+
ecom-store-id: ${{ secrets.ECOM_STORE_ID }}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Compress images
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- '**.jpg'
|
|
7
|
+
- '**.jpeg'
|
|
8
|
+
- '**.png'
|
|
9
|
+
- '**.webp'
|
|
10
|
+
- 'package-lock.json'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
# Only run on Pull Requests within the same repository, and not from forks.
|
|
15
|
+
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
16
|
+
name: calibreapp/image-actions
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v3
|
|
20
|
+
- name: Compress images
|
|
21
|
+
uses: calibreapp/image-actions@main
|
|
22
|
+
with:
|
|
23
|
+
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
18
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Store
|
|
2
|
+
|
|
3
|
+
[Cloud Commerce](https://github.com/ecomplus/cloud-commerce): the new Store template
|
|
4
|
+
|
|
5
|
+
[:brazil: Tradução em português](./README.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
|
+
|
|
26
|
+
5. Firebase free plan doesn't support sending external HTTP requests, so you'll need to upgrade to _Blaze_ (on demand) plan;
|
|
27
|
+
|
|
28
|
+
6. [Use this template](https://github.com/ecomplus/store/generate) to generate a new repository for your store;
|
|
29
|
+
|
|
30
|
+
Proceed with:
|
|
31
|
+
- [Better way using command line](#first-deploy-on-cli)
|
|
32
|
+
- [Only in browser](#browser-only-setup) (may be easier but less safe, not recommended)
|
|
33
|
+
|
|
34
|
+
#### First deploy on CLI
|
|
35
|
+
|
|
36
|
+
7. Setup and first deploy from your terminal with [Firebase CLI](https://firebase.google.com/docs/cli):
|
|
37
|
+
```bash
|
|
38
|
+
# Install `firebase-tools` and login
|
|
39
|
+
npm install -g firebase-tools && firebase login
|
|
40
|
+
```
|
|
41
|
+
```bash
|
|
42
|
+
# Clone your new store repository
|
|
43
|
+
git clone git@github.com:{gh-user}/{new-store}.git
|
|
44
|
+
cd {new-store}
|
|
45
|
+
npm i
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
<details open>
|
|
49
|
+
<summary>With <a href="https://cloud.google.com/sdk/docs/install">gcloud CLI</a> (optional) installed</summary>
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Run project configuration and deploy on GitHub Actions
|
|
53
|
+
FIREBASE_PROJECT_ID={project-id} npm run setup
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
> **Note**
|
|
57
|
+
> Account key created automatically with only required permissions using gcloud CLI (skip steps 6 and 7).
|
|
58
|
+
|
|
59
|
+
</details>
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary>Without gcloud CLI</summary>
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Run project configuration and first deploy
|
|
66
|
+
FIREBASE_PROJECT_ID={project-id} npm run setup -- --no-gcloud
|
|
67
|
+
npm run deploy
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
7. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform:
|
|
71
|
+
- Name it _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
72
|
+
- Describe it _A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase_;
|
|
73
|
+
- Continue and select the following roles to the service account:
|
|
74
|
+
1. _Firebase Admin_
|
|
75
|
+
2. _API Keys Viewer_
|
|
76
|
+
3. _Cloud Run Viewer_
|
|
77
|
+
4. _Cloud Functions Admin_
|
|
78
|
+
5. _Artifact Registry Admin_
|
|
79
|
+
6. _App Engine Creator_
|
|
80
|
+
7. _App Engine Admin_
|
|
81
|
+
8. _Cloud Scheduler Admin_
|
|
82
|
+
8. _Service Account User_
|
|
83
|
+
|
|
84
|
+
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;
|
|
85
|
+
|
|
86
|
+
</details>
|
|
87
|
+
|
|
88
|
+
9. Set the following secrets to your GitHub repository (_Settings > Secrets > Actions_):
|
|
89
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Paste the generated Google Cloud key JSON
|
|
90
|
+
- `ECOM_AUTHENTICATION_ID`: Get from CLI setup output
|
|
91
|
+
- `ECOM_API_KEY`: Get from CLI setup output
|
|
92
|
+
|
|
93
|
+
:checkered_flag: :checkered_flag: :checkered_flag: **All done, congrats!**
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
#### Browser-only setup
|
|
98
|
+
|
|
99
|
+
> **Warning**
|
|
100
|
+
> This configuration option is less secure, we recommend [first deploy on CLI](#first-deploy-on-cli) instead.
|
|
101
|
+
|
|
102
|
+
7. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform:
|
|
103
|
+
- Name it _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
104
|
+
- Describe it _A service account with ALL permissions to deploy Cloud Commerce from the GitHub to Firebase_;
|
|
105
|
+
- Continue and select the role _Quick access > Basic > Proprietary_;
|
|
106
|
+
|
|
107
|
+
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;
|
|
108
|
+
|
|
109
|
+
9. Set the following secrets to your GitHub repository (_Settings > Secrets > Actions_):
|
|
110
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Paste the generated Google Cloud key JSON
|
|
111
|
+
- `ECOM_STORE_ID`: Copy your _Store ID_ on the [E-Com Plus admin](https://ecomplus.app/)
|
|
112
|
+
- `ECOM_AUTHENTICATION_ID`: Copy your _Authentication ID_ on the [E-Com Plus admin](https://ecomplus.app/)
|
|
113
|
+
- `ECOM_API_KEY`: Copy your _API Key_ on the [E-Com Plus admin](https://ecomplus.app/)
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Store
|
|
2
|
+
|
|
3
|
+
[Cloud Commerce](https://github.com/ecomplus/cloud-commerce): template para nova loja
|
|
4
|
+
|
|
5
|
+
[:us: English version](./README.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
|
+
|
|
26
|
+
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;
|
|
27
|
+
|
|
28
|
+
6. [Use esse template](https://github.com/ecomplus/store/generate) para gerar um novo repositório para sua loja;
|
|
29
|
+
|
|
30
|
+
Prossiga com:
|
|
31
|
+
- [Melhor maneira usando a linha de comando](#primeiro-deploy-em-cli)
|
|
32
|
+
- [Apenas no navegador](#setup-somente-do-navegador) (pode ser mais fácil mas menos seguro, não recomendado)
|
|
33
|
+
|
|
34
|
+
#### Primeiro deploy em CLI
|
|
35
|
+
|
|
36
|
+
7. Setup e primeiro deploy pelo terminal com [Firebase CLI](https://firebase.google.com/docs/cli):
|
|
37
|
+
```bash
|
|
38
|
+
# Install `firebase-tools` and login
|
|
39
|
+
npm install -g firebase-tools && firebase login
|
|
40
|
+
```
|
|
41
|
+
```bash
|
|
42
|
+
# Clone your new store repository
|
|
43
|
+
git clone git@github.com:{gh-user}/{new-store}.git
|
|
44
|
+
cd {new-store}
|
|
45
|
+
npm i
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
<details open>
|
|
49
|
+
<summary>Com <a href="https://cloud.google.com/sdk/docs/install">gcloud CLI</a> (opcional) instalado</summary>
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Run project configuration and deploy on GitHub Actions
|
|
53
|
+
FIREBASE_PROJECT_ID={project-id} npm run setup
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
> **Note**
|
|
57
|
+
> Chave de conta criada automaticamente apenas com as permissões necessárias usando gcloud CLI (pule as etapas 6 e 7).
|
|
58
|
+
|
|
59
|
+
</details>
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary>Sem gcloud CLI</summary>
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Run project configuration and first deploy
|
|
66
|
+
FIREBASE_PROJECT_ID={project-id} npm run setup -- --no-gcloud
|
|
67
|
+
npm run deploy
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
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:
|
|
71
|
+
- Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
72
|
+
- Descreva como _A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase_;
|
|
73
|
+
- Continue e selecione as seguintes permissões:
|
|
74
|
+
1. _Administrador do Firebase_
|
|
75
|
+
2. _Leitor de chaves de API_
|
|
76
|
+
3. _Leitor do Cloud Run_
|
|
77
|
+
4. _Administrador do Cloud Functions_
|
|
78
|
+
5. _Administrador do Artifact Registry_
|
|
79
|
+
6. _Criador do App Engine_
|
|
80
|
+
7. _Administrador do App Engine_
|
|
81
|
+
8. _Administrador do Cloud Scheduler_
|
|
82
|
+
9. _Usuário da conta de serviço_
|
|
83
|
+
|
|
84
|
+
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;
|
|
85
|
+
|
|
86
|
+
</details>
|
|
87
|
+
|
|
88
|
+
9. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
|
|
89
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
|
|
90
|
+
- `ECOM_AUTHENTICATION_ID`: Pegue no output do setup no CLI
|
|
91
|
+
- `ECOM_API_KEY`: Pegue no output do setup no CLI
|
|
92
|
+
|
|
93
|
+
:checkered_flag: :checkered_flag: :checkered_flag: **Tudo pronto, boa!**
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
#### Setup somente do navegador
|
|
98
|
+
|
|
99
|
+
> **Warning**
|
|
100
|
+
> Essa opção de configuração é menos segura, recomendamos o [primeiro deploy em CLI](#primeiro-deploy-em-cli).
|
|
101
|
+
|
|
102
|
+
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:
|
|
103
|
+
- Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
|
|
104
|
+
- Descreva como _A service account with ALL permissions to deploy Cloud Commerce from the GitHub to Firebase_;
|
|
105
|
+
- Continue e selecione a permissão _Acesso rápido > Básico > Proprietário_;
|
|
106
|
+
|
|
107
|
+
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;
|
|
108
|
+
|
|
109
|
+
9. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
|
|
110
|
+
- `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
|
|
111
|
+
- `ECOM_STORE_ID`: Copie seu _Store ID_ no [admin da E-Com Plus](https://ecomplus.app/)
|
|
112
|
+
- `ECOM_AUTHENTICATION_ID`: Copie seu _Authentication ID_ no [admin da E-Com Plus](https://ecomplus.app/)
|
|
113
|
+
- `ECOM_API_KEY`: Copie seu _API Key_ no [admin da E-Com Plus](https://ecomplus.app/)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Get the store credentials with `npm run setup` from project root
|
|
2
|
+
ECOM_AUTHENTICATION_ID=
|
|
3
|
+
ECOM_API_KEY=
|
|
4
|
+
|
|
5
|
+
# Optional if `storeId` is defined in config.json
|
|
6
|
+
# Automatically set on CLI setup
|
|
7
|
+
ECOM_STORE_ID=
|
|
8
|
+
|
|
9
|
+
# https://github.com/settings/tokens
|
|
10
|
+
GITHUB_TOKEN=
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import '@cloudcommerce/firebase/lib/init';
|
|
2
|
+
import config from '@cloudcommerce/firebase/config';
|
|
3
|
+
import mergeConfig from './config.json' assert { type: 'json' };
|
|
4
|
+
|
|
5
|
+
config.set({
|
|
6
|
+
...mergeConfig,
|
|
7
|
+
hello: 'from store',
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export * from '@cloudcommerce/firebase';
|
|
11
|
+
|
|
12
|
+
export * from '@cloudcommerce/passport/firebase';
|
|
13
|
+
|
|
14
|
+
export * from '@cloudcommerce/feeds/firebase';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "iluminim-many",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "echo '>> Run build from repository root'",
|
|
7
|
+
"serve": "firebase emulators:start --only functions",
|
|
8
|
+
"shell": "firebase functions:shell",
|
|
9
|
+
"start": "npm run shell",
|
|
10
|
+
"deploy": "firebase deploy --only functions",
|
|
11
|
+
"logs": "firebase functions:log"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": "18"
|
|
15
|
+
},
|
|
16
|
+
"main": "index.js",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@cloudcommerce/feeds": "^0.22.0",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.22.0",
|
|
20
|
+
"@cloudcommerce/passport": "^0.22.0"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metatags": {
|
|
3
|
+
"og_image": "",
|
|
4
|
+
"fb_app_id": "",
|
|
5
|
+
"twitter_username": ""
|
|
6
|
+
},
|
|
7
|
+
"custom_code": {
|
|
8
|
+
"css": "",
|
|
9
|
+
"html_head": "",
|
|
10
|
+
"html_body": ""
|
|
11
|
+
},
|
|
12
|
+
"header": {
|
|
13
|
+
"pitch_bar": [
|
|
14
|
+
{
|
|
15
|
+
"href": "",
|
|
16
|
+
"html": "<strong>Frete grátis</strong> <d-md>para todo Brasil</d-md> a partir de <b>{free_shipping_from_value}</b>"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"inline_menu_categories": {
|
|
20
|
+
"featured": [],
|
|
21
|
+
"random": 7
|
|
22
|
+
},
|
|
23
|
+
"alphabetical_sort_submenu": false
|
|
24
|
+
},
|
|
25
|
+
"service_links": [
|
|
26
|
+
{
|
|
27
|
+
"title": "Fale conosco",
|
|
28
|
+
"href": "/pages/contato"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"footer": {
|
|
32
|
+
}
|
|
33
|
+
}
|