cloudcommerce 0.0.109 → 0.0.111

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.
Files changed (236) hide show
  1. package/.ecomplus/stores/monocard/.firebaserc +5 -0
  2. package/.ecomplus/stores/monocard/.github/renovate.json +5 -0
  3. package/.ecomplus/stores/monocard/.github/workflows/build-and-deploy.yml +41 -0
  4. package/.ecomplus/stores/monocard/.github/workflows/calibreapp-image-actions.yml +23 -0
  5. package/.ecomplus/stores/monocard/.vscode/extensions.json +8 -0
  6. package/.ecomplus/stores/monocard/.vscode/settings.json +5 -0
  7. package/.ecomplus/stores/monocard/LICENSE.md +230 -0
  8. package/.ecomplus/stores/monocard/README.md +117 -0
  9. package/.ecomplus/stores/monocard/README.pt-BR.md +117 -0
  10. package/.ecomplus/stores/monocard/functions/config.json +3 -0
  11. package/.ecomplus/stores/monocard/functions/core/index.js +9 -0
  12. package/.ecomplus/stores/monocard/functions/core/package.json +20 -0
  13. package/.ecomplus/stores/monocard/functions/events/index.js +9 -0
  14. package/.ecomplus/stores/monocard/functions/events/package.json +21 -0
  15. package/.ecomplus/stores/monocard/functions/example.env +10 -0
  16. package/.ecomplus/stores/monocard/functions/modules/index.js +9 -0
  17. package/.ecomplus/stores/monocard/functions/modules/package.json +21 -0
  18. package/.ecomplus/stores/monocard/functions/passport/index.js +9 -0
  19. package/.ecomplus/stores/monocard/functions/passport/package.json +21 -0
  20. package/.ecomplus/stores/monocard/functions/ssr/astro.config.mjs +4 -0
  21. package/.ecomplus/stores/monocard/functions/ssr/content/blog.json +18 -0
  22. package/.ecomplus/stores/monocard/functions/ssr/content/brands.json +24 -0
  23. package/.ecomplus/stores/monocard/functions/ssr/content/categories.json +24 -0
  24. package/.ecomplus/stores/monocard/functions/ssr/content/code.json +5 -0
  25. package/.ecomplus/stores/monocard/functions/ssr/content/collections.json +24 -0
  26. package/.ecomplus/stores/monocard/functions/ssr/content/contacts.json +13 -0
  27. package/.ecomplus/stores/monocard/functions/ssr/content/footer.json +46 -0
  28. package/.ecomplus/stores/monocard/functions/ssr/content/header.json +35 -0
  29. package/.ecomplus/stores/monocard/functions/ssr/content/home.json +45 -0
  30. package/.ecomplus/stores/monocard/functions/ssr/content/info.json +18 -0
  31. package/.ecomplus/stores/monocard/functions/ssr/content/maintenance.json +6 -0
  32. package/.ecomplus/stores/monocard/functions/ssr/content/menu.json +6 -0
  33. package/.ecomplus/stores/monocard/functions/ssr/content/pages/contato.json +6 -0
  34. package/.ecomplus/stores/monocard/functions/ssr/content/pages/entrega.json +6 -0
  35. package/.ecomplus/stores/monocard/functions/ssr/content/pages/faq.json +6 -0
  36. package/.ecomplus/stores/monocard/functions/ssr/content/pages/pagamentos.json +6 -0
  37. package/.ecomplus/stores/monocard/functions/ssr/content/pages/privacidade.json +6 -0
  38. package/.ecomplus/stores/monocard/functions/ssr/content/pages/sobre-nos.json +6 -0
  39. package/.ecomplus/stores/monocard/functions/ssr/content/pages/termos.json +6 -0
  40. package/.ecomplus/stores/monocard/functions/ssr/content/pages/trocas.json +6 -0
  41. package/.ecomplus/stores/monocard/functions/ssr/content/posts/esta-loja-e-um-pwa.json +9 -0
  42. package/.ecomplus/stores/monocard/functions/ssr/content/products.json +32 -0
  43. package/.ecomplus/stores/monocard/functions/ssr/content/search.json +8 -0
  44. package/.ecomplus/stores/monocard/functions/ssr/content/settings.json +21 -0
  45. package/.ecomplus/stores/monocard/functions/ssr/content/social.json +5 -0
  46. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/analytics.json +11 -0
  47. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/compre-confie.json +11 -0
  48. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/ebit.json +11 -0
  49. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/fb-pixel.json +12 -0
  50. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/gmc-ratings.json +12 -0
  51. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/minicart.json +6 -0
  52. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/offers-notification.json +11 -0
  53. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/opinioes-verificadas.json +18 -0
  54. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/product-card.json +10 -0
  55. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/product.json +13 -0
  56. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/search-engine.json +8 -0
  57. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/search.json +6 -0
  58. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/tag-manager.json +12 -0
  59. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/tawkto.json +12 -0
  60. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/trustvox.json +15 -0
  61. package/.ecomplus/stores/monocard/functions/ssr/content/widgets/user.json +5 -0
  62. package/.ecomplus/stores/monocard/functions/ssr/index.js +18 -0
  63. package/.ecomplus/stores/monocard/functions/ssr/package.json +27 -0
  64. package/.ecomplus/stores/monocard/functions/ssr/public/admin/config.json +1 -0
  65. package/.ecomplus/stores/monocard/functions/ssr/public/assets/cms-preview.css +274 -0
  66. package/.ecomplus/stores/monocard/functions/ssr/public/assets/cms.css +114 -0
  67. package/.ecomplus/stores/monocard/functions/ssr/public/assets/cvv.png +0 -0
  68. package/.ecomplus/stores/monocard/functions/ssr/public/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
  69. package/.ecomplus/stores/monocard/functions/ssr/public/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
  70. package/.ecomplus/stores/monocard/functions/ssr/public/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
  71. package/.ecomplus/stores/monocard/functions/ssr/public/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
  72. package/.ecomplus/stores/monocard/functions/ssr/public/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
  73. package/.ecomplus/stores/monocard/functions/ssr/public/assets/img-placeholder.png +0 -0
  74. package/.ecomplus/stores/monocard/functions/ssr/public/assets/payments.png +0 -0
  75. package/.ecomplus/stores/monocard/functions/ssr/public/assets/ssl-safe.png +0 -0
  76. package/.ecomplus/stores/monocard/functions/ssr/public/img/icon.png +0 -0
  77. package/.ecomplus/stores/monocard/functions/ssr/public/img/large-icon.png +0 -0
  78. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/banner1.png +0 -0
  79. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/banner2.png +0 -0
  80. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/banner2.webp +0 -0
  81. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/favicon.png +0 -0
  82. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/headless.png +0 -0
  83. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/headphone.png +0 -0
  84. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/headphone.webp +0 -0
  85. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/icon.png +0 -0
  86. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/large-icon.png +0 -0
  87. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/logo.png +0 -0
  88. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/logo.webp +0 -0
  89. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/og-image.png +0 -0
  90. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/passion.png +0 -0
  91. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/passion.webp +0 -0
  92. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/pwa-reliable.png +0 -0
  93. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/rect8589.png +0 -0
  94. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/rect859.png +0 -0
  95. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/rect89.png +0 -0
  96. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/rect89.webp +0 -0
  97. package/.ecomplus/stores/monocard/functions/ssr/public/img/uploads/ssl-safe.png +0 -0
  98. package/.ecomplus/stores/monocard/functions/ssr/public/robots.txt +8 -0
  99. package/.ecomplus/stores/monocard/functions/ssr/src/env.d.ts +3 -0
  100. package/.ecomplus/stores/monocard/functions/ssr/src/pages/[...slug].astro +38 -0
  101. package/.ecomplus/stores/monocard/functions/ssr/src/pages/fallback.astro +21 -0
  102. package/.ecomplus/stores/monocard/functions/ssr/src/pages/index.astro +33 -0
  103. package/.ecomplus/stores/monocard/functions/ssr/src/scripts/InlineScripts.astro +10 -0
  104. package/.ecomplus/stores/monocard/functions/ssr/tailwind.config.cjs +4 -0
  105. package/.ecomplus/stores/monocard/functions/ssr/tsconfig.json +3 -0
  106. package/.ecomplus/stores/monocard/functions/ssr/uno.config.ts +4 -0
  107. package/.ecomplus/stores/monocard/package.json +28 -0
  108. package/.ecomplus/stores/monocard/scripts/install.sh +8 -0
  109. package/.gitmodules +3 -0
  110. package/CHANGELOG.md +29 -0
  111. package/CONTRIBUTING.md +2 -1
  112. package/action.yml +1 -1
  113. package/package.json +1 -1
  114. package/packages/api/lib/api.d.ts +4 -4940
  115. package/packages/api/lib/types.d.ts +17 -3
  116. package/packages/api/package.json +1 -1
  117. package/packages/api/src/types.ts +45 -23
  118. package/packages/apps/correios/package.json +1 -1
  119. package/packages/apps/custom-shipping/package.json +1 -1
  120. package/packages/apps/discounts/package.json +1 -1
  121. package/packages/apps/frenet/lib-mjs/calculate-frenet.mjs +26 -23
  122. package/packages/apps/frenet/package.json +1 -1
  123. package/packages/apps/tiny-erp/lib/event-to-tiny.js +94 -94
  124. package/packages/apps/tiny-erp/lib/index.js +1 -1
  125. package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js +71 -74
  126. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +70 -73
  127. package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js +49 -53
  128. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +3 -3
  129. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +76 -75
  130. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +137 -140
  131. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +40 -39
  132. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +173 -178
  133. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +173 -171
  134. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +123 -127
  135. package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js +32 -32
  136. package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js +37 -37
  137. package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js +42 -43
  138. package/packages/apps/tiny-erp/lib/tiny-erp.js +8 -6
  139. package/packages/apps/tiny-erp/lib/tiny-webhook.js +76 -73
  140. package/packages/apps/tiny-erp/package.json +1 -1
  141. package/packages/cli/package.json +1 -1
  142. package/packages/config/package.json +1 -1
  143. package/packages/events/package.json +1 -1
  144. package/packages/firebase/package.json +1 -1
  145. package/packages/i18n/lib/en_us.d.ts +1 -0
  146. package/packages/i18n/lib/en_us.js +1 -0
  147. package/packages/i18n/lib/en_us.js.map +1 -1
  148. package/packages/i18n/lib/pt_br.d.ts +1 -0
  149. package/packages/i18n/lib/pt_br.js +1 -0
  150. package/packages/i18n/lib/pt_br.js.map +1 -1
  151. package/packages/i18n/package.json +1 -1
  152. package/packages/i18n/src/en_us.ts +1 -0
  153. package/packages/i18n/src/pt_br.ts +1 -0
  154. package/packages/modules/lib/firebase/ajv.js +24 -19
  155. package/packages/modules/lib/firebase/call-app-module.js +110 -116
  156. package/packages/modules/lib/firebase/checkout.js +149 -154
  157. package/packages/modules/lib/firebase/checkout.js.map +1 -1
  158. package/packages/modules/lib/firebase/functions-checkout/fix-items.js +187 -194
  159. package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js +33 -27
  160. package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js.map +1 -1
  161. package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js +111 -125
  162. package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js.map +1 -1
  163. package/packages/modules/lib/firebase/functions-checkout/new-order.js +178 -178
  164. package/packages/modules/lib/firebase/functions-checkout/new-order.js.map +1 -1
  165. package/packages/modules/lib/firebase/functions-checkout/request-to-module.js +53 -60
  166. package/packages/modules/lib/firebase/functions-checkout/request-to-module.js.map +1 -1
  167. package/packages/modules/lib/firebase/functions-checkout/utils.js +197 -195
  168. package/packages/modules/lib/firebase/handle-module.js +146 -144
  169. package/packages/modules/lib/firebase/handle-module.js.map +1 -1
  170. package/packages/modules/lib/firebase/proxy-apps.js +1 -2
  171. package/packages/modules/lib/firebase/serve-modules-api.js +53 -52
  172. package/packages/modules/lib/firebase/serve-modules-api.js.map +1 -1
  173. package/packages/modules/lib/firebase.js +6 -4
  174. package/packages/modules/lib/index.js +17 -12
  175. package/packages/modules/lib/index.js.map +1 -1
  176. package/packages/modules/package.json +2 -1
  177. package/packages/modules/schemas/@checkout.cjs +13 -1
  178. package/packages/modules/schemas/list_payments.cjs +6 -0
  179. package/packages/modules/src/firebase/checkout.ts +22 -49
  180. package/packages/modules/src/firebase/functions-checkout/get-custumerId.ts +23 -17
  181. package/packages/modules/src/firebase/functions-checkout/handle-order-transaction.ts +8 -45
  182. package/packages/modules/src/firebase/functions-checkout/new-order.ts +4 -9
  183. package/packages/modules/src/firebase/functions-checkout/request-to-module.ts +2 -11
  184. package/packages/modules/src/firebase/handle-module.ts +1 -1
  185. package/packages/modules/src/firebase/serve-modules-api.ts +1 -1
  186. package/packages/modules/src/index.ts +2 -0
  187. package/packages/passport/lib/firebase/authenticate-customer.js +81 -0
  188. package/packages/passport/lib/firebase/authenticate-customer.js.map +1 -0
  189. package/packages/passport/lib/firebase/serve-passport-api.js +20 -30
  190. package/packages/passport/lib/firebase/serve-passport-api.js.map +1 -1
  191. package/packages/passport/lib/firebase.js +1 -13
  192. package/packages/passport/lib/firebase.js.map +1 -1
  193. package/packages/passport/lib/index.js +1 -1
  194. package/packages/passport/lib/index.js.map +1 -1
  195. package/packages/passport/package.json +1 -1
  196. package/packages/passport/src/firebase/authenticate-customer.ts +94 -0
  197. package/packages/passport/src/firebase/serve-passport-api.ts +21 -49
  198. package/packages/passport/src/firebase.ts +1 -21
  199. package/packages/passport/src/index.ts +4 -1
  200. package/packages/ssr/package.json +2 -2
  201. package/packages/storefront/client.d.ts +1 -1
  202. package/packages/storefront/content/header.json +6 -0
  203. package/packages/storefront/dist/client/LoginDrawer.1061c69c.js +1 -0
  204. package/packages/storefront/dist/client/assets/_...129504ca.css +4 -0
  205. package/packages/storefront/dist/client/chunks/LoginDrawer.4d10fa17.js +1 -0
  206. package/packages/storefront/dist/client/chunks/{LoginForm.c995d3d4.js → LoginForm.dd3df9d8.js} +109 -109
  207. package/packages/storefront/dist/client/chunks/runtime-dom.esm-bundler.7f8f570f.js +1 -0
  208. package/packages/storefront/dist/client/{client.6736232b.js → client.246ab4a4.js} +1 -1
  209. package/packages/storefront/dist/client/sw.js +1 -1
  210. package/packages/storefront/dist/server/entry.mjs +2439 -223
  211. package/packages/storefront/package.json +2 -2
  212. package/packages/storefront/src/assets/pico.css +3 -400
  213. package/packages/storefront/src/lib/components/{AOffcanvas.vue → ADrawer.vue} +3 -3
  214. package/packages/storefront/src/lib/components/LoginDrawer.vue +80 -0
  215. package/packages/storefront/src/lib/components/LoginForm.vue +31 -14
  216. package/packages/storefront/src/lib/layouts/Base.astro +5 -7
  217. package/packages/storefront/src/lib/layouts/PagesHeader.astro +18 -7
  218. package/packages/storefront/src/lib/scripts/firebase-app.ts +1 -10
  219. package/packages/storefront/src/lib/state/customer-session.ts +137 -0
  220. package/packages/storefront/src/pages/[...slug].astro +2 -0
  221. package/packages/storefront/src/pages/fallback.astro +2 -0
  222. package/packages/storefront/src/pages/index.astro +2 -0
  223. package/packages/storefront/src/scripts/InlineScripts.astro +11 -0
  224. package/packages/types/index.ts +22 -0
  225. package/packages/types/modules/@checkout:params.d.ts +9 -1
  226. package/packages/types/modules/list_payments:params.d.ts +4 -0
  227. package/packages/types/package.json +1 -1
  228. package/pnpm-workspace.yaml +3 -1
  229. package/packages/passport/lib/firebase/handle-passport.js +0 -112
  230. package/packages/passport/lib/firebase/handle-passport.js.map +0 -1
  231. package/packages/passport/src/firebase/handle-passport.ts +0 -142
  232. package/packages/storefront/dist/client/LoginOffcanvas.28d2f50c.js +0 -1
  233. package/packages/storefront/dist/client/assets/_...41f686e3.css +0 -4
  234. package/packages/storefront/dist/client/chunks/LoginOffcanvas.a1f3fe3b.js +0 -1
  235. package/packages/storefront/dist/client/chunks/runtime-dom.esm-bundler.62d623e7.js +0 -1
  236. package/packages/storefront/src/lib/components/LoginOffcanvas.vue +0 -41
