Skip to content

Commit a2ffc6b

Browse files
committed
Merge pull request #241 from CrystallizeAPI/feat-js-api-client-v5
feat(v5): big revamp and cleaning
2 parents d6e506a + f7ad363 commit a2ffc6b

377 files changed

Lines changed: 12238 additions & 18773 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/CODE_OF_CONDUCT.md‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,24 @@ diverse, inclusive, and healthy community.
2121
Examples of behavior that contributes to a positive environment for our
2222
community include:
2323

24-
- Demonstrating empathy and kindness toward other people
25-
- Being respectful of differing opinions, viewpoints, and experiences
26-
- Giving and gracefully accepting constructive feedback
27-
- Accepting responsibility and apologizing to those affected by our mistakes,
28-
and learning from the experience
29-
- Focusing on what is best not just for us as individuals, but for the overall
30-
community
24+
- Demonstrating empathy and kindness toward other people
25+
- Being respectful of differing opinions, viewpoints, and experiences
26+
- Giving and gracefully accepting constructive feedback
27+
- Accepting responsibility and apologizing to those affected by our mistakes,
28+
and learning from the experience
29+
- Focusing on what is best not just for us as individuals, but for the overall
30+
community
3131

3232
Examples of unacceptable behavior include:
3333

34-
- The use of sexualized language or imagery, and sexual attention or advances of
35-
any kind
36-
- Trolling, insulting or derogatory comments, and personal or political attacks
37-
- Public or private harassment
38-
- Publishing others' private information, such as a physical or email address,
39-
without their explicit permission
40-
- Other conduct which could reasonably be considered inappropriate in a
41-
professional setting
34+
- The use of sexualized language or imagery, and sexual attention or advances of
35+
any kind
36+
- Trolling, insulting or derogatory comments, and personal or political attacks
37+
- Public or private harassment
38+
- Publishing others' private information, such as a physical or email address,
39+
without their explicit permission
40+
- Other conduct which could reasonably be considered inappropriate in a
41+
professional setting
4242

4343
## Enforcement Responsibilities
4444

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy Docs
2+
3+
on:
4+
workflow_run:
5+
workflows: ['CI']
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
jobs:
15+
build:
16+
name: 🦾 Build the doc artefact
17+
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: ⬇️ Checkout repo
21+
uses: actions/checkout@v5
22+
23+
- name: 📦 Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
package-manager-cache: false
28+
29+
- name: 📦 Setup pnpm
30+
uses: pnpm/action-setup@v4
31+
32+
- name: 📥 Download deps
33+
run: pnpm install && pnpm run build
34+
35+
- name: 🏄 Install, build, and upload
36+
uses: withastro/action@v4
37+
with:
38+
path: apps/demo
39+
node-version: 22
40+
package-manager: pnpm@latest
41+
deploy:
42+
name: 🚀 Deploy to GitHub Pages
43+
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main'
44+
needs: build
45+
runs-on: ubuntu-latest
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
steps:
50+
- name: 🚢 Ship it
51+
id: deployment
52+
uses: actions/deploy-pages@v4

‎.github/workflows/gh-pages.yaml‎

Lines changed: 0 additions & 50 deletions
This file was deleted.

‎.github/workflows/main-ci.yaml‎

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,64 @@ on:
66
pull_request:
77
types: [opened, synchronize, reopened]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
lint:
1115
name: 💄 Prettier
1216
runs-on: ubuntu-latest
1317
steps:
1418
- name: ⬇️ Checkout repo
15-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
1620

17-
- uses: actionsx/prettier@v3
21+
- name: ⎔ Setup node
22+
uses: actions/setup-node@v5
1823
with:
19-
args: --check .
24+
node-version: 22
25+
package-manager-cache: false
26+
27+
- name: ⎔ Set up pnpm
28+
uses: pnpm/action-setup@v4
29+
30+
- name: 📥 Download deps
31+
run: pnpm install
2032

33+
- name: 💄 Prettier
34+
run: pnpm run prettier:check
2135
test:
2236
name: 🧪 Tests
2337
runs-on: ubuntu-latest
2438
needs: [lint]
2539
strategy:
2640
matrix:
27-
node: [18, 20]
28-
env:
29-
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
30-
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
41+
node: [22, 24]
3142
steps:
32-
- name: 🛑 Cancel Previous Runs
33-
uses: styfle/cancel-workflow-action@0.12.1
34-
3543
- name: ⬇️ Checkout repo
36-
uses: actions/checkout@v4
44+
uses: actions/checkout@v5
3745

