-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
184 lines (184 loc) · 7.17 KB
/
Copy pathpackage.json
File metadata and controls
184 lines (184 loc) · 7.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{
"name": "trilkeep",
"displayName": "Trilkeep",
"description": "Mirror your VS Code notes workspace into Trilium via the ETAPI.",
"version": "0.3.0",
"publisher": "kalmigs",
"license": "MIT",
"icon": "assets/icon.png",
"repository": {
"type": "git",
"url": "https://github.com/kalmigs/trilkeep.git"
},
"bugs": {
"url": "https://github.com/kalmigs/trilkeep/issues"
},
"homepage": "https://github.com/kalmigs/trilkeep#readme",
"packageManager": "pnpm@10.30.3",
"engines": {
"vscode": "^1.90.0"
},
"scripts": {
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"typecheck": "tsc -p tsconfig.test.json",
"lint": "eslint src test",
"format": "prettier --write .",
"format:check": "prettier --check .",
"test": "node --import tsx --test test/*.test.ts",
"vscode:prepublish": "npm run compile",
"package": "pnpm dlx @vscode/vsce@3.9.2 package",
"publish:vsce": "pnpm dlx @vscode/vsce@3.9.2 publish",
"publish:ovsx": "pnpm dlx ovsx@1.0.0 publish"
},
"categories": [
"Other"
],
"keywords": [
"trilium",
"triliumnext",
"backup",
"notes",
"markdown",
"etapi"
],
"main": "./out/extension.js",
"activationEvents": [
"onStartupFinished"
],
"contributes": {
"commands": [
{
"command": "trilkeep.setup",
"category": "Trilkeep",
"title": "Setup"
},
{
"command": "trilkeep.setupAdvanced",
"category": "Trilkeep",
"title": "Setup (Advanced)"
},
{
"command": "trilkeep.backup",
"category": "Trilkeep",
"title": "Back Up Workspace"
},
{
"command": "trilkeep.previewBackup",
"category": "Trilkeep",
"title": "Back Up Workspace (Dry Run)"
},
{
"command": "trilkeep.setToken",
"category": "Trilkeep",
"title": "Set ETAPI Token"
},
{
"command": "trilkeep.testConnection",
"category": "Trilkeep",
"title": "Test Connection"
},
{
"command": "trilkeep.clearToken",
"category": "Trilkeep",
"title": "Clear ETAPI Token"
},
{
"command": "trilkeep.forgetInstance",
"category": "Trilkeep",
"title": "Forget Instance"
}
],
"configuration": {
"title": "Trilkeep",
"properties": {
"trilkeep.instanceName": {
"type": "string",
"description": "Stable name identifying this Trilium instance (e.g. \"real\", \"test\"). The ETAPI token and backup state (manifest) are keyed by this name, so serverUrl can change (e.g. a LAN IP) without losing the token or duplicating the backup. Set by Trilkeep: Setup (which offers \"default\" for a single instance); a workspace with no instance set is not backed up. Use distinct names for distinct instances."
},
"trilkeep.serverUrl": {
"type": "string",
"default": "http://localhost:8080",
"description": "Base URL of your Trilium server (the ETAPI lives at <serverUrl>/etapi). Just the address. Change it freely; identity is trilkeep.instanceName."
},
"trilkeep.include": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"**/*.md"
],
"description": "Glob patterns for files to back up (relative to the workspace root)."
},
"trilkeep.exclude": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"**/node_modules/**",
"**/.git/**"
],
"description": "Glob patterns to exclude from backup."
},
"trilkeep.backupOnSave": {
"type": "boolean",
"default": false,
"description": "Run an incremental backup automatically whenever a file is saved."
},
"trilkeep.backupOnActivation": {
"type": "boolean",
"default": false,
"description": "Run a full backup automatically when the workspace opens, catching up edits made while it was closed."
},
"trilkeep.rootNoteTitle": {
"type": "string",
"default": "",
"description": "Title of this workspace's root note in Trilium. Leave blank to use the workspace folder name. (Branding/grouping lives in trilkeep.group, not here.)"
},
"trilkeep.group": {
"type": "string",
"default": "Trilkeep",
"description": "Slash-path of container notes to nest this workspace's backup root under, e.g. \"Trilkeep\" or \"Trilkeep/work/repo\". Trilkeep creates and reuses the containers, so repos sharing a group land together. Leave blank to place the root directly under trilkeep.parentNoteId (or Trilium's root), i.e. no grouping."
},
"trilkeep.parentNoteId": {
"type": "string",
"default": "",
"description": "Existing Trilium noteId to use as the base parent instead of Trilium's root (e.g. to nest backups under one of your own notes). The trilkeep.group path, if any, is created under it. Blank = Trilium root."
},
"trilkeep.readOnly": {
"type": "boolean",
"default": true,
"description": "Mark the mirrored tree read-only in Trilium's UI (an inheritable #readOnly label on the backup root), to discourage edits in Trilium that the next backup would silently overwrite. On by default because Trilkeep is a one-way mirror (the workspace is the source of truth). Soft UI guard only; Trilkeep's own backups still update the notes. Set false if you want the tree editable in Trilium."
},
"trilkeep.hardDeleteRemovedFiles": {
"type": "boolean",
"default": false,
"description": "If true, delete the Trilium note when a backed-up file is removed. Default false (soft): removed files are only logged, never auto-deleted."
},
"trilkeep.excludeSecrets": {
"type": "boolean",
"default": true,
"description": "Skip files whose name looks like a secret (.env, *.pem, *.key, id_rsa, credentials, .npmrc, …) even if they match the include globs, so a broadened backup doesn't copy credentials into Trilium. A best-effort filename heuristic, not secret scanning: it misses renamed secrets and secrets inside a tracked note. Every skip is logged to the Trilkeep output channel, with a once-per-session notice; set this to false to back them up instead."
},
"trilkeep.maxFileSizeBytes": {
"type": "integer",
"minimum": 0,
"default": 1048576,
"description": "Skip files larger than this many bytes (default 1048576 = 1 MiB), even if they match the include globs. Guards against a broadened include sweeping build artifacts, exports or dumps into Trilium. Every skip is logged to the Trilkeep output channel, with a once-per-session notice. Set to 0 for no limit."
}
}
}
},
"devDependencies": {
"@eslint/js": "^9.0.0",
"@types/node": "^22.0.0",
"@types/vscode": "^1.90.0",
"eslint": "^9.0.0",
"prettier": "^3.8.4",
"tsx": "^4.19.0",
"typescript": "^5.6.0",
"typescript-eslint": "^8.0.0"
}
}