@ai-development-environment/control-agent 0.0.32 → 0.0.34
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/control-agent.js +64 -2
- package/package.json +1 -1
package/dist/control-agent.js
CHANGED
|
@@ -2596,6 +2596,53 @@ function parseScript(value, index) {
|
|
|
2596
2596
|
position
|
|
2597
2597
|
};
|
|
2598
2598
|
}
|
|
2599
|
+
function httpUrl(value, name) {
|
|
2600
|
+
const text2 = stringValue6(value, name);
|
|
2601
|
+
let url;
|
|
2602
|
+
try {
|
|
2603
|
+
url = new URL(text2);
|
|
2604
|
+
} catch {
|
|
2605
|
+
throw new Error(`${name} must be a valid HTTP(S) URL`);
|
|
2606
|
+
}
|
|
2607
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
2608
|
+
throw new Error(`${name} must be a valid HTTP(S) URL`);
|
|
2609
|
+
}
|
|
2610
|
+
return url.toString().replace(/\/$/, "");
|
|
2611
|
+
}
|
|
2612
|
+
function parseBuildTelemetrySettings(value) {
|
|
2613
|
+
if (value === void 0 || value === null) return void 0;
|
|
2614
|
+
const input = objectValue6(value, "build job payload.telemetry");
|
|
2615
|
+
return {
|
|
2616
|
+
localBaseUrl: httpUrl(
|
|
2617
|
+
input.localBaseUrl,
|
|
2618
|
+
"build job payload.telemetry.localBaseUrl"
|
|
2619
|
+
),
|
|
2620
|
+
remoteBaseUrl: httpUrl(
|
|
2621
|
+
input.remoteBaseUrl,
|
|
2622
|
+
"build job payload.telemetry.remoteBaseUrl"
|
|
2623
|
+
),
|
|
2624
|
+
selectedBaseUrl: httpUrl(
|
|
2625
|
+
input.selectedBaseUrl,
|
|
2626
|
+
"build job payload.telemetry.selectedBaseUrl"
|
|
2627
|
+
),
|
|
2628
|
+
consoleLogsUrl: httpUrl(
|
|
2629
|
+
input.consoleLogsUrl,
|
|
2630
|
+
"build job payload.telemetry.consoleLogsUrl"
|
|
2631
|
+
),
|
|
2632
|
+
analyticsEventsUrl: httpUrl(
|
|
2633
|
+
input.analyticsEventsUrl,
|
|
2634
|
+
"build job payload.telemetry.analyticsEventsUrl"
|
|
2635
|
+
),
|
|
2636
|
+
consoleCollectionEnabled: booleanValue2(
|
|
2637
|
+
input.consoleCollectionEnabled,
|
|
2638
|
+
"build job payload.telemetry.consoleCollectionEnabled"
|
|
2639
|
+
),
|
|
2640
|
+
analyticsCollectionEnabled: booleanValue2(
|
|
2641
|
+
input.analyticsCollectionEnabled,
|
|
2642
|
+
"build job payload.telemetry.analyticsCollectionEnabled"
|
|
2643
|
+
)
|
|
2644
|
+
};
|
|
2645
|
+
}
|
|
2599
2646
|
function parseBuildSourceDiscoverPayload(value) {
|
|
2600
2647
|
return worktreeIdentity(objectValue6(value, "source discovery payload"));
|
|
2601
2648
|
}
|
|
@@ -2679,6 +2726,7 @@ function parseBuildJobPayload(value) {
|
|
|
2679
2726
|
destination,
|
|
2680
2727
|
advancedSettings,
|
|
2681
2728
|
scripts,
|
|
2729
|
+
telemetry: parseBuildTelemetrySettings(input.telemetry),
|
|
2682
2730
|
worktreeCoverage: input.worktreeCoverage === void 0 ? false : booleanValue2(
|
|
2683
2731
|
input.worktreeCoverage,
|
|
2684
2732
|
"build job payload.worktreeCoverage"
|
|
@@ -8008,7 +8056,20 @@ if (typeof hookModule.default === "function") {
|
|
|
8008
8056
|
BUILD_ID: options.input.buildId,
|
|
8009
8057
|
BUILD_PHASE: options.phase,
|
|
8010
8058
|
BUILD_CONTEXT_PATH: options.contextPath,
|
|
8011
|
-
BUILD_ARTIFACT_DIRECTORY: options.input.artifactDirectory
|
|
8059
|
+
BUILD_ARTIFACT_DIRECTORY: options.input.artifactDirectory,
|
|
8060
|
+
...options.input.telemetry ? {
|
|
8061
|
+
TELEMETRY_LOCAL_BASE_URL: options.input.telemetry.localBaseUrl,
|
|
8062
|
+
TELEMETRY_REMOTE_BASE_URL: options.input.telemetry.remoteBaseUrl,
|
|
8063
|
+
TELEMETRY_BASE_URL: options.input.telemetry.selectedBaseUrl,
|
|
8064
|
+
CONSOLE_LOGS_URL: options.input.telemetry.consoleLogsUrl,
|
|
8065
|
+
ANALYTICS_EVENTS_URL: options.input.telemetry.analyticsEventsUrl,
|
|
8066
|
+
CONSOLE_LOG_COLLECTION_ENABLED: String(
|
|
8067
|
+
options.input.telemetry.consoleCollectionEnabled
|
|
8068
|
+
),
|
|
8069
|
+
ANALYTICS_EVENT_COLLECTION_ENABLED: String(
|
|
8070
|
+
options.input.telemetry.analyticsCollectionEnabled
|
|
8071
|
+
)
|
|
8072
|
+
} : {}
|
|
8012
8073
|
}),
|
|
8013
8074
|
timeoutMs: options.script.timeoutSeconds * 1e3,
|
|
8014
8075
|
signal: options.signal,
|
|
@@ -8683,7 +8744,8 @@ var runIosBuild = async (payload, timeoutMs, signal, onLog, context) => {
|
|
|
8683
8744
|
},
|
|
8684
8745
|
source: input.source,
|
|
8685
8746
|
scheme: input.scheme,
|
|
8686
|
-
configuration: input.configuration
|
|
8747
|
+
configuration: input.configuration,
|
|
8748
|
+
telemetry: input.telemetry ?? null
|
|
8687
8749
|
};
|
|
8688
8750
|
let buildResult = null;
|
|
8689
8751
|
let coverageChanges = [];
|