@lark-apaas/fullstack-cli 1.1.59-alpha.20260719084243 → 1.1.59-alpha.20260719101713
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/index.js
CHANGED
|
@@ -8852,6 +8852,7 @@ import { spawn as spawn2, spawnSync as spawnSync7 } from "child_process";
|
|
|
8852
8852
|
|
|
8853
8853
|
// src/commands/preview-artifact/readiness.ts
|
|
8854
8854
|
function isPreviewBusinessResponseReady(response) {
|
|
8855
|
+
if (response.status === 401 || response.status === 403) return true;
|
|
8855
8856
|
return response.status !== 404 && response.status < 500 && !response.headers.get("content-type")?.includes("text/html");
|
|
8856
8857
|
}
|
|
8857
8858
|
|
|
@@ -9106,11 +9107,11 @@ async function runPreviewArtifactProbe(options) {
|
|
|
9106
9107
|
coverage.clientAssets = entryReferences.localExecutable;
|
|
9107
9108
|
if (entryReferences.localExecutable.length === 0) {
|
|
9108
9109
|
reasons.push("client HTML has no local executable entry asset");
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9110
|
+
for (const externalAsset of entryReferences.unsupportedExternal) {
|
|
9111
|
+
reasons.push(
|
|
9112
|
+
`external client entry asset is unsupported: ${externalAsset}`
|
|
9113
|
+
);
|
|
9114
|
+
}
|
|
9114
9115
|
}
|
|
9115
9116
|
for (const entryAsset of entryAssets) {
|
|
9116
9117
|
if (!resolveClientEntryAsset(clientRoot, options.appBasePath, entryAsset)) {
|
package/package.json
CHANGED
package/templates/scripts/dev.js
CHANGED
|
@@ -6,6 +6,7 @@ const path = require('path');
|
|
|
6
6
|
const { spawn, execFileSync, execSync } = require('child_process');
|
|
7
7
|
const readline = require('readline');
|
|
8
8
|
const {
|
|
9
|
+
applyPreviewArtifactHostOverrides,
|
|
9
10
|
buildListeningPortLookupArgs,
|
|
10
11
|
createDeferredTypecheckGate,
|
|
11
12
|
createPreviewPhaseReporter,
|
|
@@ -64,6 +65,7 @@ const previewArtifactPorts = resolvePreviewArtifactPorts({
|
|
|
64
65
|
server_port: configuredServerPort,
|
|
65
66
|
client_port: configuredClientDevPort,
|
|
66
67
|
});
|
|
68
|
+
applyPreviewArtifactHostOverrides(previewArtifactPorts, process.env);
|
|
67
69
|
const SERVER_PORT = previewArtifactPorts.server_port;
|
|
68
70
|
const CLIENT_DEV_PORT = previewArtifactPorts.client_port;
|
|
69
71
|
process.env.SERVER_PORT = String(SERVER_PORT);
|
|
@@ -107,6 +107,16 @@ function resolvePreviewArtifactPorts(options) {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
function applyPreviewArtifactHostOverrides(ports, environment) {
|
|
111
|
+
if (!ports.cache_active) return false;
|
|
112
|
+
// Cached runtime and switcher use an explicit IPv4 loopback endpoint. Pin
|
|
113
|
+
// both shadow services to the same address family; Linux commonly resolves
|
|
114
|
+
// `localhost` to IPv6-only ::1, which otherwise makes cutover impossible.
|
|
115
|
+
environment.SERVER_HOST = '127.0.0.1';
|
|
116
|
+
environment.CLIENT_DEV_HOST = '127.0.0.1';
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
|
|
110
120
|
function hasRuntimeCompilerPluginConsumer(projectRoot, sourceRoot) {
|
|
111
121
|
const root = path.resolve(projectRoot, sourceRoot || 'src');
|
|
112
122
|
const stack = [root];
|
|
@@ -437,6 +447,7 @@ async function waitForTcpReady(options) {
|
|
|
437
447
|
}
|
|
438
448
|
|
|
439
449
|
module.exports = {
|
|
450
|
+
applyPreviewArtifactHostOverrides,
|
|
440
451
|
buildListeningPortLookupArgs,
|
|
441
452
|
createDeferredTypecheckGate,
|
|
442
453
|
createPreviewPhaseReporter,
|