cloudcommerce 0.0.14 → 0.0.18

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/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
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.18](https://github.com/ecomplus/cloud-commerce/compare/v0.0.17...v0.0.18) (2022-06-29)
6
+
7
+ ### [0.0.17](https://github.com/ecomplus/cloud-commerce/compare/v0.0.16...v0.0.17) (2022-06-29)
8
+
9
+ ### [0.0.16](https://github.com/ecomplus/cloud-commerce/compare/v0.0.14...v0.0.16) (2022-06-29)
10
+
11
+
12
+ ### Features
13
+
14
+ * **cli:** Setup pkg bin and run basic commands with `firebase-tools` ([5904747](https://github.com/ecomplus/cloud-commerce/commit/5904747b2fe13629f15a9bb9f1f2d581e2d8d972))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **firebase:** Move Firebase functions deps to `@cloudcommerce/firebase` ([a13ad01](https://github.com/ecomplus/cloud-commerce/commit/a13ad0147500092fd618d8b8294fa0140f9b0976))
20
+
21
+ ### [0.0.15](https://github.com/ecomplus/cloud-commerce/compare/v0.0.14...v0.0.15) (2022-06-29)
22
+
23
+
24
+ ### Features
25
+
26
+ * **cli:** Setup pkg bin and run basic commands with `firebase-tools` ([5904747](https://github.com/ecomplus/cloud-commerce/commit/5904747b2fe13629f15a9bb9f1f2d581e2d8d972))
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * **firebase:** Move Firebase functions deps to `@cloudcommerce/firebase` ([a13ad01](https://github.com/ecomplus/cloud-commerce/commit/a13ad0147500092fd618d8b8294fa0140f9b0976))
32
+
5
33
  ### [0.0.14](https://github.com/ecomplus/cloud-commerce/compare/v0.0.13...v0.0.14) (2022-06-24)
6
34
 
7
35
 
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,9 +1,9 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "0.0.14",
4
+ "version": "0.0.18",
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": {
@@ -12,17 +12,16 @@
12
12
  },
13
13
  "standard-version": {
14
14
  "scripts": {
15
- "precommit": "zx scripts/release.mjs && git add **/package.json",
16
- "posttag": "git push --follow-tags origin main && pnpm publish -r --access public --no-git-checks"
15
+ "precommit": "bash scripts/on-version.sh"
17
16
  }
18
17
  },
19
18
  "devDependencies": {
20
- "@commitlint/cli": "^17.0.2",
21
- "@commitlint/config-conventional": "^17.0.2",
19
+ "@commitlint/cli": "^17.0.3",
20
+ "@commitlint/config-conventional": "^17.0.3",
22
21
  "@commitlint/rules": "^17.0.0",
23
22
  "@types/node": "^17.0.45",
24
- "@typescript-eslint/eslint-plugin": "^5.29.0",
25
- "@typescript-eslint/parser": "^5.29.0",
23
+ "@typescript-eslint/eslint-plugin": "^5.30.0",
24
+ "@typescript-eslint/parser": "^5.30.0",
26
25
  "esbuild": "^0.14.47",
27
26
  "eslint": "^8.18.0",
28
27
  "eslint-config-airbnb-base": "^15.0.0",
@@ -33,14 +32,15 @@
33
32
  "standard-version": "^9.5.0",
34
33
  "turbo": "^1.3.1",
35
34
  "typescript": "^4.7.4",
36
- "vite": "^2.9.12",
35
+ "vite": "^2.9.13",
37
36
  "vitest": "^0.15.2",
38
- "zx": "^7.0.2"
37
+ "zx": "^7.0.3"
39
38
  },
40
39
  "scripts": {
41
40
  "postinstall": "husky install",
41
+ "new-pkg": "bash scripts/new-package.sh",
42
42
  "build": "turbo run build",
43
43
  "test": "turbo run test",
44
- "release": "pnpm build && pnpm test && standard-version --commit-all"
44
+ "release": "bash scripts/version-and-release.sh"
45
45
  }
46
46
  }
@@ -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.14",
4
+ "version": "0.0.18",
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.14",
4
+ "version": "0.0.18",
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.18",
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.14",
4
+ "version": "0.0.18",
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.14",
4
+ "version": "0.0.18",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "main": "src/index.js",
7
7
  "repository": {