adhdev 0.8.9 → 0.8.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/cli/index.js +36 -46
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +29 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -581,8 +581,8 @@ async function detectIDEs() {
|
|
|
581
581
|
if ((0, import_fs2.existsSync)(bundledCli)) resolvedCli = bundledCli;
|
|
582
582
|
}
|
|
583
583
|
if (!resolvedCli && appPath && os22 === "win32") {
|
|
584
|
-
const { dirname:
|
|
585
|
-
const appDir =
|
|
584
|
+
const { dirname: dirname9 } = await import("path");
|
|
585
|
+
const appDir = dirname9(appPath);
|
|
586
586
|
const candidates = [
|
|
587
587
|
`${appDir}\\\\bin\\\\${def.cli}.cmd`,
|
|
588
588
|
`${appDir}\\\\bin\\\\${def.cli}`,
|
|
@@ -26987,9 +26987,9 @@ var init_handler2 = __esm({
|
|
|
26987
26987
|
if (this.fsw.closed) {
|
|
26988
26988
|
return;
|
|
26989
26989
|
}
|
|
26990
|
-
const
|
|
26990
|
+
const dirname9 = sp.dirname(file2);
|
|
26991
26991
|
const basename7 = sp.basename(file2);
|
|
26992
|
-
const parent = this.fsw._getWatchedDir(
|
|
26992
|
+
const parent = this.fsw._getWatchedDir(dirname9);
|
|
26993
26993
|
let prevStats = stats;
|
|
26994
26994
|
if (parent.has(basename7))
|
|
26995
26995
|
return;
|
|
@@ -27016,7 +27016,7 @@ var init_handler2 = __esm({
|
|
|
27016
27016
|
prevStats = newStats2;
|
|
27017
27017
|
}
|
|
27018
27018
|
} catch (error48) {
|
|
27019
|
-
this.fsw._remove(
|
|
27019
|
+
this.fsw._remove(dirname9, basename7);
|
|
27020
27020
|
}
|
|
27021
27021
|
} else if (parent.has(basename7)) {
|
|
27022
27022
|
const at = newStats.atimeMs;
|
|
@@ -39355,6 +39355,33 @@ var init_session_host = __esm({
|
|
|
39355
39355
|
}
|
|
39356
39356
|
});
|
|
39357
39357
|
|
|
39358
|
+
// src/version.ts
|
|
39359
|
+
function resolvePackageVersion(options) {
|
|
39360
|
+
const injectedVersion = options?.injectedVersion || "unknown";
|
|
39361
|
+
const dir = options?.dirname || __dirname;
|
|
39362
|
+
const possiblePaths = [
|
|
39363
|
+
(0, import_path2.join)(dir, "..", "..", "package.json"),
|
|
39364
|
+
(0, import_path2.join)(dir, "..", "package.json"),
|
|
39365
|
+
(0, import_path2.join)(dir, "package.json")
|
|
39366
|
+
];
|
|
39367
|
+
for (const p of possiblePaths) {
|
|
39368
|
+
try {
|
|
39369
|
+
const data = JSON.parse((0, import_fs3.readFileSync)(p, "utf-8"));
|
|
39370
|
+
if (data.version) return data.version;
|
|
39371
|
+
} catch {
|
|
39372
|
+
}
|
|
39373
|
+
}
|
|
39374
|
+
return injectedVersion;
|
|
39375
|
+
}
|
|
39376
|
+
var import_fs3, import_path2;
|
|
39377
|
+
var init_version = __esm({
|
|
39378
|
+
"src/version.ts"() {
|
|
39379
|
+
"use strict";
|
|
39380
|
+
import_fs3 = require("fs");
|
|
39381
|
+
import_path2 = require("path");
|
|
39382
|
+
}
|
|
39383
|
+
});
|
|
39384
|
+
|
|
39358
39385
|
// src/adhdev-daemon.ts
|
|
39359
39386
|
var adhdev_daemon_exports = {};
|
|
39360
39387
|
__export(adhdev_daemon_exports, {
|
|
@@ -39428,26 +39455,8 @@ var init_adhdev_daemon = __esm({
|
|
|
39428
39455
|
import_http = require("http");
|
|
39429
39456
|
import_ws3 = require("ws");
|
|
39430
39457
|
import_chalk2 = __toESM(require("chalk"));
|
|
39431
|
-
|
|
39432
|
-
|
|
39433
|
-
try {
|
|
39434
|
-
const possiblePaths = [
|
|
39435
|
-
path21.join(__dirname, "..", "package.json"),
|
|
39436
|
-
path21.join(__dirname, "package.json")
|
|
39437
|
-
];
|
|
39438
|
-
for (const p of possiblePaths) {
|
|
39439
|
-
try {
|
|
39440
|
-
const data = JSON.parse(fs17.readFileSync(p, "utf-8"));
|
|
39441
|
-
if (data.version) {
|
|
39442
|
-
pkgVersion = data.version;
|
|
39443
|
-
break;
|
|
39444
|
-
}
|
|
39445
|
-
} catch {
|
|
39446
|
-
}
|
|
39447
|
-
}
|
|
39448
|
-
} catch {
|
|
39449
|
-
}
|
|
39450
|
-
}
|
|
39458
|
+
init_version();
|
|
39459
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.10" });
|
|
39451
39460
|
DANGEROUS_PATTERNS = [
|
|
39452
39461
|
/\brm\s+(-[a-z]*f|-[a-z]*r|--force|--recursive)/i,
|
|
39453
39462
|
/\bsudo\b/i,
|
|
@@ -40503,8 +40512,6 @@ var init_supported = __esm({
|
|
|
40503
40512
|
// src/cli/index.ts
|
|
40504
40513
|
var import_commander = require("commander");
|
|
40505
40514
|
var import_chalk7 = __toESM(require("chalk"));
|
|
40506
|
-
var import_fs3 = require("fs");
|
|
40507
|
-
var import_path2 = require("path");
|
|
40508
40515
|
init_src();
|
|
40509
40516
|
|
|
40510
40517
|
// src/cli/setup-commands.ts
|
|
@@ -42139,25 +42146,8 @@ function registerCdpCommands(program2) {
|
|
|
42139
42146
|
}
|
|
42140
42147
|
|
|
42141
42148
|
// src/cli/index.ts
|
|
42142
|
-
|
|
42143
|
-
|
|
42144
|
-
const possiblePaths = [
|
|
42145
|
-
(0, import_path2.join)(__dirname, "..", "..", "package.json"),
|
|
42146
|
-
(0, import_path2.join)(__dirname, "..", "package.json"),
|
|
42147
|
-
(0, import_path2.join)(__dirname, "package.json")
|
|
42148
|
-
];
|
|
42149
|
-
for (const p of possiblePaths) {
|
|
42150
|
-
try {
|
|
42151
|
-
const data = JSON.parse((0, import_fs3.readFileSync)(p, "utf-8"));
|
|
42152
|
-
if (data.version) {
|
|
42153
|
-
pkgVersion2 = data.version;
|
|
42154
|
-
break;
|
|
42155
|
-
}
|
|
42156
|
-
} catch {
|
|
42157
|
-
}
|
|
42158
|
-
}
|
|
42159
|
-
} catch {
|
|
42160
|
-
}
|
|
42149
|
+
init_version();
|
|
42150
|
+
var pkgVersion2 = resolvePackageVersion();
|
|
42161
42151
|
var _cliProviderLoader = new ProviderLoader({ logFn: () => {
|
|
42162
42152
|
} });
|
|
42163
42153
|
_cliProviderLoader.loadAll();
|