@oxprotocol/cli 0.1.8 → 0.1.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/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +63 -11
- package/dist/commands/dev.js.map +1 -1
- package/dist/lib/ide-launch.d.ts +25 -4
- package/dist/lib/ide-launch.d.ts.map +1 -1
- package/dist/lib/ide-launch.js +420 -79
- package/dist/lib/ide-launch.js.map +1 -1
- package/package.json +13 -13
- package/vendor/oxp-vscode.json +1 -1
- package/vendor/oxp-vscode.vsix +0 -0
- package/LICENSE +0 -189
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAqFA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA6MzD"}
|
package/dist/commands/dev.js
CHANGED
|
@@ -24,10 +24,53 @@ import { WebSocketServer } from "ws";
|
|
|
24
24
|
import { packBundle } from "@oxprotocol/bundle";
|
|
25
25
|
import { findProjectRoot, fail, info } from "../util.js";
|
|
26
26
|
import { launchIdeForDev } from "../lib/ide-launch.js";
|
|
27
|
+
/**
|
|
28
|
+
* Bind the dev server to the requested port, but if it's already in use,
|
|
29
|
+
* walk forward a few ports, then fall back to an OS-assigned free one.
|
|
30
|
+
* Returns the port we actually ended up listening on.
|
|
31
|
+
*
|
|
32
|
+
* Why: a stale `oxp dev` (or another extension running concurrently) holding
|
|
33
|
+
* 7373 should not crash the new session — that's a hostile dev experience.
|
|
34
|
+
*/
|
|
35
|
+
async function listenWithFallback(http, preferred) {
|
|
36
|
+
const tryListen = (port) => new Promise((resolve, reject) => {
|
|
37
|
+
const onError = (err) => {
|
|
38
|
+
http.removeListener("listening", onListening);
|
|
39
|
+
if (err.code === "EADDRINUSE")
|
|
40
|
+
resolve("busy");
|
|
41
|
+
else
|
|
42
|
+
reject(err);
|
|
43
|
+
};
|
|
44
|
+
const onListening = () => {
|
|
45
|
+
http.removeListener("error", onError);
|
|
46
|
+
const addr = http.address();
|
|
47
|
+
const actual = typeof addr === "object" && addr ? addr.port : port;
|
|
48
|
+
resolve(actual);
|
|
49
|
+
};
|
|
50
|
+
http.once("error", onError);
|
|
51
|
+
http.once("listening", onListening);
|
|
52
|
+
http.listen(port, "127.0.0.1");
|
|
53
|
+
});
|
|
54
|
+
// Try the requested port, then a small forward range, then ephemeral (0).
|
|
55
|
+
const candidates = [preferred, preferred + 1, preferred + 2, 0];
|
|
56
|
+
for (const p of candidates) {
|
|
57
|
+
const result = await tryListen(p);
|
|
58
|
+
if (result !== "busy") {
|
|
59
|
+
if (p !== preferred) {
|
|
60
|
+
info(`port ${preferred} in use — using ${result} instead (set OXP_DEV_PORT to override)`);
|
|
61
|
+
}
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Should not happen — port 0 always succeeds — but be explicit.
|
|
66
|
+
throw new Error("could not bind oxp dev to any port");
|
|
67
|
+
}
|
|
27
68
|
export async function dev(args) {
|
|
28
|
-
// Parse args: [--port N] [--no-ide] [dir]
|
|
69
|
+
// Parse args: [--port N] [--no-ide] [--ide=<id>] [--debug] [dir]
|
|
29
70
|
let port = Number(process.env.OXP_DEV_PORT ?? 7373);
|
|
30
71
|
let openIde = process.env.OXP_DEV_NO_IDE !== "1";
|
|
72
|
+
let ideOverride = process.env.OXP_IDE;
|
|
73
|
+
let debug = process.env.OXP_DEBUG === "1";
|
|
31
74
|
const positional = [];
|
|
32
75
|
for (let i = 0; i < args.length; i++) {
|
|
33
76
|
const a = args[i];
|
|
@@ -43,6 +86,18 @@ export async function dev(args) {
|
|
|
43
86
|
else if (a === "--no-ide") {
|
|
44
87
|
openIde = false;
|
|
45
88
|
}
|
|
89
|
+
else if (a === "--ide") {
|
|
90
|
+
const v = args[++i];
|
|
91
|
+
if (!v)
|
|
92
|
+
fail("usage: oxp dev --ide <id>");
|
|
93
|
+
ideOverride = v;
|
|
94
|
+
}
|
|
95
|
+
else if (a.startsWith("--ide=")) {
|
|
96
|
+
ideOverride = a.slice("--ide=".length);
|
|
97
|
+
}
|
|
98
|
+
else if (a === "--debug") {
|
|
99
|
+
debug = true;
|
|
100
|
+
}
|
|
46
101
|
else {
|
|
47
102
|
positional.push(a);
|
|
48
103
|
}
|
|
@@ -167,7 +222,7 @@ export async function dev(args) {
|
|
|
167
222
|
});
|
|
168
223
|
// ── Initial build + start ────────────────────────────────────────────────
|
|
169
224
|
await rebuild("initial");
|
|
170
|
-
await
|
|
225
|
+
port = await listenWithFallback(http, port);
|
|
171
226
|
// Machine-readable line so IDE hosts can auto-detect when we're ready
|
|
172
227
|
// (used by VS Code's "OXP: Start Dev Session" command).
|
|
173
228
|
info(`OXP_DEV_READY port=${port}`);
|
|
@@ -176,18 +231,15 @@ export async function dev(args) {
|
|
|
176
231
|
info(` watching: ${root}`);
|
|
177
232
|
info("");
|
|
178
233
|
if (openIde) {
|
|
179
|
-
const ok = launchIdeForDev(root);
|
|
234
|
+
const ok = launchIdeForDev(root, { ideOverride, debug });
|
|
180
235
|
info("");
|
|
181
|
-
if (ok) {
|
|
182
|
-
info("Your IDE is opening. Click the OXP icon in the activity bar (or press F5)");
|
|
183
|
-
info("to attach the running extension. The UI renders inside the IDE.");
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
236
|
+
if (!ok) {
|
|
186
237
|
info("Render the extension inside your IDE:");
|
|
187
|
-
info(" • VS Code / Cursor: install the OXP host, then run \u201cOXP: Start Dev Session\u201d");
|
|
188
|
-
info(" • JetBrains / Neovim: see hosts/<ide>/README.md");
|
|
238
|
+
info(" • VS Code / Cursor / Windsurf: install the OXP host, then run \u201cOXP: Start Dev Session\u201d");
|
|
239
|
+
info(" • JetBrains / Neovim / Piye: see hosts/<ide>/README.md");
|
|
189
240
|
info("");
|
|
190
|
-
info("
|
|
241
|
+
info("Override detection with --ide=<id> (cursor|windsurf|code|code-insiders|jetbrains|neovim|piye)");
|
|
242
|
+
info("or disable auto-launch with --no-ide.");
|
|
191
243
|
}
|
|
192
244
|
}
|
|
193
245
|
else {
|
package/dist/commands/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACL,YAAY,GAGb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,eAAe,EAAkB,MAAM,IAAI,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AASvD,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAc;IACtC,0CAA0C;IAC1C,IAAI,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC;IACpD,IAAI,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,GAAG,CAAC;IACjD,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAA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O,EAAE,KAAK,CAAC;QAC9B,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACP,YAAY;IACd,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW,EAAE,GAAW;IACxC,OAAO,IAAI,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QACjC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;QACjB,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,EAAE;YACvB,GAAG;YACH,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,SAAS;YAChB,GAAG,EAAE,OAAO,CAAC,GAAG;SACjB,CAAC,CAAC;QACH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;QACnD,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/lib/ide-launch.d.ts
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* if no supported IDE was found (caller should print fallback hints).
|
|
2
|
+
* The output of detection. Either we know the IDE (and have a CLI to
|
|
3
|
+
* drive) or we don't.
|
|
5
4
|
*/
|
|
6
|
-
|
|
5
|
+
interface DetectedIde {
|
|
6
|
+
/** Human display name from product.json (`nameLong`) or app folder. */
|
|
7
|
+
name: string;
|
|
8
|
+
/** CLI binary name from product.json (`applicationName`) or derived. */
|
|
9
|
+
bin: string;
|
|
10
|
+
/** Absolute path to the bundled CLI inside the install (preferred). */
|
|
11
|
+
binPath?: string;
|
|
12
|
+
/** Root of the install: `/Applications/Cursor.app` or `/usr/share/cursor`. */
|
|
13
|
+
installRoot?: string;
|
|
14
|
+
/** Did we read this from a product.json? */
|
|
15
|
+
fromProductJson: boolean;
|
|
16
|
+
/** Detection source for `--debug`. */
|
|
17
|
+
source: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function detectIde(): DetectedIde | null;
|
|
20
|
+
export interface LaunchOptions {
|
|
21
|
+
/** `--ide=<bin>` override — literal CLI binary name. */
|
|
22
|
+
ideOverride?: string;
|
|
23
|
+
/** Print detection details. */
|
|
24
|
+
debug?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare function launchIdeForDev(projectRoot: string, opts?: LaunchOptions): boolean;
|
|
27
|
+
export {};
|
|
7
28
|
//# sourceMappingURL=ide-launch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ide-launch.d.ts","sourceRoot":"","sources":["../../src/lib/ide-launch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ide-launch.d.ts","sourceRoot":"","sources":["../../src/lib/ide-launch.ts"],"names":[],"mappings":"AAsFA;;;GAGG;AACH,UAAU,WAAW;IACnB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,GAAG,EAAE,MAAM,CAAC;IACZ,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,eAAe,EAAE,OAAO,CAAC;IACzB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAsOD,wBAAgB,SAAS,IAAI,WAAW,GAAG,IAAI,CA0B9C;AA2HD,MAAM,WAAW,aAAa;IAC5B,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE,aAAkB,GACvB,OAAO,CAiGT"}
|
package/dist/lib/ide-launch.js
CHANGED
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Generic IDE detection + auto-install for `oxp dev`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* activity-bar view appears.
|
|
4
|
+
* No hardcoded list of IDEs. We detect the IDE that owns the current
|
|
5
|
+
* terminal by walking the parent process to its application bundle /
|
|
6
|
+
* install directory, then read VS Code's own `product.json` manifest
|
|
7
|
+
* — every VS Code fork (Cursor, Windsurf, Antigravity, VSCodium, …)
|
|
8
|
+
* ships one with the IDE's display name and CLI binary name. From
|
|
9
|
+
* there we use the bundled CLI inside the install to install the host
|
|
10
|
+
* VSIX and (if launched outside the IDE) open a new window.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* This works for any current or future VS Code-compatible IDE without
|
|
13
|
+
* code changes.
|
|
14
|
+
*
|
|
15
|
+
* Override: `--ide=<bin>` (or env `OXP_IDE`) forces a CLI binary name.
|
|
16
|
+
* Disable: `--no-ide` (or env `OXP_DEV_NO_IDE=1`).
|
|
17
|
+
* Debug: `--debug` (or env `OXP_DEBUG=1`).
|
|
15
18
|
*/
|
|
16
19
|
import { spawn, spawnSync as nodeSpawnSync } from "node:child_process";
|
|
17
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
18
|
-
import { dirname, join } from "node:path";
|
|
20
|
+
import { existsSync, readFileSync, readlinkSync, statSync } from "node:fs";
|
|
21
|
+
import { dirname, join, sep } from "node:path";
|
|
19
22
|
import { fileURLToPath } from "node:url";
|
|
20
23
|
import { info } from "../util.js";
|
|
21
|
-
const SUPPORTED_IDES = [
|
|
22
|
-
{ name: "Cursor", bin: "cursor" },
|
|
23
|
-
{ name: "VS Code", bin: "code" },
|
|
24
|
-
{ name: "VS Code Insiders", bin: "code-insiders" },
|
|
25
|
-
];
|
|
26
|
-
const HOST_EXTENSION_ID = "oxp.oxp-vscode";
|
|
27
|
-
/**
|
|
28
|
-
* Locate the VSIX shipped inside the CLI npm package
|
|
29
|
-
* (`<cli>/vendor/oxp-vscode.vsix`). When the CLI is run from source the
|
|
30
|
-
* vendor dir lives next to dist/, so we walk up from this module's path.
|
|
31
|
-
*/
|
|
32
24
|
function locateVendoredVsix() {
|
|
33
25
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
34
|
-
// dist/lib/ide-launch.js → ../../vendor (built)
|
|
35
|
-
// src/lib/ide-launch.ts → ../../vendor (tsx)
|
|
36
26
|
const candidates = [
|
|
37
27
|
join(here, "..", "..", "vendor"),
|
|
38
28
|
join(here, "..", "..", "..", "vendor"),
|
|
@@ -58,46 +48,327 @@ function locateVendoredVsix() {
|
|
|
58
48
|
}
|
|
59
49
|
return null;
|
|
60
50
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
function spawnSync(cmd, args) {
|
|
52
|
+
const r = nodeSpawnSync(cmd, args, { encoding: "utf8" });
|
|
53
|
+
return {
|
|
54
|
+
status: r.status,
|
|
55
|
+
stdout: r.stdout ?? "",
|
|
56
|
+
stderr: r.stderr ?? "",
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function commandExists(bin) {
|
|
60
|
+
if (!bin)
|
|
61
|
+
return false;
|
|
62
|
+
const which = process.platform === "win32" ? "where" : "which";
|
|
63
|
+
return spawnSync(which, [bin]).status === 0;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Look for `<root>/Contents/Resources/app/product.json` (macOS .app) or
|
|
67
|
+
* `<root>/resources/app/product.json` (Linux/Windows install). Returns
|
|
68
|
+
* the parsed manifest if present.
|
|
69
|
+
*/
|
|
70
|
+
function readProductJson(installRoot) {
|
|
71
|
+
const tries = [
|
|
72
|
+
join(installRoot, "Contents", "Resources", "app"),
|
|
73
|
+
join(installRoot, "resources", "app"),
|
|
74
|
+
];
|
|
75
|
+
for (const appDir of tries) {
|
|
76
|
+
const p = join(appDir, "product.json");
|
|
77
|
+
if (!existsSync(p))
|
|
78
|
+
continue;
|
|
79
|
+
try {
|
|
80
|
+
const product = JSON.parse(readFileSync(p, "utf8"));
|
|
81
|
+
return { product, appDir };
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// ignore
|
|
85
|
+
}
|
|
65
86
|
}
|
|
66
87
|
return null;
|
|
67
88
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
89
|
+
/**
|
|
90
|
+
* From an arbitrary executable path, walk up to the install root.
|
|
91
|
+
* On macOS the boundary is `*.app/`. On Linux/Windows, walk up until
|
|
92
|
+
* we find a directory containing `resources/app/product.json`.
|
|
93
|
+
*/
|
|
94
|
+
function findInstallRoot(execPath) {
|
|
95
|
+
// macOS .app boundary
|
|
96
|
+
const m = /^(.*?\.app)(\/|$)/.exec(execPath);
|
|
97
|
+
if (m && m[1])
|
|
98
|
+
return m[1];
|
|
99
|
+
// Linux/Windows: walk up looking for resources/app/product.json
|
|
100
|
+
let dir = dirname(execPath);
|
|
101
|
+
for (let i = 0; i < 8; i++) {
|
|
102
|
+
if (existsSync(join(dir, "resources", "app", "product.json")))
|
|
103
|
+
return dir;
|
|
104
|
+
const parent = dirname(dir);
|
|
105
|
+
if (parent === dir)
|
|
106
|
+
break;
|
|
107
|
+
dir = parent;
|
|
72
108
|
}
|
|
73
|
-
|
|
74
|
-
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Locate the bundled CLI inside a VS Code-family install. The CLI is at
|
|
113
|
+
* `<install>/Contents/Resources/app/bin/<applicationName>` on macOS or
|
|
114
|
+
* `<install>/bin/<applicationName>` on Linux/Windows.
|
|
115
|
+
*/
|
|
116
|
+
function findBundledCli(installRoot, appName) {
|
|
117
|
+
if (!appName)
|
|
118
|
+
return null;
|
|
119
|
+
const candidates = [
|
|
120
|
+
join(installRoot, "Contents", "Resources", "app", "bin", appName),
|
|
121
|
+
join(installRoot, "bin", appName),
|
|
122
|
+
join(installRoot, "bin", `${appName}.cmd`),
|
|
123
|
+
join(installRoot, "bin", `${appName}.exe`),
|
|
124
|
+
];
|
|
125
|
+
for (const c of candidates) {
|
|
126
|
+
if (existsSync(c)) {
|
|
127
|
+
try {
|
|
128
|
+
if (statSync(c).isFile())
|
|
129
|
+
return c;
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
// ignore
|
|
133
|
+
}
|
|
134
|
+
}
|
|
75
135
|
}
|
|
136
|
+
return null;
|
|
76
137
|
}
|
|
77
|
-
|
|
78
|
-
|
|
138
|
+
/** Best-effort: get an ancestor process's executable path. */
|
|
139
|
+
function getProcessExecPath(pid) {
|
|
140
|
+
if (!pid || pid <= 1)
|
|
141
|
+
return null;
|
|
142
|
+
if (process.platform === "linux") {
|
|
143
|
+
try {
|
|
144
|
+
return readlinkSync(`/proc/${pid}/exe`);
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
// fall through
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (process.platform === "darwin") {
|
|
151
|
+
// `comm=` returns the executable path *without* arguments, so paths
|
|
152
|
+
// containing spaces (e.g. "IntelliJ IDEA.app", "Visual Studio
|
|
153
|
+
// Code.app") survive intact. `command=` would include args, forcing
|
|
154
|
+
// us to split on whitespace and truncating those names.
|
|
155
|
+
const r = spawnSync("ps", ["-o", "comm=", "-p", String(pid)]);
|
|
156
|
+
if (r.status === 0) {
|
|
157
|
+
const line = r.stdout.replace(/\r?\n$/, "");
|
|
158
|
+
if (line)
|
|
159
|
+
return line;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (process.platform === "linux") {
|
|
163
|
+
// /proc above is the primary path; this is the fallback.
|
|
164
|
+
const r = spawnSync("ps", ["-o", "comm=", "-p", String(pid)]);
|
|
165
|
+
if (r.status === 0) {
|
|
166
|
+
const line = r.stdout.replace(/\r?\n$/, "");
|
|
167
|
+
if (line)
|
|
168
|
+
return line;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (process.platform === "win32") {
|
|
172
|
+
const r = spawnSync("wmic", [
|
|
173
|
+
"process",
|
|
174
|
+
"where",
|
|
175
|
+
`ProcessId=${pid}`,
|
|
176
|
+
"get",
|
|
177
|
+
"ExecutablePath",
|
|
178
|
+
"/value",
|
|
179
|
+
]);
|
|
180
|
+
if (r.status === 0) {
|
|
181
|
+
const m = /ExecutablePath=(.+)/.exec(r.stdout);
|
|
182
|
+
if (m && m[1])
|
|
183
|
+
return m[1].trim();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
/** Get a process's parent PID (macOS/Linux). */
|
|
189
|
+
function getParentPid(pid) {
|
|
190
|
+
if (process.platform === "darwin" || process.platform === "linux") {
|
|
191
|
+
const r = spawnSync("ps", ["-o", "ppid=", "-p", String(pid)]);
|
|
192
|
+
if (r.status === 0) {
|
|
193
|
+
const n = Number(r.stdout.trim());
|
|
194
|
+
if (Number.isFinite(n) && n > 0)
|
|
195
|
+
return n;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (process.platform === "win32") {
|
|
199
|
+
const r = spawnSync("wmic", [
|
|
200
|
+
"process",
|
|
201
|
+
"where",
|
|
202
|
+
`ProcessId=${pid}`,
|
|
203
|
+
"get",
|
|
204
|
+
"ParentProcessId",
|
|
205
|
+
"/value",
|
|
206
|
+
]);
|
|
207
|
+
if (r.status === 0) {
|
|
208
|
+
const m = /ParentProcessId=(\d+)/.exec(r.stdout);
|
|
209
|
+
if (m)
|
|
210
|
+
return Number(m[1]);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
/** Walk up the process tree collecting exec paths (parent first, up to 8). */
|
|
216
|
+
function getAncestorExecPaths() {
|
|
217
|
+
const out = [];
|
|
218
|
+
let pid = process.ppid || null;
|
|
219
|
+
for (let i = 0; pid && i < 8; i++) {
|
|
220
|
+
const exec = getProcessExecPath(pid);
|
|
221
|
+
if (exec)
|
|
222
|
+
out.push({ pid, exec });
|
|
223
|
+
pid = getParentPid(pid);
|
|
224
|
+
}
|
|
225
|
+
return out;
|
|
226
|
+
}
|
|
227
|
+
/** Back-compat shim for the debug printer. */
|
|
228
|
+
function getParentExecPath() {
|
|
229
|
+
return getProcessExecPath(process.ppid || 0);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Try to derive the IDE from any path we have: parent process, or any
|
|
233
|
+
* env var whose value points into a VS Code-family install.
|
|
234
|
+
*/
|
|
235
|
+
function detectFromPath(execPath, source) {
|
|
236
|
+
const root = findInstallRoot(execPath);
|
|
237
|
+
if (!root)
|
|
238
|
+
return null;
|
|
239
|
+
const product = readProductJson(root);
|
|
240
|
+
if (product) {
|
|
241
|
+
const name = product.product.nameLong ||
|
|
242
|
+
product.product.nameShort ||
|
|
243
|
+
basename(root).replace(/\.app$/i, "");
|
|
244
|
+
const bin = product.product.applicationName || guessBinFromRoot(root);
|
|
245
|
+
const binPath = findBundledCli(root, bin);
|
|
246
|
+
return {
|
|
247
|
+
name,
|
|
248
|
+
bin,
|
|
249
|
+
binPath: binPath ?? undefined,
|
|
250
|
+
installRoot: root,
|
|
251
|
+
fromProductJson: true,
|
|
252
|
+
source: `${source} → ${root}`,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
// No product.json — best-effort name guess from folder
|
|
256
|
+
const name = basename(root).replace(/\.app$/i, "");
|
|
257
|
+
const bin = guessBinFromRoot(root);
|
|
258
|
+
const binPath = findBundledCli(root, bin);
|
|
79
259
|
return {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
260
|
+
name,
|
|
261
|
+
bin,
|
|
262
|
+
binPath: binPath ?? undefined,
|
|
263
|
+
installRoot: root,
|
|
264
|
+
fromProductJson: false,
|
|
265
|
+
source: `${source} → ${root} (no product.json)`,
|
|
83
266
|
};
|
|
84
267
|
}
|
|
85
|
-
function
|
|
86
|
-
const
|
|
268
|
+
function basename(p) {
|
|
269
|
+
const parts = p.split(sep).filter(Boolean);
|
|
270
|
+
return parts[parts.length - 1] ?? p;
|
|
271
|
+
}
|
|
272
|
+
function guessBinFromRoot(root) {
|
|
273
|
+
return basename(root)
|
|
274
|
+
.replace(/\.app$/i, "")
|
|
275
|
+
.toLowerCase()
|
|
276
|
+
.replace(/\s+/g, "-");
|
|
277
|
+
}
|
|
278
|
+
/** Env vars whose values often hold an IDE-internal path. */
|
|
279
|
+
const PATH_BEARING_ENV_VARS = [
|
|
280
|
+
"VSCODE_GIT_ASKPASS_NODE",
|
|
281
|
+
"VSCODE_GIT_ASKPASS_MAIN",
|
|
282
|
+
"VSCODE_IPC_HOOK",
|
|
283
|
+
"VSCODE_IPC_HOOK_CLI",
|
|
284
|
+
"VSCODE_CWD",
|
|
285
|
+
"TERM_PROGRAM_PATH",
|
|
286
|
+
"GIT_ASKPASS",
|
|
287
|
+
"_",
|
|
288
|
+
];
|
|
289
|
+
export function detectIde() {
|
|
290
|
+
// 1. Walk the whole process tree. Direct parent is usually `npx`/`node`
|
|
291
|
+
// when invoked by an extension host; the IDE is a few hops up.
|
|
292
|
+
for (const { exec, pid } of getAncestorExecPaths()) {
|
|
293
|
+
const fromAncestor = detectFromPath(exec, `ancestor pid=${pid} ${exec}`);
|
|
294
|
+
if (fromAncestor)
|
|
295
|
+
return fromAncestor;
|
|
296
|
+
}
|
|
297
|
+
// 2. If this terminal belongs to a non-VS-Code IDE (JetBrains, Neovim,
|
|
298
|
+
// Piye, …), STOP. Do not fall back to env-var scanning — env may
|
|
299
|
+
// leak `.app/` paths from a previously-focused VS Code window and
|
|
300
|
+
// we'd end up popping that on top of the user's actual IDE. The
|
|
301
|
+
// caller (`launchIdeForDev`) handles non-VS-Code recognition
|
|
302
|
+
// separately and prints a hint.
|
|
303
|
+
if (recognizeNonVscodeIde())
|
|
304
|
+
return null;
|
|
305
|
+
// 3. Trusted VS Code env vars. These are guaranteed to point at the
|
|
306
|
+
// *current* IDE (they're set by the integrated terminal itself).
|
|
307
|
+
for (const key of PATH_BEARING_ENV_VARS) {
|
|
308
|
+
const v = process.env[key];
|
|
309
|
+
if (!v)
|
|
310
|
+
continue;
|
|
311
|
+
const fromEnv = detectFromPath(v, `env ${key}`);
|
|
312
|
+
if (fromEnv)
|
|
313
|
+
return fromEnv;
|
|
314
|
+
}
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
// ── Debug ─────────────────────────────────────────────────────────────────
|
|
318
|
+
function printDebug(detected) {
|
|
319
|
+
info("── oxp dev: IDE detection debug ──");
|
|
320
|
+
info(` platform: ${process.platform}`);
|
|
321
|
+
info(` ppid: ${process.ppid}`);
|
|
322
|
+
const ancestors = getAncestorExecPaths();
|
|
323
|
+
info(" ancestors (parent first):");
|
|
324
|
+
if (ancestors.length === 0)
|
|
325
|
+
info(" <none resolved>");
|
|
326
|
+
for (const a of ancestors)
|
|
327
|
+
info(` pid=${a.pid} ${a.exec}`);
|
|
328
|
+
if (detected) {
|
|
329
|
+
info(` detected: ${detected.name} (bin=${detected.bin})`);
|
|
330
|
+
info(` source: ${detected.source}`);
|
|
331
|
+
info(` install: ${detected.installRoot ?? "<n/a>"}`);
|
|
332
|
+
info(` binPath: ${detected.binPath ?? "<falls back to PATH lookup>"}`);
|
|
333
|
+
info(` product: ${detected.fromProductJson ? "yes" : "no"}`);
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
info(" detected: <none>");
|
|
337
|
+
}
|
|
338
|
+
const interesting = [
|
|
339
|
+
"TERM_PROGRAM",
|
|
340
|
+
"TERM_PROGRAM_VERSION",
|
|
341
|
+
"__CFBundleIdentifier",
|
|
342
|
+
"VSCODE_GIT_ASKPASS_NODE",
|
|
343
|
+
"VSCODE_IPC_HOOK_CLI",
|
|
344
|
+
];
|
|
345
|
+
info(" env:");
|
|
346
|
+
for (const k of interesting) {
|
|
347
|
+
const v = process.env[k];
|
|
348
|
+
if (v)
|
|
349
|
+
info(` ${k}=${v.length > 100 ? v.slice(0, 97) + "…" : v}`);
|
|
350
|
+
}
|
|
351
|
+
info("──────────────────────────────────");
|
|
352
|
+
}
|
|
353
|
+
// ── Drive the IDE ─────────────────────────────────────────────────────────
|
|
354
|
+
const HOST_EXTENSION_ID = "oxp.oxp-vscode";
|
|
355
|
+
function resolveCli(ide) {
|
|
356
|
+
if (ide.binPath)
|
|
357
|
+
return ide.binPath;
|
|
358
|
+
if (ide.bin && commandExists(ide.bin))
|
|
359
|
+
return ide.bin;
|
|
360
|
+
return null;
|
|
361
|
+
}
|
|
362
|
+
function isHostInstalled(cli, version) {
|
|
363
|
+
const r = spawnSync(cli, ["--list-extensions", "--show-versions"]);
|
|
87
364
|
if (r.status !== 0)
|
|
88
365
|
return false;
|
|
89
|
-
const wanted = `${HOST_EXTENSION_ID}@${
|
|
90
|
-
return r.stdout
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
info(`▸ installing OXP host into ${ide.name}…`);
|
|
96
|
-
const r = spawnSync(ide.bin, [
|
|
97
|
-
"--install-extension",
|
|
98
|
-
vsixPath,
|
|
99
|
-
"--force",
|
|
100
|
-
]);
|
|
366
|
+
const wanted = `${HOST_EXTENSION_ID}@${version}`.toLowerCase();
|
|
367
|
+
return r.stdout.split(/\r?\n/).some((l) => l.trim().toLowerCase() === wanted);
|
|
368
|
+
}
|
|
369
|
+
function installHost(cli, vsixPath, ideName) {
|
|
370
|
+
info(`▸ installing OXP host into ${ideName}…`);
|
|
371
|
+
const r = spawnSync(cli, ["--install-extension", vsixPath, "--force"]);
|
|
101
372
|
if (r.status !== 0) {
|
|
102
373
|
info(`✖ failed to install host: ${r.stderr.trim() || "exit " + r.status}`);
|
|
103
374
|
return false;
|
|
@@ -105,11 +376,9 @@ function installHost(ide, vsixPath) {
|
|
|
105
376
|
info(" ✓ host installed");
|
|
106
377
|
return true;
|
|
107
378
|
}
|
|
108
|
-
function openInIde(
|
|
109
|
-
// Detached so the IDE keeps running after `oxp dev` exits, and also so
|
|
110
|
-
// closing the IDE window doesn't kill the backend.
|
|
379
|
+
function openInIde(cli, projectRoot) {
|
|
111
380
|
try {
|
|
112
|
-
const child = spawn(
|
|
381
|
+
const child = spawn(cli, ["-n", projectRoot], {
|
|
113
382
|
detached: true,
|
|
114
383
|
stdio: "ignore",
|
|
115
384
|
});
|
|
@@ -120,38 +389,110 @@ function openInIde(ide, projectRoot) {
|
|
|
120
389
|
return false;
|
|
121
390
|
}
|
|
122
391
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
392
|
+
function recognizeNonVscodeIde() {
|
|
393
|
+
const env = process.env;
|
|
394
|
+
// Neovim sets NVIM (channel address) for any :terminal it spawns.
|
|
395
|
+
if (env.NVIM || env.NVIM_LISTEN_ADDRESS) {
|
|
396
|
+
return {
|
|
397
|
+
name: "Neovim",
|
|
398
|
+
hint: "Install the OXP Neovim plugin from `hosts/neovim` to attach.",
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
// Every JetBrains IDE sets TERMINAL_EMULATOR=JetBrains-JediTerm in its
|
|
402
|
+
// built-in terminal — IntelliJ, WebStorm, PyCharm, GoLand, Rider, …
|
|
403
|
+
if ((env.TERMINAL_EMULATOR ?? "").includes("JetBrains")) {
|
|
404
|
+
return {
|
|
405
|
+
name: "JetBrains IDE",
|
|
406
|
+
hint: "Install the OXP JetBrains plugin from `hosts/jetbrains` to attach.",
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
// Piye sets its own session var.
|
|
410
|
+
if (env.PIYE_SESSION || env.PIYE_VERSION) {
|
|
411
|
+
return {
|
|
412
|
+
name: "Piye",
|
|
413
|
+
hint: "Install the OXP Piye host from `hosts/piye` to attach.",
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
export function launchIdeForDev(projectRoot, opts = {}) {
|
|
129
419
|
const vsix = locateVendoredVsix();
|
|
130
420
|
if (!vsix) {
|
|
131
421
|
info("ℹ︎ no bundled host VSIX found — skipping IDE auto-launch");
|
|
132
422
|
return false;
|
|
133
423
|
}
|
|
134
|
-
const
|
|
424
|
+
const debug = opts.debug ?? process.env.OXP_DEBUG === "1";
|
|
425
|
+
const detected = detectIde();
|
|
426
|
+
if (debug)
|
|
427
|
+
printDebug(detected);
|
|
428
|
+
// Resolve target.
|
|
429
|
+
const override = opts.ideOverride ?? process.env.OXP_IDE;
|
|
430
|
+
let ide = detected;
|
|
431
|
+
let isCurrent = !!detected;
|
|
432
|
+
if (override) {
|
|
433
|
+
// User forced a binary name. Use it directly.
|
|
434
|
+
if (!commandExists(override)) {
|
|
435
|
+
info(`✖ --ide=${override}: '${override}' is not on PATH.`);
|
|
436
|
+
info(" Install your IDE's shell command (Command Palette → \"Install 'xxx' command in PATH\")");
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
ide = {
|
|
440
|
+
name: override,
|
|
441
|
+
bin: override,
|
|
442
|
+
fromProductJson: false,
|
|
443
|
+
source: `--ide=${override}`,
|
|
444
|
+
};
|
|
445
|
+
isCurrent = detected?.bin === override;
|
|
446
|
+
}
|
|
135
447
|
if (!ide) {
|
|
448
|
+
// Recognize IDEs that aren't VS Code-family. We can't auto-install
|
|
449
|
+
// a host into them yet, but we can at least confirm we *saw* them
|
|
450
|
+
// and tell the user what to do — and crucially, NOT pop a VS Code
|
|
451
|
+
// window on top of their session.
|
|
452
|
+
const nonVscode = recognizeNonVscodeIde();
|
|
453
|
+
if (nonVscode) {
|
|
454
|
+
info("");
|
|
455
|
+
info(`▸ detected ${nonVscode.name}.`);
|
|
456
|
+
info(` No host plugin is bundled for ${nonVscode.name} yet — the dev backend`);
|
|
457
|
+
info(" is running and any OXP host can connect to ws://localhost:<port>/dev");
|
|
458
|
+
info(` (see banner above). ${nonVscode.hint}`);
|
|
459
|
+
return true;
|
|
460
|
+
}
|
|
136
461
|
info("");
|
|
137
|
-
info("ℹ︎
|
|
138
|
-
info("
|
|
139
|
-
info("
|
|
140
|
-
info("
|
|
462
|
+
info("ℹ︎ Could not detect an IDE from this terminal.");
|
|
463
|
+
info(" • Run `oxp dev` from inside your IDE's terminal, or");
|
|
464
|
+
info(" • Pass `--ide=<bin>` (e.g. --ide=cursor, --ide=code), or");
|
|
465
|
+
info(" • Re-run with `--debug` to see what we saw.");
|
|
141
466
|
return false;
|
|
142
467
|
}
|
|
143
|
-
|
|
144
|
-
if (!
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
468
|
+
const cli = resolveCli(ide);
|
|
469
|
+
if (!cli) {
|
|
470
|
+
info(`✖ ${ide.name}: could not find a CLI to drive.`);
|
|
471
|
+
info(` Install ${ide.name}'s shell command (Command Palette → "Install '${ide.bin}' command in PATH"),`);
|
|
472
|
+
info(" or re-run with --ide=<bin> pointing at a CLI on your PATH.");
|
|
473
|
+
return false;
|
|
148
474
|
}
|
|
149
|
-
|
|
150
|
-
info(
|
|
475
|
+
if (!isCurrent)
|
|
476
|
+
info(`▸ targeting ${ide.name} (${ide.source})`);
|
|
477
|
+
else
|
|
478
|
+
info(`▸ detected ${ide.name} as your current IDE (${ide.source})`);
|
|
479
|
+
// Install host if missing.
|
|
480
|
+
if (isHostInstalled(cli, vsix.version)) {
|
|
481
|
+
info(` ✓ OXP host ${vsix.version} already installed in ${ide.name}`);
|
|
482
|
+
}
|
|
483
|
+
else if (!installHost(cli, vsix.vsixPath, ide.name)) {
|
|
484
|
+
info(" (continuing — install the host manually and reload your window)");
|
|
485
|
+
}
|
|
486
|
+
if (isCurrent) {
|
|
487
|
+
info("");
|
|
488
|
+
info(`▸ you're already in ${ide.name} — click the OXP icon in the activity bar`);
|
|
489
|
+
info(" (or press F5). If it's not visible yet, reload the window:");
|
|
490
|
+
info(" Cmd/Ctrl+Shift+P → Developer: Reload Window");
|
|
491
|
+
return true;
|
|
151
492
|
}
|
|
152
493
|
info(`▸ opening ${projectRoot} in ${ide.name}…`);
|
|
153
|
-
if (!openInIde(
|
|
154
|
-
info(`✖ failed to spawn ${
|
|
494
|
+
if (!openInIde(cli, projectRoot)) {
|
|
495
|
+
info(`✖ failed to spawn ${cli}`);
|
|
155
496
|
return false;
|
|
156
497
|
}
|
|
157
498
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ide-launch.js","sourceRoot":"","sources":["../../src/lib/ide-launch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASlC,MAAM,cAAc,GAAgB;IAClC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;IACjC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE;IAChC,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,eAAe,EAAE;CACnD,CAAC;AAEF,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAQ3C;;;;GAIG;AACH,SAAS,kBAAkB;IACzB,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,kDAAkD;IAClD,gDAAgD;IAChD,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,IAA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IAAI,CAAC,eAAe,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;;QAC5D,IAAI,CAAC,cAAc,GAAG,CAAC,IAAI,0BAA0B,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;IAEzE,2BAA2B;IAC3B,IAAI,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,IAAI,CAAC,gBAAgB,IAAI,CAAC,OAAO,yBAAyB,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IACxE,CAAC;SAAM,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACtD,IAAI,CAAC,mEAAmE,CAAC,CAAC;IAC5E,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,CAAC,EAAE,CAAC,CAAC;QACT,IAAI,CACF,uBAAuB,GAAG,CAAC,IAAI,2CAA2C,CAC3E,CAAC;QACF,IAAI,CAAC,8DAA8D,CAAC,CAAC;QACrE,IAAI,CAAC,iDAAiD,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,aAAa,WAAW,OAAO,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC;IACjD,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,EAAE,CAAC;QACjC,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;QACjC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxprotocol/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Command-line tool for the Open eXtensions Protocol.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,14 +25,19 @@
|
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsc -p tsconfig.json && chmod +x dist/cli.js",
|
|
30
|
+
"dev": "tsx src/cli.ts",
|
|
31
|
+
"test": "vitest run --passWithNoTests"
|
|
32
|
+
},
|
|
28
33
|
"dependencies": {
|
|
34
|
+
"@oxprotocol/bundle": "workspace:*",
|
|
35
|
+
"@oxprotocol/host-core": "workspace:*",
|
|
36
|
+
"@oxprotocol/schema": "workspace:*",
|
|
37
|
+
"@oxprotocol/types": "workspace:*",
|
|
38
|
+
"@oxprotocol/wit": "workspace:*",
|
|
29
39
|
"chokidar": "^4.0.3",
|
|
30
|
-
"ws": "^8.18.0"
|
|
31
|
-
"@oxprotocol/bundle": "0.1.5",
|
|
32
|
-
"@oxprotocol/host-core": "0.1.4",
|
|
33
|
-
"@oxprotocol/wit": "0.1.4",
|
|
34
|
-
"@oxprotocol/types": "0.1.4",
|
|
35
|
-
"@oxprotocol/schema": "0.1.4"
|
|
40
|
+
"ws": "^8.18.0"
|
|
36
41
|
},
|
|
37
42
|
"devDependencies": {
|
|
38
43
|
"@types/node": "^22.10.2",
|
|
@@ -40,10 +45,5 @@
|
|
|
40
45
|
"tsx": "^4.20.6",
|
|
41
46
|
"typescript": "5.9.3",
|
|
42
47
|
"vitest": "^2.1.8"
|
|
43
|
-
},
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "tsc -p tsconfig.json && chmod +x dist/cli.js",
|
|
46
|
-
"dev": "tsx src/cli.ts",
|
|
47
|
-
"test": "vitest run --passWithNoTests"
|
|
48
48
|
}
|
|
49
|
-
}
|
|
49
|
+
}
|
package/vendor/oxp-vscode.json
CHANGED
package/vendor/oxp-vscode.vsix
CHANGED
|
Binary file
|
package/LICENSE
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of tracking or improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for describing the origin of the Work and
|
|
141
|
-
reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Support. While redistributing the Work or
|
|
166
|
-
Derivative Works thereof, You may accept and offer support, warranty,
|
|
167
|
-
indemnity, or other liability obligations consistent with this
|
|
168
|
-
License. However, in accepting such obligations, You may act only
|
|
169
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
170
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
171
|
-
defend, and hold each Contributor harmless for any liability
|
|
172
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
173
|
-
of your accepting any such warranty or support.
|
|
174
|
-
|
|
175
|
-
END OF TERMS AND CONDITIONS
|
|
176
|
-
|
|
177
|
-
Copyright 2025 OXP contributors
|
|
178
|
-
|
|
179
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
180
|
-
you may not use this file except in compliance with the License.
|
|
181
|
-
You may obtain a copy of the License at
|
|
182
|
-
|
|
183
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
184
|
-
|
|
185
|
-
Unless required by applicable law or agreed to in writing, software
|
|
186
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
187
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
188
|
-
implied. See the License for the specific language governing permissions
|
|
189
|
-
and limitations under the License.
|