@expo/steps 0.0.4 → 0.0.5

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.
Files changed (42) hide show
  1. package/README.md +4 -0
  2. package/dist_commonjs/BuildConfig.cjs +85 -27
  3. package/dist_commonjs/BuildConfig.d.ts +41 -13
  4. package/dist_commonjs/BuildConfig.js.map +1 -1
  5. package/dist_commonjs/BuildConfigParser.cjs +92 -25
  6. package/dist_commonjs/BuildConfigParser.d.ts +7 -2
  7. package/dist_commonjs/BuildConfigParser.js.map +1 -1
  8. package/dist_commonjs/BuildFunction.cjs +40 -0
  9. package/dist_commonjs/BuildFunction.d.ts +32 -0
  10. package/dist_commonjs/BuildFunction.js.map +1 -0
  11. package/dist_commonjs/BuildPlatform.cjs +9 -0
  12. package/dist_commonjs/BuildPlatform.d.ts +4 -0
  13. package/dist_commonjs/BuildPlatform.js.map +1 -0
  14. package/dist_commonjs/BuildStepInput.cjs +1 -1
  15. package/dist_commonjs/BuildStepInput.d.ts +1 -0
  16. package/dist_commonjs/BuildStepInput.js.map +1 -1
  17. package/dist_commonjs/BuildStepOutput.d.ts +1 -0
  18. package/dist_commonjs/BuildStepOutput.js.map +1 -1
  19. package/dist_commonjs/BuildWorkflow.cjs +6 -3
  20. package/dist_commonjs/BuildWorkflow.d.ts +4 -1
  21. package/dist_commonjs/BuildWorkflow.js.map +1 -1
  22. package/dist_esm/BuildConfig.d.ts +41 -13
  23. package/dist_esm/BuildConfig.js +79 -25
  24. package/dist_esm/BuildConfig.js.map +1 -1
  25. package/dist_esm/BuildConfigParser.d.ts +7 -2
  26. package/dist_esm/BuildConfigParser.js +93 -26
  27. package/dist_esm/BuildConfigParser.js.map +1 -1
  28. package/dist_esm/BuildFunction.d.ts +32 -0
  29. package/dist_esm/BuildFunction.js +36 -0
  30. package/dist_esm/BuildFunction.js.map +1 -0
  31. package/dist_esm/BuildPlatform.d.ts +4 -0
  32. package/dist_esm/BuildPlatform.js +6 -0
  33. package/dist_esm/BuildPlatform.js.map +1 -0
  34. package/dist_esm/BuildStepInput.d.ts +1 -0
  35. package/dist_esm/BuildStepInput.js +1 -1
  36. package/dist_esm/BuildStepInput.js.map +1 -1
  37. package/dist_esm/BuildStepOutput.d.ts +1 -0
  38. package/dist_esm/BuildStepOutput.js.map +1 -1
  39. package/dist_esm/BuildWorkflow.d.ts +4 -1
  40. package/dist_esm/BuildWorkflow.js +6 -3
  41. package/dist_esm/BuildWorkflow.js.map +1 -1
  42. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"BuildStepInput.js","sourceRoot":"","sources":["../src/BuildStepInput.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,OAAO,cAAc;IAQzB,YACmB,GAAqB,EACtC,EACE,EAAE,EACF,MAAM,EACN,YAAY,EACZ,QAAQ,GAAG,KAAK,GAMjB;QAXgB,QAAG,GAAH,GAAG,CAAkB;QAatC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAI,KAAK;;QACP,MAAM,QAAQ,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,CAAC,YAAY,CAAC;QAClD,IAAI,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC3C,MAAM,IAAI,qBAAqB,CAC7B,oBAAoB,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,MAAM,mCAAmC,CACzF,CAAC;SACH;QAED,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,OAAO,QAAQ,CAAC;SACjB;aAAM;YACL,OAAO,sBAAsB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,MAAA,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAA,EAAA,CAAC,CAAC;SAC5F;IACH,CAAC;IAED,GAAG,CAAC,KAAyB;QAC3B,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,KAAK,SAAS,EAAE;YACxC,MAAM,IAAI,qBAAqB,CAC7B,oBAAoB,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,MAAM,gBAAgB,CACtE,CAAC;SACH;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { BuildStepContext } from './BuildStepContext.js';\nimport { BuildStepRuntimeError } from './errors/BuildStepRuntimeError.js';\nimport { interpolateWithOutputs } from './utils/template.js';\n\nexport class BuildStepInput {\n public readonly id: string;\n public readonly stepId: string;\n public readonly defaultValue?: string;\n public readonly required: boolean;\n\n private _value?: string;\n\n constructor(\n private readonly ctx: BuildStepContext,\n {\n id,\n stepId,\n defaultValue,\n required = false,\n }: {\n id: string;\n stepId: string;\n defaultValue?: string;\n required?: boolean;\n }\n ) {\n this.id = id;\n this.stepId = stepId;\n this.defaultValue = defaultValue;\n this.required = required;\n }\n\n get value(): string | undefined {\n const rawValue = this._value ?? this.defaultValue;\n if (this.required && rawValue === undefined) {\n throw new BuildStepRuntimeError(\n `Input parameter \"${this.id}\" for step \"${this.stepId}\" is required but it was not set.`\n );\n }\n\n if (rawValue === undefined) {\n return rawValue;\n } else {\n return interpolateWithOutputs(rawValue, (path) => this.ctx.getStepOutputValue(path) ?? '');\n }\n }\n\n set(value: string | undefined): BuildStepInput {\n if (this.required && value === undefined) {\n throw new BuildStepRuntimeError(\n `Input parameter \"${this.id}\" for step \"${this.stepId}\" is required.`\n );\n }\n this._value = value;\n return this;\n }\n}\n"]}