@@ -0,0 +1,5 @@
1
+ {
2
+ "projects": {
3
+ "default": "ecom2-monocard"
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": [
3
+ "github>ecomplus/cloud-commerce:store.renovate"
4
+ ]
5
+ }
@@ -0,0 +1,41 @@
1
+ name: Build and deploy
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - 'functions/**'
9
+ - 'public/**'
10
+ - 'src/**'
11
+ - 'content/**'
12
+ - 'template/**'
13
+ - 'package-lock.json'
14
+ - '.firebaserc'
15
+ - '.ecomplus/**'
16
+ - '.github/build-and-deploy'
17
+ - '.github/workflows/build-and-deploy.yml'
18
+ pull_request:
19
+ paths:
20
+ - 'functions/**'
21
+ - 'public/**'
22
+ - 'src/**'
23
+ - 'content/**'
24
+ - 'template/**'
25
+ - 'package-lock.json'
26
+
27
+ jobs:
28
+ build-and-deploy:
29
+ name: Cloud Commerce build and deploy
30
+ runs-on: ubuntu-latest
31
+ if: |
32
+ !contains(github.event.head_commit.message, '[skip ci]')
33
+ steps:
34
+ - uses: actions/checkout@v3
35
+ - uses: ecomplus/cloud-commerce@main
36
+ with:
37
+ github-token: ${{ secrets.GITHUB_TOKEN }}
38
+ firebase-service-account: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
39
+ ecom-authentication-id: ${{ secrets.ECOM_AUTHENTICATION_ID }}
40
+ ecom-api-key: ${{ secrets.ECOM_API_KEY }}
41
+ 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,8 @@
1
+ {
2
+ "recommendations": [
3
+ "dbaeumer.vscode-eslint",
4
+ "astro-build.astro-vscode",
5
+ "vue.volar",
6
+ "bradlc.vscode-tailwindcss"
7
+ ]
8
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "editor.quickSuggestions": {
3
+ "strings": true
4
+ }
5
+ }
@@ -0,0 +1,230 @@
1
+ “Commons Clause” License Condition v1.0
2
+
3
+ The Software is provided to you by the Licensor under the
4
+ License, as defined below, subject to the following condition.
5
+
6
+ Without limiting other conditions in the License, the grant
7
+ of rights under the License will not include, and the License
8
+ does not grant to you, the right to Sell the Software.
9
+
10
+ For purposes of the foregoing, “Sell” means practicing any or
11
+ all of the rights granted to you under the License to provide
12
+ to third parties, for a fee or other consideration (including
13
+ without limitation fees for hosting or consulting/ support
14
+ services related to the Software), a product or service whose
15
+ value derives, entirely or substantially, from the functionality
16
+ of the Software. Any license notice or attribution required by
17
+ the License must also include this Commons Clause License
18
+ Condition notice.
19
+
20
+ Software: E-Com Plus Open Cloud Commerce
21
+
22
+ License: Apache 2.0 with Commons Clause
23
+
24
+ Licensor: E-Com Club Softwares para E-commerce
25
+
26
+
27
+ ---------------------------------------------------------------------
28
+
29
+
30
+ Apache License
31
+ Version 2.0, January 2004
32
+ http://www.apache.org/licenses/
33
+
34
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
35
+
36
+ 1. Definitions.
37
+
38
+ "License" shall mean the terms and conditions for use, reproduction,
39
+ and distribution as defined by Sections 1 through 9 of this document.
40
+
41
+ "Licensor" shall mean the copyright owner or entity authorized by
42
+ the copyright owner that is granting the License.
43
+
44
+ "Legal Entity" shall mean the union of the acting entity and all
45
+ other entities that control, are controlled by, or are under common
46
+ control with that entity. For the purposes of this definition,
47
+ "control" means (i) the power, direct or indirect, to cause the
48
+ direction or management of such entity, whether by contract or
49
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
50
+ outstanding shares, or (iii) beneficial ownership of such entity.
51
+
52
+ "You" (or "Your") shall mean an individual or Legal Entity
53
+ exercising permissions granted by this License.
54
+
55
+ "Source" form shall mean the preferred form for making modifications,
56
+ including but not limited to software source code, documentation
57
+ source, and configuration files.
58
+
59
+ "Object" form shall mean any form resulting from mechanical
60
+ transformation or translation of a Source form, including but
61
+ not limited to compiled object code, generated documentation,
62
+ and conversions to other media types.
63
+
64
+ "Work" shall mean the work of authorship, whether in Source or
65
+ Object form, made available under the License, as indicated by a
66
+ copyright notice that is included in or attached to the work
67
+ (an example is provided in the Appendix below).
68
+
69
+ "Derivative Works" shall mean any work, whether in Source or Object
70
+ form, that is based on (or derived from) the Work and for which the
71
+ editorial revisions, annotations, elaborations, or other modifications
72
+ represent, as a whole, an original work of authorship. For the purposes
73
+ of this License, Derivative Works shall not include works that remain
74
+ separable from, or merely link (or bind by name) to the interfaces of,
75
+ the Work and Derivative Works thereof.
76
+
77
+ "Contribution" shall mean any work of authorship, including
78
+ the original version of the Work and any modifications or additions
79
+ to that Work or Derivative Works thereof, that is intentionally
80
+ submitted to Licensor for inclusion in the Work by the copyright owner
81
+ or by an individual or Legal Entity authorized to submit on behalf of
82
+ the copyright owner. For the purposes of this definition, "submitted"
83
+ means any form of electronic, verbal, or written communication sent
84
+ to the Licensor or its representatives, including but not limited to
85
+ communication on electronic mailing lists, source code control systems,
86
+ and issue tracking systems that are managed by, or on behalf of, the
87
+ Licensor for the purpose of discussing and improving the Work, but
88
+ excluding communication that is conspicuously marked or otherwise
89
+ designated in writing by the copyright owner as "Not a Contribution."
90
+
91
+ "Contributor" shall mean Licensor and any individual or Legal Entity
92
+ on behalf of whom a Contribution has been received by Licensor and
93
+ subsequently incorporated within the Work.
94
+
95
+ 2. Grant of Copyright License. Subject to the terms and conditions of
96
+ this License, each Contributor hereby grants to You a perpetual,
97
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
98
+ copyright license to reproduce, prepare Derivative Works of,
99
+ publicly display, publicly perform, sublicense, and distribute the
100
+ Work and such Derivative Works in Source or Object form.
101
+
102
+ 3. Grant of Patent License. Subject to the terms and conditions of
103
+ this License, each Contributor hereby grants to You a perpetual,
104
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
105
+ (except as stated in this section) patent license to make, have made,
106
+ use, offer to sell, sell, import, and otherwise transfer the Work,
107
+ where such license applies only to those patent claims licensable
108
+ by such Contributor that are necessarily infringed by their
109
+ Contribution(s) alone or by combination of their Contribution(s)
110
+ with the Work to which such Contribution(s) was submitted. If You
111
+ institute patent litigation against any entity (including a
112
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
113
+ or a Contribution incorporated within the Work constitutes direct
114
+ or contributory patent infringement, then any patent licenses
115
+ granted to You under this License for that Work shall terminate
116
+ as of the date such litigation is filed.
117
+
118
+ 4. Redistribution. You may reproduce and distribute copies of the
119
+ Work or Derivative Works thereof in any medium, with or without
120
+ modifications, and in Source or Object form, provided that You
121
+ meet the following conditions:
122
+
123
+ (a) You must give any other recipients of the Work or
124
+ Derivative Works a copy of this License; and
125
+
126
+ (b) You must cause any modified files to carry prominent notices
127
+ stating that You changed the files; and
128
+
129
+ (c) You must retain, in the Source form of any Derivative Works
130
+ that You distribute, all copyright, patent, trademark, and
131
+ attribution notices from the Source form of the Work,
132
+ excluding those notices that do not pertain to any part of
133
+ the Derivative Works; and
134
+
135
+ (d) If the Work includes a "NOTICE" text file as part of its
136
+ distribution, then any Derivative Works that You distribute must
137
+ include a readable copy of the attribution notices contained
138
+ within such NOTICE file, excluding those notices that do not
139
+ pertain to any part of the Derivative Works, in at least one
140
+ of the following places: within a NOTICE text file distributed
141
+ as part of the Derivative Works; within the Source form or
142
+ documentation, if provided along with the Derivative Works; or,
143
+ within a display generated by the Derivative Works, if and
144
+ wherever such third-party notices normally appear. The contents
145
+ of the NOTICE file are for informational purposes only and
146
+ do not modify the License. You may add Your own attribution
147
+ notices within Derivative Works that You distribute, alongside
148
+ or as an addendum to the NOTICE text from the Work, provided
149
+ that such additional attribution notices cannot be construed
150
+ as modifying the License.
151
+
152
+ You may add Your own copyright statement to Your modifications and
153
+ may provide additional or different license terms and conditions
154
+ for use, reproduction, or distribution of Your modifications, or
155
+ for any such Derivative Works as a whole, provided Your use,
156
+ reproduction, and distribution of the Work otherwise complies with
157
+ the conditions stated in this License.
158
+
159
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
160
+ any Contribution intentionally submitted for inclusion in the Work
161
+ by You to the Licensor shall be under the terms and conditions of
162
+ this License, without any additional terms or conditions.
163
+ Notwithstanding the above, nothing herein shall supersede or modify
164
+ the terms of any separate license agreement you may have executed
165
+ with Licensor regarding such Contributions.
166
+
167
+ 6. Trademarks. This License does not grant permission to use the trade
168
+ names, trademarks, service marks, or product names of the Licensor,
169
+ except as required for reasonable and customary use in describing the
170
+ origin of the Work and reproducing the content of the NOTICE file.
171
+
172
+ 7. Disclaimer of Warranty. Unless required by applicable law or
173
+ agreed to in writing, Licensor provides the Work (and each
174
+ Contributor provides its Contributions) on an "AS IS" BASIS,
175
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
176
+ implied, including, without limitation, any warranties or conditions
177
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
178
+ PARTICULAR PURPOSE. You are solely responsible for determining the
179
+ appropriateness of using or redistributing the Work and assume any
180
+ risks associated with Your exercise of permissions under this License.
181
+
182
+ 8. Limitation of Liability. In no event and under no legal theory,
183
+ whether in tort (including negligence), contract, or otherwise,
184
+ unless required by applicable law (such as deliberate and grossly
185
+ negligent acts) or agreed to in writing, shall any Contributor be
186
+ liable to You for damages, including any direct, indirect, special,
187
+ incidental, or consequential damages of any character arising as a
188
+ result of this License or out of the use or inability to use the
189
+ Work (including but not limited to damages for loss of goodwill,
190
+ work stoppage, computer failure or malfunction, or any and all
191
+ other commercial damages or losses), even if such Contributor
192
+ has been advised of the possibility of such damages.
193
+
194
+ 9. Accepting Warranty or Additional Liability. While redistributing
195
+ the Work or Derivative Works thereof, You may choose to offer,
196
+ and charge a fee for, acceptance of support, warranty, indemnity,
197
+ or other liability obligations and/or rights consistent with this
198
+ License. However, in accepting such obligations, You may act only
199
+ on Your own behalf and on Your sole responsibility, not on behalf
200
+ of any other Contributor, and only if You agree to indemnify,
201
+ defend, and hold each Contributor harmless for any liability
202
+ incurred by, or claims asserted against, such Contributor by reason
203
+ of your accepting any such warranty or additional liability.
204
+
205
+ END OF TERMS AND CONDITIONS
206
+
207
+ APPENDIX: How to apply the Apache License to your work.
208
+
209
+ To apply the Apache License to your work, attach the following
210
+ boilerplate notice, with the fields enclosed by brackets "[]"
211
+ replaced with your own identifying information. (Don't include
212
+ the brackets!) The text should be enclosed in the appropriate
213
+ comment syntax for the file format. We also recommend that a
214
+ file or class name and description of purpose be included on the
215
+ same "printed page" as the copyright notice for easier
216
+ identification within third-party archives.
217
+
218
+ Copyright 2021 E-Com Club Softwares para E-commerce
219
+
220
+ Licensed under the Apache License, Version 2.0 (the "License");
221
+ you may not use this file except in compliance with the License.
222
+ You may obtain a copy of the License at
223
+
224
+ http://www.apache.org/licenses/LICENSE-2.0
225
+
226
+ Unless required by applicable law or agreed to in writing, software
227
+ distributed under the License is distributed on an "AS IS" BASIS,
228
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
229
+ See the License for the specific language governing permissions and
230
+ limitations under the License.
@@ -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](./README.pt-BR.md)
6
+
7
+ ## Getting started
8
+
9
+ 1. Start creating new project on [Firebase console](https://console.firebase.google.com/), set a nice project name (ID) and remember it;
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 `southamerica-east1` (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;
16
+
17
+ 4. [Use this template](https://github.com/ecomplus/store/generate) to generate a new repository for your store;
18
+
19
+ Proceed with:
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)
22
+
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
+ ```bash
31
+ # Clone your new store repository
32
+ git clone git@github.com:{gh-user}/{new-store}.git
33
+ cd {new-store}
34
+ npm i
35
+ ```
36
+
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
+ > **Note**
46
+ > Account key created automatically with only required permissions using gcloud CLI (skip steps 6 and 7).
47
+
48
+ </details>
49
+
50
+ <details>
51
+ <summary>Without gcloud CLI</summary>
52
+
53
+ ```bash
54
+ # Run project configuration and first deploy
55
+ FIREBASE_PROJECT_ID={project-id} npm run setup -- --no-gcloud
56
+ npm run deploy
57
+ ```
58
+
59
+ 6. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform:
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;
97
+
98
+ 7. Set the following secrets to your GitHub repository (_Settings > Secrets > Actions_):
99
+ - `FIREBASE_SERVICE_ACCOUNT`: Paste the generated Google Cloud key JSON
100
+ - `ECOM_STORE_ID`: Copy your _Store ID_ on the [E-Com Plus admin](https://ecomplus.app/)
101
+ - `ECOM_AUTHENTICATION_ID`: Copy your _Authentication ID_ on the [E-Com Plus admin](https://ecomplus.app/)
102
+ - `ECOM_API_KEY`: Copy your _API Key_ on the [E-Com Plus admin](https://ecomplus.app/)
103
+
104
+ ## Production best practices
105
+
106
+ Firebase Hosting CDN is (really) fast, but [doesn't support cache `Stale-While-Revalidate`](https://firebase.google.com/docs/hosting/manage-cache) and Cloud Functions (even without cold starts) will never render complex views with less than 1s (SSR 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.
107
+
108
+ [Bunny CDN](https://bunny.net/cdn/) is recommended on top of Firebase Hosting + Functions for production stores (a.k.a. when pointing the custom domain) with the following configuration:
109
+ - Pull zone with your Firebase Hosting https://_project_.web.app domain as origin URL;
110
+ - **SSL + Force SSL enabled** (prevents http://* redirects to origin domain);
111
+ - Follow redirects enabled;
112
+ - **_Smart Cache_ disabled** (cache all by response headers);
113
+ - Caching _Query String Sort_ enabled (awesome for image transformations);
114
+ - Caching _Strip Response Cookies_ enabled;
115
+ - **[Stale Cache](https://bunny.net/blog/introducing-stale-cache-more-efficient-cache-handling/) while origin offline and while updating enabled** :zap: ;
116
+ - Other origin and caching configurations may be disabled;
117
+ - You might want to disable some zones in routing configuration depending on store target;
@@ -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](./README.md)
6
+
7
+ ## Começando
8
+
9
+ 1. Comece criando um novo projeto no [Firebase console](https://console.firebase.google.com/), insira um bom nome (ID) para o projeto e lembre-se dele;
10
+
11
+ 2. Vá para a página _Criação > Firestore Database_ (menu lateral) e clique em _criar banco de dados_:
12
+ - Pule com o modo e as regras de produção padrão;
13
+ - Selecione a região `southamerica-east1` (recomendado);
14
+
15
+ 3. 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);
16
+
17
+ 4. [Use esse template](https://github.com/ecomplus/store/generate) para gerar um novo repositório para sua loja;
18
+
19
+ Prossiga com:
20
+ - [Melhor maneira usando a linha de comando](#primeiro-deploy-em-cli)
21
+ - [Apenas no navegador](#setup-somente-do-navegador) (pode ser mais fácil mas menos seguro, não recomendado)
22
+
23
+ #### Primeiro deploy em CLI
24
+
25
+ 5. Setup e primeiro deploy pelo terminal com [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
+ ```bash
31
+ # Clone your new store repository
32
+ git clone git@github.com:{gh-user}/{new-store}.git
33
+ cd {new-store}
34
+ npm i
35
+ ```
36
+
37
+ <details open>
38
+ <summary>Com <a href="https://cloud.google.com/sdk/docs/install">gcloud CLI</a> (opcional) instalado</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
+ > **Note**
46
+ > Chave de conta criada automaticamente apenas com as permissões necessárias usando gcloud CLI (pule as etapas 6 e 7).
47
+
48
+ </details>
49
+
50
+ <details>
51
+ <summary>Sem gcloud CLI</summary>
52
+
53
+ ```bash
54
+ # Run project configuration and first deploy
55
+ FIREBASE_PROJECT_ID={project-id} npm run setup -- --no-gcloud
56
+ npm run deploy
57
+ ```
58
+
59
+ 6. [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
+ - Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
61
+ - Descreva como _A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase_;
62
+ - Continue e selecione as seguintes permissões:
63
+ 1. _Administrador do Firebase_
64
+ 2. _Leitor de chaves de API_
65
+ 3. _Leitor do Cloud Run_
66
+ 4. _Administrador do Cloud Functions_
67
+ 5. _Administrador do Artifact Registry_
68
+ 6. _Criador do App Engine_
69
+ 7. _Administrador do App Engine_
70
+ 8. _Administrador do Cloud Scheduler_
71
+ 9. _Usuário da conta de serviço_
72
+
73
+ 7. 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
+
75
+ </details>
76
+
77
+ 8. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
78
+ - `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
79
+ - `ECOM_AUTHENTICATION_ID`: Pegue no output do setup no CLI
80
+ - `ECOM_API_KEY`: Pegue no output do setup no CLI
81
+
82
+ :checkered_flag: :checkered_flag: :checkered_flag: **Tudo pronto, boa!**
83
+
84
+ ---
85
+
86
+ #### Setup somente do navegador
87
+
88
+ > **Warning**
89
+ > Essa opção de configuração é menos segura, recomendamos o [primeiro deploy em CLI](#primeiro-deploy-em-cli).
90
+
91
+ 5. [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
+ - Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
93
+ - Descreva como _A service account with ALL permissions to deploy Cloud Commerce from the GitHub to Firebase_;
94
+ - Continue e selecione a permissão _Acesso rápido > Básico > Proprietário_;
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;
97
+
98
+ 7. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
99
+ - `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
100
+ - `ECOM_STORE_ID`: Copie seu _Store ID_ no [admin da E-Com Plus](https://ecomplus.app/)
101
+ - `ECOM_AUTHENTICATION_ID`: Copie seu _Authentication ID_ no [admin da E-Com Plus](https://ecomplus.app/)
102
+ - `ECOM_API_KEY`: Copie seu _API Key_ no [admin da E-Com Plus](https://ecomplus.app/)
103
+
104
+ ## Práticas recomendadas de produção
105
+
106
+ O CDN do Firebase Hosting é (bem) rápido, mas [não suporta `Stale-While-Revalidate`](https://firebase.google.com/docs/hosting/manage-cache) e Cloud Functions (mesmo sem cold starts) nunca vai renderizar views complexas com menos de 1s (SSR provavelmente vai demorar ~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.
107
+
108
+ [Bunny CDN](https://bunny.net/cdn/) é recomendado na frente do Firebase Hosting + Functions para lojas em produção (quando apontando o domínio próprio) com a configuração abaixo:
109
+ - Pull zone com seu domínio https://_project_.web.app do Firebase Hosting como URL de origem;
110
+ - **SSL + Force SSL habilitados** (previne redirecionar http://* para o domínio de origem);
111
+ - Follow redirects habilitado;
112
+ - **_Smart Cache_ desabilitado** (cache para tudo respeitando os cabeçalhos da resposta);
113
+ - Caching _Query String Sort_ habilitado (ótimo para transformações de imagens);
114
+ - Caching _Strip Response Cookies_ habilitado;
115
+ - **[Stale Cache](https://bunny.net/blog/introducing-stale-cache-more-efficient-cache-handling/) _while origin offline_ e _while updating_ habilitados** :zap: ;
116
+ - Outras configurações de origem e cache podem ser mantidas desabilitadas;
117
+ - Você pode querer desabilitar algumas zonas na configuração de _routing_ dependendo do target da loja;
@@ -0,0 +1,3 @@
1
+ {
2
+ "storeId": 1011
3
+ }
@@ -0,0 +1,9 @@
1
+ import config from '@cloudcommerce/firebase/config';
2
+ import mergeConfig from './config.json' assert { type: 'json' };
3
+
4
+ config.set({
5
+ ...mergeConfig,
6
+ hello: 'from store',
7
+ });
8
+
9
+ export * from '@cloudcommerce/firebase';
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "core",
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": "16"
15
+ },
16
+ "main": "index.js",
17
+ "dependencies": {
18
+ "@cloudcommerce/firebase": "^0.0.110"
19
+ }
20
+ }
@@ -0,0 +1,9 @@
1
+ import config from '@cloudcommerce/firebase/config';
2
+ import mergeConfig from './config.json' assert { type: 'json' };
3
+
4
+ config.set({
5
+ ...mergeConfig,
6
+ hello: 'from store',
7
+ });
8
+
9
+ export * from '@cloudcommerce/events/firebase';
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "events",
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": "16"
15
+ },
16
+ "main": "index.js",
17
+ "dependencies": {
18
+ "@cloudcommerce/events": "^0.0.110",
19
+ "@cloudcommerce/firebase": "^0.0.110"
20
+ }
21
+ }
@@ -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,9 @@
1
+ import config from '@cloudcommerce/firebase/config';
2
+ import mergeConfig from './config.json' assert { type: 'json' };
3
+
4
+ config.set({
5
+ ...mergeConfig,
6
+ hello: 'from store',
7
+ });
8
+
9
+ export * from '@cloudcommerce/modules/firebase';