@mycadet/cli 0.12.6-dev.202610072225.d7acd73 → 0.12.6-dev.202610080102.d7d1bec
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 +1 -1
- package/package.json +1 -1
- package/src/lib/local.ts +6 -6
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ cadet hatch [options]
|
|
|
55
55
|
|
|
56
56
|
#### Remote Targets
|
|
57
57
|
|
|
58
|
-
- **`local`** -- Starts the local assistant and local gateway. Gateway source resolution order is: repo source tree, then installed `@mycadet/
|
|
58
|
+
- **`local`** -- Starts the local assistant and local gateway. Gateway source resolution order is: repo source tree, then installed `@mycadet/gateway` package.
|
|
59
59
|
- **`docker`** -- Starts the assistant, gateway, and credential service in Docker containers.
|
|
60
60
|
- **`cadet`** -- Hatches an assistant on the Cadet Cloud.
|
|
61
61
|
- **`custom`** -- Recognized but not yet implemented.
|
package/package.json
CHANGED
package/src/lib/local.ts
CHANGED
|
@@ -110,7 +110,7 @@ function hasLocalRuntimeComponents(installDir: string): boolean {
|
|
|
110
110
|
return (
|
|
111
111
|
existsSync(packagePath(installDir, "@mycadet/assistant", "src/index.ts")) &&
|
|
112
112
|
existsSync(
|
|
113
|
-
packagePath(installDir, "@mycadet/
|
|
113
|
+
packagePath(installDir, "@mycadet/gateway", "src/index.ts"),
|
|
114
114
|
) &&
|
|
115
115
|
existsSync(
|
|
116
116
|
packagePath(installDir, "@mycadet/credential-executor", "src/main.ts"),
|
|
@@ -214,7 +214,7 @@ function localRuntimeGatewayDir(
|
|
|
214
214
|
): string | undefined {
|
|
215
215
|
const installDir = resources?.runtimeInstallDir;
|
|
216
216
|
if (!installDir) return undefined;
|
|
217
|
-
const candidate = packagePath(installDir, "@mycadet/
|
|
217
|
+
const candidate = packagePath(installDir, "@mycadet/gateway", "");
|
|
218
218
|
return isGatewaySourceDir(candidate) ? candidate : undefined;
|
|
219
219
|
}
|
|
220
220
|
|
|
@@ -423,7 +423,7 @@ function isGatewaySourceDir(dir: string): boolean {
|
|
|
423
423
|
return false;
|
|
424
424
|
try {
|
|
425
425
|
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
426
|
-
return pkg.name === "@mycadet/
|
|
426
|
+
return pkg.name === "@mycadet/gateway";
|
|
427
427
|
} catch {
|
|
428
428
|
return false;
|
|
429
429
|
}
|
|
@@ -969,7 +969,7 @@ function resolveGatewayDir(resources?: LocalInstanceResources): string {
|
|
|
969
969
|
return sourceDir;
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
// npm-installed: @mycadet/cli and @mycadet/
|
|
972
|
+
// npm-installed: @mycadet/cli and @mycadet/gateway are siblings
|
|
973
973
|
const npmGatewayDir = join(
|
|
974
974
|
import.meta.dir,
|
|
975
975
|
"..",
|
|
@@ -993,11 +993,11 @@ function resolveGatewayDir(resources?: LocalInstanceResources): string {
|
|
|
993
993
|
}
|
|
994
994
|
|
|
995
995
|
try {
|
|
996
|
-
const pkgPath = _require.resolve("@mycadet/
|
|
996
|
+
const pkgPath = _require.resolve("@mycadet/gateway/package.json");
|
|
997
997
|
return dirname(pkgPath);
|
|
998
998
|
} catch {
|
|
999
999
|
throw new Error(
|
|
1000
|
-
"Gateway not found. Ensure @mycadet/
|
|
1000
|
+
"Gateway not found. Ensure @mycadet/gateway is installed or run from the source tree.",
|
|
1001
1001
|
);
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|