3846
- name: ⎔ Setup node
39-
uses: actions/setup-node@v4
47+
uses: actions/setup-node@v5
4048
with:
4149
node-version: ${{ matrix.node }}
50+
package-manager-cache: false
4251

4352
- name: ⎔ Set up pnpm
4453
uses: pnpm/action-setup@v4
45-
with:
46-
version: 9.12.3
4754

4855
- name: 📥 Download deps
4956
run: |
5057
echo ::group::..:: Mono Repo Tests ::..
51-
pnpm install
58+
pnpm install && pnpm run build
5259
echo ::endgroup::
5360
5461
- name: 🏄 Run the tests
62+
env:
63+
CRYSTALLIZE_TENANT_ID: 6890ca9cd065ed6bcafdf9e5
64+
CRYSTALLIZE_TENANT_IDENTIFIER: js-api-client-integration-tests
65+
CRYSTALLIZE_ACCESS_TOKEN_ID: ${{ secrets.CRYSTALLIZE_ACCESS_TOKEN_ID }}
66+
CRYSTALLIZE_ACCESS_TOKEN_SECRET: ${{ secrets.CRYSTALLIZE_ACCESS_TOKEN_SECRET }}
5567
run: |
5668
echo ::group::..:: Mono Repo Tests ::..
5769
pnpm run test
@@ -62,21 +74,17 @@ jobs:
6274
runs-on: ubuntu-latest
6375
needs: [lint, test]
6476
steps:
65-
- name: 🛑 Cancel Previous Runs
66-
uses: styfle/cancel-workflow-action@0.12.1
67-
6877
- name: ⬇️ Checkout repo
69-
uses: actions/checkout@v4
78+
uses: actions/checkout@v5
7079

7180
- name: ⎔ Setup node
72-
uses: actions/setup-node@v4
81+
uses: actions/setup-node@v5
7382
with:
74-
node-version: 20
83+
node-version: 22
84+
package-manager-cache: false
7585

7686
- name: ⎔ Set up pnpm
7787
uses: pnpm/action-setup@v4
78-
with:
79-
version: 9.12.3
8088

8189
- name: 📥 Download deps
8290
run: pnpm install && pnpm run build

‎.prettierignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
dist
33
build
4+
.astro

‎.vscode/settings.json‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
"**/build": true,
1616
"**/dist": true,
1717
"**/.turbo": true,
18+
"**/.astro": true,
1819
"**/.cache": true
1920
},
20-
"files.associations": {},
21+
"files.associations": {
22+
"**/*/*.css": "tailwindcss"
23+
},
2124
"todo-tree.general.tags": ["@todo:", "@fixme:", "@bug:"],
2225
"todo-tree.general.statusBar": "top three",
2326
"todo-tree.tree.groupedByTag": true,
@@ -42,5 +45,25 @@
4245
"group": "Default"
4346
}
4447
],
45-
"favorites.sortOrder": "ASC"
48+
"favorites.sortOrder": "ASC",
49+
"peacock.color": "#004c4d",
50+
"workbench.colorCustomizations": {
51+
"activityBar.activeBackground": "#007e80",
52+
"activityBar.background": "#007e80",
53+
"activityBar.foreground": "#e7e7e7",
54+
"activityBar.inactiveForeground": "#e7e7e799",
55+
"activityBarBadge.background": "#ff80fd",
56+
"activityBarBadge.foreground": "#15202b",
57+
"commandCenter.border": "#e7e7e799",
58+
"sash.hoverBorder": "#007e80",
59+
"statusBar.background": "#004c4d",
60+
"statusBar.foreground": "#e7e7e7",
61+
"statusBarItem.hoverBackground": "#007e80",
62+
"statusBarItem.remoteBackground": "#004c4d",
63+
"statusBarItem.remoteForeground": "#e7e7e7",
64+
"titleBar.activeBackground": "#004c4d",
65+
"titleBar.activeForeground": "#e7e7e7",
66+
"titleBar.inactiveBackground": "#004c4d99",
67+
"titleBar.inactiveForeground": "#e7e7e799"
68+
}
4669
}

‎LICENSE‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2022 Crystallize, https://crystallize.com
3+
Copyright (c) 2025 Crystallize, https://crystallize.com
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ clean: ## Clean non-essential files
3131

3232
.PHONY: codeclean
3333
codeclean: ## Code Clean
34-
@pnpm prettier --write .
34+
@pnpm run prettier:fix
3535

