cloudcommerce 0.6.10 → 0.6.12

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 (70) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/ecomplus-stores/monocard/functions/core/package.json +1 -1
  3. package/ecomplus-stores/monocard/functions/events/package.json +2 -2
  4. package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
  5. package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
  6. package/ecomplus-stores/monocard/functions/ssr/package.json +6 -6
  7. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/devices.jpg +0 -0
  8. package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/edit-suit.jpg +0 -0
  9. package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +1 -1
  10. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +1 -1
  11. package/ecomplus-stores/monocard/functions/ssr/src/components/UsageSteps.astro +21 -0
  12. package/ecomplus-stores/monocard/functions/ssr/src/components/UsageSteps.vue +155 -0
  13. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +3 -3
  14. package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +19 -3
  15. package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +0 -1
  16. package/ecomplus-stores/monocard/package.json +1 -1
  17. package/package.json +4 -4
  18. package/packages/api/package.json +1 -1
  19. package/packages/apps/correios/package.json +1 -1
  20. package/packages/apps/custom-payment/package.json +1 -1
  21. package/packages/apps/custom-shipping/package.json +1 -1
  22. package/packages/apps/datafrete/package.json +1 -1
  23. package/packages/apps/discounts/package.json +1 -1
  24. package/packages/apps/emails/package.json +1 -1
  25. package/packages/apps/fb-conversions/package.json +1 -1
  26. package/packages/apps/frenet/package.json +1 -1
  27. package/packages/apps/galaxpay/package.json +1 -1
  28. package/packages/apps/google-analytics/package.json +1 -1
  29. package/packages/apps/infinitepay/package.json +1 -1
  30. package/packages/apps/jadlog/package.json +1 -1
  31. package/packages/apps/loyalty-points/package.json +1 -1
  32. package/packages/apps/melhor-envio/package.json +1 -1
  33. package/packages/apps/mercadopago/package.json +1 -1
  34. package/packages/apps/pagarme/package.json +2 -2
  35. package/packages/apps/paghiper/package.json +1 -1
  36. package/packages/apps/pix/package.json +1 -1
  37. package/packages/apps/tiny-erp/package.json +1 -1
  38. package/packages/apps/webhooks/package.json +1 -1
  39. package/packages/cli/config/firebase.json +1 -1
  40. package/packages/cli/lib/build.js +11 -2
  41. package/packages/cli/lib/cli.js +5 -3
  42. package/packages/cli/package.json +1 -1
  43. package/packages/cli/src/build.ts +12 -2
  44. package/packages/cli/src/cli.ts +5 -3
  45. package/packages/config/package.json +1 -1
  46. package/packages/emails/package.json +1 -1
  47. package/packages/events/package.json +1 -1
  48. package/packages/firebase/package.json +1 -1
  49. package/packages/i18n/package.json +1 -1
  50. package/packages/modules/package.json +1 -1
  51. package/packages/passport/package.json +1 -1
  52. package/packages/ssr/package.json +2 -3
  53. package/packages/storefront/astro.config.mjs +2 -4
  54. package/packages/storefront/dist/client/sw.js +1 -1
  55. package/packages/storefront/dist/server/chunks/avif/avif_node_dec.wasm +0 -0
  56. package/packages/storefront/dist/server/chunks/avif/avif_node_enc.wasm +0 -0
  57. package/packages/storefront/dist/server/chunks/image-pool.78b6d784.mjs +10645 -0
  58. package/packages/storefront/dist/server/chunks/mozjpeg/mozjpeg_node_dec.wasm +0 -0
  59. package/packages/storefront/dist/server/chunks/mozjpeg/mozjpeg_node_enc.wasm +0 -0
  60. package/packages/storefront/dist/server/chunks/pages/{all.726ca7f4.mjs → all.f49a350f.mjs} +172 -58
  61. package/packages/storefront/dist/server/chunks/png/squoosh_oxipng_bg.wasm +0 -0
  62. package/packages/storefront/dist/server/chunks/png/squoosh_png_bg.wasm +0 -0
  63. package/packages/storefront/dist/server/chunks/resize/squoosh_resize_bg.wasm +0 -0
  64. package/packages/storefront/dist/server/chunks/rotate/rotate.wasm +0 -0
  65. package/packages/storefront/dist/server/chunks/webp/webp_node_dec.wasm +0 -0
  66. package/packages/storefront/dist/server/chunks/webp/webp_node_enc.wasm +0 -0
  67. package/packages/storefront/dist/server/entry.mjs +5 -6
  68. package/packages/storefront/package.json +2 -3
  69. package/packages/types/package.json +1 -1
  70. package/ecomplus-stores/monocard/functions/ssr/src/components/MotionFade.vue +0 -17
