obsidian-plugin-config 1.5.8 → 1.5.10
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/.injection-info.json +5 -5
- package/.vscode/settings.json +11 -11
- package/.vscode/tasks.json +126 -126
- package/bin/obsidian-inject.js +1 -1
- package/package.json +5 -20
- package/scripts/build-npm.ts +15 -14
- package/scripts/esbuild.config.ts +268 -268
- package/scripts/help.ts +152 -152
- package/scripts/inject-core.ts +738 -736
- package/scripts/utils.ts +151 -151
- package/templates/package.json +1 -1
- package/templates/scripts/release.ts +3 -1
- package/tsconfig.json +30 -30
- package/versions.json +3 -1
package/.injection-info.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"injectorVersion": "1.1.20",
|
|
3
|
-
"injectionDate": "2025-07-18T22:04:30.392Z",
|
|
4
|
-
"injectorName": "obsidian-plugin-config"
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"injectorVersion": "1.1.20",
|
|
3
|
+
"injectionDate": "2025-07-18T22:04:30.392Z",
|
|
4
|
+
"injectorName": "obsidian-plugin-config"
|
|
5
|
+
}
|
package/.vscode/settings.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"npm.packageManager": "yarn",
|
|
3
|
-
"js/ts.preferences.includePackageJsonAutoImports": "off",
|
|
4
|
-
"[typescript]": {
|
|
5
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
6
|
-
},
|
|
7
|
-
"[markdown]": {
|
|
8
|
-
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
|
|
9
|
-
},
|
|
10
|
-
"editor.formatOnSave": true
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"npm.packageManager": "yarn",
|
|
3
|
+
"js/ts.preferences.includePackageJsonAutoImports": "off",
|
|
4
|
+
"[typescript]": {
|
|
5
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
6
|
+
},
|
|
7
|
+
"[markdown]": {
|
|
8
|
+
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
|
|
9
|
+
},
|
|
10
|
+
"editor.formatOnSave": true
|
|
11
|
+
}
|
package/.vscode/tasks.json
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "2.0.0",
|
|
3
|
-
"tasks": [
|
|
4
|
-
{
|
|
5
|
-
"label": "Build",
|
|
6
|
-
"type": "shell",
|
|
7
|
-
"command": "yarn build",
|
|
8
|
-
"group": { "kind": "build", "isDefault": true },
|
|
9
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
10
|
-
"problemMatcher": ["$tsc"]
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"label": "Dev (watch)",
|
|
14
|
-
"type": "shell",
|
|
15
|
-
"command": "yarn dev",
|
|
16
|
-
"group": "build",
|
|
17
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
18
|
-
"problemMatcher": ["$tsc-watch"],
|
|
19
|
-
"isBackground": true
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"label": "Real (build to vault)",
|
|
23
|
-
"type": "shell",
|
|
24
|
-
"command": "yarn real",
|
|
25
|
-
"group": "build",
|
|
26
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
27
|
-
"problemMatcher": ["$tsc"]
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"label": "Lint",
|
|
31
|
-
"type": "shell",
|
|
32
|
-
"command": "yarn lint",
|
|
33
|
-
"group": "test",
|
|
34
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
35
|
-
"problemMatcher": ["$eslint-stylish"]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"label": "Lint: Fix",
|
|
39
|
-
"type": "shell",
|
|
40
|
-
"command": "yarn lint:fix",
|
|
41
|
-
"group": "test",
|
|
42
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
43
|
-
"problemMatcher": ["$eslint-stylish"]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"label": "Prettier: Check",
|
|
47
|
-
"type": "shell",
|
|
48
|
-
"command": "yarn prettier",
|
|
49
|
-
"group": "test",
|
|
50
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
51
|
-
"problemMatcher": []
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"label": "Prettier: Fix",
|
|
55
|
-
"type": "shell",
|
|
56
|
-
"command": "yarn prettier:fix",
|
|
57
|
-
"group": "test",
|
|
58
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
59
|
-
"problemMatcher": []
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"label": "Update Exports",
|
|
63
|
-
"type": "shell",
|
|
64
|
-
"command": "yarn update-exports",
|
|
65
|
-
"group": "build",
|
|
66
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
67
|
-
"problemMatcher": []
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"label": "ACP (add, commit, push)",
|
|
71
|
-
"type": "shell",
|
|
72
|
-
"command": "yarn acp",
|
|
73
|
-
"group": "build",
|
|
74
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
75
|
-
"problemMatcher": []
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"label": "BACP (build + acp)",
|
|
79
|
-
"type": "shell",
|
|
80
|
-
"command": "yarn bacp",
|
|
81
|
-
"group": "build",
|
|
82
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
83
|
-
"problemMatcher": []
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"label": "Version update",
|
|
87
|
-
"type": "shell",
|
|
88
|
-
"command": "yarn v",
|
|
89
|
-
"group": "build",
|
|
90
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
91
|
-
"problemMatcher": []
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"label": "Upgrade All (yarn upgrade + sync templates)",
|
|
95
|
-
"type": "shell",
|
|
96
|
-
"command": "yarn upgrade-all",
|
|
97
|
-
"group": "build",
|
|
98
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
99
|
-
"problemMatcher": []
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"label": "NPM Publish",
|
|
103
|
-
"type": "shell",
|
|
104
|
-
"command": "yarn npm-publish --auto-update",
|
|
105
|
-
"group": "build",
|
|
106
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
107
|
-
"problemMatcher": []
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"label": "Install/Update obsidian-inject",
|
|
111
|
-
"type": "shell",
|
|
112
|
-
"command": "npm list -g obsidian-plugin-config --depth=0 && npm install -g obsidian-plugin-config@latest --force --engine-strict=false && npm list -g obsidian-plugin-config --depth=0",
|
|
113
|
-
"group": "build",
|
|
114
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
115
|
-
"problemMatcher": []
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"label": "Cleanup: Lint + Prettier + Build",
|
|
119
|
-
"dependsOrder": "sequence",
|
|
120
|
-
"dependsOn": ["Lint: Fix", "Prettier: Fix", "Build"],
|
|
121
|
-
"group": "build",
|
|
122
|
-
"presentation": { "reveal": "always", "panel": "shared" },
|
|
123
|
-
"problemMatcher": []
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"label": "Build",
|
|
6
|
+
"type": "shell",
|
|
7
|
+
"command": "yarn build",
|
|
8
|
+
"group": { "kind": "build", "isDefault": true },
|
|
9
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
10
|
+
"problemMatcher": ["$tsc"]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"label": "Dev (watch)",
|
|
14
|
+
"type": "shell",
|
|
15
|
+
"command": "yarn dev",
|
|
16
|
+
"group": "build",
|
|
17
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
18
|
+
"problemMatcher": ["$tsc-watch"],
|
|
19
|
+
"isBackground": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"label": "Real (build to vault)",
|
|
23
|
+
"type": "shell",
|
|
24
|
+
"command": "yarn real",
|
|
25
|
+
"group": "build",
|
|
26
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
27
|
+
"problemMatcher": ["$tsc"]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"label": "Lint",
|
|
31
|
+
"type": "shell",
|
|
32
|
+
"command": "yarn lint",
|
|
33
|
+
"group": "test",
|
|
34
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
35
|
+
"problemMatcher": ["$eslint-stylish"]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"label": "Lint: Fix",
|
|
39
|
+
"type": "shell",
|
|
40
|
+
"command": "yarn lint:fix",
|
|
41
|
+
"group": "test",
|
|
42
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
43
|
+
"problemMatcher": ["$eslint-stylish"]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"label": "Prettier: Check",
|
|
47
|
+
"type": "shell",
|
|
48
|
+
"command": "yarn prettier",
|
|
49
|
+
"group": "test",
|
|
50
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
51
|
+
"problemMatcher": []
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"label": "Prettier: Fix",
|
|
55
|
+
"type": "shell",
|
|
56
|
+
"command": "yarn prettier:fix",
|
|
57
|
+
"group": "test",
|
|
58
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
59
|
+
"problemMatcher": []
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"label": "Update Exports",
|
|
63
|
+
"type": "shell",
|
|
64
|
+
"command": "yarn update-exports",
|
|
65
|
+
"group": "build",
|
|
66
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
67
|
+
"problemMatcher": []
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"label": "ACP (add, commit, push)",
|
|
71
|
+
"type": "shell",
|
|
72
|
+
"command": "yarn acp",
|
|
73
|
+
"group": "build",
|
|
74
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
75
|
+
"problemMatcher": []
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"label": "BACP (build + acp)",
|
|
79
|
+
"type": "shell",
|
|
80
|
+
"command": "yarn bacp",
|
|
81
|
+
"group": "build",
|
|
82
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
83
|
+
"problemMatcher": []
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"label": "Version update",
|
|
87
|
+
"type": "shell",
|
|
88
|
+
"command": "yarn v",
|
|
89
|
+
"group": "build",
|
|
90
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
91
|
+
"problemMatcher": []
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"label": "Upgrade All (yarn upgrade + sync templates)",
|
|
95
|
+
"type": "shell",
|
|
96
|
+
"command": "yarn upgrade-all",
|
|
97
|
+
"group": "build",
|
|
98
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
99
|
+
"problemMatcher": []
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"label": "NPM Publish",
|
|
103
|
+
"type": "shell",
|
|
104
|
+
"command": "yarn npm-publish --auto-update",
|
|
105
|
+
"group": "build",
|
|
106
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
107
|
+
"problemMatcher": []
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"label": "Install/Update obsidian-inject",
|
|
111
|
+
"type": "shell",
|
|
112
|
+
"command": "npm list -g obsidian-plugin-config --depth=0 && npm install -g obsidian-plugin-config@latest --force --engine-strict=false && npm list -g obsidian-plugin-config --depth=0",
|
|
113
|
+
"group": "build",
|
|
114
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
115
|
+
"problemMatcher": []
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"label": "Cleanup: Lint + Prettier + Build",
|
|
119
|
+
"dependsOrder": "sequence",
|
|
120
|
+
"dependsOn": ["Lint: Fix", "Prettier: Fix", "Build"],
|
|
121
|
+
"group": "build",
|
|
122
|
+
"presentation": { "reveal": "always", "panel": "shared" },
|
|
123
|
+
"problemMatcher": []
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
package/bin/obsidian-inject.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obsidian-plugin-config",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.10",
|
|
4
4
|
"description": "Système d'injection pour plugins Obsidian autonomes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -49,10 +49,11 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/eslint": "latest",
|
|
52
|
+
"@types/fs-extra": "^11.0.4",
|
|
52
53
|
"@types/node": "^22.15.26",
|
|
53
54
|
"@types/semver": "^7.7.0",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "
|
|
55
|
-
"@typescript-eslint/parser": "
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
56
|
+
"@typescript-eslint/parser": "^8.58.0",
|
|
56
57
|
"builtin-modules": "3.3.0",
|
|
57
58
|
"dedent": "^1.6.0",
|
|
58
59
|
"dotenv": "^16.4.5",
|
|
@@ -65,23 +66,7 @@
|
|
|
65
66
|
"obsidian-typings": "latest",
|
|
66
67
|
"prettier": "^3.4.0",
|
|
67
68
|
"semver": "^7.7.2",
|
|
68
|
-
"tsx": "^4.
|
|
69
|
-
"typescript": "^5.8.2"
|
|
70
|
-
},
|
|
71
|
-
"dependencies": {
|
|
72
|
-
"@types/lodash": "^4.17.17",
|
|
73
|
-
"@types/node": "^22.15.26",
|
|
74
|
-
"@types/semver": "^7.7.0",
|
|
75
|
-
"builtin-modules": "3.3.0",
|
|
76
|
-
"dedent": "^1.6.0",
|
|
77
|
-
"dotenv": "^16.4.5",
|
|
78
|
-
"esbuild": "latest",
|
|
79
|
-
"fs-extra": "^11.2.0",
|
|
80
|
-
"lodash": "^4.17.21",
|
|
81
|
-
"obsidian": "*",
|
|
82
|
-
"obsidian-typings": "latest",
|
|
83
|
-
"semver": "^7.7.2",
|
|
84
|
-
"tsx": "^4.19.4",
|
|
69
|
+
"tsx": "^4.21.0",
|
|
85
70
|
"typescript": "^5.8.2"
|
|
86
71
|
},
|
|
87
72
|
"engines": {
|
package/scripts/build-npm.ts
CHANGED
|
@@ -209,18 +209,18 @@ async function buildAndPublishNpm(): Promise<void> {
|
|
|
209
209
|
console.log(`Full automation: version → exports → bin → commit → publish\n`);
|
|
210
210
|
|
|
211
211
|
try {
|
|
212
|
-
// Step 0: Check NPM login
|
|
213
|
-
console.log(`🔐 Checking NPM authentication...`);
|
|
214
|
-
try {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
} catch {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
212
|
+
// Step 0: Check NPM login (disabled - npm publish will handle auth)
|
|
213
|
+
// console.log(`🔐 Checking NPM authentication...`);
|
|
214
|
+
// try {
|
|
215
|
+
// const whoami = execSync('npm whoami --registry https://registry.npmjs.org/', {
|
|
216
|
+
// stdio: 'pipe',
|
|
217
|
+
// encoding: 'utf8'
|
|
218
|
+
// }).trim();
|
|
219
|
+
// console.log(` ✅ Logged in as: ${whoami}\n`);
|
|
220
|
+
// } catch {
|
|
221
|
+
// console.error(` ❌ Not logged in to NPM. Run: npm login`);
|
|
222
|
+
// process.exit(1);
|
|
223
|
+
// }
|
|
224
224
|
|
|
225
225
|
// Step 1: Update version
|
|
226
226
|
console.log(`📋 Step 1/7: Updating version...`);
|
|
@@ -259,7 +259,8 @@ async function buildAndPublishNpm(): Promise<void> {
|
|
|
259
259
|
const autoUpdate = process.argv.includes('--auto-update');
|
|
260
260
|
let doUpdate = autoUpdate;
|
|
261
261
|
if (!autoUpdate) {
|
|
262
|
-
const { askConfirmation, createReadlineInterface } =
|
|
262
|
+
const { askConfirmation, createReadlineInterface } =
|
|
263
|
+
await import('./utils.js');
|
|
263
264
|
const rl = createReadlineInterface();
|
|
264
265
|
doUpdate = await askConfirmation(
|
|
265
266
|
`Install obsidian-plugin-config@latest globally?`,
|
|
@@ -269,7 +270,7 @@ async function buildAndPublishNpm(): Promise<void> {
|
|
|
269
270
|
}
|
|
270
271
|
if (doUpdate) {
|
|
271
272
|
console.log(` ⏳ Waiting 15s for NPM registry propagation...`);
|
|
272
|
-
await new Promise(resolve => setTimeout(resolve, 15000));
|
|
273
|
+
await new Promise((resolve) => setTimeout(resolve, 15000));
|
|
273
274
|
execSync(
|
|
274
275
|
'npm install -g obsidian-plugin-config@latest --force --engine-strict=false',
|
|
275
276
|
{ stdio: 'inherit' }
|