3636
.PHONY: tests
3737
tests: ## Run the tests
@@ -62,4 +62,4 @@ add-component-compliance-files: ## Add the compliance files into all the compone
6262
.PHONY: start-demo-app
6363
start-demo-app: ## Start Demo App
6464
@echo " ..:: Starting Demo App ::.."
65-
@pnpm run demo
65+
@cd apps/demo && pnpm run dev

‎README.md‎

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,26 @@ In order to simplify their maintenance they are all in this Git Repository.
66

77
All contributions will happen here:
88

9-
- PRs and Issues are therefore open, discuss, contribute in one place
10-
- Many things will be shared accross the `components`: Coding Standards, CI & Automations, Tests, etc.
9+
- PRs and Issues are therefore open, discuss, contribute in one place
10+
- Many things will be shared accross the `components`: Coding Standards, CI & Automations, Tests, etc.
1111

12-
✅ Nevertheless, all the `compoenents` (here library) will continue to be independant and pushed in their own repository. (through magic mechanisms that we have internally)
12+
✅ Nevertheless, all the `components` (here library) will continue to be independant and pushed in their own repository. (through magic mechanisms that we have internally)
1313

1414
## Managed Repositories
1515

16-
| Libraries | Licence | Version |
17-
| -------------------------------------------------------------------------------------------------------- | ------- | -------------------------------------------- |
18-
| [Import Export SDK](https://github.com/CrystallizeAPI/import-export-sdk) | ![mit] | ![import-export-sdk] |
19-
| [JS Api Client](https://github.com/CrystallizeAPI/js-api-client) | ![mit] | ![js-api-client-version] |
20-
| [React JS Hooks](https://github.com/CrystallizeAPI/reactjs-hooks) | ![mit] | ![reactjs-hooks-version] |
21-
| [React JS Components](https://github.com/CrystallizeAPI/reactjs-components) | ![mit] | ![reactjs-components-version] |
22-
| [Node Service Api Router](https://github.com/CrystallizeAPI/node-service-api-router) | ![mit] | ![node-service-api-router-version] |
23-
| [Node Service Api Request Handlers](https://github.com/CrystallizeAPI/node-service-api-request-handlers) | ![mit] | ![node-service-api-request-handlers-version] |
24-
| [Schema](https://github.com/CrystallizeAPI/schema) | ![mit] | ![schema] |
16+
| Libraries | Licence | Version |
17+
| --------------------------------------------------------------------------- | ------- | ----------------------------- |
18+
| [JS Api Client](https://github.com/CrystallizeAPI/js-api-client) | ![mit] | ![js-api-client-version] |
19+
| [React JS Components](https://github.com/CrystallizeAPI/reactjs-components) | ![mit] | ![reactjs-components-version] |
20+
| [Schema](https://github.com/CrystallizeAPI/schema) | ![mit] | ![schema] |
2521

2622
## Contributions
2723

2824
### Conventions
2925

30-
- Pull Requests and Issues should start with `[$COMPONENT_NAME]`
31-
- CI will fail if Coding Standars are not OK
32-
- CI will fail if Tests are not OK
26+
- Pull Requests and Issues should start with `[$COMPONENT_NAME]`
27+
- CI will fail if Coding Standars are not OK
28+
- CI will fail if Tests are not OK
3329

3430
### Coding Standards
3531

@@ -72,10 +68,6 @@ make add-component COMPONENT=my-new-component
7268
> If not already done, you still need create the Github sub-repository and add an entry in `components/manifest.json`
7369
7470
[mit]: https://img.shields.io/badge/license-MIT-green?style=flat-square&labelColor=black
75-
[import-export-sdk]: https://img.shields.io/npm/v/@crystallize/import-export-sdk?label=version&style=flat-square
7671
[js-api-client-version]: https://img.shields.io/npm/v/@crystallize/js-api-client?label=version&style=flat-square
77-
[reactjs-hooks-version]: https://img.shields.io/npm/v/@crystallize/reactjs-hooks?label=version&style=flat-square
7872
[reactjs-components-version]: https://img.shields.io/npm/v/@crystallize/reactjs-components?label=version&style=flat-square
79-
[node-service-api-router-version]: https://img.shields.io/npm/v/@crystallize/node-service-api-router?label=version&style=flat-square
80-
[node-service-api-request-handlers-version]: https://img.shields.io/npm/v/@crystallize/node-service-api-request-handlers?label=version&style=flat-square
8173
[schema]: https://img.shields.io/npm/v/@crystallize/schema?label=version&style=flat-square

‎apps/demo/.eslintrc.cjs‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)