@shd101wyy/yo 0.1.14 → 0.1.15
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/README.md +40 -1
- package/out/cjs/index.cjs +514 -514
- package/out/cjs/yo-cli.cjs +713 -687
- package/out/cjs/yo-lsp.cjs +11635 -0
- package/out/esm/index.mjs +359 -359
- package/out/types/src/cache.d.ts +2 -0
- package/out/types/src/doc/extractor.d.ts +4 -0
- package/out/types/src/evaluator/values/impl.d.ts +9 -1
- package/out/types/src/lsp/completion.d.ts +3 -0
- package/out/types/src/lsp/definition.d.ts +3 -0
- package/out/types/src/lsp/diagnostics.d.ts +6 -0
- package/out/types/src/lsp/document-manager.d.ts +31 -0
- package/out/types/src/lsp/folding.d.ts +3 -0
- package/out/types/src/lsp/hover.d.ts +3 -0
- package/out/types/src/lsp/inlay-hints.d.ts +3 -0
- package/out/types/src/lsp/references.d.ts +3 -0
- package/out/types/src/lsp/rename.d.ts +16 -0
- package/out/types/src/lsp/server.d.ts +1 -0
- package/out/types/src/lsp/signature-help.d.ts +3 -0
- package/out/types/src/lsp/symbols.d.ts +3 -0
- package/out/types/src/lsp/utils.d.ts +11 -0
- package/out/types/src/tests/lsp.test.d.ts +1 -0
- package/out/types/src/tests/version.test.d.ts +1 -0
- package/out/types/src/types/definitions.d.ts +2 -0
- package/out/types/src/version-cache.d.ts +7 -0
- package/out/types/src/version.d.ts +5 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -1
- package/scripts/build-site.ts +32 -15
- package/scripts/check-liburing.js +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shd101wyy/yo",
|
|
3
3
|
"displayName": "Yo",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.15",
|
|
5
5
|
"main": "./out/cjs/index.cjs",
|
|
6
6
|
"module": "./out/esm/index.mjs",
|
|
7
7
|
"types": "./out/types/src/index.d.ts",
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"markdown_yo": "0.0.4",
|
|
51
|
+
"vscode-languageserver": "^9.0.1",
|
|
52
|
+
"vscode-languageserver-textdocument": "^1.0.12",
|
|
51
53
|
"yargs": "^17.7.2"
|
|
52
54
|
},
|
|
53
55
|
"devDependencies": {
|
package/scripts/build-site.ts
CHANGED
|
@@ -20,18 +20,19 @@ import * as fs from "fs";
|
|
|
20
20
|
import * as path from "path";
|
|
21
21
|
import { createRenderer } from "markdown_yo";
|
|
22
22
|
import type { MarkdownRenderer } from "markdown_yo";
|
|
23
|
-
import {
|
|
23
|
+
import { execFileSync } from "child_process";
|
|
24
24
|
|
|
25
25
|
const ROOT = path.resolve(import.meta.dir, "..");
|
|
26
26
|
const GITHUB_REPO = "https://github.com/shd101wyy/Yo";
|
|
27
27
|
|
|
28
28
|
// Detect the latest release tag for stable links.
|
|
29
29
|
// Falls back to "main" if no tags exist or git fails.
|
|
30
|
-
function getLatestTag(): string {
|
|
30
|
+
export function getLatestTag(rootDir: string = ROOT): string {
|
|
31
31
|
try {
|
|
32
|
-
const result =
|
|
33
|
-
cwd:
|
|
32
|
+
const result = execFileSync("git", ["describe", "--tags", "--abbrev=0"], {
|
|
33
|
+
cwd: rootDir,
|
|
34
34
|
encoding: "utf-8",
|
|
35
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
35
36
|
timeout: 5000,
|
|
36
37
|
}).trim();
|
|
37
38
|
return result || "main";
|
|
@@ -43,6 +44,16 @@ function getLatestTag(): string {
|
|
|
43
44
|
const GITHUB_REF = getLatestTag();
|
|
44
45
|
const GITHUB_BLOB = `${GITHUB_REPO}/blob/${GITHUB_REF}`;
|
|
45
46
|
|
|
47
|
+
export function getStdDocCommand(rootDir: string = ROOT): {
|
|
48
|
+
command: string;
|
|
49
|
+
args: string[];
|
|
50
|
+
} {
|
|
51
|
+
return {
|
|
52
|
+
command: "node",
|
|
53
|
+
args: [path.join(rootDir, "out", "cjs", "yo-cli.cjs"), "doc", "std/"],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
46
57
|
// ── Parse args ───────────────────────────────────────────────────────
|
|
47
58
|
|
|
48
59
|
let outputDir = path.join(ROOT, "site");
|
|
@@ -399,7 +410,7 @@ function injectHomeLinks(stdDir: string): void {
|
|
|
399
410
|
|
|
400
411
|
// ── Main ─────────────────────────────────────────────────────────────
|
|
401
412
|
|
|
402
|
-
async function main(): Promise<void> {
|
|
413
|
+
export async function main(): Promise<void> {
|
|
403
414
|
console.log("Building documentation site...");
|
|
404
415
|
console.log(` Output: ${outputDir}`);
|
|
405
416
|
|
|
@@ -449,12 +460,16 @@ async function main(): Promise<void> {
|
|
|
449
460
|
const stdOutputDir = path.join(outputDir, "std");
|
|
450
461
|
|
|
451
462
|
try {
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
463
|
+
const stdDocCommand = getStdDocCommand();
|
|
464
|
+
execFileSync(
|
|
465
|
+
stdDocCommand.command,
|
|
466
|
+
[...stdDocCommand.args, "--output", stdOutputDir],
|
|
467
|
+
{
|
|
468
|
+
cwd: ROOT,
|
|
469
|
+
stdio: ["ignore", "inherit", "inherit"],
|
|
470
|
+
timeout: 600_000,
|
|
471
|
+
}
|
|
472
|
+
);
|
|
458
473
|
console.log(" ✓ Standard library docs generated");
|
|
459
474
|
} catch (err) {
|
|
460
475
|
console.error(
|
|
@@ -492,7 +507,9 @@ function getTotalSize(dir: string): number {
|
|
|
492
507
|
return Math.round(total / 1024);
|
|
493
508
|
}
|
|
494
509
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
510
|
+
if (import.meta.main) {
|
|
511
|
+
main().catch((err) => {
|
|
512
|
+
console.error("Fatal error:", err);
|
|
513
|
+
process.exit(1);
|
|
514
|
+
});
|
|
515
|
+
}
|
|
@@ -9,9 +9,9 @@ const fs = require("fs");
|
|
|
9
9
|
function checkLiburing() {
|
|
10
10
|
const platform = os.platform();
|
|
11
11
|
|
|
12
|
-
// Only check on Linux
|
|
12
|
+
// Only check on Linux. Other platforms don't use io_uring, so keep postinstall
|
|
13
|
+
// quiet instead of printing a Linux-specific note.
|
|
13
14
|
if (platform !== "linux") {
|
|
14
|
-
console.log("ℹ️ Async I/O with io_uring is only supported on Linux.");
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
|