@expo/steps
Advanced tools
Comparing version 1.0.161 to 1.0.163
import Joi from 'joi'; | ||
import { BuildRuntimePlatform } from './BuildRuntimePlatform.js'; | ||
import { BuildStepInputValueTypeWithRequired, BuildStepInputValueTypeName, BuildStepInputValueType } from './BuildStepInput.js'; | ||
import { BuildStepInputValueTypeName, BuildStepInputValueType } from './BuildStepInput.js'; | ||
import { BuildStepEnv } from './BuildStepEnv.js'; | ||
@@ -39,3 +39,3 @@ export type BuildFunctions = Record<string, BuildFunctionConfig>; | ||
}; | ||
export type BuildStepInputs = Record<string, BuildStepInputValueTypeWithRequired>; | ||
export type BuildStepInputs = Record<string, unknown>; | ||
export type BuildStepOutputs = (string | { | ||
@@ -42,0 +42,0 @@ name: string; |
import { BuildRuntimePlatform } from './BuildRuntimePlatform.js'; | ||
import { BuildStep, BuildStepFunction } from './BuildStep.js'; | ||
import { BuildStepGlobalContext } from './BuildStepContext.js'; | ||
import { BuildStepInputProvider, BuildStepInputValueTypeWithRequired } from './BuildStepInput.js'; | ||
import { BuildStepInputProvider } from './BuildStepInput.js'; | ||
import { BuildStepOutputProvider } from './BuildStepOutput.js'; | ||
import { BuildStepEnv } from './BuildStepEnv.js'; | ||
export type BuildFunctionById = Record<string, BuildFunction>; | ||
export type BuildFunctionCallInputs = Record<string, BuildStepInputValueTypeWithRequired>; | ||
export type BuildFunctionCallInputs = Record<string, unknown>; | ||
export declare class BuildFunction { | ||
@@ -10,0 +10,0 @@ readonly namespace?: string; |
@@ -9,4 +9,3 @@ import { bunyan } from '@expo/logger'; | ||
} | ||
export type BuildStepInputValueType<T extends BuildStepInputValueTypeName = BuildStepInputValueTypeName> = T extends BuildStepInputValueTypeName.STRING ? string : T extends BuildStepInputValueTypeName.BOOLEAN ? boolean : T extends BuildStepInputValueTypeName.NUMBER ? number : Record<string, any>; | ||
export type BuildStepInputValueTypeWithRequired<T extends BuildStepInputValueTypeName = BuildStepInputValueTypeName, R extends boolean = boolean> = R extends true ? BuildStepInputValueType<T> : BuildStepInputValueType<T> | undefined; | ||
export type BuildStepInputValueType<T extends BuildStepInputValueTypeName = BuildStepInputValueTypeName> = T extends BuildStepInputValueTypeName.STRING ? string : T extends BuildStepInputValueTypeName.BOOLEAN ? boolean : T extends BuildStepInputValueTypeName.NUMBER ? number : Record<string, unknown>; | ||
export type BuildStepInputById = Record<string, BuildStepInput>; | ||
@@ -16,4 +15,4 @@ export type BuildStepInputProvider = (ctx: BuildStepGlobalContext, stepId: string) => BuildStepInput; | ||
id: string; | ||
allowedValues?: BuildStepInputValueType<T>[]; | ||
defaultValue?: BuildStepInputValueType<T>; | ||
allowedValues?: unknown[]; | ||
defaultValue?: unknown; | ||
required: R; | ||
@@ -25,10 +24,10 @@ allowedValueTypeName: T; | ||
} | ||
export interface SerializedBuildStepInput<T extends BuildStepInputValueTypeName = BuildStepInputValueTypeName, R extends boolean = boolean> { | ||
export interface SerializedBuildStepInput { | ||
id: string; | ||
stepDisplayName: string; | ||
defaultValue?: BuildStepInputValueType<T>; | ||
allowedValues?: BuildStepInputValueType<T>[]; | ||
defaultValue?: unknown; | ||
allowedValues?: unknown[]; | ||
allowedValueTypeName: BuildStepInputValueTypeName; | ||
required: R; | ||
value?: BuildStepInputValueType<T>; | ||
required: boolean; | ||
value?: unknown; | ||
ctx: SerializedBuildStepGlobalContext; | ||
@@ -40,4 +39,4 @@ } | ||
readonly stepDisplayName: string; | ||
readonly defaultValue?: BuildStepInputValueType<T>; | ||
readonly allowedValues?: BuildStepInputValueType<T>[]; | ||
readonly defaultValue?: unknown; | ||
readonly allowedValues?: unknown[]; | ||
readonly allowedValueTypeName: T; | ||
@@ -48,8 +47,8 @@ readonly required: R; | ||
constructor(ctx: BuildStepGlobalContext, { id, stepDisplayName, allowedValues, defaultValue, required, allowedValueTypeName, }: BuildStepInputParams<T, R>); | ||
get value(): BuildStepInputValueTypeWithRequired<T, R>; | ||
get rawValue(): BuildStepInputValueType<T> | undefined; | ||
set(value: BuildStepInputValueType<T> | undefined): BuildStepInput; | ||
get value(): R extends true ? BuildStepInputValueType<T> : BuildStepInputValueType<T> | undefined; | ||
get rawValue(): unknown; | ||
set(value: unknown): BuildStepInput; | ||
isValueOneOfAllowedValues(): boolean; | ||
isRawValueStepOrContextReference(): boolean; | ||
serialize(): SerializedBuildStepInput<T, R>; | ||
serialize(): SerializedBuildStepInput; | ||
static deserialize(serializedInput: SerializedBuildStepInput, logger: bunyan): BuildStepInput; | ||
@@ -56,0 +55,0 @@ private parseInputValueToAllowedType; |
import Joi from 'joi'; | ||
import { BuildRuntimePlatform } from './BuildRuntimePlatform.js'; | ||
import { BuildStepInputValueTypeWithRequired, BuildStepInputValueTypeName, BuildStepInputValueType } from './BuildStepInput.js'; | ||
import { BuildStepInputValueTypeName, BuildStepInputValueType } from './BuildStepInput.js'; | ||
import { BuildStepEnv } from './BuildStepEnv.js'; | ||
@@ -39,3 +39,3 @@ export type BuildFunctions = Record<string, BuildFunctionConfig>; | ||
}; | ||
export type BuildStepInputs = Record<string, BuildStepInputValueTypeWithRequired>; | ||
export type BuildStepInputs = Record<string, unknown>; | ||
export type BuildStepOutputs = (string | { | ||
@@ -42,0 +42,0 @@ name: string; |
@@ -8,3 +8,3 @@ import assert from 'assert'; | ||
import { BuildRuntimePlatform } from './BuildRuntimePlatform.js'; | ||
import { BuildStepInputValueTypeName, } from './BuildStepInput.js'; | ||
import { BuildStepInputValueTypeName } from './BuildStepInput.js'; | ||
import { BUILD_STEP_OR_BUILD_GLOBAL_CONTEXT_REFERENCE_REGEX } from './utils/template.js'; | ||
@@ -11,0 +11,0 @@ const BuildFunctionInputsSchema = Joi.array().items(Joi.alternatives().conditional(Joi.ref('.'), { |
import { BuildRuntimePlatform } from './BuildRuntimePlatform.js'; | ||
import { BuildStep, BuildStepFunction } from './BuildStep.js'; | ||
import { BuildStepGlobalContext } from './BuildStepContext.js'; | ||
import { BuildStepInputProvider, BuildStepInputValueTypeWithRequired } from './BuildStepInput.js'; | ||
import { BuildStepInputProvider } from './BuildStepInput.js'; | ||
import { BuildStepOutputProvider } from './BuildStepOutput.js'; | ||
import { BuildStepEnv } from './BuildStepEnv.js'; | ||
export type BuildFunctionById = Record<string, BuildFunction>; | ||
export type BuildFunctionCallInputs = Record<string, BuildStepInputValueTypeWithRequired>; | ||
export type BuildFunctionCallInputs = Record<string, unknown>; | ||
export declare class BuildFunction { | ||
@@ -10,0 +10,0 @@ readonly namespace?: string; |
import assert from 'assert'; | ||
import fs from 'fs/promises'; | ||
import path from 'path'; | ||
import { Buffer } from 'buffer'; | ||
import { v4 as uuidv4 } from 'uuid'; | ||
@@ -15,3 +16,2 @@ import { makeBuildStepInputByIdMap } from './BuildStepInput.js'; | ||
import { interpolateJobContext } from './interpolation.js'; | ||
import { fixEscapeCharactersInRawEnvValue } from './utils/envUtils.js'; | ||
export var BuildStepStatus; | ||
@@ -306,4 +306,4 @@ (function (BuildStepStatus) { | ||
const rawContents = await fs.readFile(path.join(envsDir, basename), 'utf-8'); | ||
const updatedContents = fixEscapeCharactersInRawEnvValue(rawContents); | ||
return [basename, updatedContents]; | ||
const decodedContents = Buffer.from(rawContents, 'base64').toString('utf-8'); | ||
return [basename, decodedContents]; | ||
})); | ||
@@ -310,0 +310,0 @@ this.ctx.global.updateEnv({ |
@@ -9,4 +9,3 @@ import { bunyan } from '@expo/logger'; | ||
} | ||
export type BuildStepInputValueType<T extends BuildStepInputValueTypeName = BuildStepInputValueTypeName> = T extends BuildStepInputValueTypeName.STRING ? string : T extends BuildStepInputValueTypeName.BOOLEAN ? boolean : T extends BuildStepInputValueTypeName.NUMBER ? number : Record<string, any>; | ||
export type BuildStepInputValueTypeWithRequired<T extends BuildStepInputValueTypeName = BuildStepInputValueTypeName, R extends boolean = boolean> = R extends true ? BuildStepInputValueType<T> : BuildStepInputValueType<T> | undefined; | ||
export type BuildStepInputValueType<T extends BuildStepInputValueTypeName = BuildStepInputValueTypeName> = T extends BuildStepInputValueTypeName.STRING ? string : T extends BuildStepInputValueTypeName.BOOLEAN ? boolean : T extends BuildStepInputValueTypeName.NUMBER ? number : Record<string, unknown>; | ||
export type BuildStepInputById = Record<string, BuildStepInput>; | ||
@@ -16,4 +15,4 @@ export type BuildStepInputProvider = (ctx: BuildStepGlobalContext, stepId: string) => BuildStepInput; | ||
id: string; | ||
allowedValues?: BuildStepInputValueType<T>[]; | ||
defaultValue?: BuildStepInputValueType<T>; | ||
allowedValues?: unknown[]; | ||
defaultValue?: unknown; | ||
required: R; | ||
@@ -25,10 +24,10 @@ allowedValueTypeName: T; | ||
} | ||
export interface SerializedBuildStepInput<T extends BuildStepInputValueTypeName = BuildStepInputValueTypeName, R extends boolean = boolean> { | ||
export interface SerializedBuildStepInput { | ||
id: string; | ||
stepDisplayName: string; | ||
defaultValue?: BuildStepInputValueType<T>; | ||
allowedValues?: BuildStepInputValueType<T>[]; | ||
defaultValue?: unknown; | ||
allowedValues?: unknown[]; | ||
allowedValueTypeName: BuildStepInputValueTypeName; | ||
required: R; | ||
value?: BuildStepInputValueType<T>; | ||
required: boolean; | ||
value?: unknown; | ||
ctx: SerializedBuildStepGlobalContext; | ||
@@ -40,4 +39,4 @@ } | ||
readonly stepDisplayName: string; | ||
readonly defaultValue?: BuildStepInputValueType<T>; | ||
readonly allowedValues?: BuildStepInputValueType<T>[]; | ||
readonly defaultValue?: unknown; | ||
readonly allowedValues?: unknown[]; | ||
readonly allowedValueTypeName: T; | ||
@@ -48,8 +47,8 @@ readonly required: R; | ||
constructor(ctx: BuildStepGlobalContext, { id, stepDisplayName, allowedValues, defaultValue, required, allowedValueTypeName, }: BuildStepInputParams<T, R>); | ||
get value(): BuildStepInputValueTypeWithRequired<T, R>; | ||
get rawValue(): BuildStepInputValueType<T> | undefined; | ||
set(value: BuildStepInputValueType<T> | undefined): BuildStepInput; | ||
get value(): R extends true ? BuildStepInputValueType<T> : BuildStepInputValueType<T> | undefined; | ||
get rawValue(): unknown; | ||
set(value: unknown): BuildStepInput; | ||
isValueOneOfAllowedValues(): boolean; | ||
isRawValueStepOrContextReference(): boolean; | ||
serialize(): SerializedBuildStepInput<T, R>; | ||
serialize(): SerializedBuildStepInput; | ||
static deserialize(serializedInput: SerializedBuildStepInput, logger: bunyan): BuildStepInput; | ||
@@ -56,0 +55,0 @@ private parseInputValueToAllowedType; |
@@ -31,3 +31,6 @@ import assert from 'assert'; | ||
} | ||
const valueDoesNotRequireInterpolation = rawValue === undefined || typeof rawValue === 'boolean' || typeof rawValue === 'number'; | ||
const valueDoesNotRequireInterpolation = rawValue === undefined || | ||
rawValue === null || | ||
typeof rawValue === 'boolean' || | ||
typeof rawValue === 'number'; | ||
let returnValue; | ||
@@ -34,0 +37,0 @@ if (valueDoesNotRequireInterpolation) { |
{ | ||
"name": "@expo/steps", | ||
"type": "module", | ||
"version": "1.0.161", | ||
"version": "1.0.163", | ||
"main": "./dist_commonjs/index.cjs", | ||
@@ -51,3 +51,3 @@ "types": "./dist_esm/index.d.ts", | ||
"dependencies": { | ||
"@expo/eas-build-job": "1.0.156", | ||
"@expo/eas-build-job": "1.0.163", | ||
"@expo/logger": "1.0.117", | ||
@@ -69,3 +69,3 @@ "@expo/spawn-async": "^1.7.2", | ||
}, | ||
"gitHead": "a43eb772ea625244c1350ecb4a39b585c978cfae" | ||
"gitHead": "7390cf79914f90b42f72c47e67af76978450496e" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
714738
180
6153
+ Added@expo/eas-build-job@1.0.163(transitive)
- Removed@expo/eas-build-job@1.0.156(transitive)
Updated@expo/eas-build-job@1.0.163