@expo/build-tools 1.0.125 → 1.0.127

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.
@@ -17,13 +17,20 @@ function createEasMaestroTestFunctionGroup(buildToolsContext) {
17
17
  id: 'flow_path',
18
18
  required: true,
19
19
  }),
20
+ steps_1.BuildStepInput.createProvider({
21
+ allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
22
+ id: 'app_path',
23
+ required: false,
24
+ }),
20
25
  ],
21
26
  createBuildStepsFromFunctionGroupCall: (globalCtx, { inputs }) => {
27
+ var _a, _b;
22
28
  const steps = [
23
29
  (0, installMaestro_1.createInstallMaestroBuildFunction)().createBuildStepFromFunctionCall(globalCtx),
24
30
  ];
25
31
  if (buildToolsContext.job.platform === eas_build_job_1.Platform.IOS) {
26
32
  steps.push((0, startIosSimulator_1.createStartIosSimulatorBuildFunction)().createBuildStepFromFunctionCall(globalCtx));
33
+ const searchPath = (_a = inputs.app_path.value) !== null && _a !== void 0 ? _a : 'ios/build/Build/Products/*simulator/*.app';
27
34
  steps.push(new steps_1.BuildStep(globalCtx, {
28
35
  id: steps_1.BuildStep.getNewId(),
29
36
  name: 'install_app',
@@ -33,7 +40,7 @@ function createEasMaestroTestFunctionGroup(buildToolsContext) {
33
40
  # SEARCH_PATH literally if there are no matching files.
34
41
  shopt -s nullglob
35
42
 
36
- SEARCH_PATH="ios/build/Build/Products/*simulator/*.app"
43
+ SEARCH_PATH="${searchPath}"
37
44
  FILES_FOUND=false
38
45
 
39
46
  for APP_PATH in $SEARCH_PATH; do
@@ -41,7 +48,7 @@ function createEasMaestroTestFunctionGroup(buildToolsContext) {
41
48
  echo "Installing \\"$APP_PATH\\""
42
49
  xcrun simctl install booted "$APP_PATH"
43
50
  done
44
-
51
+
45
52
  if ! $FILES_FOUND; then
46
53
  echo "No files found matching \\"$SEARCH_PATH\\". Are you sure you've built a Simulator app?"
47
54
  exit 1
@@ -51,6 +58,7 @@ function createEasMaestroTestFunctionGroup(buildToolsContext) {
51
58
  }
52
59
  else if (buildToolsContext.job.platform === eas_build_job_1.Platform.ANDROID) {
53
60
  steps.push((0, startAndroidEmulator_1.createStartAndroidEmulatorBuildFunction)().createBuildStepFromFunctionCall(globalCtx));
61
+ const searchPath = (_b = inputs.app_path.value) !== null && _b !== void 0 ? _b : 'android/app/build/outputs/**/*.apk';
54
62
  steps.push(new steps_1.BuildStep(globalCtx, {
55
63
  id: steps_1.BuildStep.getNewId(),
56
64
  name: 'install_app',
@@ -62,7 +70,7 @@ function createEasMaestroTestFunctionGroup(buildToolsContext) {
62
70
  # SEARCH_PATH literally if there are no matching files.
63
71
  shopt -s nullglob
64
72
 
65
- SEARCH_PATH="android/app/build/outputs/**/*.apk"
73
+ SEARCH_PATH="${searchPath}"
66
74
  FILES_FOUND=false
67
75
 
68
76
  for APP_PATH in $SEARCH_PATH; do
@@ -70,7 +78,7 @@ function createEasMaestroTestFunctionGroup(buildToolsContext) {
70
78
  echo "Installing \\"$APP_PATH\\""
71
79
  adb install "$APP_PATH"
72
80
  done
73
-
81
+
74
82
  if ! $FILES_FOUND; then
75
83
  echo "No files found matching \\"$SEARCH_PATH\\". Are you sure you've built an Emulator app?"
76
84
  exit 1
@@ -1 +1 @@
1
- {"version":3,"file":"maestroTest.js","sourceRoot":"","sources":["../../../src/steps/functionGroups/maestroTest.ts"],"names":[],"mappings":";;;AAAA,uCAKqB;AACrB,uDAA+C;AAG/C,gEAAgF;AAChF,sEAAsF;AACtF,4EAA4F;AAC5F,gEAAgF;AAEhF,SAAgB,iCAAiC,CAC/C,iBAAqC;IAErC,OAAO,IAAI,0BAAkB,CAAC;QAC5B,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,cAAc;QAClB,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;gBACxD,EAAE,EAAE,WAAW;gBACf,QAAQ,EAAE,IAAI;aACf,CAAC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AS,EAAE,CAAC;gBACjC,KAAK,CAAC,IAAI,CACR,IAAI,iBAAS,CAAC,SAAS,EAAE;oBACvB,EAAE,EAAE,iBAAS,CAAC,QAAQ,EAAE;oBACxB,IAAI,EAAE,cAAc;oBACpB,WAAW,EAAE,eAAe;oBAC5B,WAAW,EAAE,gBAAgB,QAAQ,EAAE;oBACvC,OAAO,EAAE,gBAAgB,QAAQ,EAAE;iBACpC,CAAC,CACH,CAAC;YACJ,CAAC;YAED,KAAK,CAAC,IAAI,CACR,IAAA,kDAAiC,EAAC,iBAAiB,CAAC,CAAC,+BAA+B,CAClF,SAAS,EACT;gBACE,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,6BAA6B;gBACnC,UAAU,EAAE;oBACV,IAAI,EAAE,kCAAkC;oBACxC,YAAY,EAAE,IAAI;oBAClB,IAAI,EAAE,gBAAgB;iBACvB;aACF,CACF,CACF,CAAC;YAEF,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAnHD,8EAmHC","sourcesContent":["import {\n BuildFunctionGroup,\n BuildStep,\n BuildStepInput,\n BuildStepInputValueTypeName,\n} from '@expo/steps';\nimport { Platform } from '@expo/eas-build-job';\n\nimport { CustomBuildContext } from '../../customBuildContext';\nimport { createInstallMaestroBuildFunction } from '../functions/installMaestro';\nimport { createStartIosSimulatorBuildFunction } from '../functions/startIosSimulator';\nimport { createStartAndroidEmulatorBuildFunction } from '../functions/startAndroidEmulator';\nimport { createUploadArtifactBuildFunction } from '../functions/uploadArtifact';\n\nexport function createEasMaestroTestFunctionGroup(\n buildToolsContext: CustomBuildContext\n): BuildFunctionGroup {\n return new BuildFunctionGroup({\n namespace: 'eas',\n id: 'maestro_test',\n inputProviders: [\n BuildStepInput.createProvider({\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n id: 'flow_path',\n required: true,\n }),\n ],\n createBuildStepsFromFunctionGroupCall: (globalCtx, { inputs }) => {\n const steps: BuildStep[] = [\n createInstallMaestroBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n ];\n\n if (buildToolsContext.job.platform === Platform.IOS) {\n steps.push(\n createStartIosSimulatorBuildFunction().createBuildStepFromFunctionCall(globalCtx)\n );\n steps.push(\n new BuildStep(globalCtx, {\n id: BuildStep.getNewId(),\n name: 'install_app',\n displayName: `Install app to Simulator`,\n command: `\n # shopt -s nullglob is necessary not to try to install\n # SEARCH_PATH literally if there are no matching files.\n shopt -s nullglob\n\n SEARCH_PATH=\"ios/build/Build/Products/*simulator/*.app\"\n FILES_FOUND=false\n\n for APP_PATH in $SEARCH_PATH; do\n FILES_FOUND=true\n echo \"Installing \\\\\"$APP_PATH\\\\\"\"\n xcrun simctl install booted \"$APP_PATH\"\n done\n \n if ! $FILES_FOUND; then\n echo \"No files found matching \\\\\"$SEARCH_PATH\\\\\". Are you sure you've built a Simulator app?\"\n exit 1\n fi\n `,\n })\n );\n } else if (buildToolsContext.job.platform === Platform.ANDROID) {\n steps.push(\n createStartAndroidEmulatorBuildFunction().createBuildStepFromFunctionCall(globalCtx)\n );\n steps.push(\n new BuildStep(globalCtx, {\n id: BuildStep.getNewId(),\n name: 'install_app',\n displayName: `Install app to Emulator`,\n command: `\n # shopt -s globstar is necessary to add /**/ support\n shopt -s globstar\n # shopt -s nullglob is necessary not to try to install\n # SEARCH_PATH literally if there are no matching files.\n shopt -s nullglob\n\n SEARCH_PATH=\"android/app/build/outputs/**/*.apk\"\n FILES_FOUND=false\n\n for APP_PATH in $SEARCH_PATH; do\n FILES_FOUND=true\n echo \"Installing \\\\\"$APP_PATH\\\\\"\"\n adb install \"$APP_PATH\"\n done\n \n if ! $FILES_FOUND; then\n echo \"No files found matching \\\\\"$SEARCH_PATH\\\\\". Are you sure you've built an Emulator app?\"\n exit 1\n fi\n `,\n })\n );\n }\n\n const flowPaths = `${inputs.flow_path.value}`\n .split('\\n') // It's easy to get an empty line with YAML\n .filter((entry) => entry);\n for (const flowPath of flowPaths) {\n steps.push(\n new BuildStep(globalCtx, {\n id: BuildStep.getNewId(),\n name: 'maestro_test',\n ifCondition: '${ always() }',\n displayName: `maestro test ${flowPath}`,\n command: `maestro test ${flowPath}`,\n })\n );\n }\n\n steps.push(\n createUploadArtifactBuildFunction(buildToolsContext).createBuildStepFromFunctionCall(\n globalCtx,\n {\n ifCondition: '${ always() }',\n name: 'Upload Maestro test results',\n callInputs: {\n path: '${ eas.env.HOME }/.maestro/tests',\n ignore_error: true,\n type: 'build-artifact',\n },\n }\n )\n );\n\n return steps;\n },\n });\n}\n"]}
1
+ {"version":3,"file":"maestroTest.js","sourceRoot":"","sources":["../../../src/steps/functionGroups/maestroTest.ts"],"names":[],"mappings":";;;AAAA,uCAKqB;AACrB,uDAA+C;AAG/C,gEAAgF;AAChF,sEAAsF;AACtF,4EAA4F;AAC5F,gEAAgF;AAEhF,SAAgB,iCAAiC,CAC/C,iBAAqC;IAErC,OAAO,IAAI,0BAAkB,CAAC;QAC5B,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,cAAc;QAClB,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;gBACxD,EAAE,EAAE,WAAW;gBACf,QAAQ,EAAE,IAAI;aACf,CAAC;YACF,sBAAc,CAAC,cAAc,CAAC;gBAC5B,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;gBACxD,EAAE,EAAE,UAAU;gBACd,QAAQ,EAAE,KAAK;aAChB,CAAC;SACH;QACD,qCAAqC,EAAE,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;;YAC/D,MAAM,KAAK,GAAgB;gBACzB,IAAA,kDAAiC,GAAE,CAAC,+BAA+B,CAAC,SAAS,CAAC;aAC/E,CAAC;YAEF,IAAI,iBAAiB,CAAC,GAAG,CAAC,QAAQ,KAAK,wBAAQ,CAAC,GAAG,EAAE,CAAC;gBACpD,KAAK,CAAC,IAAI,CACR,IAAA,wDAAoC,GAAE,CAA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EAAE;oBACxB,IAAI,EAAE,cAAc;oBACpB,WAAW,EAAE,eAAe;oBAC5B,WAAW,EAAE,gBAAgB,QAAQ,EAAE;oBACvC,OAAO,EAAE,gBAAgB,QAAQ,EAAE;iBACpC,CAAC,CACH,CAAC;YACJ,CAAC;YAED,KAAK,CAAC,IAAI,CACR,IAAA,kDAAiC,EAAC,iBAAiB,CAAC,CAAC,+BAA+B,CAClF,SAAS,EACT;gBACE,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,6BAA6B;gBACnC,UAAU,EAAE;oBACV,IAAI,EAAE,kCAAkC;oBACxC,YAAY,EAAE,IAAI;oBAClB,IAAI,EAAE,gBAAgB;iBACvB;aACF,CACF,CACF,CAAC;YAEF,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA1HD,8EA0HC","sourcesContent":["import {\n BuildFunctionGroup,\n BuildStep,\n BuildStepInput,\n BuildStepInputValueTypeName,\n} from '@expo/steps';\nimport { Platform } from '@expo/eas-build-job';\n\nimport { CustomBuildContext } from '../../customBuildContext';\nimport { createInstallMaestroBuildFunction } from '../functions/installMaestro';\nimport { createStartIosSimulatorBuildFunction } from '../functions/startIosSimulator';\nimport { createStartAndroidEmulatorBuildFunction } from '../functions/startAndroidEmulator';\nimport { createUploadArtifactBuildFunction } from '../functions/uploadArtifact';\n\nexport function createEasMaestroTestFunctionGroup(\n buildToolsContext: CustomBuildContext\n): BuildFunctionGroup {\n return new BuildFunctionGroup({\n namespace: 'eas',\n id: 'maestro_test',\n inputProviders: [\n BuildStepInput.createProvider({\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n id: 'flow_path',\n required: true,\n }),\n BuildStepInput.createProvider({\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n id: 'app_path',\n required: false,\n }),\n ],\n createBuildStepsFromFunctionGroupCall: (globalCtx, { inputs }) => {\n const steps: BuildStep[] = [\n createInstallMaestroBuildFunction().createBuildStepFromFunctionCall(globalCtx),\n ];\n\n if (buildToolsContext.job.platform === Platform.IOS) {\n steps.push(\n createStartIosSimulatorBuildFunction().createBuildStepFromFunctionCall(globalCtx)\n );\n const searchPath = inputs.app_path.value ?? 'ios/build/Build/Products/*simulator/*.app';\n steps.push(\n new BuildStep(globalCtx, {\n id: BuildStep.getNewId(),\n name: 'install_app',\n displayName: `Install app to Simulator`,\n command: `\n # shopt -s nullglob is necessary not to try to install\n # SEARCH_PATH literally if there are no matching files.\n shopt -s nullglob\n\n SEARCH_PATH=\"${searchPath}\"\n FILES_FOUND=false\n\n for APP_PATH in $SEARCH_PATH; do\n FILES_FOUND=true\n echo \"Installing \\\\\"$APP_PATH\\\\\"\"\n xcrun simctl install booted \"$APP_PATH\"\n done\n\n if ! $FILES_FOUND; then\n echo \"No files found matching \\\\\"$SEARCH_PATH\\\\\". Are you sure you've built a Simulator app?\"\n exit 1\n fi\n `,\n })\n );\n } else if (buildToolsContext.job.platform === Platform.ANDROID) {\n steps.push(\n createStartAndroidEmulatorBuildFunction().createBuildStepFromFunctionCall(globalCtx)\n );\n const searchPath = inputs.app_path.value ?? 'android/app/build/outputs/**/*.apk';\n steps.push(\n new BuildStep(globalCtx, {\n id: BuildStep.getNewId(),\n name: 'install_app',\n displayName: `Install app to Emulator`,\n command: `\n # shopt -s globstar is necessary to add /**/ support\n shopt -s globstar\n # shopt -s nullglob is necessary not to try to install\n # SEARCH_PATH literally if there are no matching files.\n shopt -s nullglob\n\n SEARCH_PATH=\"${searchPath}\"\n FILES_FOUND=false\n\n for APP_PATH in $SEARCH_PATH; do\n FILES_FOUND=true\n echo \"Installing \\\\\"$APP_PATH\\\\\"\"\n adb install \"$APP_PATH\"\n done\n\n if ! $FILES_FOUND; then\n echo \"No files found matching \\\\\"$SEARCH_PATH\\\\\". Are you sure you've built an Emulator app?\"\n exit 1\n fi\n `,\n })\n );\n }\n\n const flowPaths = `${inputs.flow_path.value}`\n .split('\\n') // It's easy to get an empty line with YAML\n .filter((entry) => entry);\n for (const flowPath of flowPaths) {\n steps.push(\n new BuildStep(globalCtx, {\n id: BuildStep.getNewId(),\n name: 'maestro_test',\n ifCondition: '${ always() }',\n displayName: `maestro test ${flowPath}`,\n command: `maestro test ${flowPath}`,\n })\n );\n }\n\n steps.push(\n createUploadArtifactBuildFunction(buildToolsContext).createBuildStepFromFunctionCall(\n globalCtx,\n {\n ifCondition: '${ always() }',\n name: 'Upload Maestro test results',\n callInputs: {\n path: '${ eas.env.HOME }/.maestro/tests',\n ignore_error: true,\n type: 'build-artifact',\n },\n }\n )\n );\n\n return steps;\n },\n });\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/build-tools",
3
- "version": "1.0.125",
3
+ "version": "1.0.127",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -25,13 +25,13 @@
25
25
  "@expo/config": "8.5.4",
26
26
  "@expo/config-plugins": "7.8.4",
27
27
  "@expo/downloader": "1.0.118",
28
- "@expo/eas-build-job": "1.0.119",
28
+ "@expo/eas-build-job": "1.0.126",
29
29
  "@expo/env": "^0.3.0",
30
30
  "@expo/logger": "1.0.117",
31
31
  "@expo/package-manager": "1.5.2",
32
32
  "@expo/plist": "^0.1.3",
33
33
  "@expo/repack-app": "0.0.6",
34
- "@expo/steps": "1.0.119",
34
+ "@expo/steps": "1.0.126",
35
35
  "@expo/template-file": "1.0.117",
36
36
  "@expo/turtle-spawn": "1.0.117",
37
37
  "@expo/xcpretty": "^4.3.1",
@@ -69,5 +69,5 @@
69
69
  "node": "20.14.0",
70
70
  "yarn": "1.22.21"
71
71
  },
72
- "gitHead": "950e22e8a85c69230a10541a0b25ac770c0ac2a7"
72
+ "gitHead": "4e63c539ea8c9058eac1cd174c08c95913614330"
73
73
  }