cloudcommerce 0.0.27 → 0.0.30
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 +36 -0
- package/CONTRIBUTING.md +19 -0
- package/action.yml +10 -3
- package/package.json +9 -8
- package/packages/api/lib/index.d.ts +9988 -29
- package/packages/api/lib/index.js +47 -20
- package/packages/api/lib/index.js.map +1 -1
- package/packages/api/lib/types/applications.d.ts +1 -1
- package/packages/api/lib/types/authentications.d.ts +1 -1
- package/packages/api/lib/types/brands.d.ts +1 -1
- package/packages/api/lib/types/carts.d.ts +3 -3
- package/packages/api/lib/types/categories.d.ts +1 -1
- package/packages/api/lib/types/collections.d.ts +1 -1
- package/packages/api/lib/types/customers.d.ts +2 -2
- package/packages/api/lib/types/grids.d.ts +1 -1
- package/packages/api/lib/types/orders.d.ts +5 -5
- package/packages/api/lib/types/products.d.ts +2 -2
- package/packages/api/lib/types/stores.d.ts +1 -1
- package/packages/api/lib/types.d.ts +25 -8
- package/packages/api/package.json +1 -1
- package/packages/api/src/index.ts +78 -29
- package/packages/api/src/types/applications.d.ts +1 -1
- package/packages/api/src/types/authentications.d.ts +1 -1
- package/packages/api/src/types/brands.d.ts +1 -1
- package/packages/api/src/types/carts.d.ts +3 -3
- package/packages/api/src/types/categories.d.ts +1 -1
- package/packages/api/src/types/collections.d.ts +1 -1
- package/packages/api/src/types/customers.d.ts +2 -2
- package/packages/api/src/types/grids.d.ts +1 -1
- package/packages/api/src/types/orders.d.ts +5 -5
- package/packages/api/src/types/products.d.ts +2 -2
- package/packages/api/src/types/stores.d.ts +1 -1
- package/packages/api/src/types.ts +56 -17
- package/packages/api/tests/index.test.ts +16 -0
- package/packages/apps/discounts/package.json +1 -1
- package/packages/cli/create-auth.js +5 -0
- package/packages/cli/lib/create-auth.js +48 -0
- package/packages/cli/lib/index.js +42 -2
- package/packages/cli/lib/login.js +41 -0
- package/packages/cli/package.json +7 -1
- package/packages/cli/src/create-auth.ts +53 -0
- package/packages/cli/src/index.ts +55 -2
- package/packages/cli/src/login.ts +48 -0
- package/packages/firebase/lib/index.js +17 -2
- package/packages/firebase/lib/index.js.map +1 -1
- package/packages/firebase/lib/methods/check-store-events.js +18 -0
- package/packages/firebase/lib/methods/check-store-events.js.map +1 -0
- package/packages/firebase/lib/types.js +3 -0
- package/packages/firebase/lib/types.js.map +1 -0
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/index.ts +23 -3
- package/packages/firebase/src/methods/check-store-events.ts +18 -0
- package/packages/firebase/src/types.ts +12 -0
- package/packages/storefront/package.json +2 -2
- package/pnpm-lock.yaml +283 -549
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.30](https://github.com/ecomplus/cloud-commerce/compare/v0.0.29...v0.0.30) (2022-07-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **firebase:** Start listing stor eevents (orders, carts, products) with new cron function ([2eb0616](https://github.com/ecomplus/cloud-commerce/commit/2eb06168b03e7cd751c58001cf36c8253da040d7))
|
|
11
|
+
* GH Action setup functions .env with repo secrets ([98bf2a2](https://github.com/ecomplus/cloud-commerce/commit/98bf2a2ba25edd45da32555fa6e18fab3b459be8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **cli:** Do not change `config.json with `--no-commit` option ([f94ca57](https://github.com/ecomplus/cloud-commerce/commit/f94ca5740d16412a0c07537d512632f5d12a5904))
|
|
17
|
+
|
|
18
|
+
### [0.0.29](https://github.com/ecomplus/cloud-commerce/compare/v0.0.28...v0.0.29) (2022-07-17)
|
|
19
|
+
|
|
20
|
+
### [0.0.28](https://github.com/ecomplus/cloud-commerce/compare/v0.0.27...v0.0.28) (2022-07-17)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **api:** Handle authentication for mutation requests ([03e1dea](https://github.com/ecomplus/cloud-commerce/commit/03e1dea512956bea74df5325c0e80e26492e00a6))
|
|
26
|
+
* **api:** Match resource on list endpoint with optional query string ([11d0e8d](https://github.com/ecomplus/cloud-commerce/commit/11d0e8d71371897c88dedb24b64a693d4089df06))
|
|
27
|
+
* **api:** Properly handle post, put and patch with body ([49adf9a](https://github.com/ecomplus/cloud-commerce/commit/49adf9a01bef2098296091b6ff6b3f59ffec139f))
|
|
28
|
+
* **cli:** Handle setup command to login to E-Com Plus and create base Cloud Commerce authentication ([636eedb](https://github.com/ecomplus/cloud-commerce/commit/636eedb92fd74015e065677b9ea68a15a8398ed5))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **api:** Add 'authentications' resource to types ([8be86f2](https://github.com/ecomplus/cloud-commerce/commit/8be86f231d559777e1cf97cda945ec9fa55bc68f))
|
|
34
|
+
* **api:** Do not reassign original `config.headers` object ([f26e2aa](https://github.com/ecomplus/cloud-commerce/commit/f26e2aa008d3a947190ade6f599876f371512306))
|
|
35
|
+
* **api:** Fix login response typedef ([3348558](https://github.com/ecomplus/cloud-commerce/commit/334855861bf8b6b55dc5d9b6e44d0cc230aca3d3))
|
|
36
|
+
* **api:** Fix typedefs for authenticate and subresource (nested) endpoints ([675d6fd](https://github.com/ecomplus/cloud-commerce/commit/675d6fdc90f5d182c4e170f7d8f6fbc43afecda8))
|
|
37
|
+
* **api:** Fix typedefs for authentications list and read ([84abfc3](https://github.com/ecomplus/cloud-commerce/commit/84abfc31069dc4dcaedf59941a75321964844715))
|
|
38
|
+
* **api:** Improve resources types Object IDs ([05e3c98](https://github.com/ecomplus/cloud-commerce/commit/05e3c987a77a0a3efc729d676feb60ba0541cb34))
|
|
39
|
+
* **api:** Skip setting Store ID and lang on auth endpoints ([6f3be2a](https://github.com/ecomplus/cloud-commerce/commit/6f3be2a6ffb49c608030715545f12b5b3ed93de4))
|
|
40
|
+
|
|
5
41
|
### [0.0.27](https://github.com/ecomplus/cloud-commerce/compare/v0.0.26...v0.0.27) (2022-07-13)
|
|
6
42
|
|
|
7
43
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -11,6 +11,8 @@ npm i -g pnpm firebase-tools
|
|
|
11
11
|
Clone this repo to your local machine and install the dependencies:
|
|
12
12
|
|
|
13
13
|
```console
|
|
14
|
+
git clone --recurse-submodules git@github.com:ecomplus/cloud-commerce.git
|
|
15
|
+
cd cloud-commerce
|
|
14
16
|
pnpm install
|
|
15
17
|
```
|
|
16
18
|
|
|
@@ -42,3 +44,20 @@ If you want to deploy to a new Firebase project (needed for larger changes):
|
|
|
42
44
|
4. Go to `/store` folder and edit `.firebaserc` setting your project ID (don't commit this file);
|
|
43
45
|
|
|
44
46
|
5. Deploy with `firebase login && npm run deploy`;
|
|
47
|
+
|
|
48
|
+
## Development
|
|
49
|
+
|
|
50
|
+
To emulate Firebase and serve all starter Store services locally, run the following commands on the monorepo root:
|
|
51
|
+
|
|
52
|
+
```console
|
|
53
|
+
pnpm run setup
|
|
54
|
+
pnpm serve
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`run setup` is only needed for the first time, it'll get your store credentials and put them in `functions/.env`.
|
|
58
|
+
|
|
59
|
+
To run tests for all packages:
|
|
60
|
+
|
|
61
|
+
```console
|
|
62
|
+
pnpm test
|
|
63
|
+
```
|
package/action.yml
CHANGED
|
@@ -38,10 +38,17 @@ runs:
|
|
|
38
38
|
shell: bash
|
|
39
39
|
env:
|
|
40
40
|
FIREBASE_SERVICE_ACCOUNT: ${{ inputs.firebase-service-account }}
|
|
41
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
42
|
+
ECOM_AUTHENTICATION_ID: ${{ secrets.ECOM_AUTHENTICATION_ID }}
|
|
43
|
+
ECOM_API_KEY: ${{ secrets.ECOM_API_KEY }}
|
|
41
44
|
run: |
|
|
42
|
-
export GAC_FILENAME=".gac-$RANDOM.json"
|
|
43
|
-
echo $FIREBASE_SERVICE_ACCOUNT > $GAC_FILENAME
|
|
44
|
-
|
|
45
|
+
export GAC_FILENAME=".gac-$RANDOM.json"
|
|
46
|
+
echo $FIREBASE_SERVICE_ACCOUNT > $GAC_FILENAME
|
|
47
|
+
printf "ECOM_AUTHENTICATION_ID=$ECOM_AUTHENTICATION_ID
|
|
48
|
+
ECOM_API_KEY=$ECOM_API_KEY
|
|
49
|
+
GITHUB_TOKEN=$GITHUB_TOKEN
|
|
50
|
+
" > functions/.env
|
|
51
|
+
GOOGLE_APPLICATION_CREDENTIALS=$GAC_FILENAME npm run deploy
|
|
45
52
|
|
|
46
53
|
- if: github.event_name == 'pull_request'
|
|
47
54
|
name: Deploy Firebase Hosting PR preview
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.30",
|
|
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,21 +19,21 @@
|
|
|
19
19
|
"@commitlint/cli": "^17.0.3",
|
|
20
20
|
"@commitlint/config-conventional": "^17.0.3",
|
|
21
21
|
"@commitlint/rules": "^17.0.0",
|
|
22
|
-
"@types/node": "^18.0.
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "^5.30.
|
|
24
|
-
"@typescript-eslint/parser": "^5.30.
|
|
22
|
+
"@types/node": "^18.0.5",
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
|
24
|
+
"@typescript-eslint/parser": "^5.30.7",
|
|
25
25
|
"esbuild": "^0.14.49",
|
|
26
|
-
"eslint": "^8.
|
|
26
|
+
"eslint": "^8.20.0",
|
|
27
27
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
28
28
|
"eslint-plugin-import": "^2.26.0",
|
|
29
29
|
"eslint-plugin-vue": "^9.2.0",
|
|
30
30
|
"husky": "^8.0.1",
|
|
31
|
-
"node-fetch": "^3.2.
|
|
31
|
+
"node-fetch": "^3.2.9",
|
|
32
32
|
"standard-version": "^9.5.0",
|
|
33
33
|
"turbo": "^1.3.1",
|
|
34
34
|
"typescript": "^4.7.4",
|
|
35
35
|
"vite": "^2.9.14",
|
|
36
|
-
"vitest": "^0.18.
|
|
36
|
+
"vitest": "^0.18.1",
|
|
37
37
|
"zx": "^7.0.7"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"store:run": "pnpm build && npm --prefix \"store\" run",
|
|
46
46
|
"start": "pnpm store:run start",
|
|
47
47
|
"serve": "pnpm store:run serve",
|
|
48
|
-
"deploy": "pnpm store:run deploy"
|
|
48
|
+
"deploy": "pnpm store:run deploy",
|
|
49
|
+
"setup": "pnpm store:run setup:quiet"
|
|
49
50
|
}
|
|
50
51
|
}
|