@osfactory/har 0.49.0 → 0.49.2
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
|
@@ -28694,6 +28694,10 @@ var init_control_config = __esm({
|
|
|
28694
28694
|
});
|
|
28695
28695
|
|
|
28696
28696
|
// src/utils/shell.ts
|
|
28697
|
+
function quoteShellArg(arg) {
|
|
28698
|
+
if (/^[A-Za-z0-9_./:=+-]+$/.test(arg)) return arg;
|
|
28699
|
+
return `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
28700
|
+
}
|
|
28697
28701
|
function run(command2, options = {}) {
|
|
28698
28702
|
try {
|
|
28699
28703
|
const stdout = (0, import_child_process.execSync)(command2, {
|
|
@@ -29055,10 +29059,6 @@ var init_slot_registry = __esm({
|
|
|
29055
29059
|
});
|
|
29056
29060
|
|
|
29057
29061
|
// src/core/local-executor.ts
|
|
29058
|
-
function quoteShellArg(arg) {
|
|
29059
|
-
if (/^[A-Za-z0-9_./:=+-]+$/.test(arg)) return arg;
|
|
29060
|
-
return `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
29061
|
-
}
|
|
29062
29062
|
function buildLaunchFlagArgs(flags) {
|
|
29063
29063
|
const args = [];
|
|
29064
29064
|
if (flags.worktree === false) args.push("--no-worktree");
|
|
@@ -31227,11 +31227,11 @@ function buildTelemetryEnvBlock(attrs) {
|
|
|
31227
31227
|
const lines2 = [
|
|
31228
31228
|
"",
|
|
31229
31229
|
"# HAR session attribution (generated)",
|
|
31230
|
-
`HAR_SESSION_KEY=${attrs.sessionKey}`,
|
|
31231
|
-
...attrs.workUnitId ? [`HAR_WORK_UNIT_ID=${attrs.workUnitId}`] : [],
|
|
31232
|
-
...attrs.attemptId ? [`HAR_ATTEMPT_ID=${attrs.attemptId}`] : [],
|
|
31233
|
-
`HAR_CONTROL_API_URL=${apiUrl}`,
|
|
31234
|
-
`OTEL_RESOURCE_ATTRIBUTES=${buildOtelResourceAttributes(attrs)}`,
|
|
31230
|
+
`HAR_SESSION_KEY=${quoteShellArg(attrs.sessionKey)}`,
|
|
31231
|
+
...attrs.workUnitId ? [`HAR_WORK_UNIT_ID=${quoteShellArg(attrs.workUnitId)}`] : [],
|
|
31232
|
+
...attrs.attemptId ? [`HAR_ATTEMPT_ID=${quoteShellArg(attrs.attemptId)}`] : [],
|
|
31233
|
+
`HAR_CONTROL_API_URL=${quoteShellArg(apiUrl)}`,
|
|
31234
|
+
`OTEL_RESOURCE_ATTRIBUTES=${quoteShellArg(buildOtelResourceAttributes(attrs))}`,
|
|
31235
31235
|
"# Agent telemetry: @osfactory/otel-hook \u2192 Mission Control (har telemetry on|off)"
|
|
31236
31236
|
];
|
|
31237
31237
|
return lines2.join("\n") + "\n";
|
|
@@ -31264,6 +31264,7 @@ var init_telemetry_env = __esm({
|
|
|
31264
31264
|
fs20 = __toESM(require("fs"));
|
|
31265
31265
|
path21 = __toESM(require("path"));
|
|
31266
31266
|
init_control_config();
|
|
31267
|
+
init_shell();
|
|
31267
31268
|
TELEMETRY_MARKER_START = "# HAR session attribution (generated)";
|
|
31268
31269
|
TELEMETRY_MARKER_END = "# end HAR telemetry";
|
|
31269
31270
|
}
|
|
@@ -60,8 +60,8 @@ source .env.agent.${AGENT_ID}
|
|
|
60
60
|
# Build
|
|
61
61
|
xcodebuild build -scheme MyApp -destination "$HARNESS_IOS_DESTINATION" CODE_SIGNING_ALLOWED=NO
|
|
62
62
|
|
|
63
|
-
# Run unit tests
|
|
64
|
-
xcodebuild test -scheme MyApp -destination "$HARNESS_IOS_DESTINATION"
|
|
63
|
+
# Run unit tests — signed, or an app with entitlements traps at launch
|
|
64
|
+
xcodebuild test -scheme MyApp -destination "$HARNESS_IOS_DESTINATION"
|
|
65
65
|
|
|
66
66
|
# Install and launch on this slot's device
|
|
67
67
|
./.har/agent-cli.sh ${AGENT_ID} install path/to/MyApp.app
|
|
@@ -118,6 +118,8 @@ process.stdout.write(JSON.stringify(arr));
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
# Quick (default): compile-only — use XCODEBUILD_BIN from .env.agent.<id> (written by launch)
|
|
121
|
+
# Nothing is installed or run, so CODE_SIGNING_ALLOWED=NO keeps the smoke build
|
|
122
|
+
# from needing a signing identity.
|
|
121
123
|
run_step "build" '${XCODEBUILD_BIN:-xcodebuild} build \
|
|
122
124
|
${XC_FLAGS} \
|
|
123
125
|
-scheme "${XC_SCHEME}" \
|
|
@@ -133,18 +135,20 @@ run_step "build" '${XCODEBUILD_BIN:-xcodebuild} build \
|
|
|
133
135
|
|
|
134
136
|
if [ -n "$FULL" ]; then
|
|
135
137
|
# Full: project-specific checks — add/remove/reorder steps for this repo.
|
|
138
|
+
# No CODE_SIGNING_ALLOWED=NO here, unlike the build step: tests install and run
|
|
139
|
+
# the host app on the simulator, and an unsigned app gets no entitlements. Apps
|
|
140
|
+
# using CloudKit, NSUbiquitousKeyValueStore, or push then trap at launch, before
|
|
141
|
+
# the test harness connects — the whole bundle is lost, not one test.
|
|
136
142
|
run_step "unit-tests" '${XCODEBUILD_BIN:-xcodebuild} test \
|
|
137
143
|
${XC_FLAGS} \
|
|
138
144
|
-scheme "${XC_SCHEME}" \
|
|
139
145
|
-destination "${XC_DESTINATION}" \
|
|
140
146
|
-derivedDataPath "${XC_DERIVED}" \
|
|
141
|
-
CODE_SIGNING_ALLOWED=NO \
|
|
142
147
|
| xcbeautify 2>/dev/null || ${XCODEBUILD_BIN:-xcodebuild} test \
|
|
143
148
|
${XC_FLAGS} \
|
|
144
149
|
-scheme "${XC_SCHEME}" \
|
|
145
150
|
-destination "${XC_DESTINATION}" \
|
|
146
|
-
-derivedDataPath "${XC_DERIVED}"
|
|
147
|
-
CODE_SIGNING_ALLOWED=NO' || true
|
|
151
|
+
-derivedDataPath "${XC_DERIVED}"' || true
|
|
148
152
|
|
|
149
153
|
# SwiftLint — optional, skip gracefully when not installed
|
|
150
154
|
run_step "lint" "command -v \"${HARNESS_SWIFTLINT_CMD:-swiftlint}\" >/dev/null 2>&1 && \
|