trilium-api 1.0.0 → 1.0.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/ci.yml +37 -37
- package/.github/workflows/publish.yml +84 -86
- package/LICENSE +660 -660
- package/README.md +835 -836
- package/package.json +15 -13
- package/src/client.test.ts +477 -477
- package/src/client.ts +91 -91
- package/src/demo-mapper.ts +166 -166
- package/src/demo-search.ts +108 -108
- package/src/demo.ts +126 -126
- package/src/index.ts +34 -34
- package/src/mapper.test.ts +638 -638
- package/src/mapper.ts +534 -534
- package/tsconfig.json +42 -42
package/.github/workflows/ci.yml
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main, master]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main, master]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
test:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
strategy:
|
|
14
|
-
matrix:
|
|
15
|
-
node-version: [18, 20, 22]
|
|
16
|
-
|
|
17
|
-
steps:
|
|
18
|
-
- name: Checkout repository
|
|
19
|
-
uses: actions/checkout@v4
|
|
20
|
-
|
|
21
|
-
- name: Install pnpm
|
|
22
|
-
uses: pnpm/action-setup@v4
|
|
23
|
-
|
|
24
|
-
- name: Setup Node.js ${{ matrix.node-version }}
|
|
25
|
-
uses: actions/setup-node@v4
|
|
26
|
-
with:
|
|
27
|
-
node-version: ${{ matrix.node-version }}
|
|
28
|
-
cache: 'pnpm'
|
|
29
|
-
|
|
30
|
-
- name: Install dependencies
|
|
31
|
-
run: pnpm install
|
|
32
|
-
|
|
33
|
-
- name: Type check
|
|
34
|
-
run: pnpm test:ts
|
|
35
|
-
|
|
36
|
-
- name: Run tests
|
|
37
|
-
run: pnpm test:run
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
node-version: [18, 20, 22]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install pnpm
|
|
22
|
+
uses: pnpm/action-setup@v4
|
|
23
|
+
|
|
24
|
+
- name: Setup Node.js ${{ matrix.node-version }}
|
|
25
|
+
uses: actions/setup-node@v4
|
|
26
|
+
with:
|
|
27
|
+
node-version: ${{ matrix.node-version }}
|
|
28
|
+
cache: 'pnpm'
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: pnpm install
|
|
32
|
+
|
|
33
|
+
- name: Type check
|
|
34
|
+
run: pnpm test:ts
|
|
35
|
+
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: pnpm test:run
|
|
@@ -1,86 +1,84 @@
|
|
|
1
|
-
name: Publish to npm
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
version:
|
|
7
|
-
description: 'Version bump type'
|
|
8
|
-
required: true
|
|
9
|
-
default: 'patch'
|
|
10
|
-
type: choice
|
|
11
|
-
options:
|
|
12
|
-
- patch
|
|
13
|
-
- minor
|
|
14
|
-
- major
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- name:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
git
|
|
70
|
-
git
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
name: v${{ steps.version.outputs.version }}
|
|
86
|
-
generate_release_notes: true
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: 'Version bump type'
|
|
8
|
+
required: true
|
|
9
|
+
default: 'patch'
|
|
10
|
+
type: choice
|
|
11
|
+
options:
|
|
12
|
+
- patch
|
|
13
|
+
- minor
|
|
14
|
+
- major
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
publish:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: write
|
|
22
|
+
id-token: write # Required for npm trusted publishing (OIDC)
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout repository
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
|
|
31
|
+
- name: Configure Git
|
|
32
|
+
run: |
|
|
33
|
+
git config user.name "github-actions[bot]"
|
|
34
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
35
|
+
|
|
36
|
+
- name: Install pnpm
|
|
37
|
+
uses: pnpm/action-setup@v4
|
|
38
|
+
|
|
39
|
+
- name: Setup Node.js
|
|
40
|
+
uses: actions/setup-node@v4
|
|
41
|
+
with:
|
|
42
|
+
node-version: 22
|
|
43
|
+
cache: 'pnpm'
|
|
44
|
+
registry-url: 'https://registry.npmjs.org'
|
|
45
|
+
|
|
46
|
+
- name: Update npm to latest
|
|
47
|
+
run: npm install -g npm@latest
|
|
48
|
+
|
|
49
|
+
- name: Install dependencies
|
|
50
|
+
run: pnpm install
|
|
51
|
+
|
|
52
|
+
- name: Type check
|
|
53
|
+
run: pnpm test:ts
|
|
54
|
+
|
|
55
|
+
- name: Run tests
|
|
56
|
+
run: pnpm test:run
|
|
57
|
+
|
|
58
|
+
- name: Bump version
|
|
59
|
+
id: version
|
|
60
|
+
run: |
|
|
61
|
+
pnpm version ${{ inputs.version }} --no-git-tag-version
|
|
62
|
+
VERSION=$(node -p "require('./package.json').version")
|
|
63
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
64
|
+
|
|
65
|
+
- name: Commit and tag
|
|
66
|
+
run: |
|
|
67
|
+
git add package.json
|
|
68
|
+
git commit -m "chore: release v${{ steps.version.outputs.version }}"
|
|
69
|
+
git tag "v${{ steps.version.outputs.version }}"
|
|
70
|
+
git push && git push --tags
|
|
71
|
+
|
|
72
|
+
- name: Build
|
|
73
|
+
run: pnpm build
|
|
74
|
+
|
|
75
|
+
- name: Publish to npm
|
|
76
|
+
run: npm publish --access public
|
|
77
|
+
# Uses OIDC trusted publishing - no NPM_TOKEN needed
|
|
78
|
+
|
|
79
|
+
- name: Create GitHub Release
|
|
80
|
+
uses: softprops/action-gh-release@v2
|
|
81
|
+
with:
|
|
82
|
+
tag_name: v${{ steps.version.outputs.version }}
|
|
83
|
+
name: v${{ steps.version.outputs.version }}
|
|
84
|
+
generate_release_notes: true
|