@expo/build-tools 21.0.0 → 21.0.1

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.
@@ -49,6 +49,7 @@ async function runCustomBuildAsync(ctx) {
49
49
  externalFunctions: easFunctions,
50
50
  externalFunctionGroups: easFunctionGroups,
51
51
  steps: ctx.job.steps,
52
+ hooks: ctx.job.hooks,
52
53
  })
53
54
  : new steps_1.BuildConfigParser(globalContext, {
54
55
  externalFunctions: easFunctions,
@@ -1,6 +1,6 @@
1
1
  import { BuildJob, Env, Job, Metadata, StaticJobInterpolationContext } from '@expo/eas-build-job';
2
2
  import { bunyan } from '@expo/logger';
3
- import { BuildRuntimePlatform, ExternalBuildContextProvider, StepMetric } from '@expo/steps';
3
+ import { BuildRuntimePlatform, ExternalBuildContextProvider, StepMetric, WorkflowHookMetric } from '@expo/steps';
4
4
  import { Client } from '@urql/core';
5
5
  import { ArtifactToUpload, BuildContext } from './context';
6
6
  export interface BuilderRuntimeApi {
@@ -36,5 +36,6 @@ export declare class CustomBuildContext<TJob extends Job = Job> implements Exter
36
36
  updateEnv(env: Env): void;
37
37
  updateJobInformation(job: TJob, metadata: Metadata): void;
38
38
  reportStepMetric(metric: StepMetric): void;
39
+ reportWorkflowHookMetric(metric: WorkflowHookMetric): void;
39
40
  drainPendingMetricUploads(): Promise<void>;
40
41
  }
@@ -8,6 +8,7 @@ const eas_build_job_1 = require("@expo/eas-build-job");
8
8
  const steps_1 = require("@expo/steps");
9
9
  const assert_1 = __importDefault(require("assert"));
10
10
  const path_1 = __importDefault(require("path"));
11
+ const hookMetrics_1 = require("./utils/hookMetrics");
11
12
  const stepMetrics_1 = require("./utils/stepMetrics");
12
13
  const platformToBuildRuntimePlatform = {
13
14
  [eas_build_job_1.Platform.ANDROID]: steps_1.BuildRuntimePlatform.LINUX,
@@ -125,6 +126,9 @@ class CustomBuildContext {
125
126
  });
126
127
  this.pendingMetricUploads.push(p);
127
128
  }
129
+ reportWorkflowHookMetric(metric) {
130
+ (0, hookMetrics_1.reportWorkflowHookMetricToDatadog)(metric);
131
+ }
128
132
  async drainPendingMetricUploads() {
129
133
  await Promise.allSettled(this.pendingMetricUploads);
130
134
  }
package/dist/generic.js CHANGED
@@ -37,6 +37,7 @@ async function runGenericJobAsync(ctx) {
37
37
  externalFunctions: (0, easFunctions_1.getEasFunctions)(customBuildCtx),
38
38
  externalFunctionGroups: (0, easFunctionGroups_1.getEasFunctionGroups)(customBuildCtx),
39
39
  steps: ctx.job.steps,
40
+ hooks: ctx.job.hooks,
40
41
  });
