@expo/build-tools 1.0.26 → 1.0.28
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/builders/custom.js +1 -2
- package/dist/builders/custom.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/steps/functions/eas/prebuild.js +1 -0
- package/dist/steps/functions/eas/prebuild.js.map +1 -1
- package/dist/steps/functions/utils/runGradle.js +2 -0
- package/dist/steps/functions/utils/runGradle.js.map +1 -1
- package/dist/steps/functions/utils/uploadArtifact.js +7 -1
- package/dist/steps/functions/utils/uploadArtifact.js.map +1 -1
- package/package.json +3 -3
package/dist/builders/custom.js
CHANGED
|
@@ -17,10 +17,9 @@ async function runCustomBuildAsync(ctx) {
|
|
|
17
17
|
await (0, projectSources_1.prepareProjectSourcesAsync)(ctx, customBuildCtx.projectSourceDirectory);
|
|
18
18
|
const relativeConfigPath = (0, nullthrows_1.default)((_a = ctx.job.customBuildConfig) === null || _a === void 0 ? void 0 : _a.path, 'Custom build config must be defined for custom builds');
|
|
19
19
|
const configPath = path_1.default.join(ctx.getReactNativeProjectDirectory(customBuildCtx.projectSourceDirectory), relativeConfigPath);
|
|
20
|
-
const globalContext = new steps_1.BuildStepGlobalContext(customBuildCtx, false);
|
|
20
|
+
const globalContext = new steps_1.BuildStepGlobalContext(customBuildCtx, false, configPath);
|
|
21
21
|
const easFunctions = (0, easFunctions_1.getEasFunctions)(customBuildCtx, ctx);
|
|
22
22
|
const parser = new steps_1.BuildConfigParser(globalContext, {
|
|
23
|
-
configPath,
|
|
24
23
|
externalFunctions: easFunctions,
|
|
25
24
|
});
|
|
26
25
|
const workflow = await ctx.runBuildPhase(eas_build_job_1.BuildPhase.PARSE_CUSTOM_WORKFLOW_CONFIG, async () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.js","sourceRoot":"","sources":["../../src/builders/custom.ts"],"names":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,kBAAkB,CACnB,CAAC;IAEF,MAAM,aAAa,GAAG,IAAI,8BAAsB,CAAC,cAAc,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;IACpF,MAAM,YAAY,GAAG,IAAA,8BAAe,EAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IAC1D,MAAM,MAAM,GAAG,IAAI,yBAAiB,CAAC,aAAa,EAAE;QAClD,iBAAiB,EAAE,YAAY;KAChC,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC3F,IAAI;YACF,OAAO,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;SAClC;QAAC,OAAO,UAAe,EAAE;YACxB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;YAClE,IAAI,UAAU,YAAY,cAAM,CAAC,kBAAkB,EAAE;gBACnD,KAAK,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,EAAE;oBACnC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;iBAC3B;aACF;YACD,MAAM,UAAU,CAAC;SAClB;IACH,CAAC,CAAC,CAAC;IACH,IAAI;QACF,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC;KAC/B;IAAC,OAAO,GAAQ,EAAE;QACjB,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QAC9B,MAAM,GAAG,CAAC;KACX;IAED,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB,CAAC;AAtCD,kDAsCC","sourcesContent":["import path from 'path';\n\nimport { BuildPhase, Job } from '@expo/eas-build-job';\nimport { BuildConfigParser, BuildStepGlobalContext, errors } from '@expo/steps';\nimport nullthrows from 'nullthrows';\n\nimport { Artifacts, BuildContext } from '../context';\nimport { prepareProjectSourcesAsync } from '../common/projectSources';\nimport { getEasFunctions } from '../steps/easFunctions';\nimport { CustomBuildContext } from '../customBuildContext';\n\nexport async function runCustomBuildAsync<T extends Job>(ctx: BuildContext<T>): Promise<Artifacts> {\n const customBuildCtx = new CustomBuildContext(ctx);\n await prepareProjectSourcesAsync(ctx, customBuildCtx.projectSourceDirectory);\n const relativeConfigPath = nullthrows(\n ctx.job.customBuildConfig?.path,\n 'Custom build config must be defined for custom builds'\n );\n const configPath = path.join(\n ctx.getReactNativeProjectDirectory(customBuildCtx.projectSourceDirectory),\n relativeConfigPath\n );\n\n const globalContext = new BuildStepGlobalContext(customBuildCtx, false, configPath);\n const easFunctions = getEasFunctions(customBuildCtx, ctx);\n const parser = new BuildConfigParser(globalContext, {\n externalFunctions: easFunctions,\n });\n const workflow = await ctx.runBuildPhase(BuildPhase.PARSE_CUSTOM_WORKFLOW_CONFIG, async () => {\n try {\n return await parser.parseAsync();\n } catch (parseError: any) {\n ctx.logger.error('Failed to parse the custom build config file.');\n if (parseError instanceof errors.BuildWorkflowError) {\n for (const err of parseError.errors) {\n ctx.logger.error({ err });\n }\n }\n throw parseError;\n }\n });\n try {\n await workflow.executeAsync();\n } catch (err: any) {\n err.artifacts = ctx.artifacts;\n throw err;\n }\n\n return ctx.artifacts;\n}\n"]}
|
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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuild.js","sourceRoot":"","sources":["../../../../src/steps/functions/eas/prebuild.ts"],"names":[],"mappings":";;;;;;AAEA,uCAAyF;AACzF,sEAAuC;AAGvC,kEAAsF;AAEtF,6DAA0D;AAO1D,SAAgB,2BAA2B,CAAC,GAAuB;IACjE,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,KAAK;QAChB,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;QAChB,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,wBAAwB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;YACF,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,OAAO;gBACX,YAAY,EAAE,KAAK;gBACnB,oBAAoB,EAAE,mCAA2B,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"prebuild.js","sourceRoot":"","sources":["../../../../src/steps/functions/eas/prebuild.ts"],"names":[],"mappings":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CAAC;IACjD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE;QAChD,eAAe,GAAG,GAAG,eAAe,eAAe,QAAQ,EAAE,CAAC;KAC/D;IACD,IAAI,oBAAoB,EAAE;QACxB,eAAe,GAAG,GAAG,eAAe,6BAA6B,oBAAoB,EAAE,CAAC;KACzF;IACD,IAAI,KAAK,EAAE;QACT,eAAe,GAAG,GAAG,eAAe,UAAU,CAAC;KAChD;IACD,MAAM,gBAAgB,GAAG,MAAM,CAAC;IAChC,MAAM,iBAAiB,GAAG,OAAO,CAAC;IAClC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IACzC,IAAI,eAAe,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;QAChD,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KAC7E;IACD,IAAI,eAAe,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE;QACjD,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KAC9E;IACD,IAAI,eAAe,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE;QACpD,eAAe,GAAG,eAAe,CAAC,SAAS,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;KACjF;IACD,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import { Platform } from '@expo/config';\nimport { Job } from '@expo/eas-build-job';\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport spawn from '@expo/turtle-spawn';\n\nimport { CustomBuildContext } from '../../../customBuildContext';\nimport { PackageManager, resolvePackageManager } from '../../../utils/packageManager';\n\nimport { installNodeModules } from './installNodeModules';\n\ntype PrebuildOptions = {\n clean?: boolean;\n skipDependencyUpdate?: string;\n};\n\nexport function createPrebuildBuildFunction(ctx: CustomBuildContext): BuildFunction {\n return new BuildFunction({\n namespace: 'eas',\n id: 'prebuild',\n name: 'Prebuild',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'skip_dependency_update',\n required: false,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'clean',\n defaultValue: false,\n allowedValueTypeName: BuildStepInputValueTypeName.BOOLEAN,\n required: true,\n }),\n ],\n fn: async (stepCtx, { inputs, env }) => {\n const { logger } = stepCtx;\n // TODO: make sure we can pass Apple Team ID to prebuild when adding credentials for custom builds\n const packageManager = resolvePackageManager(ctx.projectTargetDirectory);\n const prebuildCommandArgs = getPrebuildCommandArgs(ctx.job, {\n clean: inputs.clean.value as boolean,\n skipDependencyUpdate: inputs.skip_dependency_update.value as string,\n });\n const argsWithExpo = ['expo', ...prebuildCommandArgs];\n const options = {\n cwd: stepCtx.workingDirectory,\n logger,\n env: {\n EXPO_IMAGE_UTILS_NO_SHARP: '1',\n ...env,\n },\n };\n if (packageManager === PackageManager.NPM) {\n await spawn('npx', argsWithExpo, options);\n } else if (packageManager === PackageManager.YARN) {\n await spawn('yarn', argsWithExpo, options);\n } else if (packageManager === PackageManager.PNPM) {\n await spawn('pnpm', argsWithExpo, options);\n } else {\n throw new Error(`Unsupported package manager: ${packageManager}`);\n }\n await installNodeModules(stepCtx, ctx, env);\n },\n });\n}\n\nfunction getPrebuildCommandArgs(\n job: Job,\n { clean, skipDependencyUpdate }: PrebuildOptions\n): string[] {\n if (job.experimental?.prebuildCommand) {\n return sanitizeUserDefinedPrebuildCommand(job.experimental.prebuildCommand, job.platform, {\n clean,\n skipDependencyUpdate,\n });\n }\n return [\n 'prebuild',\n '--no-install',\n '--platform',\n job.platform,\n ...(skipDependencyUpdate ? ['--skip-dependency-update', skipDependencyUpdate] : []),\n ...(clean ? ['--clean'] : []),\n ];\n}\n\n// TODO: deprecate prebuildCommand in eas.json\nfunction sanitizeUserDefinedPrebuildCommand(\n userDefinedPrebuildCommand: string,\n platform: Platform,\n { clean, skipDependencyUpdate }: PrebuildOptions\n): string[] {\n let prebuildCommand = userDefinedPrebuildCommand;\n if (!prebuildCommand.match(/(?:--platform| -p)/)) {\n prebuildCommand = `${prebuildCommand} --platform ${platform}`;\n }\n if (skipDependencyUpdate) {\n prebuildCommand = `${prebuildCommand} --skip-dependency-update ${skipDependencyUpdate}`;\n }\n if (clean) {\n prebuildCommand = `${prebuildCommand} --clean`;\n }\n const npxCommandPrefix = 'npx ';\n const expoCommandPrefix = 'expo ';\n const expoCliCommandPrefix = 'expo-cli ';\n if (prebuildCommand.startsWith(npxCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(npxCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(expoCommandPrefix.length).trim();\n }\n if (prebuildCommand.startsWith(expoCliCommandPrefix)) {\n prebuildCommand = prebuildCommand.substring(expoCliCommandPrefix.length).trim();\n }\n return prebuildCommand.split(' ');\n}\n"]}
|
|
@@ -16,6 +16,8 @@ function createRunGradleBuildFunction(ctx) {
|
|
|
16
16
|
steps_1.BuildStepInput.createProvider({
|
|
17
17
|
id: 'gradle_command',
|
|
18
18
|
defaultValue: ':app:bundleRelease',
|
|
19
|
+
required: true,
|
|
20
|
+
allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
|
|
19
21
|
}),
|
|
20
22
|
],
|
|
21
23
|
fn: async (stepsCtx, { inputs }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runGradle.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/runGradle.ts"],"names":[],"mappings":";;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"runGradle.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/runGradle.ts"],"names":[],"mappings":";;;;;;AACA,uCAAyF;AACzF,4DAAoC;AAGpC,oDAA2D;AAE3D,SAAgB,4BAA4B,CAAgB,GAAoB;IAC9E,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,EAAE,gBAAgB;gBACpB,YAAY,EAAE,oBAAoB;gBAClC,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,mCAA2B,CAAC,MAAM;aACzD,CAAC;SACH;QACD,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACjC,MAAM,IAAA,yBAAgB,EAAC,GAAgC,EAAE;gBACvD,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,aAAa,EAAE,IAAA,oBAAU,EAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;gBACjE,UAAU,EAAE,QAAQ,CAAC,gBAAgB;aACtC,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AArBD,oEAqBC","sourcesContent":["import { Android, Job } from '@expo/eas-build-job';\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport nullthrows from 'nullthrows';\n\nimport { BuildContext } from '../../../context';\nimport { runGradleCommand } from '../../../android/gradle';\n\nexport function createRunGradleBuildFunction<T extends Job>(ctx: BuildContext<T>): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'run_gradle',\n name: 'Run Gradle',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'gradle_command',\n defaultValue: ':app:bundleRelease',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n ],\n fn: async (stepsCtx, { inputs }) => {\n await runGradleCommand(ctx as BuildContext<Android.Job>, {\n logger: stepsCtx.logger,\n gradleCommand: nullthrows(inputs.gradle_command.value).toString(),\n androidDir: stepsCtx.workingDirectory,\n });\n },\n });\n}\n"]}
|
|
@@ -23,8 +23,14 @@ function createUploadArtifactBuildFunction(ctx) {
|
|
|
23
23
|
id: 'type',
|
|
24
24
|
defaultValue: BuildArtifactType.APPLICATION_ARCHIVE,
|
|
25
25
|
allowedValues: [BuildArtifactType.APPLICATION_ARCHIVE, BuildArtifactType.BUILD_ARTIFACT],
|
|
26
|
+
required: true,
|
|
27
|
+
allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
|
|
28
|
+
}),
|
|
29
|
+
steps_1.BuildStepInput.createProvider({
|
|
30
|
+
id: 'path',
|
|
31
|
+
required: true,
|
|
32
|
+
allowedValueTypeName: steps_1.BuildStepInputValueTypeName.STRING,
|
|
26
33
|
}),
|
|
27
|
-
steps_1.BuildStepInput.createProvider({ id: 'path', required: true }),
|
|
28
34
|
],
|
|
29
35
|
fn: async (stepsCtx, { inputs }) => {
|
|
30
36
|
const artifactType = validateAndConvertBuildArtifactType((0, nullthrows_1.default)(inputs.type.value).toString());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadArtifact.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/uploadArtifact.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,
|
|
1
|
+
{"version":3,"file":"uploadArtifact.js","sourceRoot":"","sources":["../../../../src/steps/functions/utils/uploadArtifact.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uCAAyF;AACzF,4DAAoC;AAEpC,8CAAgD;AAGhD,IAAK,iBAGJ;AAHD,WAAK,iBAAiB;IACpB,gEAA2C,CAAA;IAC3C,sDAAiC,CAAA;AACnC,CAAC,EAHI,iBAAiB,KAAjB,iBAAiB,QAGrB;AAED,SAAgB,iCAAiC,CAAC,GAAuB;IACvE,OAAO,IAAI,qBAAa,CAAC;QACvB,SAAS,EAAE,OAAO;QAClB,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,iBAAiB;QACvB,cAAc,EAAE;YACd,sBAAc,CAAC,cAAc,CAAC;gBAC5B,EAAE,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AAO,KAAK,KAAK,iBAAiB,CAAC,mBAAmB;QACpD,CAAC,CAAC,sBAAY,CAAC,mBAAmB;QAClC,CAAC,CAAC,sBAAY,CAAC,eAAe,CAAC;AACnC,CAAC","sourcesContent":["import path from 'path';\n\nimport { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';\nimport nullthrows from 'nullthrows';\n\nimport { ArtifactType } from '../../../context';\nimport { CustomBuildContext } from '../../../customBuildContext';\n\nenum BuildArtifactType {\n APPLICATION_ARCHIVE = 'application-archive',\n BUILD_ARTIFACT = 'build-artifact',\n}\n\nexport function createUploadArtifactBuildFunction(ctx: CustomBuildContext): BuildFunction {\n return new BuildFunction({\n namespace: 'utils',\n id: 'upload_artifact',\n name: 'Upload artifact',\n inputProviders: [\n BuildStepInput.createProvider({\n id: 'type',\n defaultValue: BuildArtifactType.APPLICATION_ARCHIVE,\n allowedValues: [BuildArtifactType.APPLICATION_ARCHIVE, BuildArtifactType.BUILD_ARTIFACT],\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n BuildStepInput.createProvider({\n id: 'path',\n required: true,\n allowedValueTypeName: BuildStepInputValueTypeName.STRING,\n }),\n ],\n fn: async (stepsCtx, { inputs }) => {\n const artifactType = validateAndConvertBuildArtifactType(\n nullthrows(inputs.type.value).toString()\n );\n const filePath = path.resolve(\n stepsCtx.workingDirectory,\n nullthrows(inputs.path.value).toString()\n );\n await ctx.runtimeApi.uploadArtifacts(artifactType, [filePath], stepsCtx.logger);\n },\n });\n}\n\nfunction validateAndConvertBuildArtifactType(input: string): ArtifactType {\n const allowedValues: string[] = Object.values(BuildArtifactType);\n if (!allowedValues.includes(input)) {\n throw new Error(\n `\"${input}\" is not allowed artifact type, allowed values: ${allowedValues\n .map((i) => `\"${i}\"`)\n .join(', ')}`\n );\n }\n return input === BuildArtifactType.APPLICATION_ARCHIVE\n ? ArtifactType.APPLICATION_ARCHIVE\n : ArtifactType.BUILD_ARTIFACTS;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/build-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@expo/logger": "1.0.21",
|
|
29
29
|
"@expo/package-manager": "^0.0.57",
|
|
30
30
|
"@expo/plist": "^0.0.20",
|
|
31
|
-
"@expo/steps": "1.0.
|
|
31
|
+
"@expo/steps": "1.0.28",
|
|
32
32
|
"@expo/template-file": "1.0.13",
|
|
33
33
|
"@expo/turtle-spawn": "1.0.21",
|
|
34
34
|
"@expo/xcpretty": "^4.2.2",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"node": "18.13.0",
|
|
63
63
|
"yarn": "1.22.19"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "8882fcc1d594bc5a077e811408772085ad639590"
|
|
66
66
|
}
|