genlayer 0.0.30 → 0.0.32-beta.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.
@@ -0,0 +1,41 @@
1
+ name: Release & Publish Beta version of the Package to NPM with @beta tag
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - staging
8
+
9
+ jobs:
10
+ release:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Get CI Bot Token
14
+ uses: tibdex/github-app-token@v1
15
+ id: ci_bot_token
16
+ with:
17
+ app_id: ${{ secrets.CI_BOT_APP_ID }}
18
+ private_key: ${{ secrets.CI_BOT_SECRET }}
19
+
20
+ - name: Checkout source code
21
+ uses: actions/checkout@v4
22
+ with:
23
+ token: ${{ steps.ci_bot_token.outputs.token }}
24
+ - name: Setup Node.js
25
+ uses: actions/setup-node@v2
26
+ with:
27
+ node-version: "18"
28
+ - name: Install the dependencies
29
+ run: npm ci
30
+ - name: Initialize Git User
31
+ run: |
32
+ git config --global user.email "github-actions[bot]@genlayer.com"
33
+ git config --global user.name "github-actions[bot]"
34
+ - name: Initialize the NPM configuration
35
+ run: npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
36
+ env:
37
+ NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
38
+ - run: npm run release-beta
39
+ env:
40
+ GITHUB_TOKEN: ${{ steps.ci_bot_token.outputs.token }}
41
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
 
2
2
 
3
+ ## 0.0.32-beta.0 (2024-07-03)
4
+
5
+ ## 0.0.31 (2024-05-27)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * handle Fetch Error (Mac M3) ([#36](https://github.com/yeagerai/genlayer-cli/issues/36)) ([deae77a](https://github.com/yeagerai/genlayer-cli/commit/deae77a7c5a0f00694d2aa94f26d3e3be67e0178))
11
+
3
12
  ## 0.0.30 (2024-05-22)
4
13
 
5
14
  ## 0.0.29 (2024-05-15)
package/README.md CHANGED
@@ -29,10 +29,12 @@ Contributions to the GenLayer CLI are welcome! Please feel free to fork the repo
29
29
  ### Running the CLI from the repository
30
30
 
31
31
  First, install the dependencies and start the build process
32
+
32
33
  ```bash
33
34
  npm install
34
35
  npm run dev
35
36
  ```
37
+
36
38
  This will continuously rebuild the CLI from the source
37
39
 
38
40
  Then in another window execute the CLI commands like so:
@@ -41,6 +43,32 @@ Then in another window execute the CLI commands like so:
41
43
  node dist/index.js init
42
44
  ```
43
45
 
46
+ ## Testing
47
+
48
+ ### Overview
49
+
50
+ The GenLayer CLI uses Jest in combination with ts-jest to handle testing of TypeScript files. The configuration is tailored to support ES Modules (ESM), aligning with the latest JavaScript standards and ensuring compatibility with modern tooling and Node.js features.
51
+
52
+ ### Running Tests
53
+
54
+ To run the tests, use the following command:
55
+
56
+ ```bash
57
+ npm run test
58
+ ```
59
+
60
+ This command sets the appropriate Node.js options to handle ES Modules and watches for changes in the test files, making it suitable for development.
61
+
62
+ ### Test Configuration
63
+
64
+ Our `jest.config.js` is set up as follows:
65
+
66
+ - ES Module Support: Configured to treat .ts files as ES Modules.
67
+ - Test Environment: Uses Node.js as the testing environment.
68
+ - Transformation: Utilizes ts-jest with an ESM preset to process TypeScript files.
69
+
70
+ Tests are located in the tests/ directory and should be named using the following pattern: [filename].test.ts. When writing tests, you can use all Jest functionalities such as describe, test, expect, and Jest mocks for testing asynchronous functions, component interactions, or API calls.
71
+
44
72
  ## License
45
73
 
46
74
  This project is licensed under the ... License - see the [LICENSE](LICENSE) file for details.