stonyx 0.2.2 → 0.2.3-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.
@@ -2,35 +2,15 @@ name: CI
2
2
 
3
3
  on:
4
4
  pull_request:
5
- branches:
6
- - dev
7
- - main
5
+ branches: [dev, main]
8
6
 
9
7
  concurrency:
10
8
  group: ci-${{ github.head_ref || github.ref }}
11
9
  cancel-in-progress: true
12
10
 
11
+ permissions:
12
+ contents: read
13
+
13
14
  jobs:
14
15
  test:
15
- runs-on: ubuntu-latest
16
-
17
- steps:
18
- - name: Checkout code
19
- uses: actions/checkout@v3
20
-
21
- - name: Setup pnpm
22
- uses: pnpm/action-setup@v4
23
- with:
24
- version: 9
25
-
26
- - name: Set up Node.js
27
- uses: actions/setup-node@v3
28
- with:
29
- node-version: 22.18.0
30
- cache: 'pnpm'
31
-
32
- - name: Install dependencies
33
- run: pnpm install --frozen-lockfile
34
-
35
- - name: Run tests
36
- run: pnpm test
16
+ uses: abofs/stonyx-workflows/.github/workflows/ci.yml@main
@@ -0,0 +1,35 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version-type:
7
+ description: 'Version type'
8
+ required: true
9
+ type: choice
10
+ options:
11
+ - patch
12
+ - minor
13
+ - major
14
+ custom-version:
15
+ description: 'Custom version (optional, overrides version-type)'
16
+ required: false
17
+ type: string
18
+ pull_request:
19
+ types: [opened, synchronize, reopened]
20
+ branches: [main, dev]
21
+ push:
22
+ branches: [main]
23
+
24
+ permissions:
25
+ contents: write
26
+ id-token: write
27
+ pull-requests: write
28
+
29
+ jobs:
30
+ publish:
31
+ uses: abofs/stonyx-workflows/.github/workflows/npm-publish.yml@main
32
+ with:
33
+ version-type: ${{ github.event.inputs.version-type }}
34
+ custom-version: ${{ github.event.inputs.custom-version }}
35
+ secrets: inherit
package/README.md CHANGED
@@ -90,6 +90,33 @@ cron.register('exampleJob', async () => console.log('Job executed!'), 5, true);
90
90
 
91
91
  ---
92
92
 
93
+ ### **[@stonyx/events](https://github.com/abofs/stonyx-events)**
94
+
95
+ Lightweight pub/sub event system for application-wide event handling.
96
+
97
+ ```js
98
+ import Events from '@stonyx/events';
99
+
100
+ const events = new Events();
101
+
102
+ // Register available events
103
+ events.setup(['userLogin', 'userLogout', 'dataChange']);
104
+
105
+ // Subscribe to events
106
+ events.subscribe('userLogin', (user) => {
107
+ console.log(`${user.name} logged in`);
108
+ });
109
+
110
+ // Emit events
111
+ events.emit('userLogin', { name: 'Alice' });
112
+ ```
113
+
114
+ * Singleton pattern for shared event bus
115
+ * Async support with error isolation
116
+ * Type-safe event registration
117
+
118
+ ---
119
+
93
120
  ### **[@stonyx/rest-server](https://github.com/abofs/stonyx-rest-server)**
94
121
 
95
122
  Dynamic REST server module with auto-route registration.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stonyx",
3
- "version": "0.2.2",
3
+ "version": "0.2.3-beta.0",
4
4
  "description": "Base stonyx framework module",
5
5
  "main": "main.js",
6
6
  "type": "module",
@@ -14,6 +14,9 @@
14
14
  "type": "git",
15
15
  "url": "git+https://github.com/abofs/stonyx.git"
16
16
  },
17
+ "publishConfig": {
18
+ "provenance": true
19
+ },
17
20
  "author": "Stone Costa",
18
21
  "license": "Apache-2.0",
19
22
  "contributors": [