cloudcommerce 0.0.13 → 0.0.17

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.
@@ -6,7 +6,7 @@ on:
6
6
  - "v*"
7
7
 
8
8
  jobs:
9
- build:
9
+ release:
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
12
  - uses: actions/checkout@v3
package/.husky/commit-msg CHANGED
File without changes
package/CHANGELOG.md CHANGED
@@ -2,6 +2,39 @@
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.17](https://github.com/ecomplus/cloud-commerce/compare/v0.0.16...v0.0.17) (2022-06-29)
6
+
7
+ ### [0.0.16](https://github.com/ecomplus/cloud-commerce/compare/v0.0.14...v0.0.16) (2022-06-29)
8
+
9
+
10
+ ### Features
11
+
12
+ * **cli:** Setup pkg bin and run basic commands with `firebase-tools` ([5904747](https://github.com/ecomplus/cloud-commerce/commit/5904747b2fe13629f15a9bb9f1f2d581e2d8d972))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **firebase:** Move Firebase functions deps to `@cloudcommerce/firebase` ([a13ad01](https://github.com/ecomplus/cloud-commerce/commit/a13ad0147500092fd618d8b8294fa0140f9b0976))
18
+
19
+ ### [0.0.15](https://github.com/ecomplus/cloud-commerce/compare/v0.0.14...v0.0.15) (2022-06-29)
20
+
21
+
22
+ ### Features
23
+
24
+ * **cli:** Setup pkg bin and run basic commands with `firebase-tools` ([5904747](https://github.com/ecomplus/cloud-commerce/commit/5904747b2fe13629f15a9bb9f1f2d581e2d8d972))
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * **firebase:** Move Firebase functions deps to `@cloudcommerce/firebase` ([a13ad01](https://github.com/ecomplus/cloud-commerce/commit/a13ad0147500092fd618d8b8294fa0140f9b0976))
30
+
31
+ ### [0.0.14](https://github.com/ecomplus/cloud-commerce/compare/v0.0.13...v0.0.14) (2022-06-24)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * **pkgs:** Release with `pnpm` to fix workspace dependencies versions ([b005ab7](https://github.com/ecomplus/cloud-commerce/commit/b005ab7f7a9a2142d0ec0418b9549331372b82d9))
37
+
5
38
  ### [0.0.13](https://github.com/ecomplus/cloud-commerce/compare/v0.0.12...v0.0.13) (2022-06-24)
6
39
 
7
40
  ### [0.0.12](https://github.com/ecomplus/cloud-commerce/compare/v0.0.11...v0.0.12) (2022-06-24)
package/action.yml ADDED
@@ -0,0 +1,49 @@
1
+ name: 'Deploy Cloud Commerce to Firebase'
2
+ description: 'A GitHub Action to deploy https://github.com/ecomplus/cloud-commerce store to Firebase'
3
+
4
+ inputs:
5
+ github-token:
6
+ description: 'The `GITHUB_TOKEN` secret'
7
+ required: true
8
+ firebase-service-account:
9
+ description: 'Firebase service account JSON'
10
+ required: true
11
+
12
+ outputs: {}
13
+
14
+ runs:
15
+ using: "composite"
16
+ steps:
17
+ - name: Get current branch
18
+ id: get-branch
19
+ env:
20
+ GITHUB_REF: ${{ github.ref }}
21
+ run: echo "::set-output name=name::${GITHUB_REF#refs/heads/}"
22
+
23
+ - if: steps.get-branch.outputs.name == main
24
+ uses: actions/setup-node@v3
25
+ with:
26
+ node-version: 16
27
+ cache: 'npm'
28
+ # cache-dependency-path: ${{ github.action_path }}/scripts/store/package-lock.json
29
+
30
+ - if: steps.get-branch.outputs.name == main
31
+ shell: bash
32
+ run: npm i -g firebase-tools
33
+
34
+ - if: steps.get-branch.outputs.name == main
35
+ name: Deploy to Firebase live
36
+ shell: bash
37
+ env:
38
+ FIREBASE_SERVICE_ACCOUNT: ${{ inputs.firebase-service-account }}
39
+ run: |
40
+ export GAC_FILENAME=".gac-$RANDOM.json";
41
+ echo $FIREBASE_SERVICE_ACCOUNT > $GAC_FILENAME;
42
+ GOOGLE_APPLICATION_CREDENTIALS=$GAC_FILENAME npx firebase deploy;
43
+
44
+ - if: steps.get-branch.outputs.name != main
45
+ name: Deploy Firebase Hosting PR preview
46
+ uses: FirebaseExtended/action-hosting-deploy@v0
47
+ with:
48
+ repoToken: ${{ inputs.github-token }}
49
+ firebaseServiceAccount: ${{ inputs.firebase-service-account }}
package/package.json CHANGED
@@ -1,34 +1,28 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "0.0.13",
4
+ "version": "0.0.17",
5
5
  "description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
6
- "main": "store/functions/index.js",
6
+ "main": "packages/api/lib/index.js",
7
7
  "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
8
8
  "license": "Apache 2.0 with Commons Clause",
9
9
  "engines": {
10
10
  "node": ">=16",
11
11
  "pnpm": ">=7"
12
12
  },
13
- "scripts": {
14
- "postinstall": "husky install",
15
- "build": "turbo run build",
16
- "test": "turbo run test",
17
- "release": "pnpm build && pnpm test && standard-version --commit-all",
18
- "postpublish": "zx scripts/release.mjs --publish"
19
- },
20
13
  "standard-version": {
21
14
  "scripts": {
22
- "precommit": "zx scripts/release.mjs && git add **/package.json"
15
+ "precommit": "zx scripts/release.mjs && sleep 1 && git add packages/**/package.json",
16
+ "posttag": "zx scripts/release.mjs --publish"
23
17
  }
24
18
  },
25
19
  "devDependencies": {
26
- "@commitlint/cli": "^17.0.2",
27
- "@commitlint/config-conventional": "^17.0.2",
20
+ "@commitlint/cli": "^17.0.3",
21
+ "@commitlint/config-conventional": "^17.0.3",
28
22
  "@commitlint/rules": "^17.0.0",
29
23
  "@types/node": "^17.0.45",
30
- "@typescript-eslint/eslint-plugin": "^5.29.0",
31
- "@typescript-eslint/parser": "^5.29.0",
24
+ "@typescript-eslint/eslint-plugin": "^5.30.0",
25
+ "@typescript-eslint/parser": "^5.30.0",
32
26
  "esbuild": "^0.14.47",
33
27
  "eslint": "^8.18.0",
34
28
  "eslint-config-airbnb-base": "^15.0.0",
@@ -39,8 +33,15 @@
39
33
  "standard-version": "^9.5.0",
40
34
  "turbo": "^1.3.1",
41
35
  "typescript": "^4.7.4",
42
- "vite": "^2.9.12",
36
+ "vite": "^2.9.13",
43
37
  "vitest": "^0.15.2",
44
- "zx": "^7.0.2"
38
+ "zx": "^7.0.3"
39
+ },
40
+ "scripts": {
41
+ "postinstall": "husky install",
42
+ "new-pkg": "bash scripts/new-package.sh",
43
+ "build": "turbo run build",
44
+ "test": "turbo run test",
45
+ "release": "pnpm build && pnpm test && standard-version --commit-all"
45
46
  }
46
- }
47
+ }
@@ -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/__skeleton`
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@cloudcommerce/__skeleton",
3
+ "type": "module",
4
+ "version": "0.0.0",
5
+ "description": "E-Com Plus Cloud Commerce",
6
+ "main": "src/index.js",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/ecomplus/cloud-commerce.git",
10
+ "directory": "packages/__skeleton"
11
+ },
12
+ "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
13
+ "license": "Apache 2.0 with Commons Clause",
14
+ "bugs": {
15
+ "url": "https://github.com/ecomplus/cloud-commerce/issues"
16
+ },
17
+ "homepage": "https://github.com/ecomplus/cloud-commerce/tree/main/packages/__skeleton#readme",
18
+ "scripts": {
19
+ "build": "echo '@ecomplus/__skeleton'"
20
+ },
21
+ "dependencies": {
22
+ "@cloudcommerce/api": "workspace:*"
23
+ }
24
+ }
File without changes
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/api",
3
3
  "type": "module",
4
- "version": "0.0.13",
4
+ "version": "0.0.17",
5
5
  "description": "E-Com Plus Cloud Commerce APIs client/adapter",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-discounts",
3
3
  "type": "module",
4
- "version": "0.0.13",
4
+ "version": "0.0.17",
5
5
  "description": "E-Com Plus Cloud Commerce app for complex discount rules",
6
6
  "main": "functions/dist/index.js",
7
7
  "repository": {
@@ -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/cli`
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import { $, argv } from 'zx';
3
+
4
+ (async () => {
5
+ const options = Object.keys(argv).reduce((opts, key) => {
6
+ if (key !== '_') {
7
+ // eslint-disable-next-line no-param-reassign
8
+ opts += `--${key} ${argv[key]}\n`;
9
+ }
10
+ return opts;
11
+ }, '');
12
+ const $firebase = async (cmd) => $`npx firebase-tools ${cmd} ${options}`;
13
+ if (argv._.includes('serve')) {
14
+ return $firebase('emulators:start');
15
+ }
16
+ if (argv._.find((cmd) => /^(\w+:)?(shell|start)$/.test(cmd))) {
17
+ return $firebase('functions:shell');
18
+ }
19
+ if (argv._.find((cmd) => /^(\w+:)?logs?$/.test(cmd))) {
20
+ return $firebase('functions:log');
21
+ }
22
+ if (argv._.includes('deploy')) {
23
+ return $firebase('deploy');
24
+ }
25
+ return $`echo 'Hello from @cloudcommerce/cli'`;
26
+ })();
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@cloudcommerce/cli",
3
+ "type": "module",
4
+ "version": "0.0.17",
5
+ "description": "E-Com Plus Cloud Commerce CLI tools",
6
+ "bin": {
7
+ "cloudcommerce": "./bin/run.mjs"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/ecomplus/cloud-commerce.git",
12
+ "directory": "packages/cli"
13
+ },
14
+ "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
15
+ "license": "Apache 2.0 with Commons Clause",
16
+ "bugs": {
17
+ "url": "https://github.com/ecomplus/cloud-commerce/issues"
18
+ },
19
+ "homepage": "https://github.com/ecomplus/cloud-commerce/tree/main/packages/cli#readme",
20
+ "dependencies": {
21
+ "zx": "^7.0.3"
22
+ }
23
+ }
File without changes
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/firebase",
3
3
  "type": "module",
4
- "version": "0.0.13",
4
+ "version": "0.0.17",
5
5
  "description": "E-Com Plus Cloud Commerce on Firebase",
6
6
  "main": "src/index.js",
7
7
  "repository": {
@@ -19,6 +19,11 @@
19
19
  "build": "echo '@ecomplus/firebase'"
20
20
  },
21
21
  "dependencies": {
22
- "@cloudcommerce/api": "workspace:*"
22
+ "@cloudcommerce/api": "workspace:*",
23
+ "firebase-admin": "^10.3.0",
24
+ "firebase-functions": "^3.21.2"
25
+ },
26
+ "devDependencies": {
27
+ "@firebase/app-types": "^0.7.0"
23
28
  }
24
29
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "0.0.13",
4
+ "version": "0.0.17",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "main": "src/index.js",
7
7
  "repository": {