41
42
  const workflow = await ctx.runBuildPhase(eas_build_job_1.BuildPhase.PARSE_CUSTOM_WORKFLOW_CONFIG, async () => {
42
43
  try {
@@ -12,6 +12,7 @@ function createCheckoutBuildFunction() {
12
12
  id: 'checkout',
13
13
  name: 'Checkout',
14
14
  __metricsId: 'eas/checkout',
15
+ __hookId: 'checkout',
15
16
  fn: async (stepsCtx) => {
16
17
  if (stepsCtx.global.wasCheckedOut()) {
17
18
  stepsCtx.logger.info('Project directory is already checked out');
@@ -16,6 +16,7 @@ function createInstallNodeModulesBuildFunction() {
16
16
  id: 'install_node_modules',
17
17
  name: 'Install node modules',
18
18
  __metricsId: 'eas/install_node_modules',
19
+ __hookId: 'install_node_modules',
19
20
  fn: async (stepCtx, { env }) => {
20
21
  await installNodeModules(stepCtx, env);
21
22
  },
@@ -64,6 +64,7 @@ function createMaestroTestsBuildFunction(ctx) {
64
64
  id: 'maestro_tests',
65
65
  name: 'Run Maestro Tests',
66
66
  __metricsId: 'eas/maestro_tests',
67
+ __hookId: 'maestro_tests',
67
68
  inputProviders: [
68
69
  steps_1.BuildStepInput.createProvider({
69
70
  id: 'flow_path',
@@ -60,6 +60,7 @@ function createUploadToAscBuildFunction() {
60
60
  id: 'upload_to_asc',
61
61
  name: 'Upload to App Store Connect',
62
62
  __metricsId: 'eas/upload_to_asc',
63
+ __hookId: 'submit',
63
64
  inputProviders: [
64
65
  steps_1.BuildStepInput.createProvider({
65
66
  id: 'ipa_path',
@@ -0,0 +1,8 @@
1
+ import { WorkflowHookMetric } from '@expo/steps';
2
+ /**
3
+ * The engine's provider callback is the ONLY `eas.workflow.hook` emitter —
4
+ * never emit directly on top. The turtle-job-runs proxy forwards these tags
5
+ * as-is; the turtle-builds proxy (custom builds) also adds the standard build
6
+ * tags (image, sdk_version, build_mode, …), the same as every build metric.
7
+ */
8
+ export declare function reportWorkflowHookMetricToDatadog(metric: WorkflowHookMetric): void;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reportWorkflowHookMetricToDatadog = reportWorkflowHookMetricToDatadog;
4
+ const datadog_1 = require("../datadog");
5
+ /**
6
+ * The engine's provider callback is the ONLY `eas.workflow.hook` emitter —
7
+ * never emit directly on top. The turtle-job-runs proxy forwards these tags
8
+ * as-is; the turtle-builds proxy (custom builds) also adds the standard build
9
+ * tags (image, sdk_version, build_mode, …), the same as every build metric.
10
+ */
11
+ function reportWorkflowHookMetricToDatadog(metric) {
12
+ datadog_1.Datadog.distribution('eas.workflow.hook', 1, {
13
+ anchor: metric.anchor,
14
+ timing: metric.timing,
15
+ result: metric.result,
16
+ ...(metric.anchorResult !== undefined ? { anchor_result: metric.anchorResult } : null),
17
+ });
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/build-tools",
3
- "version": "21.0.0",
3
+ "version": "21.0.1",
4
4
  "bugs": "https://github.com/expo/eas-cli/issues",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Expo <support@expo.io>",
@@ -39,14 +39,14 @@
39
39
  "@expo/config": "55.0.10",
40
40
  "@expo/config-plugins": "55.0.7",
41
41
  "@expo/downloader": "21.0.0",
42
- "@expo/eas-build-job": "21.0.0",
42
+ "@expo/eas-build-job": "21.0.1",
43
43
  "@expo/env": "^0.4.0",
44
44
  "@expo/logger": "21.0.0",
45
45
  "@expo/package-manager": "1.9.10",
46
46
  "@expo/plist": "^0.2.0",
47
47
  "@expo/results": "^1.0.0",
48
48
  "@expo/spawn-async": "1.7.2",
49
- "@expo/steps": "21.0.0",
49
+ "@expo/steps": "21.0.1",
50
50
  "@expo/template-file": "21.0.0",
51
51
  "@expo/turtle-spawn": "21.0.0",
52
52
  "@expo/xcpretty": "^4.3.1",
@@ -72,7 +72,7 @@
72
72
  "resolve-from": "^5.0.0",
73
73
  "retry": "^0.13.1",
74
74
  "semver": "^7.6.2",
75
- "tar": "7.5.7",
75
+ "tar": "7.5.19",
76
76
  "uuid": "9.0.1",
77
77
  "yaml": "^2.8.1",
78
78
  "zod": "^4.3.5"
@@ -101,5 +101,5 @@
101
101
  "typescript": "^5.5.4",
102
102
  "uuid": "^9.0.1"
103
103
  },
104
- "gitHead": "c72cee372f2d45a252acb014493311de85776497"
104
+ "gitHead": "a62289b9888b71fe90e3022840643b182b732048"
105
105
  }