stagent 0.1.3 → 0.1.4
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.js
CHANGED
|
@@ -63,15 +63,12 @@ function resolveNextEntrypoint(cwd, exists = existsSync) {
|
|
|
63
63
|
function buildNextLaunchArgs({
|
|
64
64
|
isPrebuilt,
|
|
65
65
|
port,
|
|
66
|
-
host = SIDECAR_LOOPBACK_HOST
|
|
67
|
-
turbopack = true
|
|
66
|
+
host = SIDECAR_LOOPBACK_HOST
|
|
68
67
|
}) {
|
|
69
68
|
if (isPrebuilt) {
|
|
70
69
|
return ["start", "--hostname", host, "--port", String(port)];
|
|
71
70
|
}
|
|
72
|
-
|
|
73
|
-
if (turbopack) args.push("--turbopack");
|
|
74
|
-
return args;
|
|
71
|
+
return ["dev", "--hostname", host, "--port", String(port)];
|
|
75
72
|
}
|
|
76
73
|
function buildSidecarUrl(port, host = SIDECAR_LOOPBACK_HOST) {
|
|
77
74
|
return `http://${host}:${port}`;
|
|
@@ -465,8 +462,7 @@ async function main() {
|
|
|
465
462
|
const isPrebuilt = existsSync2(join3(effectiveCwd, ".next", "BUILD_ID"));
|
|
466
463
|
const nextArgs = buildNextLaunchArgs({
|
|
467
464
|
isPrebuilt,
|
|
468
|
-
port: actualPort
|
|
469
|
-
turbopack: effectiveCwd === appDir
|
|
465
|
+
port: actualPort
|
|
470
466
|
});
|
|
471
467
|
const sidecarUrl = buildSidecarUrl(actualPort);
|
|
472
468
|
console.log(`Stagent ${pkg.version}`);
|
package/next.config.mjs
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import { dirname } from "path";
|
|
2
|
-
import { fileURLToPath } from "url";
|
|
3
|
-
|
|
4
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
|
-
|
|
6
1
|
/** @type {import('next').NextConfig} */
|
|
7
2
|
const nextConfig = {
|
|
8
3
|
serverExternalPackages: ["better-sqlite3"],
|
|
9
4
|
devIndicators: false,
|
|
10
|
-
turbopack: {
|
|
11
|
-
root: __dirname,
|
|
12
|
-
},
|
|
13
5
|
};
|
|
14
6
|
|
|
15
7
|
export default nextConfig;
|
package/package.json
CHANGED
|
@@ -42,22 +42,12 @@ describe("desktop sidecar launch helpers", () => {
|
|
|
42
42
|
).toEqual(["start", "--hostname", "127.0.0.1", "--port", "3210"]);
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
it("launches Next on loopback for development builds
|
|
45
|
+
it("launches Next on loopback for development builds", () => {
|
|
46
46
|
expect(
|
|
47
47
|
buildNextLaunchArgs({
|
|
48
48
|
isPrebuilt: false,
|
|
49
49
|
port: 3210,
|
|
50
50
|
}),
|
|
51
|
-
).toEqual(["dev", "--hostname", "127.0.0.1", "--port", "3210", "--turbopack"]);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it("launches Next without turbopack when turbopack is false", () => {
|
|
55
|
-
expect(
|
|
56
|
-
buildNextLaunchArgs({
|
|
57
|
-
isPrebuilt: false,
|
|
58
|
-
port: 3210,
|
|
59
|
-
turbopack: false,
|
|
60
|
-
}),
|
|
61
51
|
).toEqual(["dev", "--hostname", "127.0.0.1", "--port", "3210"]);
|
|
62
52
|
});
|
|
63
53
|
|
|
@@ -68,20 +68,16 @@ export function buildNextLaunchArgs({
|
|
|
68
68
|
isPrebuilt,
|
|
69
69
|
port,
|
|
70
70
|
host = SIDECAR_LOOPBACK_HOST,
|
|
71
|
-
turbopack = true,
|
|
72
71
|
}: {
|
|
73
72
|
isPrebuilt: boolean;
|
|
74
73
|
port: number;
|
|
75
74
|
host?: string;
|
|
76
|
-
turbopack?: boolean;
|
|
77
75
|
}): string[] {
|
|
78
76
|
if (isPrebuilt) {
|
|
79
77
|
return ["start", "--hostname", host, "--port", String(port)];
|
|
80
78
|
}
|
|
81
79
|
|
|
82
|
-
|
|
83
|
-
if (turbopack) args.push("--turbopack");
|
|
84
|
-
return args;
|
|
80
|
+
return ["dev", "--hostname", host, "--port", String(port)];
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
export function buildSidecarUrl(port: number, host = SIDECAR_LOOPBACK_HOST): string {
|