@absolutejs/absolute 0.19.0-beta.1009 → 0.19.0-beta.1010
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-jXaXWU/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-jXaXWU/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-jXaXWU/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
package/dist/cli/index.js
CHANGED
|
@@ -4466,10 +4466,13 @@ var isPartialEscapeSequence = (value) => {
|
|
|
4466
4466
|
};
|
|
4467
4467
|
var createWorkspaceTui = ({
|
|
4468
4468
|
actions,
|
|
4469
|
+
headless: headlessOption,
|
|
4469
4470
|
services,
|
|
4470
4471
|
version: version2
|
|
4471
4472
|
}) => {
|
|
4472
|
-
|
|
4473
|
+
const headlessForced = headlessOption === true || process.env.CI === "1" || process.env.CI === "true";
|
|
4474
|
+
const input = headlessForced ? null : openTtyStream2();
|
|
4475
|
+
const headless = headlessForced || headlessOption !== false && !input;
|
|
4473
4476
|
let disposed = false;
|
|
4474
4477
|
let renderTimer = null;
|
|
4475
4478
|
let shellMode = false;
|
|
@@ -4500,7 +4503,7 @@ var createWorkspaceTui = ({
|
|
|
4500
4503
|
} catch {}
|
|
4501
4504
|
};
|
|
4502
4505
|
const scheduleRender = () => {
|
|
4503
|
-
if (disposed || renderTimer) {
|
|
4506
|
+
if (headless || disposed || renderTimer) {
|
|
4504
4507
|
return;
|
|
4505
4508
|
}
|
|
4506
4509
|
renderTimer = setTimeout(() => {
|
|
@@ -4632,10 +4635,16 @@ var createWorkspaceTui = ({
|
|
|
4632
4635
|
}
|
|
4633
4636
|
existing.status = status2;
|
|
4634
4637
|
existing.detail = detail;
|
|
4638
|
+
if (headless) {
|
|
4639
|
+
addLog("workspace", `${name} ${status2}${detail ? ` \u2014 ${detail}` : ""}`, status2 === "error" ? "error" : "info");
|
|
4640
|
+
}
|
|
4635
4641
|
scheduleRender();
|
|
4636
4642
|
};
|
|
4637
4643
|
const setReadyDuration = (durationMs) => {
|
|
4638
4644
|
readyDurationMs = durationMs;
|
|
4645
|
+
if (headless && durationMs !== null) {
|
|
4646
|
+
addLog("workspace", `workspace ready in ${getDurationString(durationMs)}`);
|
|
4647
|
+
}
|
|
4639
4648
|
scheduleRender();
|
|
4640
4649
|
};
|
|
4641
4650
|
const addLog = (source, message, level = "info") => {
|
|
@@ -4645,12 +4654,13 @@ var createWorkspaceTui = ({
|
|
|
4645
4654
|
}
|
|
4646
4655
|
for (const line of cleanMessage.split(`
|
|
4647
4656
|
`)) {
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
timestamp
|
|
4653
|
-
|
|
4657
|
+
const timestamp = formatTimestamp2();
|
|
4658
|
+
logEntries.push({ level, message: line, source, timestamp });
|
|
4659
|
+
if (headless) {
|
|
4660
|
+
const levelColor = level === "error" ? colors.red : level === "warn" ? colors.yellow : colors.dim;
|
|
4661
|
+
process.stdout.write(`${colors.dim}${timestamp}${colors.reset} ${levelColor}${source}${colors.reset} ${line}
|
|
4662
|
+
`);
|
|
4663
|
+
}
|
|
4654
4664
|
}
|
|
4655
4665
|
if (logEntries.length > MAX_LOG_ENTRIES) {
|
|
4656
4666
|
logEntries.splice(0, logEntries.length - MAX_LOG_ENTRIES);
|
|
@@ -4859,8 +4869,15 @@ var createWorkspaceTui = ({
|
|
|
4859
4869
|
processInputChars(chars);
|
|
4860
4870
|
};
|
|
4861
4871
|
const start2 = () => {
|
|
4872
|
+
if (headless) {
|
|
4873
|
+
addLog("workspace", `ABSOLUTEJS WORKSPACE v${version2} \u2014 headless mode (no interactive TTY); streaming logs. Ctrl+C to stop.`);
|
|
4874
|
+
for (const service of serviceStates.values()) {
|
|
4875
|
+
const target = service.url ?? (service.port ? `:${service.port}` : "internal");
|
|
4876
|
+
addLog("workspace", `${service.name} (${service.visibility}) ${target}`);
|
|
4877
|
+
}
|
|
4878
|
+
return;
|
|
4879
|
+
}
|
|
4862
4880
|
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[H\x1B[?25l");
|
|
4863
|
-
input = openTtyStream2();
|
|
4864
4881
|
if (input) {
|
|
4865
4882
|
input.resume();
|
|
4866
4883
|
input.on("data", onData);
|
|
@@ -4885,6 +4902,9 @@ var createWorkspaceTui = ({
|
|
|
4885
4902
|
return;
|
|
4886
4903
|
}
|
|
4887
4904
|
disposed = true;
|
|
4905
|
+
if (headless) {
|
|
4906
|
+
return;
|
|
4907
|
+
}
|
|
4888
4908
|
clearPendingEscape();
|
|
4889
4909
|
if (renderTimer) {
|
|
4890
4910
|
clearTimeout(renderTimer);
|
|
@@ -5168,10 +5188,10 @@ var formatReadyTimeoutMessage = (resolved) => {
|
|
|
5168
5188
|
var probeReady = async (resolved, service) => {
|
|
5169
5189
|
try {
|
|
5170
5190
|
if (resolved.type === "http")
|
|
5171
|
-
return probeHttpReady(resolved);
|
|
5191
|
+
return await probeHttpReady(resolved);
|
|
5172
5192
|
if (resolved.type === "tcp")
|
|
5173
|
-
return probeTcpReady(resolved);
|
|
5174
|
-
return probeCommandReady(resolved, service);
|
|
5193
|
+
return await probeTcpReady(resolved);
|
|
5194
|
+
return await probeCommandReady(resolved, service);
|
|
5175
5195
|
} catch {
|
|
5176
5196
|
return false;
|
|
5177
5197
|
}
|
|
@@ -5403,6 +5423,7 @@ var workspace = async (subcommand, options) => {
|
|
|
5403
5423
|
restart: () => restartWorkspace(),
|
|
5404
5424
|
shell: (command) => runShellCommand2(command)
|
|
5405
5425
|
},
|
|
5426
|
+
headless: options.noTui,
|
|
5406
5427
|
services: orderedNames.map((name) => {
|
|
5407
5428
|
const service = services[name];
|
|
5408
5429
|
return {
|
|
@@ -5704,7 +5725,10 @@ if (command === "dev") {
|
|
|
5704
5725
|
command: `workspace:${workspaceCommand ?? "unknown"}`
|
|
5705
5726
|
});
|
|
5706
5727
|
const configPath2 = parseNamedArg("--config");
|
|
5707
|
-
await workspace(workspaceCommand, {
|
|
5728
|
+
await workspace(workspaceCommand, {
|
|
5729
|
+
configPath: configPath2,
|
|
5730
|
+
noTui: args.includes("--no-tui")
|
|
5731
|
+
});
|
|
5708
5732
|
} else if (command === "eslint" && args[0] === "studio") {
|
|
5709
5733
|
sendTelemetryEvent("cli:command", { command: "eslint:studio" });
|
|
5710
5734
|
const studioServerModule = `${import.meta.dir}/eslint/studio/server`;
|
|
@@ -5746,7 +5770,7 @@ if (command === "dev") {
|
|
|
5746
5770
|
console.error("Usage: absolute <command>");
|
|
5747
5771
|
console.error("Commands:");
|
|
5748
5772
|
console.error(" dev [entry] Start development server");
|
|
5749
|
-
console.error(" workspace dev Start multi-service workspace dev");
|
|
5773
|
+
console.error(" workspace dev [--no-tui] Start multi-service workspace dev");
|
|
5750
5774
|
console.error(" build [--outdir dir] Build production assets");
|
|
5751
5775
|
console.error(" start [entry] [--outdir dir] Start production server");
|
|
5752
5776
|
console.error(" compile [entry] [--outdir dir] [--outfile path] Compile standalone executable");
|
|
@@ -20,8 +20,9 @@ type WorkspaceLogEntry = {
|
|
|
20
20
|
source: string;
|
|
21
21
|
timestamp: string;
|
|
22
22
|
};
|
|
23
|
-
export declare const createWorkspaceTui: ({ actions, services, version }: {
|
|
23
|
+
export declare const createWorkspaceTui: ({ actions, headless: headlessOption, services, version }: {
|
|
24
24
|
actions: WorkspaceTuiActions;
|
|
25
|
+
headless?: boolean;
|
|
25
26
|
services: WorkspaceTuiService[];
|
|
26
27
|
version: string;
|
|
27
28
|
}) => {
|
package/package.json
CHANGED