1
+ {"version":3,"file":"BuildStepInput.js","sourceRoot":"","sources":["../src/BuildStepInput.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAI7D,MAAM,OAAO,cAAc;IAQzB,YACmB,GAAqB,EACtC,EACE,EAAE,EACF,MAAM,EACN,YAAY,EACZ,QAAQ,GAAG,IAAI,GAMhB;QAXgB,QAAG,GAAH,GAAG,CAAkB;QAatC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAI,KAAK;;QACP,MAAM,QAAQ,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,CAAC,YAAY,CAAC;QAClD,IAAI,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC3C,MAAM,IAAI,qBAAqB,CAC7B,oBAAoB,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,MAAM,mCAAmC,CACzF,CAAC;SACH;QAED,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,OAAO,QAAQ,CAAC;SACjB;aAAM;YACL,OAAO,sBAAsB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,MAAA,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAA,EAAA,CAAC,CAAC;SAC5F;IACH,CAAC;IAED,GAAG,CAAC,KAAyB;QAC3B,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,KAAK,SAAS,EAAE;YACxC,MAAM,IAAI,qBAAqB,CAC7B,oBAAoB,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,MAAM,gBAAgB,CACtE,CAAC;SACH;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { BuildStepContext } from './BuildStepContext.js';\nimport { BuildStepRuntimeError } from './errors/BuildStepRuntimeError.js';\nimport { interpolateWithOutputs } from './utils/template.js';\n\nexport type BuildStepInputCreator = (stepId: string) => BuildStepInput;\n\nexport class BuildStepInput {\n public readonly id: string;\n public readonly stepId: string;\n public readonly defaultValue?: string;\n public readonly required: boolean;\n\n private _value?: string;\n\n constructor(\n private readonly ctx: BuildStepContext,\n {\n id,\n stepId,\n defaultValue,\n required = true,\n }: {\n id: string;\n stepId: string;\n defaultValue?: string;\n required?: boolean;\n }\n ) {\n this.id = id;\n this.stepId = stepId;\n this.defaultValue = defaultValue;\n this.required = required;\n }\n\n get value(): string | undefined {\n const rawValue = this._value ?? this.defaultValue;\n if (this.required && rawValue === undefined) {\n throw new BuildStepRuntimeError(\n `Input parameter \"${this.id}\" for step \"${this.stepId}\" is required but it was not set.`\n );\n }\n\n if (rawValue === undefined) {\n return rawValue;\n } else {\n return interpolateWithOutputs(rawValue, (path) => this.ctx.getStepOutputValue(path) ?? '');\n }\n }\n\n set(value: string | undefined): BuildStepInput {\n if (this.required && value === undefined) {\n throw new BuildStepRuntimeError(\n `Input parameter \"${this.id}\" for step \"${this.stepId}\" is required.`\n );\n }\n this._value = value;\n return this;\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { BuildStepContext } from './BuildStepContext.js';
2
+ export type BuildStepOutputCreator = (stepId: string) => BuildStepOutput;
2
3
  export declare class BuildStepOutput {
3
4
  private readonly ctx;
4
5
  readonly id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BuildStepOutput.js","sourceRoot":"","sources":["../src/BuildStepOutput.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,MAAM,OAAO,eAAe;IAO1B;IACE,wFAAwF;IACvE,GAAqB,EACtC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAsD;QADlE,QAAG,GAAH,GAAG,CAAkB;QAGtC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAI,KAAK;QACP,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YAC9C,MAAM,IAAI,qBAAqB,CAC7B,qBAAqB,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,MAAM,mCAAmC,CAC1F,CAAC;SACH;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,GAAG,CAAC,KAAyB;QAC3B,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,KAAK,SAAS,EAAE;YACxC,MAAM,IAAI,qBAAqB,CAC7B,qBAAqB,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,MAAM,gBAAgB,CACvE,CAAC;SACH;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { BuildStepContext } from './BuildStepContext.js';\nimport { BuildStepRuntimeError } from './errors/BuildStepRuntimeError.js';\n\nexport class BuildStepOutput {\n public readonly id: string;\n public readonly stepId: string;\n public readonly required: boolean;\n\n private _value?: string;\n\n constructor(\n // @ts-expect-error ctx is not used in this class but let's keep it here for consistency\n private readonly ctx: BuildStepContext,\n { id, stepId, required = true }: { id: string; stepId: string; required?: boolean }\n ) {\n this.id = id;\n this.stepId = stepId;\n this.required = required;\n }\n\n get value(): string | undefined {\n if (this.required && this._value === undefined) {\n throw new BuildStepRuntimeError(\n `Output parameter \"${this.id}\" for step \"${this.stepId}\" is required but it was not set.`\n );\n }\n return this._value;\n }\n\n set(value: string | undefined): BuildStepOutput {\n if (this.required && value === undefined) {\n throw new BuildStepRuntimeError(\n `Output parameter \"${this.id}\" for step \"${this.stepId}\" is required.`\n );\n }\n this._value = value;\n return this;\n }\n}\n"]}
1
+ {"version":3,"file":"BuildStepOutput.js","sourceRoot":"","sources":["../src/BuildStepOutput.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAI1E,MAAM,OAAO,eAAe;IAO1B;IACE,wFAAwF;IACvE,GAAqB,EACtC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAsD;QADlE,QAAG,GAAH,GAAG,CAAkB;QAGtC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAI,KAAK;QACP,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YAC9C,MAAM,IAAI,qBAAqB,CAC7B,qBAAqB,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,MAAM,mCAAmC,CAC1F,CAAC;SACH;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,GAAG,CAAC,KAAyB;QAC3B,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,KAAK,SAAS,EAAE;YACxC,MAAM,IAAI,qBAAqB,CAC7B,qBAAqB,IAAI,CAAC,EAAE,eAAe,IAAI,CAAC,MAAM,gBAAgB,CACvE,CAAC;SACH;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { BuildStepContext } from './BuildStepContext.js';\nimport { BuildStepRuntimeError } from './errors/BuildStepRuntimeError.js';\n\nexport type BuildStepOutputCreator = (stepId: string) => BuildStepOutput;\n\nexport class BuildStepOutput {\n public readonly id: string;\n public readonly stepId: string;\n public readonly required: boolean;\n\n private _value?: string;\n\n constructor(\n // @ts-expect-error ctx is not used in this class but let's keep it here for consistency\n private readonly ctx: BuildStepContext,\n { id, stepId, required = true }: { id: string; stepId: string; required?: boolean }\n ) {\n this.id = id;\n this.stepId = stepId;\n this.required = required;\n }\n\n get value(): string | undefined {\n if (this.required && this._value === undefined) {\n throw new BuildStepRuntimeError(\n `Output parameter \"${this.id}\" for step \"${this.stepId}\" is required but it was not set.`\n );\n }\n return this._value;\n }\n\n set(value: string | undefined): BuildStepOutput {\n if (this.required && value === undefined) {\n throw new BuildStepRuntimeError(\n `Output parameter \"${this.id}\" for step \"${this.stepId}\" is required.`\n );\n }\n this._value = value;\n return this;\n }\n}\n"]}
@@ -1,12 +1,15 @@
1
1
  import { BuildArtifacts } from './BuildArtifacts.js';
2
+ import { BuildFunctionById } from './BuildFunction.js';
2
3
  import { BuildStep } from './BuildStep.js';
3
4
  import { BuildStepContext } from './BuildStepContext.js';
4
5
  import { BuildStepEnv } from './BuildStepEnv.js';
5
6
  export declare class BuildWorkflow {
6
7
  private readonly ctx;
7
8
  readonly buildSteps: BuildStep[];
8
- constructor(ctx: BuildStepContext, { buildSteps }: {
9
+ readonly buildFunctions: BuildFunctionById;
10
+ constructor(ctx: BuildStepContext, { buildSteps, buildFunctions }: {
9
11
  buildSteps: BuildStep[];
12
+ buildFunctions: BuildFunctionById;
10
13
  });
11
14
  executeAsync(env?: BuildStepEnv): Promise<void>;
12
15
  collectArtifactsAsync(): Promise<BuildArtifacts>;
@@ -1,9 +1,10 @@
1
1
  import { BuildArtifactType } from './BuildArtifacts.js';
2
2
  import { cleanUpWorkflowTemporaryDirectoriesAsync, findArtifactsByTypeAsync, } from './BuildTemporaryFiles.js';
3
3
  export class BuildWorkflow {
4
- constructor(ctx, { buildSteps }) {
4
+ constructor(ctx, { buildSteps, buildFunctions }) {
5
5
  this.ctx = ctx;
6
6
  this.buildSteps = buildSteps;
7
+ this.buildFunctions = buildFunctions;
7
8
  }
8
9
  async executeAsync(env = process.env) {
9
10
  for (const step of this.buildSteps) {
@@ -14,8 +15,10 @@ export class BuildWorkflow {
14
15
  const applicationArchives = await findArtifactsByTypeAsync(this.ctx, BuildArtifactType.APPLICATION_ARCHIVE);
15
16
  const buildArtifacts = await findArtifactsByTypeAsync(this.ctx, BuildArtifactType.BUILD_ARTIFACT);
16
17
  return {
17
- [BuildArtifactType.APPLICATION_ARCHIVE]: applicationArchives,
18
- [BuildArtifactType.BUILD_ARTIFACT]: buildArtifacts,
18
+ ...(applicationArchives.length > 0 && {
19
+ [BuildArtifactType.APPLICATION_ARCHIVE]: applicationArchives,
20
+ }),
21
+ ...(buildArtifacts.length > 0 && { [BuildArtifactType.BUILD_ARTIFACT]: buildArtifacts }),
19
22
  };
20
23
  }
21
24
  async cleanUpAsync() {
@@ -1 +1 @@
1
- {"version":3,"file":"BuildWorkflow.js","sourceRoot":"","sources":["../src/BuildWorkflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxE,OAAO,EACL,wCAAwC,EACxC,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAElC,MAAM,OAAO,aAAa;IAGxB,YAA6B,GAAqB,EAAE,EAAE,UAAU,EAA+B;QAAlE,QAAG,GAAH,GAAG,CAAkB;QAChD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,MAAoB,OAAO,CAAC,GAAG;QACvD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;YAClC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;SAC9B;IACH,CAAC;IAEM,KAAK,CAAC,qBAAqB;QAChC,MAAM,mBAAmB,GAAG,MAAM,wBAAwB,CACxD,IAAI,CAAC,GAAG,EACR,iBAAiB,CAAC,mBAAmB,CACtC,CAAC;QACF,MAAM,cAAc,GAAG,MAAM,wBAAwB,CACnD,IAAI,CAAC,GAAG,EACR,iBAAiB,CAAC,cAAc,CACjC,CAAC;QACF,OAAO;YACL,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,mBAAmB;YAC5D,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,cAAc;SACnD,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,YAAY;QACvB,MAAM,wCAAwC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3D,CAAC;CACF","sourcesContent":["import { BuildArtifacts, BuildArtifactType } from './BuildArtifacts.js';\nimport { BuildStep } from './BuildStep.js';\nimport { BuildStepContext } from './BuildStepContext.js';\nimport { BuildStepEnv } from './BuildStepEnv.js';\nimport {\n cleanUpWorkflowTemporaryDirectoriesAsync,\n findArtifactsByTypeAsync,\n} from './BuildTemporaryFiles.js';\n\nexport class BuildWorkflow {\n public readonly buildSteps: BuildStep[];\n\n constructor(private readonly ctx: BuildStepContext, { buildSteps }: { buildSteps: BuildStep[] }) {\n this.buildSteps = buildSteps;\n }\n\n public async executeAsync(env: BuildStepEnv = process.env): Promise<void> {\n for (const step of this.buildSteps) {\n await step.executeAsync(env);\n }\n }\n\n public async collectArtifactsAsync(): Promise<BuildArtifacts> {\n const applicationArchives = await findArtifactsByTypeAsync(\n this.ctx,\n BuildArtifactType.APPLICATION_ARCHIVE\n );\n const buildArtifacts = await findArtifactsByTypeAsync(\n this.ctx,\n BuildArtifactType.BUILD_ARTIFACT\n );\n return {\n [BuildArtifactType.APPLICATION_ARCHIVE]: applicationArchives,\n [BuildArtifactType.BUILD_ARTIFACT]: buildArtifacts,\n };\n }\n\n public async cleanUpAsync(): Promise<void> {\n await cleanUpWorkflowTemporaryDirectoriesAsync(this.ctx);\n }\n}\n"]}
1
+ {"version":3,"file":"BuildWorkflow.js","sourceRoot":"","sources":["../src/BuildWorkflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKxE,OAAO,EACL,wCAAwC,EACxC,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAElC,MAAM,OAAO,aAAa;IAIxB,YACmB,GAAqB,EACtC,EAAE,UAAU,EAAE,cAAc,EAAkE;QAD7E,QAAG,GAAH,GAAG,CAAkB;QAGtC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,MAAoB,OAAO,CAAC,GAAG;QACvD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;YAClC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;SAC9B;IACH,CAAC;IAEM,KAAK,CAAC,qBAAqB;QAChC,MAAM,mBAAmB,GAAG,MAAM,wBAAwB,CACxD,IAAI,CAAC,GAAG,EACR,iBAAiB,CAAC,mBAAmB,CACtC,CAAC;QACF,MAAM,cAAc,GAAG,MAAM,wBAAwB,CACnD,IAAI,CAAC,GAAG,EACR,iBAAiB,CAAC,cAAc,CACjC,CAAC;QACF,OAAO;YACL,GAAG,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,IAAI;gBACpC,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,mBAAmB;aAC7D,CAAC;YACF,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;SACzF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,YAAY;QACvB,MAAM,wCAAwC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3D,CAAC;CACF","sourcesContent":["import { BuildArtifacts, BuildArtifactType } from './BuildArtifacts.js';\nimport { BuildFunctionById } from './BuildFunction.js';\nimport { BuildStep } from './BuildStep.js';\nimport { BuildStepContext } from './BuildStepContext.js';\nimport { BuildStepEnv } from './BuildStepEnv.js';\nimport {\n cleanUpWorkflowTemporaryDirectoriesAsync,\n findArtifactsByTypeAsync,\n} from './BuildTemporaryFiles.js';\n\nexport class BuildWorkflow {\n public readonly buildSteps: BuildStep[];\n public readonly buildFunctions: BuildFunctionById;\n\n constructor(\n private readonly ctx: BuildStepContext,\n { buildSteps, buildFunctions }: { buildSteps: BuildStep[]; buildFunctions: BuildFunctionById }\n ) {\n this.buildSteps = buildSteps;\n this.buildFunctions = buildFunctions;\n }\n\n public async executeAsync(env: BuildStepEnv = process.env): Promise<void> {\n for (const step of this.buildSteps) {\n await step.executeAsync(env);\n }\n }\n\n public async collectArtifactsAsync(): Promise<BuildArtifacts> {\n const applicationArchives = await findArtifactsByTypeAsync(\n this.ctx,\n BuildArtifactType.APPLICATION_ARCHIVE\n );\n const buildArtifacts = await findArtifactsByTypeAsync(\n this.ctx,\n BuildArtifactType.BUILD_ARTIFACT\n );\n return {\n ...(applicationArchives.length > 0 && {\n [BuildArtifactType.APPLICATION_ARCHIVE]: applicationArchives,\n }),\n ...(buildArtifacts.length > 0 && { [BuildArtifactType.BUILD_ARTIFACT]: buildArtifacts }),\n };\n }\n\n public async cleanUpAsync(): Promise<void> {\n await cleanUpWorkflowTemporaryDirectoriesAsync(this.ctx);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@expo/steps",
3
3
  "type": "module",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "main": "./dist_commonjs/index.cjs",
6
6
  "types": "./dist_esm/index.d.ts",
7
7
  "exports": {
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "start": "yarn watch",
22
22
  "build": "./build.sh",
23
- "watch": "chokidar --initial \"src/**/*.ts\" -c \"./build.sh\"",
23
+ "watch": "chokidar --initial \"src/**/*.ts\" -i \"src/**/__tests__/**/*\" -c \"./build.sh\"",
24
24
  "test": "node --experimental-vm-modules --no-warnings node_modules/.bin/jest -c=jest.config.cjs --no-cache",
25
25
  "test:watch": "yarn test --watch",
26
26
  "clean": "rm -rf node_modules dist_* coverage"