@stonyx/rest-server 0.2.0 → 0.2.1-alpha.1

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: 24.13.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/package.json CHANGED
@@ -4,8 +4,12 @@
4
4
  "stonyx-async",
5
5
  "stonyx-module"
6
6
  ],
7
- "version": "0.2.0",
7
+ "version": "0.2.1-alpha.1",
8
8
  "description": "Rest Server Module for Stonyx Framework",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/abofs/stonyx-rest-server"
12
+ },
9
13
  "main": "src/main.js",
10
14
  "type": "module",
11
15
  "exports": {
@@ -17,7 +21,8 @@
17
21
  "Stone Costa <stone.costa@synamicd.com>"
18
22
  ],
19
23
  "publishConfig": {
20
- "access": "public"
24
+ "access": "public",
25
+ "provenance": true
21
26
  },
22
27
  "dependencies": {
23
28
  "cors": "^2.8.5",
package/src/request.js CHANGED
@@ -51,7 +51,7 @@ export default class Request {
51
51
 
52
52
  for (const [route, handler] of Object.entries(handlers)) {
53
53
  expressInstance[method](route, async (req, res) => {
54
- const callStack = makeArray(handler);
54
+ const callStack = [...makeArray(handler)];
55
55
  const mainCall = callStack.pop();
56
56
  const { sendStatusResponse } = Request;
57
57
  let response;