klaim 1.11.144 → 1.12.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.
- package/.github/workflows/update-deps.yml +57 -57
- package/bun.lock +1242 -0
- package/deno.json +1 -1
- package/dist/index.d.ts +1077 -0
- package/dist/klaim.cjs +1 -1
- package/dist/klaim.es.js +491 -991
- package/dist/klaim.umd.js +1 -1
- package/eslint.config.mjs +211 -211
- package/package.json +28 -16
- package/src/core/Api.ts +96 -99
- package/src/core/Cache.ts +64 -7
- package/src/core/Element.ts +329 -332
- package/src/core/Group.ts +268 -272
- package/src/core/Hook.ts +86 -70
- package/src/core/Klaim.ts +363 -354
- package/src/core/Registry.ts +286 -272
- package/src/core/Route.ts +202 -201
- package/src/core/errors.ts +108 -0
- package/src/index.ts +20 -0
- package/src/tools/fetchWithCache.ts +30 -30
- package/src/tools/hashStr.ts +30 -28
- package/src/tools/timeout.ts +31 -29
- package/tests/04.klaim.test.ts +116 -116
- package/tests/06.retry.test.ts +68 -68
- package/vite.config.ts +47 -40
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
name: Auto Update & Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
- cron: '0 0 * * *'
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
update-and-release:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
permissions:
|
|
12
|
-
id-token: write
|
|
13
|
-
contents: write
|
|
14
|
-
packages: write
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
with:
|
|
18
|
-
fetch-depth: 0
|
|
19
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
-
|
|
21
|
-
- name: Setup Node.js
|
|
22
|
-
uses: actions/setup-node@v4
|
|
23
|
-
with:
|
|
24
|
-
node-version: '20'
|
|
25
|
-
registry-url: 'https://registry.npmjs.org'
|
|
26
|
-
|
|
27
|
-
- name: Configure NPM Authentication
|
|
28
|
-
run: |
|
|
29
|
-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
|
|
30
|
-
npm whoami
|
|
31
|
-
env:
|
|
32
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
33
|
-
|
|
34
|
-
- name: Configure Git
|
|
35
|
-
run: |
|
|
36
|
-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
37
|
-
git config --global user.name "GitHub Actions Bot"
|
|
38
|
-
|
|
39
|
-
- name: Install dependencies
|
|
40
|
-
run: npm install
|
|
41
|
-
|
|
42
|
-
- name: Update
|
|
43
|
-
run: |
|
|
44
|
-
npx npm-check-updates -u
|
|
45
|
-
npm install
|
|
46
|
-
|
|
47
|
-
- name: Test and build
|
|
48
|
-
run: |
|
|
49
|
-
npm run test
|
|
50
|
-
npm run build
|
|
51
|
-
|
|
52
|
-
- name: Release
|
|
53
|
-
run: npm run release
|
|
54
|
-
env:
|
|
55
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
56
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
57
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
1
|
+
name: Auto Update & Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 0 * * *'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
update-and-release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write
|
|
13
|
+
contents: write
|
|
14
|
+
packages: write
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
|
|
21
|
+
- name: Setup Node.js
|
|
22
|
+
uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: '20'
|
|
25
|
+
registry-url: 'https://registry.npmjs.org'
|
|
26
|
+
|
|
27
|
+
- name: Configure NPM Authentication
|
|
28
|
+
run: |
|
|
29
|
+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
|
|
30
|
+
npm whoami
|
|
31
|
+
env:
|
|
32
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
33
|
+
|
|
34
|
+
- name: Configure Git
|
|
35
|
+
run: |
|
|
36
|
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
37
|
+
git config --global user.name "GitHub Actions Bot"
|
|
38
|
+
|
|
39
|
+
- name: Install dependencies
|
|
40
|
+
run: npm install
|
|
41
|
+
|
|
42
|
+
- name: Update dependencies (minor and patch only)
|
|
43
|
+
run: |
|
|
44
|
+
npx npm-check-updates -u --target minor
|
|
45
|
+
npm install
|
|
46
|
+
|
|
47
|
+
- name: Test and build
|
|
48
|
+
run: |
|
|
49
|
+
npm run test
|
|
50
|
+
npm run build
|
|
51
|
+
|
|
52
|
+
- name: Release
|
|
53
|
+
run: npm run release
|
|
54
|
+
env:
|
|
55
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
56
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
57
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|