obsidian-plugin-config 1.3.0 β 1.3.2
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/bin/obsidian-inject.js +1 -1
- package/package.json +1 -1
- package/scripts/help.ts +8 -9
- package/scripts/inject-core.ts +2 -1
- package/versions.json +3 -1
package/bin/obsidian-inject.js
CHANGED
package/package.json
CHANGED
package/scripts/help.ts
CHANGED
|
@@ -40,15 +40,14 @@ HELP:
|
|
|
40
40
|
|
|
41
41
|
π¦ EXPORTS SYSTEM
|
|
42
42
|
|
|
43
|
-
The package exposes
|
|
44
|
-
obsidian-plugin-config # Main entry
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
yarn update-exports # Regenerates package.json exports field
|
|
43
|
+
The package exposes a single entry point:
|
|
44
|
+
obsidian-plugin-config # Main entry β re-exports all modules
|
|
45
|
+
|
|
46
|
+
Src modules (auto-exported via src/index.ts):
|
|
47
|
+
modals, tools, utils
|
|
48
|
+
|
|
49
|
+
After adding a new module to src/, run:
|
|
50
|
+
yarn update-exports # Regenerates src/index.ts
|
|
52
51
|
|
|
53
52
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
54
53
|
|
package/scripts/inject-core.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import path from "path";
|
|
5
5
|
import { execSync } from "child_process";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
6
7
|
import { isValidPath, gitExec } from "./utils.js";
|
|
7
8
|
|
|
8
9
|
export interface InjectionPlan {
|
|
@@ -59,7 +60,7 @@ export async function analyzePlugin(pluginPath: string): Promise<InjectionPlan>
|
|
|
59
60
|
* Find plugin-config root directory (handles NPM global installs)
|
|
60
61
|
*/
|
|
61
62
|
export function findPluginConfigRoot(): string {
|
|
62
|
-
const scriptDir = path.dirname(
|
|
63
|
+
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
63
64
|
const npmPackageRoot = path.resolve(scriptDir, "..");
|
|
64
65
|
const npmPackageJson = path.join(npmPackageRoot, "package.json");
|
|
65
66
|
|