kempo-server 1.9.3 → 1.9.12
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/dist/defaultConfig.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default{allowedMimes:{html:{mime:"text/html",encoding:"utf8"},htm:{mime:"text/html",encoding:"utf8"},shtml:{mime:"text/html",encoding:"utf8"},css:{mime:"text/css",encoding:"utf8"},xml:{mime:"text/xml",encoding:"utf8"},gif:{mime:"image/gif",encoding:"binary"},jpeg:{mime:"image/jpeg",encoding:"binary"},jpg:{mime:"image/jpeg",encoding:"binary"},js:{mime:"application/javascript",encoding:"utf8"},mjs:{mime:"application/javascript",encoding:"utf8"},json:{mime:"application/json",encoding:"utf8"},webp:{mime:"image/webp",encoding:"binary"},png:{mime:"image/png",encoding:"binary"},svg:{mime:"image/svg+xml",encoding:"utf8"},svgz:{mime:"image/svg+xml",encoding:"utf8"},ico:{mime:"image/x-icon",encoding:"binary"},webm:{mime:"video/webm",encoding:"binary"},mp4:{mime:"video/mp4",encoding:"binary"},m4v:{mime:"video/mp4",encoding:"binary"},ogv:{mime:"video/ogg",encoding:"binary"},mp3:{mime:"audio/mpeg",encoding:"binary"},ogg:{mime:"audio/ogg",encoding:"binary"},wav:{mime:"audio/wav",encoding:"binary"},woff:{mime:"font/woff",encoding:"binary"},woff2:{mime:"font/woff2",encoding:"binary"},ttf:{mime:"font/ttf",encoding:"binary"},otf:{mime:"font/otf",encoding:"binary"},eot:{mime:"application/vnd.ms-fontobject",encoding:"binary"},pdf:{mime:"application/pdf",encoding:"binary"},txt:{mime:"text/plain",encoding:"utf8"},webmanifest:{mime:"application/manifest+json",encoding:"utf8"},md:{mime:"text/markdown",encoding:"utf8"},csv:{mime:"text/csv",encoding:"utf8"},doc:{mime:"application/msword",encoding:"binary"},docx:{mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",encoding:"binary"},xls:{mime:"application/vnd.ms-excel",encoding:"binary"},xlsx:{mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",encoding:"binary"},ppt:{mime:"application/vnd.ms-powerpoint",encoding:"binary"},pptx:{mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",encoding:"binary"},avif:{mime:"image/avif",encoding:"binary"},wasm:{mime:"application/wasm",encoding:"binary"}},disallowedRegex:["^/\\..*","\\.config$","\\.env$","\\.git/","\\.htaccess$","\\.htpasswd$","^/node_modules/","^/vendor/","\\.log$","\\.bak$","\\.sql$","\\.ini$","config\\.php$","wp-config\\.php$","\\.DS_Store$"],routeFiles:["GET.js","POST.js","PUT.js","DELETE.js","HEAD.js","OPTIONS.js","PATCH.js","CONNECT.js","TRACE.js","index.js"],noRescanPaths:["^\\.well-known/","/favicon\\.ico$","/robots\\.txt$","/sitemap\\.xml$","/apple-touch-icon","/android-chrome-","/browserconfig\\.xml$","/manifest\\.json$","\\.map$","/__webpack_hmr$","/hot-update\\.","/sockjs-node/"],maxRescanAttempts:3,customRoutes:{},middleware:{cors:{enabled:!1,origin:"*",methods:["GET","POST","PUT","DELETE","OPTIONS"],headers:["Content-Type","Authorization"]},compression:{enabled:!1,threshold:1024},rateLimit:{enabled:!1,maxRequests:100,windowMs:6e4,message:"Too many requests"},security:{enabled:!0,headers:{"X-Content-Type-Options":"nosniff","X-Frame-Options":"DENY","X-XSS-Protection":"1; mode=block"}},logging:{enabled:!0,includeUserAgent:!1,includeResponseTime:!0},custom:[]},cache:{enabled:!1,maxSize:100,maxMemoryMB:50,ttlMs:3e5,maxHeapUsagePercent:70,memoryCheckInterval:3e4,watchFiles:!0,enableMemoryMonitoring:!0}};
|
|
1
|
+
export default{allowedMimes:{html:{mime:"text/html",encoding:"utf8"},htm:{mime:"text/html",encoding:"utf8"},shtml:{mime:"text/html",encoding:"utf8"},css:{mime:"text/css",encoding:"utf8"},xml:{mime:"text/xml",encoding:"utf8"},gif:{mime:"image/gif",encoding:"binary"},jpeg:{mime:"image/jpeg",encoding:"binary"},jpg:{mime:"image/jpeg",encoding:"binary"},js:{mime:"application/javascript",encoding:"utf8"},mjs:{mime:"application/javascript",encoding:"utf8"},json:{mime:"application/json",encoding:"utf8"},webp:{mime:"image/webp",encoding:"binary"},png:{mime:"image/png",encoding:"binary"},svg:{mime:"image/svg+xml",encoding:"utf8"},svgz:{mime:"image/svg+xml",encoding:"utf8"},ico:{mime:"image/x-icon",encoding:"binary"},webm:{mime:"video/webm",encoding:"binary"},mp4:{mime:"video/mp4",encoding:"binary"},m4v:{mime:"video/mp4",encoding:"binary"},ogv:{mime:"video/ogg",encoding:"binary"},mp3:{mime:"audio/mpeg",encoding:"binary"},ogg:{mime:"audio/ogg",encoding:"binary"},wav:{mime:"audio/wav",encoding:"binary"},woff:{mime:"font/woff",encoding:"binary"},woff2:{mime:"font/woff2",encoding:"binary"},ttf:{mime:"font/ttf",encoding:"binary"},otf:{mime:"font/otf",encoding:"binary"},eot:{mime:"application/vnd.ms-fontobject",encoding:"binary"},pdf:{mime:"application/pdf",encoding:"binary"},txt:{mime:"text/plain",encoding:"utf8"},webmanifest:{mime:"application/manifest+json",encoding:"utf8"},md:{mime:"text/markdown",encoding:"utf8"},csv:{mime:"text/csv",encoding:"utf8"},doc:{mime:"application/msword",encoding:"binary"},docx:{mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",encoding:"binary"},xls:{mime:"application/vnd.ms-excel",encoding:"binary"},xlsx:{mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",encoding:"binary"},ppt:{mime:"application/vnd.ms-powerpoint",encoding:"binary"},pptx:{mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",encoding:"binary"},avif:{mime:"image/avif",encoding:"binary"},wasm:{mime:"application/wasm",encoding:"binary"}},disallowedRegex:["^/\\..*","\\.config$","\\.env$","\\.git/","\\.htaccess$","\\.htpasswd$","^/node_modules/","^/vendor/","\\.log$","\\.bak$","\\.sql$","\\.ini$","config\\.php$","wp-config\\.php$","\\.DS_Store$","package\\.json$","package-lock\\.json$"],routeFiles:["GET.js","POST.js","PUT.js","DELETE.js","HEAD.js","OPTIONS.js","PATCH.js","CONNECT.js","TRACE.js","index.js"],noRescanPaths:["^\\.well-known/","/favicon\\.ico$","/robots\\.txt$","/sitemap\\.xml$","/apple-touch-icon","/android-chrome-","/browserconfig\\.xml$","/manifest\\.json$","\\.map$","/__webpack_hmr$","/hot-update\\.","/sockjs-node/"],maxRescanAttempts:3,customRoutes:{},middleware:{cors:{enabled:!1,origin:"*",methods:["GET","POST","PUT","DELETE","OPTIONS"],headers:["Content-Type","Authorization"]},compression:{enabled:!1,threshold:1024},rateLimit:{enabled:!1,maxRequests:100,windowMs:6e4,message:"Too many requests"},security:{enabled:!0,headers:{"X-Content-Type-Options":"nosniff","X-Frame-Options":"DENY","X-XSS-Protection":"1; mode=block"}},logging:{enabled:!0,includeUserAgent:!1,includeResponseTime:!0},custom:[]},cache:{enabled:!1,maxSize:100,maxMemoryMB:50,ttlMs:3e5,maxHeapUsagePercent:70,memoryCheckInterval:3e4,watchFiles:!0,enableMemoryMonitoring:!0}};
|
package/package.json
CHANGED
package/src/defaultConfig.js
CHANGED
|
@@ -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 }}
|