cloudcommerce 0.0.124 → 0.0.126
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/.eslintrc.cjs +26 -7
- package/.gitmodules +3 -0
- package/CHANGELOG.md +15 -0
- package/action.yml +5 -1
- package/ecomplus-stores/monocard/functions/core/package.json +1 -1
- package/ecomplus-stores/monocard/functions/events/package.json +2 -2
- package/ecomplus-stores/monocard/functions/modules/package.json +2 -2
- package/ecomplus-stores/monocard/functions/passport/package.json +2 -2
- package/ecomplus-stores/monocard/functions/ssr/package.json +7 -4
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +1 -1
- package/ecomplus-stores/monocard/package.json +1 -1
- package/ecomplus-stores/tia-sonia/.github/renovate.json +5 -0
- package/ecomplus-stores/tia-sonia/.github/workflows/build-and-deploy.yml +41 -0
- package/ecomplus-stores/tia-sonia/.github/workflows/calibreapp-image-actions.yml +23 -0
- package/ecomplus-stores/tia-sonia/.vscode/extensions.json +8 -0
- package/ecomplus-stores/tia-sonia/.vscode/settings.json +5 -0
- package/ecomplus-stores/tia-sonia/LICENSE.md +230 -0
- package/ecomplus-stores/tia-sonia/README.md +117 -0
- package/ecomplus-stores/tia-sonia/README.pt-BR.md +117 -0
- package/ecomplus-stores/tia-sonia/functions/config.json +3 -0
- package/ecomplus-stores/tia-sonia/functions/core/index.js +9 -0
- package/ecomplus-stores/tia-sonia/functions/core/package.json +20 -0
- package/ecomplus-stores/tia-sonia/functions/events/index.js +9 -0
- package/ecomplus-stores/tia-sonia/functions/events/package.json +21 -0
- package/ecomplus-stores/tia-sonia/functions/example.env +10 -0
- package/ecomplus-stores/tia-sonia/functions/modules/index.js +9 -0
- package/ecomplus-stores/tia-sonia/functions/modules/package.json +21 -0
- package/ecomplus-stores/tia-sonia/functions/passport/index.js +9 -0
- package/ecomplus-stores/tia-sonia/functions/passport/package.json +21 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/.eslintrc.cjs +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/astro.config.mjs +4 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/blog.json +18 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/brands.json +24 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/categories.json +24 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/code.json +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/collections.json +24 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/contacts.json +13 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/footer.json +46 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/header.json +35 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/home.json +45 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/info.json +18 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/maintenance.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/menu.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/contato.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/entrega.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/faq.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/pagamentos.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/privacidade.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/sobre-nos.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/termos.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/pages/trocas.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/posts/esta-loja-e-um-pwa.json +9 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/products.json +32 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/search.json +8 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/settings.json +14 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/social.json +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/analytics.json +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/compre-confie.json +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/ebit.json +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/fb-pixel.json +12 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/gmc-ratings.json +12 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/minicart.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/offers-notification.json +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/opinioes-verificadas.json +18 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/product-card.json +10 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/product.json +13 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/search-engine.json +8 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/search.json +6 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/tag-manager.json +12 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/tawkto.json +12 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/trustvox.json +15 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/content/widgets/user.json +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/index.js +18 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/package.json +30 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/admin/config.json +1 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/cms-preview.css +274 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/cms.css +114 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/cvv.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/bootstrap-icons/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/feather-icons/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/font-awesome/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/line-awesome/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/icons/tabler-icons/font/storefront-icons.woff2 +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/img-placeholder.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/payments.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/assets/ssl-safe.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/icon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/large-icon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/banner1.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/banner2.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/banner2.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/favicon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/headless.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/headphone.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/headphone.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/icon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/large-icon.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/logo.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/logo.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/og-image.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/passion.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/passion.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/pwa-reliable.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/rect8589.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/rect859.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/rect89.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/rect89.webp +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/img/uploads/ssl-safe.png +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/public/robots.txt +8 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/assets/.gitkeep +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/TheHeader.vue +42 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/TopBar.vue +133 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/header/HeaderButtonLink.vue +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/header/HeaderButtons.vue +46 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/header/HeaderNav.vue +9 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/components/header/HeaderNavLink.vue +5 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/env.d.ts +3 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/Base.astro +34 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/Checkout.astro +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/Pages.astro +19 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/layouts/PagesHeader.astro +117 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/main/Fallback.astro +15 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/main/Home.astro +19 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/main/Wildcard.astro +21 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/[...slug].astro +36 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/app/account.astro +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/app/index.astro +0 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/fallback.astro +19 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/pages/index.astro +31 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/src/scripts/InlineScripts.astro +11 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/tailwind.config.cjs +4 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/tsconfig.json +16 -0
- package/ecomplus-stores/tia-sonia/functions/ssr/uno.config.ts +4 -0
- package/ecomplus-stores/tia-sonia/package.json +28 -0
- package/ecomplus-stores/tia-sonia/scripts/install.sh +9 -0
- package/package.json +14 -14
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/mercadopago/lib/mercadopago.js +0 -2
- package/packages/apps/mercadopago/lib/mercadopago.js.map +1 -1
- package/packages/apps/mercadopago/lib/mp-webhook.js +0 -2
- package/packages/apps/mercadopago/lib/mp-webhook.js.map +1 -1
- package/packages/apps/mercadopago/package.json +4 -4
- package/packages/apps/mercadopago/src/mercadopago.ts +0 -3
- package/packages/apps/mercadopago/src/mp-webhook.ts +0 -2
- package/packages/apps/tiny-erp/lib/event-to-tiny.js +1 -1
- package/packages/apps/tiny-erp/lib/event-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js +1 -1
- package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +1 -1
- package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +1 -2
- package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +1 -1
- package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +1 -1
- package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
- package/packages/apps/tiny-erp/lib/tiny-erp.js +0 -1
- package/packages/apps/tiny-erp/lib/tiny-erp.js.map +1 -1
- package/packages/apps/tiny-erp/lib/tiny-webhook.js +1 -1
- package/packages/apps/tiny-erp/lib/tiny-webhook.js.map +1 -1
- package/packages/apps/tiny-erp/package.json +4 -4
- package/packages/apps/tiny-erp/src/event-to-tiny.ts +1 -1
- package/packages/apps/tiny-erp/src/integration/after-tiny-queue.ts +1 -1
- package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +1 -1
- package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +1 -2
- package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +1 -1
- package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +1 -1
- package/packages/apps/tiny-erp/src/tiny-erp.ts +0 -1
- package/packages/apps/tiny-erp/src/tiny-webhook.ts +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/events/package.json +4 -4
- package/packages/firebase/lib/config.js +3 -3
- package/packages/firebase/lib/handlers/check-store-events.js +1 -2
- package/packages/firebase/lib/handlers/check-store-events.js.map +1 -1
- package/packages/firebase/lib/helpers/update-app-data.js +1 -1
- package/packages/firebase/lib/helpers/update-app-data.js.map +1 -1
- package/packages/firebase/lib/init.js +0 -2
- package/packages/firebase/lib/init.js.map +1 -1
- package/packages/firebase/package.json +4 -4
- package/packages/firebase/src/config.ts +3 -3
- package/packages/firebase/src/handlers/check-store-events.ts +1 -2
- package/packages/firebase/src/helpers/update-app-data.ts +1 -1
- package/packages/firebase/src/init.ts +0 -2
- package/packages/i18n/package.json +1 -1
- package/packages/modules/lib/firebase/call-app-module.js +1 -1
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/lib/firebase/checkout.js +9 -7
- package/packages/modules/lib/firebase/checkout.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/fix-items.js +80 -18
- package/packages/modules/lib/firebase/functions-checkout/fix-items.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js +1 -1
- package/packages/modules/lib/firebase/functions-checkout/get-custumerId.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js +16 -16
- package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/new-order.js +8 -8
- package/packages/modules/lib/firebase/functions-checkout/new-order.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js +23 -6
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/utils.js +1 -2
- package/packages/modules/lib/firebase/functions-checkout/utils.js.map +1 -1
- package/packages/modules/lib/firebase/handle-module.js +1 -1
- package/packages/modules/lib/firebase/handle-module.js.map +1 -1
- package/packages/modules/lib/firebase.js +0 -1
- package/packages/modules/lib/firebase.js.map +1 -1
- package/packages/modules/package.json +4 -4
- package/packages/modules/src/firebase/call-app-module.ts +1 -1
- package/packages/modules/src/firebase/checkout.ts +13 -10
- package/packages/modules/src/firebase/functions-checkout/fix-items.ts +88 -20
- package/packages/modules/src/firebase/functions-checkout/get-custumerId.ts +1 -1
- package/packages/modules/src/firebase/functions-checkout/handle-order-transaction.ts +24 -23
- package/packages/modules/src/firebase/functions-checkout/new-order.ts +15 -14
- package/packages/modules/src/firebase/functions-checkout/request-to-module.ts +30 -8
- package/packages/modules/src/firebase/functions-checkout/utils.ts +3 -5
- package/packages/modules/src/firebase/handle-module.ts +1 -1
- package/packages/modules/src/firebase.ts +0 -1
- package/packages/modules/src/types/index.d.ts +7 -6
- package/packages/passport/lib/firebase/serve-passport-api.js +1 -1
- package/packages/passport/lib/firebase/serve-passport-api.js.map +1 -1
- package/packages/passport/lib/firebase.js +0 -1
- package/packages/passport/lib/firebase.js.map +1 -1
- package/packages/passport/package.json +4 -4
- package/packages/passport/src/firebase/serve-passport-api.ts +1 -1
- package/packages/passport/src/firebase.ts +0 -1
- package/packages/ssr/package.json +7 -7
- package/packages/storefront/.eslintrc.cjs +0 -1
- package/packages/storefront/astro.config.mjs +3 -2
- package/packages/storefront/dist/client/HeaderButtons.b5b4a939.js +1 -0
- package/packages/storefront/dist/client/assets/_...slug_.8d138f36.css +4 -0
- package/packages/storefront/dist/client/chunks/{HeaderButtons.d1f8a21f.js → HeaderButtons.308edb4d.js} +1 -1
- package/packages/storefront/dist/client/chunks/{LoginForm.e02dee3d.js → LoginForm.0c5ba697.js} +95 -95
- package/packages/storefront/dist/client/chunks/preload-helper.1de719f8.js +1 -0
- package/packages/storefront/dist/client/chunks/runtime-dom.esm-bundler.f00ab3bd.js +1 -0
- package/packages/storefront/dist/client/client.69fdbd1b.js +1 -0
- package/packages/storefront/dist/client/{hoisted.3f1cf839.js → hoisted.4f689abe.js} +1 -1
- package/packages/storefront/dist/client/page.33c44e88.js +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/entry.mjs +2826 -3530
- package/packages/storefront/package.json +13 -16
- package/packages/storefront/src/lib/assets/pico.css +19 -24
- package/packages/storefront/src/lib/components/LoginForm.vue +4 -13
- package/packages/storefront/src/lib/ssr/image.ts +0 -1
- package/packages/storefront/src/lib/state/customer-session.ts +29 -37
- package/packages/storefront/src/lib/state/shopping-cart/add-cart-item.ts +89 -0
- package/packages/storefront/src/lib/state/shopping-cart.ts +52 -0
- package/packages/storefront/src/lib/state/use-storage.ts +19 -0
- package/packages/storefront/tailwind.config.cjs +6 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/HeaderButtons.75084c8f.js +0 -1
- package/packages/storefront/dist/client/assets/_...slug_.5d8e6131.css +0 -4
- package/packages/storefront/dist/client/chunks/preload-helper.f15ab524.js +0 -1
- package/packages/storefront/dist/client/chunks/runtime-dom.esm-bundler.9119f0ff.js +0 -1
- package/packages/storefront/dist/client/client.671d7334.js +0 -1
- package/packages/storefront/dist/client/page.b906f867.js +0 -1
|
@@ -2,11 +2,11 @@ import type { Response } from 'firebase-functions';
|
|
|
2
2
|
import type { Orders } from '@cloudcommerce/types';
|
|
3
3
|
import type {
|
|
4
4
|
Amount, BodyOrder,
|
|
5
|
-
|
|
5
|
+
PaymentHistory,
|
|
6
6
|
OrderPaymentHistory,
|
|
7
7
|
TransactionOrder,
|
|
8
8
|
} from '../../types/index';
|
|
9
|
-
import
|
|
9
|
+
import logger from 'firebase-functions/logger';
|
|
10
10
|
import api from '@cloudcommerce/api';
|
|
11
11
|
import { sendError } from './utils';
|
|
12
12
|
|
|
@@ -24,14 +24,16 @@ const checkoutRespond = async (
|
|
|
24
24
|
transaction as any,
|
|
25
25
|
)).data._id;
|
|
26
26
|
transaction._id = transactionId;
|
|
27
|
-
} catch (
|
|
28
|
-
logger.error(
|
|
27
|
+
} catch (err: any) {
|
|
28
|
+
logger.error(err);
|
|
29
|
+
// Ref: class ApiError in api.d.ts
|
|
29
30
|
return sendError(
|
|
30
31
|
res,
|
|
31
|
-
409,
|
|
32
|
-
'CKT704',
|
|
33
|
-
'Create transaction Error',
|
|
34
|
-
usrMsg,
|
|
32
|
+
(err?.data?.status || err?.statusCode) || 409,
|
|
33
|
+
err?.data?.error_code || 'CKT704',
|
|
34
|
+
err?.message || 'Create transaction Error',
|
|
35
|
+
err?.data?.user_message || usrMsg,
|
|
36
|
+
err?.data?.more_info,
|
|
35
37
|
);
|
|
36
38
|
}
|
|
37
39
|
}
|
|
@@ -48,20 +50,19 @@ const checkoutRespond = async (
|
|
|
48
50
|
const newOrder = async (orderBody: BodyOrder) => {
|
|
49
51
|
try {
|
|
50
52
|
const orderId = (await api.post('orders', orderBody)).data._id;
|
|
51
|
-
return new Promise<Orders|null>((resolve) => {
|
|
53
|
+
return new Promise<{ order: Orders | null, err?: any} >((resolve) => {
|
|
52
54
|
setTimeout(async () => {
|
|
53
55
|
try {
|
|
54
|
-
const order = (await api.get(`orders/${orderId}`)).data;
|
|
55
|
-
resolve(order);
|
|
56
|
-
} catch (
|
|
57
|
-
logger.error(
|
|
58
|
-
resolve(null);
|
|
56
|
+
const order = (await api.get(`orders/${orderId}`)).data as Orders;
|
|
57
|
+
resolve({ order });
|
|
58
|
+
} catch (err: any) {
|
|
59
|
+
logger.error(err);
|
|
60
|
+
resolve({ order: null, err });
|
|
59
61
|
}
|
|
60
62
|
}, 800);
|
|
61
63
|
});
|
|
62
|
-
} catch (
|
|
63
|
-
|
|
64
|
-
return null;
|
|
64
|
+
} catch (err: any) {
|
|
65
|
+
return { order: null, err };
|
|
65
66
|
}
|
|
66
67
|
};
|
|
67
68
|
|
|
@@ -128,9 +129,9 @@ const saveTransaction = (
|
|
|
128
129
|
|
|
129
130
|
const addPaymentHistory = async (
|
|
130
131
|
orderId: string,
|
|
131
|
-
|
|
132
|
+
listPaymentsHistory: PaymentHistory[],
|
|
132
133
|
isFirstTransaction: boolean,
|
|
133
|
-
paymentEntry:
|
|
134
|
+
paymentEntry: PaymentHistory,
|
|
134
135
|
dateTime: string,
|
|
135
136
|
loyaltyPointsBalance: number,
|
|
136
137
|
amount: Amount,
|
|
@@ -140,7 +141,7 @@ const addPaymentHistory = async (
|
|
|
140
141
|
const body: OrderPaymentHistory = {
|
|
141
142
|
amount,
|
|
142
143
|
};
|
|
143
|
-
body.payments_history =
|
|
144
|
+
body.payments_history = listPaymentsHistory;
|
|
144
145
|
|
|
145
146
|
if (isFirstTransaction) {
|
|
146
147
|
body.financial_status = {
|
|
@@ -164,9 +165,9 @@ const addPaymentHistory = async (
|
|
|
164
165
|
} else {
|
|
165
166
|
reject(new Error('Error adding payment history'));
|
|
166
167
|
}
|
|
167
|
-
} catch (
|
|
168
|
-
logger.error(
|
|
169
|
-
reject(
|
|
168
|
+
} catch (err) {
|
|
169
|
+
logger.error(err);
|
|
170
|
+
reject(err);
|
|
170
171
|
}
|
|
171
172
|
}, isFirstTransaction ? 200 : 400);
|
|
172
173
|
});
|
|
@@ -5,9 +5,9 @@ import type {
|
|
|
5
5
|
Amount,
|
|
6
6
|
CheckoutTransaction,
|
|
7
7
|
TransactionOrder,
|
|
8
|
-
|
|
8
|
+
PaymentHistory,
|
|
9
9
|
} from '../../types/index';
|
|
10
|
-
import logger from 'firebase-functions/
|
|
10
|
+
import logger from 'firebase-functions/logger';
|
|
11
11
|
import { sendError, getValidResults } from './utils';
|
|
12
12
|
import {
|
|
13
13
|
newOrder,
|
|
@@ -36,7 +36,7 @@ const createOrder = async (
|
|
|
36
36
|
) => {
|
|
37
37
|
// start creating new order to API
|
|
38
38
|
|
|
39
|
-
const order = await newOrder(orderBody);
|
|
39
|
+
const { order, err } = await newOrder(orderBody);
|
|
40
40
|
if (order) {
|
|
41
41
|
const orderId = order._id;
|
|
42
42
|
const orderNumber = order.number;
|
|
@@ -45,7 +45,7 @@ const createOrder = async (
|
|
|
45
45
|
let countDone = 0;
|
|
46
46
|
let paymentsAmount = 0;
|
|
47
47
|
let loyaltyPointsBalance = 0;
|
|
48
|
-
const
|
|
48
|
+
const paymentsHistory: PaymentHistory[] = [];
|
|
49
49
|
|
|
50
50
|
const nextTransaction = async (index = 0) => {
|
|
51
51
|
const newTransaction = transactions[index];
|
|
@@ -150,18 +150,18 @@ const createOrder = async (
|
|
|
150
150
|
transaction,
|
|
151
151
|
) as string;
|
|
152
152
|
// add entry to payments history
|
|
153
|
-
const paymentEntry:
|
|
153
|
+
const paymentEntry: PaymentHistory = {
|
|
154
154
|
transaction_id: transactionId,
|
|
155
155
|
status: transaction.status.current,
|
|
156
156
|
date_time: dateTime,
|
|
157
157
|
flags: ['checkout'],
|
|
158
158
|
};
|
|
159
|
-
|
|
159
|
+
paymentsHistory.push(paymentEntry);
|
|
160
160
|
try {
|
|
161
161
|
// eslint-disable-next-line no-await-in-loop
|
|
162
162
|
await addPaymentHistory(
|
|
163
163
|
orderId,
|
|
164
|
-
|
|
164
|
+
paymentsHistory,
|
|
165
165
|
isFirstTransaction,
|
|
166
166
|
paymentEntry,
|
|
167
167
|
dateTime,
|
|
@@ -252,16 +252,17 @@ const createOrder = async (
|
|
|
252
252
|
return nextTransaction();
|
|
253
253
|
}
|
|
254
254
|
// send error
|
|
255
|
-
|
|
256
|
-
en_us: 'There was a problem saving your order, please try again later',
|
|
257
|
-
pt_br: 'Houve um problema ao salvar o pedido, por favor tente novamente mais tarde',
|
|
258
|
-
};
|
|
255
|
+
// Ref: class ApiError in api.d.ts
|
|
259
256
|
return sendError(
|
|
260
257
|
res,
|
|
261
|
-
409,
|
|
258
|
+
(err?.data?.status || err?.statusCode) || 409,
|
|
262
259
|
'CKT701',
|
|
263
|
-
'There was a problem saving your order, please try again later',
|
|
264
|
-
|
|
260
|
+
(err?.message) || 'There was a problem saving your order, please try again later',
|
|
261
|
+
{
|
|
262
|
+
en_us: 'There was a problem saving your order, please try again later',
|
|
263
|
+
pt_br: 'Houve um problema ao salvar o pedido, por favor tente novamente mais tarde',
|
|
264
|
+
},
|
|
265
|
+
err?.data?.more_info,
|
|
265
266
|
);
|
|
266
267
|
};
|
|
267
268
|
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
// eslint-disable-next-line no-unused-vars
|
|
2
|
+
import type { AxiosError } from 'axios';
|
|
3
|
+
import logger from 'firebase-functions/logger';
|
|
2
4
|
import axios from 'axios';
|
|
3
5
|
|
|
4
6
|
// handle other modules endpoints directly
|
|
5
7
|
export default async (
|
|
6
|
-
checkoutBody: {[key:string]:any},
|
|
8
|
+
checkoutBody: { [key: string]: any },
|
|
7
9
|
modulesBaseURL: string,
|
|
8
10
|
label: string,
|
|
9
11
|
) => {
|
|
10
|
-
|
|
12
|
+
const msgErr: { moreInfo?: string, code?: number | string, status?: number } = {};
|
|
13
|
+
|
|
14
|
+
let moduleBody: { [key: string]: any } | undefined;
|
|
11
15
|
let modName: string | undefined;
|
|
12
16
|
switch (label) {
|
|
13
17
|
case 'shipping':
|
|
@@ -44,6 +48,7 @@ export default async (
|
|
|
44
48
|
url,
|
|
45
49
|
body,
|
|
46
50
|
)).data;
|
|
51
|
+
// find application validation error
|
|
47
52
|
if (Array.isArray(resp.result)) {
|
|
48
53
|
let countAppErro = 0;
|
|
49
54
|
for (let i = 0; i < resp.result.length; i++) {
|
|
@@ -51,17 +56,34 @@ export default async (
|
|
|
51
56
|
if (!result.validated || result.error) {
|
|
52
57
|
countAppErro += 1;
|
|
53
58
|
logger.error(result.response);
|
|
59
|
+
msgErr.moreInfo += ` ${result.response}`;
|
|
54
60
|
}
|
|
55
61
|
}
|
|
56
62
|
if (resp.result.length === countAppErro) {
|
|
57
|
-
|
|
63
|
+
msgErr.code = 'APP_MODULE_ERROR_VALIDATION';
|
|
64
|
+
return { msgErr };
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
67
|
return resp.result;
|
|
61
|
-
} catch (
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
} catch (err: any | AxiosError) {
|
|
69
|
+
msgErr.moreInfo = 'Unexpected error ';
|
|
70
|
+
logger.error(err);
|
|
71
|
+
if (axios.isAxiosError(err)) {
|
|
72
|
+
msgErr.moreInfo = err.message;
|
|
73
|
+
if (err.code) {
|
|
74
|
+
msgErr.code = `MODULE_${err.code}`;
|
|
75
|
+
}
|
|
76
|
+
if (err.response) {
|
|
77
|
+
msgErr.status = err.response.status;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return { msgErr };
|
|
64
81
|
}
|
|
65
82
|
}
|
|
66
|
-
|
|
83
|
+
|
|
84
|
+
msgErr.moreInfo = 'Body, application or module not informed';
|
|
85
|
+
msgErr.status = 404;
|
|
86
|
+
msgErr.code = 'CKT900';
|
|
87
|
+
|
|
88
|
+
return { msgErr };
|
|
67
89
|
};
|
|
@@ -2,7 +2,7 @@ import type { Response } from 'firebase-functions';
|
|
|
2
2
|
import type {
|
|
3
3
|
CheckoutBodyWithItems,
|
|
4
4
|
BodyOrder,
|
|
5
|
-
|
|
5
|
+
Payment,
|
|
6
6
|
PaymentGateways,
|
|
7
7
|
PaymentMethod,
|
|
8
8
|
Amount,
|
|
@@ -10,9 +10,7 @@ import type {
|
|
|
10
10
|
ShippingSerive,
|
|
11
11
|
ShippingLine,
|
|
12
12
|
} from '../../types/index';
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line padding-line-between-statements
|
|
15
|
-
import logger from 'firebase-functions/lib/logger';
|
|
13
|
+
import logger from 'firebase-functions/logger';
|
|
16
14
|
|
|
17
15
|
type BodyResouce = {[key:string]:any}
|
|
18
16
|
|
|
@@ -89,7 +87,7 @@ const getValidResults = (
|
|
|
89
87
|
const handleListPayments = (
|
|
90
88
|
body: CheckoutBodyWithItems,
|
|
91
89
|
listPayment: {[key:string]:any},
|
|
92
|
-
paymentsBody:
|
|
90
|
+
paymentsBody: Payment,
|
|
93
91
|
amount:Amount,
|
|
94
92
|
orderBody: BodyOrder,
|
|
95
93
|
) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Request, Response } from 'firebase-functions';
|
|
2
2
|
import type { Applications, AppModuleName, AppModuleBody } from '@cloudcommerce/types';
|
|
3
|
-
import
|
|
3
|
+
import logger from 'firebase-functions/logger';
|
|
4
4
|
import Ajv, { ValidateFunction } from 'ajv';
|
|
5
5
|
import addFormats from 'ajv-formats';
|
|
6
6
|
import api, { ApiError, ApiConfig } from '@cloudcommerce/api';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/prefer-default-export */
|
|
2
2
|
import '@cloudcommerce/firebase/lib/init';
|
|
3
|
-
// eslint-disable-next-line import/no-unresolved
|
|
4
3
|
import { onRequest } from 'firebase-functions/v2/https';
|
|
5
4
|
import config from '@cloudcommerce/firebase/lib/config';
|
|
6
5
|
import serveModulesApi from './firebase/serve-modules-api';
|
|
@@ -3,7 +3,8 @@ import type {
|
|
|
3
3
|
Carts,
|
|
4
4
|
Orders,
|
|
5
5
|
CalculateShippingResponse,
|
|
6
|
-
ListPaymentsResponse
|
|
6
|
+
ListPaymentsResponse,
|
|
7
|
+
Products
|
|
7
8
|
} from '@cloudcommerce/types';
|
|
8
9
|
import { Transaction } from '@cloudcommerce/types/modules/@checkout:params';
|
|
9
10
|
|
|
@@ -20,7 +21,7 @@ type CheckoutBodyWithItems = Omit<CheckoutBody, 'items'> & {
|
|
|
20
21
|
|
|
21
22
|
type CustomerCheckout = Exclude<CheckoutBody['customer'], undefined>
|
|
22
23
|
type BodyOrder = Omit<Orders, '_id' | 'created_at' | 'updated_at' | 'store_id' | 'items' > & {
|
|
23
|
-
items :
|
|
24
|
+
items : Items
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
type TransactionOrder = Exclude<Orders['transactions'], undefined>[number]
|
|
@@ -30,11 +31,11 @@ type BodyTransactionOrder = Omit<TransactionOrder, 'status'> & {
|
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
type OrderPaymentHistory = Pick<Orders,'payments_history'| 'financial_status' | 'amount'>
|
|
33
|
-
type
|
|
34
|
+
type PaymentHistory = Exclude<Pick<Orders,'payments_history'>['payments_history'], undefined>[number]
|
|
34
35
|
|
|
35
36
|
type CheckoutTransaction = Exclude<CheckoutBody['transaction'], Transaction[]>
|
|
36
37
|
|
|
37
|
-
type
|
|
38
|
+
type Payment = Omit<CheckoutBodyItems, 'transaction'> & {
|
|
38
39
|
transaction: CheckoutTransaction
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -49,7 +50,7 @@ type PaymentMethod = Pick<PaymentGateways[number]['payment_method'], 'code' | 'n
|
|
|
49
50
|
|
|
50
51
|
export {
|
|
51
52
|
CheckoutBodyWithItems,
|
|
52
|
-
|
|
53
|
+
Payment,
|
|
53
54
|
Items,
|
|
54
55
|
Item,
|
|
55
56
|
CustomerCheckout,
|
|
@@ -63,5 +64,5 @@ export {
|
|
|
63
64
|
TransactionOrder,
|
|
64
65
|
OrderPaymentHistory,
|
|
65
66
|
BodyTransactionOrder,
|
|
66
|
-
|
|
67
|
+
PaymentHistory,
|
|
67
68
|
};
|
|
@@ -6,7 +6,7 @@ export default async (req, res) => {
|
|
|
6
6
|
if (url.endsWith('.json')) {
|
|
7
7
|
url = url.slice(0, -5);
|
|
8
8
|
}
|
|
9
|
-
url = url.replace('/api/
|
|
9
|
+
url = url.replace('/api/passport', ''); // due to hosting rewrite
|
|
10
10
|
const endpoint = url.split('/')[1];
|
|
11
11
|
if (endpoint !== 'token') {
|
|
12
12
|
return res.sendStatus(404);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-passport-api.js","sourceRoot":"","sources":["../../src/firebase/serve-passport-api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAE3D,eAAe,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;IACnD,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IAClB,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACzB,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACxB;IACD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"serve-passport-api.js","sourceRoot":"","sources":["../../src/firebase/serve-passport-api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAE3D,eAAe,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;IACnD,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IAClB,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACzB,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACxB;IACD,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB;IACjE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnC,IAAI,QAAQ,KAAK,OAAO,EAAE;QACxB,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;KAC5B;IACD,MAAM,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;KAC5B;IACD,IAAI;QACF,MAAM,eAAe,GAAG,MAAM,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;QACtE,IAAI,eAAe,KAAK,IAAI,EAAE;YAC5B,OAAO,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SAClC;QACD,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YAC1B,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,2CAA2C;SACnD,CAAC,CAAC;KACJ;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClB,OAAO,GAAG,CAAC,UAAU,CAAE,GAAgB,CAAC,UAAU,IAAI,GAAG,CAAC,CAAC;KAC5D;AACH,CAAC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '@cloudcommerce/firebase/lib/init';
|
|
2
|
-
// eslint-disable-next-line import/no-unresolved
|
|
3
2
|
import { onRequest } from 'firebase-functions/v2/https';
|
|
4
3
|
import config from '@cloudcommerce/firebase/lib/config';
|
|
5
4
|
import servePassportApi from './firebase/serve-passport-api.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,
|
|
1
|
+
{"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAgB,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAE7D,MAAM,OAAO,GAAG;IACd,MAAM,EAAE,QAAQ;IAChB,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC,oBAAoB;CACrB,CAAC;AAElB,wDAAwD;AACxD,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACtD,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/passport",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.126",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"firebase-admin": "^11.
|
|
29
|
-
"firebase-functions": "^
|
|
28
|
+
"firebase-admin": "^11.2.0",
|
|
29
|
+
"firebase-functions": "^4.0.2",
|
|
30
30
|
"source-map-support": "^0.5.21"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@cloudcommerce/types": "workspace:*",
|
|
34
|
-
"@firebase/app-types": "^0.8.
|
|
34
|
+
"@firebase/app-types": "^0.8.1"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -8,7 +8,7 @@ export default async (req: Request, res: Response) => {
|
|
|
8
8
|
if (url.endsWith('.json')) {
|
|
9
9
|
url = url.slice(0, -5);
|
|
10
10
|
}
|
|
11
|
-
url = url.replace('/api/
|
|
11
|
+
url = url.replace('/api/passport', ''); // due to hosting rewrite
|
|
12
12
|
const endpoint = url.split('/')[1];
|
|
13
13
|
|
|
14
14
|
if (endpoint !== 'token') {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '@cloudcommerce/firebase/lib/init';
|
|
2
|
-
// eslint-disable-next-line import/no-unresolved
|
|
3
2
|
import { HttpsOptions, onRequest } from 'firebase-functions/v2/https';
|
|
4
3
|
import config from '@cloudcommerce/firebase/lib/config';
|
|
5
4
|
import servePassportApi from './firebase/serve-passport-api';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/ssr",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.126",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront SSR",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
"build": "sh ../../scripts/build-lib.sh"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@astrojs/image": "^0.
|
|
27
|
-
"@astrojs/node": "^
|
|
26
|
+
"@astrojs/image": "^0.11.0",
|
|
27
|
+
"@astrojs/node": "^2.0.2",
|
|
28
28
|
"@cloudcommerce/api": "workspace:*",
|
|
29
29
|
"@cloudcommerce/firebase": "workspace:*",
|
|
30
30
|
"@cloudcommerce/i18n": "workspace:*",
|
|
31
31
|
"@ecomplus/utils": "^1.4.1",
|
|
32
|
-
"astro": "^1.
|
|
33
|
-
"firebase-admin": "^11.
|
|
34
|
-
"firebase-functions": "^
|
|
32
|
+
"astro": "^1.6.2",
|
|
33
|
+
"firebase-admin": "^11.2.0",
|
|
34
|
+
"firebase-functions": "^4.0.2",
|
|
35
35
|
"image-size": "^1.0.2",
|
|
36
36
|
"vue": "^3.2.41"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@cloudcommerce/types": "workspace:*",
|
|
40
|
-
"@firebase/app-types": "^0.8.
|
|
40
|
+
"@firebase/app-types": "^0.8.1"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -2,7 +2,6 @@ import { existsSync, lstatSync } from 'fs';
|
|
|
2
2
|
import { join as joinPath } from 'path';
|
|
3
3
|
import * as dotenv from 'dotenv';
|
|
4
4
|
// https://github.com/import-js/eslint-plugin-import/issues/1810
|
|
5
|
-
/* eslint-disable import/no-unresolved */
|
|
6
5
|
import { defineConfig } from 'astro/config';
|
|
7
6
|
import node from '@astrojs/node';
|
|
8
7
|
import vue from '@astrojs/vue';
|
|
@@ -140,7 +139,9 @@ const genAstroConfig = ({
|
|
|
140
139
|
vitePWAOptions = _vitePWAOptions,
|
|
141
140
|
} = {}) => ({
|
|
142
141
|
output: isSSG ? 'static' : 'server',
|
|
143
|
-
adapter: isSSG ? undefined : node(
|
|
142
|
+
adapter: isSSG ? undefined : node({
|
|
143
|
+
mode: 'middleware',
|
|
144
|
+
}),
|
|
144
145
|
outDir: isSSG ? './dist/client' : './dist',
|
|
145
146
|
integrations: [
|
|
146
147
|
image(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as i}from"./chunks/HeaderButtons.308edb4d.js";import"./chunks/preload-helper.1de719f8.js";import"./chunks/runtime-dom.esm-bundler.f00ab3bd.js";/* empty css */export{i as default};
|