docshark 0.1.16 → 0.1.17
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
const packageJsonPath = resolve(scriptDir, "../../package.json");
|
|
6
|
+
const versionFilePath = resolve(scriptDir, "../version.ts");
|
|
7
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
|
|
8
|
+
if (typeof packageJson.version !== "string") {
|
|
9
|
+
throw new Error("packages/core/package.json is missing a valid version.");
|
|
10
|
+
}
|
|
11
|
+
const nextVersionFile = [
|
|
12
|
+
"// This file is automatically updated by the version sync script.",
|
|
13
|
+
`export const VERSION = '${packageJson.version}';`,
|
|
14
|
+
"",
|
|
15
|
+
].join("\n");
|
|
16
|
+
const currentVersionFile = readFileSync(versionFilePath, "utf8");
|
|
17
|
+
if (currentVersionFile !== nextVersionFile) {
|
|
18
|
+
writeFileSync(versionFilePath, nextVersionFile, "utf8");
|
|
19
|
+
console.log(`Updated src/version.ts to ${packageJson.version}`);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
console.log(`src/version.ts already matches ${packageJson.version}`);
|
|
23
|
+
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION
|
|
1
|
+
export declare const VERSION = "0.1.17";
|
package/dist/version.js
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
const packageJsonPath = resolve(dirname(fileURLToPath(import.meta.url)), "../package.json");
|
|
5
|
-
export const VERSION = JSON.parse(readFileSync(packageJsonPath, "utf8"))
|
|
6
|
-
.version;
|
|
1
|
+
// This file is automatically updated by the version sync script.
|
|
2
|
+
export const VERSION = '0.1.17';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docshark",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "🦈 Documentation MCP Server — scrape, index, and search any doc website",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"dev": "bun run --watch src/cli.ts start",
|
|
37
37
|
"cli": "bun run src/cli.ts",
|
|
38
38
|
"check": "tsc --noEmit",
|
|
39
|
-
"
|
|
39
|
+
"sync:version": "bun run src/scripts/sync-version.ts",
|
|
40
|
+
"build": "bun run sync:version && rm -rf dist && tsc && chmod +x dist/cli.js",
|
|
40
41
|
"prepublishOnly": "bun run build",
|
|
41
42
|
"test:crawl": "bun run src/cli.ts add https://svelte.dev/docs/svelte/overview"
|
|
42
43
|
},
|