@@ -52,7 +52,9 @@ export default async () => {
52
52
  return $`firebase --project=${projectId} ${cmd} ${options}`;
53
53
  };
54
54
  if (argv._.includes('serve')) {
55
- await build();
55
+ if (argv.build !== false) {
56
+ await build(argv.codebase);
57
+ }
56
58
  return $firebase('emulators:start').catch(async (err) => {
57
59
  await echo`
58
60
  Try killing open emulators with:
@@ -71,7 +73,7 @@ ${chalk.bold('npx kill-port 4000 9099 5001 8080 5000 8085 9199 4400 4500')}
71
73
  return $firebase('functions:log');
72
74
  }
73
75
  if (argv._.includes('build')) {
74
- return build();
76
+ return build(argv.codebase);
75
77
  }
76
78
  if (argv._.includes('deploy')) {
77
79
  return $firebase('deploy');
@@ -91,7 +93,7 @@ ECOM_STORE_ID=${storeId}
91
93
  }
92
94
  if (argv.commit !== false) {
93
95
  await fs.writeFile(path.join(pwd, 'functions', 'config.json'), JSON.stringify({ storeId }, null, 2));
94
- await build();
96
+ await build(argv.codebase);
95
97
  try {
96
98
  await $`git add .firebaserc functions/config.json`;
97
99
  await $`git commit -m "Setup store [skip ci]"`;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/cli",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "0.6.12",
5
5
  "description": "E-Com Plus Cloud Commerce CLI tools",
6
6
  "bin": {
7
7
  "cloudcommerce": "./bin/run.mjs"
@@ -1,5 +1,5 @@
1
1
  import { join as joinPath } from 'node:path';
2
- import { fs } from 'zx';
2
+ import { $, fs } from 'zx';
3
3
 
4
4
  const copyFunctionsConfig = async () => {
5
5
  const functionsDir = joinPath(process.cwd(), 'functions');
@@ -28,4 +28,14 @@ const copyFunctionsConfig = async () => {
28
28
  }
29
29
  };
30
30
 
31
- export default copyFunctionsConfig;
31
+ const buildCodebase = async (codebase?: string) => {
32
+ copyFunctionsConfig();
33
+ if (codebase === 'ssr') {
34
+ await $`npm --prefix "functions/ssr" run build 2>ssr-build-warns.log &&
35
+ printf '\n--- // ---\n' && cat ssr-build-warns.log`;
36
+ }
37
+ };
38
+
39
+ export default buildCodebase;
40
+
41
+ export { buildCodebase, copyFunctionsConfig };
@@ -67,7 +67,9 @@ export default async () => {
67
67
  };
68
68
 
69
69
  if (argv._.includes('serve')) {
70
- await build();
70
+ if (argv.build !== false) {
71
+ await build(argv.codebase);
72
+ }
71
73
  return $firebase('emulators:start').catch(async (err: any) => {
72
74
  await echo`
73
75
  Try killing open emulators with:
@@ -87,7 +89,7 @@ ${chalk.bold('npx kill-port 4000 9099 5001 8080 5000 8085 9199 4400 4500')}
87
89
  return $firebase('functions:log');
88
90
  }
89
91
  if (argv._.includes('build')) {
90
- return build();
92
+ return build(argv.codebase);
91
93
  }
92
94
  if (argv._.includes('deploy')) {
93
95
  return $firebase('deploy');
@@ -116,7 +118,7 @@ ECOM_STORE_ID=${storeId}
116
118
  JSON.stringify({ storeId }, null, 2),
117
119
  );
118
120
 
119
- await build();
121
+ await build(argv.codebase);
120
122
  try {
121
123
  await $`git add .firebaserc functions/config.json`;
122
124
  await $`git commit -m "Setup store [skip ci]"`;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/config",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "0.6.12",
5
5
  "description": "E-Com Plus Cloud Commerce base config",
6
6
  "main": "lib/config.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/emails",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "0.6.12",
5
5
  "description": "E-Com Plus Cloud Commerce",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/events",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "0.6.12",
5
5
  "description": "E-Com Plus Cloud Commerce app events",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/firebase",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "0.6.12",
5
5
  "description": "E-Com Plus Cloud Commerce on Firebase",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/i18n",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "0.6.12",
5
5
  "description": "E-Com Plus Cloud Commerce i18n",
6
6
  "main": "lib/all.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/modules",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "0.6.12",
5
5
  "description": "E-Com Plus Cloud Commerce modules API",
6
6
  "main": "lib/index.cjs",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/passport",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "0.6.12",
5
5
  "description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/ssr",
3
3
  "type": "module",
4
- "version": "0.6.10",
4
+ "version": "0.6.12",
5
5
  "description": "E-Com Plus Cloud Commerce storefront SSR",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -30,13 +30,12 @@
30
30
  "@cloudcommerce/i18n": "workspace:*",
31
31
  "@ecomplus/utils": "1.5.0-rc.3",
32
32
  "@headlessui/vue": "^1.7.11",
33
- "@vueuse/core": "^9.12.0",
33
+ "@vueuse/core": "9.12.0",
34
34
  "astro": "^2.0.16",
35
35
  "firebase-admin": "^11.5.0",
36
36
  "firebase-functions": "^4.2.1",
37
37
  "image-size": "^1.0.2",
38
38
  "semver": "^7.3.8",
39
- "sharp": "^0.31.3",
40
39
  "vue": "^3.2.47"
41
40
  },
42
41
  "devDependencies": {
@@ -82,7 +82,7 @@ const _vitePWAOptions = {
82
82
  urlPattern: /^\/_image$/,
83
83
  handler: 'StaleWhileRevalidate',
84
84
  options: {
85
- cacheName: 'sharp-images',
85
+ cacheName: 'optim-images',
86
86
  expiration: {
87
87
  maxEntries: 50,
88
88
  maxAgeSeconds: 60 * 60 * 24 * 30, // 30 days
@@ -146,9 +146,7 @@ const genAstroConfig = ({
146
146
  }),
147
147
  outDir: isSSG ? './dist/client' : './dist',
148
148
  integrations: [
149
- image({
150
- serviceEntryPoint: '@astrojs/image/sharp',
151
- }),
149
+ image(),
152
150
  vue({
153
151
  appEntrypoint: '/src/pages/_vue',
154
152
  template: {
@@ -1 +1 @@
1
- if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let l={};const a=e=>r(e,o),u={module:{uri:o},exports:l,require:a};s[o]=Promise.all(n.map((e=>u[e]||a(e)))).then((e=>(i(...e),l)))}}define(["./workbox-e0d788d4"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.0607a6ef.css",revision:null},{url:"_astro/_plugin-vue_export-helper.77ed7c18.js",revision:null},{url:"_astro/client.0de2f274.js",revision:null},{url:"_astro/firebase-app.7ce2ebb1.js",revision:null},{url:"_astro/format-money.ab6b71eb.js",revision:null},{url:"_astro/hoisted.721ad75d.js",revision:null},{url:"_astro/idle-callback.889bf0ea.js",revision:null},{url:"_astro/index.0c833781.css",revision:null},{url:"_astro/index.16f33784.js",revision:null},{url:"_astro/modules-info.06ac0727.js",revision:null},{url:"_astro/PitchBar.db7cd775.js",revision:null},{url:"_astro/preload-helper.101896b7.js",revision:null},{url:"_astro/Prices.55399c72.js",revision:null},{url:"_astro/ProductCard.7e891c08.js",revision:null},{url:"_astro/runtime-dom.esm-bundler.d2f39f33.js",revision:null},{url:"_astro/server.1bc2fa51.css",revision:null},{url:"_astro/session-utm.72684b84.js",revision:null},{url:"_astro/ShopHeader.301e109b.js",revision:null},{url:"_astro/workbox-window.prod.es5.295a6886.js",revision:null},{url:"img/uploads/large-icon.png",revision:"0b35db516cfa7475b1c2f8c081e8d54d"},{url:"manifest.webmanifest",revision:"6a858866b0560997f368e27ab5418e15"}],{ignoreURLParametersMatching:[/.*/]}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/404"))),e.registerRoute(/^\/$/,new e.NetworkFirst,"GET"),e.registerRoute(/\/((?!(?:admin|assets|img)(\/|$))[^.]+)(\.(?!js|css|xml|txt|png|jpg|jpeg|webp|avif|svg|gif)[^.]+)*$/,new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/assets\//,new e.StaleWhileRevalidate({cacheName:"assets",plugins:[]}),"GET"),e.registerRoute(/^\/_image$/,new e.StaleWhileRevalidate({cacheName:"sharp-images",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/img\/uploads\/.*\.(?:png|jpg|jpeg|webp|avif|svg|gif)$/,new e.StaleWhileRevalidate({cacheName:"cms-images",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/ecomplus\.io/,new e.NetworkFirst({cacheName:"store-api",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/normal\//,new e.CacheFirst({cacheName:"product-thumbnails",plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/big\//,new e.CacheFirst({cacheName:"product-pictures",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET")}));
1
+ if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let l={};const a=e=>r(e,o),t={module:{uri:o},exports:l,require:a};s[o]=Promise.all(n.map((e=>t[e]||a(e)))).then((e=>(i(...e),l)))}}define(["./workbox-e0d788d4"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.0607a6ef.css",revision:null},{url:"_astro/_plugin-vue_export-helper.77ed7c18.js",revision:null},{url:"_astro/client.0de2f274.js",revision:null},{url:"_astro/firebase-app.7ce2ebb1.js",revision:null},{url:"_astro/format-money.ab6b71eb.js",revision:null},{url:"_astro/hoisted.721ad75d.js",revision:null},{url:"_astro/idle-callback.889bf0ea.js",revision:null},{url:"_astro/index.0c833781.css",revision:null},{url:"_astro/index.16f33784.js",revision:null},{url:"_astro/modules-info.06ac0727.js",revision:null},{url:"_astro/PitchBar.db7cd775.js",revision:null},{url:"_astro/preload-helper.101896b7.js",revision:null},{url:"_astro/Prices.55399c72.js",revision:null},{url:"_astro/ProductCard.7e891c08.js",revision:null},{url:"_astro/runtime-dom.esm-bundler.d2f39f33.js",revision:null},{url:"_astro/server.1bc2fa51.css",revision:null},{url:"_astro/session-utm.72684b84.js",revision:null},{url:"_astro/ShopHeader.301e109b.js",revision:null},{url:"_astro/workbox-window.prod.es5.295a6886.js",revision:null},{url:"img/uploads/large-icon.png",revision:"0b35db516cfa7475b1c2f8c081e8d54d"},{url:"manifest.webmanifest",revision:"6a858866b0560997f368e27ab5418e15"}],{ignoreURLParametersMatching:[/.*/]}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/404"))),e.registerRoute(/^\/$/,new e.NetworkFirst,"GET"),e.registerRoute(/\/((?!(?:admin|assets|img)(\/|$))[^.]+)(\.(?!js|css|xml|txt|png|jpg|jpeg|webp|avif|svg|gif)[^.]+)*$/,new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/assets\//,new e.StaleWhileRevalidate({cacheName:"assets",plugins:[]}),"GET"),e.registerRoute(/^\/_image$/,new e.StaleWhileRevalidate({cacheName:"optim-images",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/img\/uploads\/.*\.(?:png|jpg|jpeg|webp|avif|svg|gif)$/,new e.StaleWhileRevalidate({cacheName:"cms-images",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/ecomplus\.io/,new e.NetworkFirst({cacheName:"store-api",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/normal\//,new e.CacheFirst({cacheName:"product-thumbnails",plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/big\//,new e.CacheFirst({cacheName:"product-pictures",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET")}));