kempo-server 1.9.3 → 1.9.11

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,66 @@
1
+ name: Publish to npmjs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+ inputs:
9
+ version-type:
10
+ description: 'Version bump type'
11
+ required: true
12
+ type: choice
13
+ options:
14
+ - patch
15
+ - minor
16
+ - major
17
+ default: patch
18
+
19
+ jobs:
20
+ publish:
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: write
24
+ id-token: write
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ with:
28
+ token: ${{ secrets.GITHUB_TOKEN }}
29
+
30
+ - uses: actions/setup-node@v4
31
+ with:
32
+ node-version: '20.x'
33
+
34
+ - run: npm ci
35
+
36
+ - name: Set version type
37
+ id: version
38
+ run: |
39
+ if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
40
+ echo "type=${{ inputs.version-type }}" >> $GITHUB_OUTPUT
41
+ else
42
+ echo "type=patch" >> $GITHUB_OUTPUT
43
+ fi
44
+
45
+ - name: Bump ${{ steps.version.outputs.type }} version
46
+ run: |
47
+ git config --global user.name "github-actions"
48
+ git config --global user.email "github-actions@github.com"
49
+ npm version ${{ steps.version.outputs.type }} --no-git-tag-version
50
+ git add package.json package-lock.json || true
51
+ git commit -m "ci: bump ${{ steps.version.outputs.type }} version [skip ci]" || echo "No changes to commit"
52
+ git push origin HEAD:main || echo "No changes to push"
53
+ env:
54
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55
+
56
+ - name: Setup .npmrc for OIDC
57
+ run: |
58
+ cat << EOF > ~/.npmrc
59
+ //registry.npmjs.org/:_authToken=\${NPM_TOKEN}
60
+ registry=https://registry.npmjs.org/
61
+ always-auth=true
62
+ EOF
63
+
64
+ - run: npm publish --access public
65
+ env:
66
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kempo-server",
3
3
  "type": "module",
4
- "version": "1.9.3",
4
+ "version": "1.9.11",
5
5
  "description": "A lightweight, zero-dependency, file based routing server.",
6
6
  "main": "dist/index.js",
7
7
  "exports": {
@@ -57,7 +57,9 @@ export default {
57
57
  "\\.ini$",
58
58
  "config\\.php$",
59
59
  "wp-config\\.php$",
60
- "\\.DS_Store$"
60
+ "\\.DS_Store$",
61
+ "package\\.json$",
62
+ "package-lock\\.json$"
61
63
  ],
62
64
  routeFiles: [
63
65
  'GET.js',
@@ -1,39 +0,0 @@
1
- name: Publish Major Version to npmjs
2
-
3
- on:
4
- workflow_dispatch:
5
-
6
- jobs:
7
- publish:
8
- runs-on: ubuntu-latest
9
- permissions:
10
- contents: write
11
- id-token: write # enables npm provenance
12
- steps:
13
- - uses: actions/checkout@v4
14
- with:
15
- token: ${{ secrets.GITHUB_TOKEN }}
16
-
17
- # Setup Node and create an .npmrc that uses the token from NODE_AUTH_TOKEN
18
- - uses: actions/setup-node@v4
19
- with:
20
- node-version: '20.x'
21
- registry-url: 'https://registry.npmjs.org'
22
-
23
- - run: npm ci
24
-
25
- # Auto-increment major version, commit, and push
26
- - name: Bump major version
27
- run: |
28
- git config --global user.name "github-actions"
29
- git config --global user.email "github-actions@github.com"
30
- npm version major --no-git-tag-version
31
- git add package.json package-lock.json || true
32
- git commit -m "ci: bump major version [skip ci]" || echo "No changes to commit"
33
- git push origin HEAD:main || echo "No changes to push"
34
- env:
35
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36
-
37
- - run: npm publish --provenance --access public
38
- env:
39
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,39 +0,0 @@
1
- name: Publish Minor Version to npmjs
2
-
3
- on:
4
- workflow_dispatch:
5
-
6
- jobs:
7
- publish:
8
- runs-on: ubuntu-latest
9
- permissions:
10
- contents: write
11
- id-token: write # enables npm provenance
12
- steps:
13
- - uses: actions/checkout@v4
14
- with:
15
- token: ${{ secrets.GITHUB_TOKEN }}
16
-
17
- # Setup Node and create an .npmrc that uses the token from NODE_AUTH_TOKEN
18
- - uses: actions/setup-node@v4
19
- with:
20
- node-version: '20.x'
21
- registry-url: 'https://registry.npmjs.org'
22
-
23
- - run: npm ci
24
-
25
- # Auto-increment minor version, commit, and push
26
- - name: Bump minor version
27
- run: |
28
- git config --global user.name "github-actions"
29
- git config --global user.email "github-actions@github.com"
30
- npm version minor --no-git-tag-version
31
- git add package.json package-lock.json || true
32
- git commit -m "ci: bump minor version [skip ci]" || echo "No changes to commit"
33
- git push origin HEAD:main || echo "No changes to push"
34
- env:
35
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36
-
37
- - run: npm publish --provenance --access public
38
- env:
39
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,45 +0,0 @@
1
-
2
- name: Publish Patch Version to npmjs
3
-
4
- on:
5
- push:
6
- branches:
7
- - main
8
- workflow_dispatch:
9
-
10
- jobs:
11
- publish:
12
- runs-on: ubuntu-latest
13
- permissions:
14
- contents: write
15
- id-token: write # enables npm provenance
16
- steps:
17
- - uses: actions/checkout@v4
18
- with:
19
- token: ${{ secrets.GITHUB_TOKEN }}
20
-
21
- # Setup Node and create an .npmrc that uses the token from NODE_AUTH_TOKEN
22
- - uses: actions/setup-node@v4
23
- with:
24
- node-version: '20.x'
25
- registry-url: 'https://registry.npmjs.org'
26
-
27
- - run: npm ci
28
-
29
- # Auto-increment patch version, commit, and push
30
- - name: Bump patch version
31
- run: |
32
- git config --global user.name "github-actions"
33
- git config --global user.email "github-actions@github.com"
34
- npm version patch --no-git-tag-version
35
- git add package.json package-lock.json || true
36
- git commit -m "ci: bump patch version [skip ci]" || echo "No changes to commit"
37
- git push origin HEAD:main || echo "No changes to push"
38
- env:
39
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40
-
41
- # If your package is public and scoped (e.g., @scope/name), keep --access public.
42
- # For unscoped public packages, you can omit --access.
43
- - run: npm publish --provenance --access public
44
- env:
45
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}