@expo/build-tools 1.0.25 → 1.0.27

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.d.ts CHANGED
@@ -2,3 +2,4 @@ import * as Builders from './builders';
2
2
  export { Builders };
3
3
  export { Artifacts, ArtifactType, BuildContext, CacheManager, LogBuffer, SkipNativeBuildError, } from './context';
4
4
  export { findAndUploadXcodeBuildLogsAsync } from './ios/xcodeBuildLogs';
5
+ export { Hook, runHookIfPresent } from './utils/hooks';
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.findAndUploadXcodeBuildLogsAsync = exports.SkipNativeBuildError = exports.BuildContext = exports.ArtifactType = exports.Builders = void 0;
26
+ exports.runHookIfPresent = exports.Hook = exports.findAndUploadXcodeBuildLogsAsync = exports.SkipNativeBuildError = exports.BuildContext = exports.ArtifactType = exports.Builders = void 0;
27
27
  const Builders = __importStar(require("./builders"));
28
28
  exports.Builders = Builders;
29
29
  var context_1 = require("./context");
@@ -32,4 +32,7 @@ Object.defineProperty(exports, "BuildContext", { enumerable: true, get: function
32
32
  Object.defineProperty(exports, "SkipNativeBuildError", { enumerable: true, get: function () { return context_1.SkipNativeBuildError; } });
33
33
  var xcodeBuildLogs_1 = require("./ios/xcodeBuildLogs");
34
34
  Object.defineProperty(exports, "findAndUploadXcodeBuildLogsAsync", { enumerable: true, get: function () { return xcodeBuildLogs_1.findAndUploadXcodeBuildLogsAsync; } });
35
+ var hooks_1 = require("./utils/hooks");
36
+ Object.defineProperty(exports, "Hook", { enumerable: true, get: function () { return hooks_1.Hook; } });
37
+ Object.defineProperty(exports, "runHookIfPresent", { enumerable: true, get: function () { return hooks_1.runHookIfPresent; } });
35
38
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AAE9B,4BAAQ;AAEjB,qCAOmB;AALjB,uGAAA,YAAY,OAAA;AACZ,uGAAA,YAAY,OAAA;AAGZ,+GAAA,oBAAoB,OAAA;AAGtB,uDAAwE;AAA/D,kIAAA,gCAAgC,OAAA","sourcesContent":["import * as Builders from './builders';\n\nexport { Builders };\n\nexport {\n Artifacts,\n ArtifactType,\n BuildContext,\n CacheManager,\n LogBuffer,\n SkipNativeBuildError,\n} from './context';\n\nexport { findAndUploadXcodeBuildLogsAsync } from './ios/xcodeBuildLogs';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AAE9B,4BAAQ;AAEjB,qCAOmB;AALjB,uGAAA,YAAY,OAAA;AACZ,uGAAA,YAAY,OAAA;AAGZ,+GAAA,oBAAoB,OAAA;AAGtB,uDAAwE;AAA/D,kIAAA,gCAAgC,OAAA;AAEzC,uCAAuD;AAA9C,6FAAA,IAAI,OAAA;AAAE,yGAAA,gBAAgB,OAAA","sourcesContent":["import * as Builders from './builders';\n\nexport { Builders };\n\nexport {\n Artifacts,\n ArtifactType,\n BuildContext,\n CacheManager,\n LogBuffer,\n SkipNativeBuildError,\n} from './context';\n\nexport { findAndUploadXcodeBuildLogsAsync } from './ios/xcodeBuildLogs';\n\nexport { Hook, runHookIfPresent } from './utils/hooks';\n"]}
@@ -9,7 +9,8 @@ export declare enum Hook {
9
9
  PRE_UPLOAD_ARTIFACTS = "eas-build-pre-upload-artifacts",
10
10
  ON_BUILD_SUCCESS = "eas-build-on-success",
11
11
  ON_BUILD_ERROR = "eas-build-on-error",
12
- ON_BUILD_COMPLETE = "eas-build-on-complete"
12
+ ON_BUILD_COMPLETE = "eas-build-on-complete",
13
+ ON_BUILD_CANCEL = "eas-build-on-cancel"
13
14
  }
14
15
  export declare function runHookIfPresent<TJob extends Job>(ctx: BuildContext<TJob>, hook: Hook, { extraEnvs }?: {
15
16
  extraEnvs?: Record<string, string>;
@@ -18,6 +18,7 @@ var Hook;
18
18
  Hook["ON_BUILD_SUCCESS"] = "eas-build-on-success";
19
19
  Hook["ON_BUILD_ERROR"] = "eas-build-on-error";
20
20
  Hook["ON_BUILD_COMPLETE"] = "eas-build-on-complete";
21
+ Hook["ON_BUILD_CANCEL"] = "eas-build-on-cancel";
21
22
  })(Hook = exports.Hook || (exports.Hook = {}));
22
23
  async function runHookIfPresent(ctx, hook, { extraEnvs } = {}) {
23
24
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/utils/hooks.ts"],"names":[],"mappings":";;;;;;AACA,sEAAuC;AAIvC,qDAAkD;AAClD,uCAA0D;AAE1D,IAAY,IAUX;AAVD,WAAY,IAAI;IACd,6CAAqC,CAAA;IACrC,+CAAuC,CAAA;IACvC;;OAEG;IACH,+DAAuD,CAAA;IACvD,iDAAyC,CAAA;IACzC,6CAAqC,CAAA;IACrC,mDAA2C,CAAA;AAC7C,CAAC,EAVW,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAUf;AAEM,KAAK,UAAU,gBAAgB,CACpC,GAAuB,EACvB,IAAU,EACV,EAAE,SAAS,KAA6C,EAAE;;IAE1D,MAAM,UAAU,GAAG,GAAG,CAAC,8BAA8B,EAAE,CAAC;IACxD,MAAM,WAAW,GAAG,IAAA,yBAAe,EAAC,UAAU,CAAC,CAAC;IAChD,IAAI,MAAA,WAAW,CAAC,OAAO,0CAAG,IAAI,CAAC,EAAE;QAC/B,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,IAAI,6CAA6C,CAAC,CAAC;QAC9E,wFAAwF;QACxF,yBAAyB;QACzB,MAAM,cAAc,GAClB,CAAC,MAAM,IAAA,sBAAY,EAAC,UAAU,CAAC,CAAC,IAAI,IAAI,KAAK,IAAI,CAAC,WAAW;YAC3D,CAAC,CAAC,+BAAc,CAAC,GAAG;YACpB,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC;QACzB,MAAM,IAAA,sBAAK,EAAC,cAAc,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;YACzC,GAAG,EAAE,UAAU;YACf,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,GAAG,EAAE;gBACH,GAAG,GAAG,CAAC,GAAG;gBACV,GAAG,SAAS;aACb;SACF,CAAC,CAAC;KACJ;AACH,CAAC;AAxBD,4CAwBC","sourcesContent":["import { Job } from '@expo/eas-build-job';\nimport spawn from '@expo/turtle-spawn';\n\nimport { BuildContext } from '../context';\n\nimport { PackageManager } from './packageManager';\nimport { isUsingYarn2, readPackageJson } from './project';\n\nexport enum Hook {\n PRE_INSTALL = 'eas-build-pre-install',\n POST_INSTALL = 'eas-build-post-install',\n /**\n * @deprecated\n */\n PRE_UPLOAD_ARTIFACTS = 'eas-build-pre-upload-artifacts',\n ON_BUILD_SUCCESS = 'eas-build-on-success',\n ON_BUILD_ERROR = 'eas-build-on-error',\n ON_BUILD_COMPLETE = 'eas-build-on-complete',\n}\n\nexport async function runHookIfPresent<TJob extends Job>(\n ctx: BuildContext<TJob>,\n hook: Hook,\n { extraEnvs }: { extraEnvs?: Record<string, string> } = {}\n): Promise<void> {\n const projectDir = ctx.getReactNativeProjectDirectory();\n const packageJson = readPackageJson(projectDir);\n if (packageJson.scripts?.[hook]) {\n ctx.logger.info(`Script '${hook}' is present in package.json, running it...`);\n // when using yarn 2, it's not possible to run any scripts before running 'yarn install'\n // use 'npm' in that case\n const packageManager =\n (await isUsingYarn2(projectDir)) && hook === Hook.PRE_INSTALL\n ? PackageManager.NPM\n : ctx.packageManager;\n await spawn(packageManager, ['run', hook], {\n cwd: projectDir,\n logger: ctx.logger,\n env: {\n ...ctx.env,\n ...extraEnvs,\n },\n });\n }\n}\n"]}
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/utils/hooks.ts"],"names":[],"mappings":";;;;;;AACA,sEAAuC;AAIvC,qDAAkD;AAClD,uCAA0D;AAE1D,IAAY,IAWX;AAXD,WAAY,IAAI;IACd,6CAAqC,CAAA;IACrC,+CAAuC,CAAA;IACvC;;OAEG;IACH,+DAAuD,CAAA;IACvD,iDAAyC,CAAA;IACzC,6CAAqC,CAAA;IACrC,mDAA2C,CAAA;IAC3C,+CAAuC,CAAA;AACzC,CAAC,EAXW,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAWf;AAEM,KAAK,UAAU,gBAAgB,CACpC,GAAuB,EACvB,IAAU,EACV,EAAE,SAAS,KAA6C,EAAE;;IAE1D,MAAM,UAAU,GAAG,GAAG,CAAC,8BAA8B,EAAE,CAAC;IACxD,MAAM,WAAW,GAAG,IAAA,yBAAe,EAAC,UAAU,CAAC,CAAC;IAChD,IAAI,MAAA,WAAW,CAAC,OAAO,0CAAG,IAAI,CAAC,EAAE;QAC/B,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,IAAI,6CAA6C,CAAC,CAAC;QAC9E,wFAAwF;QACxF,yBAAyB;QACzB,MAAM,cAAc,GAClB,CAAC,MAAM,IAAA,sBAAY,EAAC,UAAU,CAAC,CAAC,IAAI,IAAI,KAAK,IAAI,CAAC,WAAW;YAC3D,CAAC,CAAC,+BAAc,CAAC,GAAG;YACpB,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC;QACzB,MAAM,IAAA,sBAAK,EAAC,cAAc,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;YACzC,GAAG,EAAE,UAAU;YACf,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,GAAG,EAAE;gBACH,GAAG,GAAG,CAAC,GAAG;gBACV,GAAG,SAAS;aACb;SACF,CAAC,CAAC;KACJ;AACH,CAAC;AAxBD,4CAwBC","sourcesContent":["import { Job } from '@expo/eas-build-job';\nimport spawn from '@expo/turtle-spawn';\n\nimport { BuildContext } from '../context';\n\nimport { PackageManager } from './packageManager';\nimport { isUsingYarn2, readPackageJson } from './project';\n\nexport enum Hook {\n PRE_INSTALL = 'eas-build-pre-install',\n POST_INSTALL = 'eas-build-post-install',\n /**\n * @deprecated\n */\n PRE_UPLOAD_ARTIFACTS = 'eas-build-pre-upload-artifacts',\n ON_BUILD_SUCCESS = 'eas-build-on-success',\n ON_BUILD_ERROR = 'eas-build-on-error',\n ON_BUILD_COMPLETE = 'eas-build-on-complete',\n ON_BUILD_CANCEL = 'eas-build-on-cancel',\n}\n\nexport async function runHookIfPresent<TJob extends Job>(\n ctx: BuildContext<TJob>,\n hook: Hook,\n { extraEnvs }: { extraEnvs?: Record<string, string> } = {}\n): Promise<void> {\n const projectDir = ctx.getReactNativeProjectDirectory();\n const packageJson = readPackageJson(projectDir);\n if (packageJson.scripts?.[hook]) {\n ctx.logger.info(`Script '${hook}' is present in package.json, running it...`);\n // when using yarn 2, it's not possible to run any scripts before running 'yarn install'\n // use 'npm' in that case\n const packageManager =\n (await isUsingYarn2(projectDir)) && hook === Hook.PRE_INSTALL\n ? PackageManager.NPM\n : ctx.packageManager;\n await spawn(packageManager, ['run', hook], {\n cwd: projectDir,\n logger: ctx.logger,\n env: {\n ...ctx.env,\n ...extraEnvs,\n },\n });\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/build-tools",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -24,7 +24,7 @@
24
24
  "@expo/config": "^7.0.3",
25
25
  "@expo/config-plugins": "^5.0.4",
26
26
  "@expo/downloader": "1.0.13",
27
- "@expo/eas-build-job": "1.0.13",
27
+ "@expo/eas-build-job": "1.0.26",
28
28
  "@expo/logger": "1.0.21",
29
29
  "@expo/package-manager": "^0.0.57",
30
30
  "@expo/plist": "^0.0.20",
@@ -62,5 +62,5 @@
62
62
  "node": "18.13.0",
63
63
  "yarn": "1.22.19"
64
64
  },
65
- "gitHead": "2d6231cbfe6b7f40fa551d9b444163ad2e1bec18"
65
+ "gitHead": "3ee3bae581d6d04cf609207d089ee1a02894f5ab"
66
66
  }