cloudcommerce 0.31.1 → 0.32.0
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/CHANGELOG.md +27 -0
- package/action.yml +8 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/ecomplus-stores/monocard/functions/many/package.json +3 -3
- package/ecomplus-stores/monocard/functions/ssr/package.json +6 -6
- package/ecomplus-stores/monocard/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/monocard/package.json +2 -2
- package/package.json +4 -4
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +2 -2
- package/packages/apps/correios/package.json +3 -3
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +2 -2
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +2 -2
- package/packages/apps/fb-conversions/package.json +2 -2
- package/packages/apps/flash-courier/package.json +2 -2
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/galaxpay/package.json +2 -2
- package/packages/apps/google-analytics/package.json +2 -2
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +3 -3
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +2 -2
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/pagarme-v5/CHANGELOG.md +1 -0
- package/packages/apps/pagarme-v5/README.md +1 -0
- package/packages/apps/pagarme-v5/assets/onload-expression.js +38 -0
- package/packages/apps/pagarme-v5/assets/onload-expression.min.js +1 -0
- package/packages/apps/pagarme-v5/events.js +1 -0
- package/packages/apps/pagarme-v5/lib/index.d.ts +1 -0
- package/packages/apps/pagarme-v5/lib/index.js +2 -0
- package/packages/apps/pagarme-v5/lib/index.js.map +1 -0
- package/packages/apps/pagarme-v5/lib/pagarme-v5-events.d.ts +6 -0
- package/packages/apps/pagarme-v5/lib/pagarme-v5-events.js +21 -0
- package/packages/apps/pagarme-v5/lib/pagarme-v5-events.js.map +1 -0
- package/packages/apps/pagarme-v5/lib/pagarme-v5.d.ts +4 -0
- package/packages/apps/pagarme-v5/lib/pagarme-v5.js +12 -0
- package/packages/apps/pagarme-v5/lib/pagarme-v5.js.map +1 -0
- package/packages/apps/pagarme-v5/lib-mjs/create-pagarme5-transaction.mjs +208 -0
- package/packages/apps/pagarme-v5/lib-mjs/events-to-pagarme5.mjs +209 -0
- package/packages/apps/pagarme-v5/lib-mjs/functions-lib/api-utils.mjs +220 -0
- package/packages/apps/pagarme-v5/lib-mjs/functions-lib/firestore-utils.mjs +24 -0
- package/packages/apps/pagarme-v5/lib-mjs/functions-lib/pagarme/create-axios.mjs +12 -0
- package/packages/apps/pagarme-v5/lib-mjs/functions-lib/pagarme/handle-plans.mjs +69 -0
- package/packages/apps/pagarme-v5/lib-mjs/functions-lib/pagarme/parses-utils.mjs +61 -0
- package/packages/apps/pagarme-v5/lib-mjs/functions-lib/pagarme/payment-subscription.mjs +244 -0
- package/packages/apps/pagarme-v5/lib-mjs/functions-lib/payments/add-installments.mjs +45 -0
- package/packages/apps/pagarme-v5/lib-mjs/list-pagarme5-payments.mjs +218 -0
- package/packages/apps/pagarme-v5/lib-mjs/pagarme5-webhooks.mjs +343 -0
- package/packages/apps/pagarme-v5/package.json +38 -0
- package/packages/apps/pagarme-v5/scripts/build.sh +4 -0
- package/packages/apps/pagarme-v5/scripts/tests.sh +9 -0
- package/packages/apps/pagarme-v5/src/index.ts +1 -0
- package/packages/apps/pagarme-v5/src/pagarme-v5-events.ts +27 -0
- package/packages/apps/pagarme-v5/src/pagarme-v5.ts +12 -0
- package/packages/apps/pagarme-v5/tests/1-list-payments.test.mjs +37 -0
- package/packages/apps/pagarme-v5/tests/2-create-transaction.test.mjs +56 -0
- package/packages/apps/pagarme-v5/tsconfig.json +6 -0
- package/packages/apps/paghiper/package.json +2 -2
- package/packages/apps/pix/package.json +2 -2
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/apps/webhooks/package.json +2 -2
- package/packages/cli/config/firebase.json +0 -25
- package/packages/cli/package.json +1 -1
- package/packages/config/lib/config.js +1 -1
- package/packages/config/lib/config.js.map +1 -1
- package/packages/config/package.json +1 -1
- package/packages/config/src/config.ts +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +2 -2
- package/packages/events/lib/firebase.js +2 -0
- package/packages/events/lib/firebase.js.map +1 -1
- package/packages/events/package.json +3 -2
- package/packages/events/src/firebase.ts +2 -0
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/lib/config.d.ts +4 -0
- package/packages/firebase/lib/config.js +9 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/firebase/src/config.ts +10 -0
- package/packages/i18n/package.json +1 -1
- package/packages/modules/lib/firebase/call-app-module.js +12 -0
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/lib/firebase/handle-module.js +2 -1
- package/packages/modules/lib/firebase/handle-module.js.map +1 -1
- package/packages/modules/lib/firebase.js +10 -0
- package/packages/modules/lib/firebase.js.map +1 -1
- package/packages/modules/package.json +3 -2
- package/packages/modules/src/firebase/call-app-module.ts +12 -0
- package/packages/modules/src/firebase/handle-module.ts +5 -1
- package/packages/modules/src/firebase.ts +13 -0
- package/packages/passport/package.json +2 -2
- package/packages/ssr/cloudflare/swr-worker.js +1 -1
- package/packages/ssr/lib/analytics-events.js +23 -0
- package/packages/ssr/lib/analytics-events.js.map +1 -0
- package/packages/ssr/lib/firebase/serve-storefront.js +27 -0
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +5 -4
- package/packages/ssr/src/analytics-events.ts +23 -0
- package/packages/ssr/src/cloudflare/swr-worker.ts +1 -1
- package/packages/ssr/src/firebase/serve-storefront.ts +28 -0
- package/packages/storefront/package.json +5 -5
- package/packages/storefront/src/lib/scripts/vbeta-app.ts +14 -4
- package/packages/storefront/src/lib/state/customer-session.ts +2 -6
- package/packages/storefront/src/lib/state/modules-info.ts +2 -1
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.32.0](https://github.com/ecomplus/cloud-commerce/compare/v0.31.2...v0.32.0) (2023-11-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* **storefront:** Passport API not existing anymore, just for token, removed `GET_PASSPORT_API_URI`
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **modules:** Add CORS headers by default and handle OPTIONS HTTP method (CORS preflight) ([aa08573](https://github.com/ecomplus/cloud-commerce/commit/aa08573100c5744c7b3a48f40187c7d9cc74b613))
|
|
15
|
+
* **pagarme-v5:** Create app to integrate Pagar.me API v5 with recurring payments ([#255](https://github.com/ecomplus/cloud-commerce/issues/255)) ([a445642](https://github.com/ecomplus/cloud-commerce/commit/a445642c2a2774fc51d2df3467ca391dc55b0ba6))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **config:** Properly using `countryCode` from settings content [skip ci] ([4014aab](https://github.com/ecomplus/cloud-commerce/commit/4014aabe3bea6e119755b7abec19b80cd684cba0))
|
|
21
|
+
* **deps:** Update non-major dependencies ([#266](https://github.com/ecomplus/cloud-commerce/issues/266)) ([17a559b](https://github.com/ecomplus/cloud-commerce/commit/17a559b0cf3df0897dacd8ac89a02c48415f24a9))
|
|
22
|
+
* **modules:** Improving GET response cache with fine control for stale cache ([9c22262](https://github.com/ecomplus/cloud-commerce/commit/9c222625a66cf3ff5abe188041dd054ef05d853e))
|
|
23
|
+
* **pagarme-v5:** Fixing package exports filepaths ([3522084](https://github.com/ecomplus/cloud-commerce/commit/3522084b30b77322fc921b7005690dbde44e360f))
|
|
24
|
+
* **ssr:** Update Cloudflare SWR worker considering API routes at /_api/* ([8946190](https://github.com/ecomplus/cloud-commerce/commit/8946190d2dcd7a35a64081bb82e541fbca8998f0))
|
|
25
|
+
* **storefront:** Fix `@ecomplus/client` const API base URIs on vbeta app compat ([7296836](https://github.com/ecomplus/cloud-commerce/commit/7296836fba024a56e0eb52e1af2e7b7762291816))
|
|
26
|
+
* **storefront:** Fix constants names for `@ecomplus/client` on vbeta compat ([56d260a](https://github.com/ecomplus/cloud-commerce/commit/56d260ad520584ecd1b6142455fe48996c2a70fa))
|
|
27
|
+
* **storefront:** Fixing API base URI on vbeta-app script ([0e7436e](https://github.com/ecomplus/cloud-commerce/commit/0e7436ef3d1f4aa6ea195561ab10da92852f882b))
|
|
28
|
+
* **storefront:** Updating vbeta-app script version ([47738b7](https://github.com/ecomplus/cloud-commerce/commit/47738b76a5e742ca5144ac766d7ea80d0d1c003e))
|
|
29
|
+
|
|
30
|
+
### [0.31.2](https://github.com/ecomplus/cloud-commerce/compare/v0.31.1...v0.31.2) (2023-11-03)
|
|
31
|
+
|
|
5
32
|
### [0.31.1](https://github.com/ecomplus/cloud-commerce/compare/v0.31.0...v0.31.1) (2023-11-03)
|
|
6
33
|
|
|
7
34
|
## [0.31.0](https://github.com/ecomplus/cloud-commerce/compare/v0.30.0...v0.31.0) (2023-11-03)
|
package/action.yml
CHANGED
|
@@ -86,6 +86,10 @@ inputs:
|
|
|
86
86
|
description: 'App: Correios access code'
|
|
87
87
|
correios-postcard-number:
|
|
88
88
|
description: 'App: Optional Correios postcard number'
|
|
89
|
+
pagarmev5-api-token:
|
|
90
|
+
description: 'App: Pagar.me API V5 token'
|
|
91
|
+
pagarmev5-public-key:
|
|
92
|
+
description: 'App: Pagar.me API V5 public key'
|
|
89
93
|
|
|
90
94
|
outputs: {}
|
|
91
95
|
|
|
@@ -251,6 +255,8 @@ runs:
|
|
|
251
255
|
CORREIOS_USER: ${{ inputs.correios-user }}
|
|
252
256
|
CORREIOS_ACCESS_CODE: ${{ inputs.correios-access-code }}
|
|
253
257
|
CORREIOS_POSTCARD: ${{ inputs.correios-postcard-number }}
|
|
258
|
+
PAGARMEV5_API_TOKEN: ${{ inputs.pagarmev5-api-token }}
|
|
259
|
+
PAGARMEV5_PUBLIC_KEY: ${{ inputs.pagarmev5-public-key }}
|
|
254
260
|
run: |
|
|
255
261
|
export GAC_FILENAME=".gac-$RANDOM.json"
|
|
256
262
|
echo $FIREBASE_SERVICE_ACCOUNT > $GAC_FILENAME
|
|
@@ -293,6 +299,8 @@ runs:
|
|
|
293
299
|
CORREIOS_USER=$CORREIOS_USER
|
|
294
300
|
CORREIOS_ACCESS_CODE=$CORREIOS_ACCESS_CODE
|
|
295
301
|
CORREIOS_POSTCARD=$CORREIOS_POSTCARD
|
|
302
|
+
PAGARMEV5_API_TOKEN=$PAGARMEV5_API_TOKEN
|
|
303
|
+
PAGARMEV5_PUBLIC_KEY=$PAGARMEV5_PUBLIC_KEY
|
|
296
304
|
" > functions/.env
|
|
297
305
|
if [ -z "$DEPLOY_CODEBASE" ]; then
|
|
298
306
|
GOOGLE_APPLICATION_CREDENTIALS=$GAC_FILENAME npm run deploy
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
20
|
-
"@cloudcommerce/passport": "^0.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.31.2",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.31.2",
|
|
20
|
+
"@cloudcommerce/passport": "^0.31.2"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.
|
|
20
|
+
"@cloudcommerce/api": "^0.31.2",
|
|
21
|
+
"@cloudcommerce/firebase": "^0.31.2",
|
|
22
|
+
"@cloudcommerce/ssr": "^0.31.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@cloudcommerce/i18n": "^0.
|
|
26
|
-
"@cloudcommerce/storefront": "^0.
|
|
27
|
-
"@cloudcommerce/types": "^0.
|
|
25
|
+
"@cloudcommerce/i18n": "^0.31.2",
|
|
26
|
+
"@cloudcommerce/storefront": "^0.31.2",
|
|
27
|
+
"@cloudcommerce/types": "^0.31.2",
|
|
28
28
|
"@fontsource/croissant-one": "^5.0.9",
|
|
29
29
|
"@iconify-json/mingcute": "^1.1.9"
|
|
30
30
|
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
20
|
-
"@cloudcommerce/modules": "^0.
|
|
18
|
+
"@cloudcommerce/events": "^0.31.2",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.31.2",
|
|
20
|
+
"@cloudcommerce/modules": "^0.31.2"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "https://github.com/ecomplus/cloud-commerce/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cloudcommerce/cli": "^0.
|
|
26
|
+
"@cloudcommerce/cli": "^0.31.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@cloudcommerce/eslint": "^0.
|
|
29
|
+
"@cloudcommerce/eslint": "^0.31.2"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
20
|
-
"@cloudcommerce/passport": "^0.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.31.2",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.31.2",
|
|
20
|
+
"@cloudcommerce/passport": "^0.31.2"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.
|
|
20
|
+
"@cloudcommerce/api": "^0.31.2",
|
|
21
|
+
"@cloudcommerce/firebase": "^0.31.2",
|
|
22
|
+
"@cloudcommerce/ssr": "^0.31.2",
|
|
23
23
|
"@vueuse/motion": "2.0.0-beta.22"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@cloudcommerce/i18n": "^0.
|
|
27
|
-
"@cloudcommerce/storefront": "^0.
|
|
28
|
-
"@cloudcommerce/types": "^0.
|
|
26
|
+
"@cloudcommerce/i18n": "^0.31.2",
|
|
27
|
+
"@cloudcommerce/storefront": "^0.31.2",
|
|
28
|
+
"@cloudcommerce/types": "^0.31.2",
|
|
29
29
|
"@fontsource-variable/inter": "^5.0.8",
|
|
30
30
|
"@iconify-json/ri": "^1.1.8",
|
|
31
31
|
"@iconify-json/wpf": "^1.1.4",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
20
|
-
"@cloudcommerce/modules": "^0.
|
|
18
|
+
"@cloudcommerce/events": "^0.31.2",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.31.2",
|
|
20
|
+
"@cloudcommerce/modules": "^0.31.2"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "https://github.com/ecomplus/cloud-commerce/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cloudcommerce/cli": "^0.
|
|
26
|
+
"@cloudcommerce/cli": "^0.31.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@cloudcommerce/eslint": "^0.
|
|
29
|
+
"@cloudcommerce/eslint": "^0.31.2"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
|
|
6
6
|
"main": "packages/api/lib/index.js",
|
|
7
7
|
"author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"@commitlint/cli": "^18.2.0",
|
|
20
20
|
"@commitlint/config-conventional": "^18.1.0",
|
|
21
21
|
"@commitlint/rules": "^18.1.0",
|
|
22
|
-
"@types/node": "^18.18.
|
|
23
|
-
"eslint": "^8.
|
|
22
|
+
"@types/node": "^18.18.8",
|
|
23
|
+
"eslint": "^8.53.0",
|
|
24
24
|
"husky": "^8.0.3",
|
|
25
25
|
"standard-version": "^9.5.0",
|
|
26
26
|
"ts-node": "^10.9.1",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vite": "^4.5.0",
|
|
31
31
|
"vitest": "^0.34.6",
|
|
32
32
|
"zx": "^7.2.3",
|
|
33
|
-
"@cloudcommerce/eslint": "0.
|
|
33
|
+
"@cloudcommerce/eslint": "0.32.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"fix-install": "bash scripts/pre-install.sh && pnpm i",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-affilate-program",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for simple affiliate program",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
24
|
"firebase-admin": "^11.11.0",
|
|
25
|
-
"firebase-functions": "^4.
|
|
25
|
+
"firebase-functions": "^4.5.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@cloudcommerce/types": "workspace:*"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-correios",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Correios shipping calculation",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@cloudcommerce/api": "workspace:*",
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
29
|
"@google-cloud/pubsub": "^4.0.6",
|
|
30
|
-
"axios": "^1.
|
|
30
|
+
"axios": "^1.6.0",
|
|
31
31
|
"firebase-admin": "^11.11.0",
|
|
32
|
-
"firebase-functions": "^4.
|
|
32
|
+
"firebase-functions": "^4.5.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@cloudcommerce/test-base": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-datafrete",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Datafrete shipping gateway ",
|
|
6
6
|
"main": "lib/datafrete.js",
|
|
7
7
|
"exports": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@ecomplus/utils": "1.5.0-rc.5",
|
|
29
29
|
"axios": "^1.6.0",
|
|
30
30
|
"firebase-admin": "^11.11.0",
|
|
31
|
-
"firebase-functions": "^4.
|
|
31
|
+
"firebase-functions": "^4.5.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@cloudcommerce/types": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-emails",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce default transactional email app",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@cloudcommerce/firebase": "workspace:*",
|
|
25
25
|
"@ecomplus/transactional-mails": "^2.0.2",
|
|
26
26
|
"firebase-admin": "^11.11.0",
|
|
27
|
-
"firebase-functions": "^4.
|
|
27
|
+
"firebase-functions": "^4.5.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@cloudcommerce/types": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-fb-conversions",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to send carts/orders to Facebook Conversions API",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
24
|
"facebook-nodejs-business-sdk": "^18.0.2",
|
|
25
25
|
"firebase-admin": "^11.11.0",
|
|
26
|
-
"firebase-functions": "^4.
|
|
26
|
+
"firebase-functions": "^4.5.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@cloudcommerce/types": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-flash-courier",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Flash Courier",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
28
|
"axios": "^1.6.0",
|
|
29
|
-
"firebase-functions": "^4.
|
|
29
|
+
"firebase-functions": "^4.5.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@cloudcommerce/types": "workspace:*"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-frenet",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Frenet shipping calculation",
|
|
6
6
|
"main": "lib/frenet.js",
|
|
7
7
|
"exports": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
29
|
"axios": "^1.6.0",
|
|
30
30
|
"firebase-admin": "^11.11.0",
|
|
31
|
-
"firebase-functions": "^4.
|
|
31
|
+
"firebase-functions": "^4.5.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@cloudcommerce/test-base": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-galaxpay",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Galax Pay for recurring payments",
|
|
6
6
|
"main": "lib/galaxpay.js",
|
|
7
7
|
"exports": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
28
|
"axios": "^1.6.0",
|
|
29
29
|
"firebase-admin": "^11.11.0",
|
|
30
|
-
"firebase-functions": "^4.
|
|
30
|
+
"firebase-functions": "^4.5.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@cloudcommerce/types": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-google-analytics",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to send carts/orders events to GA Measurement Protocol",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
24
|
"axios": "^1.6.0",
|
|
25
25
|
"firebase-admin": "^11.11.0",
|
|
26
|
-
"firebase-functions": "^4.
|
|
26
|
+
"firebase-functions": "^4.5.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@cloudcommerce/types": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-mandae",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Mandaê shipping intermediator",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@ecomplus/utils": "1.5.0-rc.5",
|
|
24
|
-
"axios": "^1.
|
|
25
|
-
"firebase-functions": "^4.
|
|
24
|
+
"axios": "^1.6.0",
|
|
25
|
+
"firebase-functions": "^4.5.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@cloudcommerce/test-base": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-melhor-envio",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Melhor Envio",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
28
|
"axios": "^1.6.0",
|
|
29
29
|
"firebase-admin": "^11.11.0",
|
|
30
|
-
"firebase-functions": "^4.
|
|
30
|
+
"firebase-functions": "^4.5.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@cloudcommerce/types": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-mercadopago",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Mercado Pago",
|
|
6
6
|
"main": "lib/mercadopago.js",
|
|
7
7
|
"exports": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
29
|
"axios": "^1.6.0",
|
|
30
30
|
"firebase-admin": "^11.11.0",
|
|
31
|
-
"firebase-functions": "^4.
|
|
31
|
+
"firebase-functions": "^4.5.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@cloudcommerce/test-base": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-pagarme",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Pagar.me",
|
|
6
6
|
"main": "lib/pagarme.js",
|
|
7
7
|
"exports": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
28
|
"axios": "^1.6.0",
|
|
29
29
|
"firebase-admin": "^11.11.0",
|
|
30
|
-
"firebase-functions": "^4.
|
|
30
|
+
"firebase-functions": "^4.5.0",
|
|
31
31
|
"pagarme": "^4.33.1",
|
|
32
32
|
"qs": "^6.11.2"
|
|
33
33
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Please refer to GitHub [repository releases](https://github.com/ecomplus/cloud-commerce/releases) or monorepo unified [CHANGELOG.md](https://github.com/ecomplus/cloud-commerce/blob/main/CHANGELOG.md).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# `@cloudcommerce/app-pagarme-v5`
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
(function pagarmeOnload() {
|
|
2
|
+
const apiKey = window._pagarmeKey;
|
|
3
|
+
window._pagarmeHash = function pagarmeHash(cardClient) {
|
|
4
|
+
return new Promise(async (resolve, reject) => {
|
|
5
|
+
const card = {
|
|
6
|
+
number: cardClient.number,
|
|
7
|
+
holder_name: cardClient.name,
|
|
8
|
+
exp_month: cardClient.month,
|
|
9
|
+
exp_year: cardClient.year,
|
|
10
|
+
cvv: cardClient.cvc,
|
|
11
|
+
};
|
|
12
|
+
const resp = await fetch(
|
|
13
|
+
`https://api.pagar.me/core/v5/tokens?appId=${apiKey}`,
|
|
14
|
+
{
|
|
15
|
+
headers: {
|
|
16
|
+
'Content-Type': 'application/json',
|
|
17
|
+
},
|
|
18
|
+
method: 'POST',
|
|
19
|
+
body: JSON.stringify({
|
|
20
|
+
type: 'card',
|
|
21
|
+
card,
|
|
22
|
+
}),
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
const data = await resp.json();
|
|
28
|
+
if (data.id) {
|
|
29
|
+
resolve(data.id);
|
|
30
|
+
}
|
|
31
|
+
throw new Error(`Error Token ${await resp.text()}`);
|
|
32
|
+
} catch (err) {
|
|
33
|
+
// console.error(err);
|
|
34
|
+
reject(err);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
}());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){const o=window._pagarmeKey;window._pagarmeHash=function(t){return new Promise(async(a,e)=>{var r={number:t.number,holder_name:t.name,exp_month:t.month,exp_year:t.year,cvv:t.cvc},r=await fetch("https://api.pagar.me/core/v5/tokens?appId="+o,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({type:"card",card:r})});try{var n=await r.json();throw n.id&&a(n.id),new Error("Error Token "+await r.text())}catch(a){e(a)}})}}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/pagarme-events';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pagarme-v5';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
2
|
+
import '@cloudcommerce/firebase/lib/init';
|
|
3
|
+
import * as functions from 'firebase-functions/v1';
|
|
4
|
+
import config from '@cloudcommerce/firebase/lib/config';
|
|
5
|
+
import { createAppEventsFunction } from '@cloudcommerce/firebase/lib/helpers/pubsub';
|
|
6
|
+
import handleApiEvent from '../lib-mjs/events-to-pagarme5.mjs';
|
|
7
|
+
import handlePagarmeV5Webhook from '../lib-mjs/pagarme5-webhooks.mjs';
|
|
8
|
+
|
|
9
|
+
export const pagarmev5 = {
|
|
10
|
+
onStoreEvent: createAppEventsFunction('pagarMeV5', handleApiEvent),
|
|
11
|
+
webhooks: functions
|
|
12
|
+
.region(config.get().httpsFunctionOptions.region)
|
|
13
|
+
.https.onRequest((req, res) => {
|
|
14
|
+
if (req.method !== 'POST') {
|
|
15
|
+
res.sendStatus(405);
|
|
16
|
+
} else {
|
|
17
|
+
handlePagarmeV5Webhook(req, res);
|
|
18
|
+
}
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
// # sourceMappingURL=pagarme-v5-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagarme-v5-events.js","sourceRoot":"","sources":["../src/pagarme-v5-events.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,OAAO,MAAM,MAAM,oCAAoC,CAAC;AACxD,OAAO,EACL,uBAAuB,GAExB,MAAM,4CAA4C,CAAC;AACpD,OAAO,cAAc,MAAM,mCAAmC,CAAC;AAC/D,OAAO,sBAAsB,MAAM,kCAAkC,CAAC;AAEtE,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,YAAY,EAAE,uBAAuB,CACnC,WAAW,EACX,cAAiC,CAClC;IACD,QAAQ,EAAE,SAAS;SAChB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,MAAM,CAAC;SAChD,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC5B,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE;YACzB,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;SACrB;aAAM;YACL,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;SAClC;IACH,CAAC,CAAC;CACL,CAAC"}
|