@expo/steps 1.0.263 → 1.0.271
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_commonjs → dist}/AbstractConfigParser.d.ts +5 -5
- package/{dist_commonjs/AbstractConfigParser.cjs → dist/AbstractConfigParser.js} +13 -13
- package/dist/AbstractConfigParser.js.map +1 -0
- package/{dist_commonjs → dist}/BuildConfig.d.ts +4 -3
- package/{dist_commonjs/BuildConfig.cjs → dist/BuildConfig.js} +24 -22
- package/dist/BuildConfig.js.map +1 -0
- package/{dist_esm → dist}/BuildConfigParser.d.ts +5 -5
- package/{dist_commonjs/BuildConfigParser.cjs → dist/BuildConfigParser.js} +33 -32
- package/dist/BuildConfigParser.js.map +1 -0
- package/{dist_esm → dist}/BuildFunction.d.ts +9 -7
- package/{dist_commonjs/BuildFunction.cjs → dist/BuildFunction.js} +9 -7
- package/dist/BuildFunction.js.map +1 -0
- package/{dist_commonjs → dist}/BuildFunctionGroup.d.ts +4 -4
- package/{dist_commonjs/BuildFunctionGroup.cjs → dist/BuildFunctionGroup.js} +4 -4
- package/dist/BuildFunctionGroup.js.map +1 -0
- package/{dist_esm → dist}/BuildStep.d.ts +8 -6
- package/{dist_commonjs/BuildStep.cjs → dist/BuildStep.js} +31 -30
- package/dist/BuildStep.js.map +1 -0
- package/{dist_commonjs → dist}/BuildStepContext.d.ts +7 -3
- package/{dist_commonjs/BuildStepContext.cjs → dist/BuildStepContext.js} +17 -10
- package/dist/BuildStepContext.js.map +1 -0
- package/{dist_esm → dist}/BuildStepInput.d.ts +1 -1
- package/{dist_commonjs/BuildStepInput.cjs → dist/BuildStepInput.js} +12 -12
- package/dist/BuildStepInput.js.map +1 -0
- package/{dist_commonjs → dist}/BuildStepOutput.d.ts +1 -1
- package/{dist_commonjs/BuildStepOutput.cjs → dist/BuildStepOutput.js} +3 -3
- package/dist/BuildStepOutput.js.map +1 -0
- package/{dist_commonjs → dist}/BuildTemporaryFiles.d.ts +1 -1
- package/{dist_commonjs → dist}/BuildTemporaryFiles.js.map +1 -1
- package/{dist_commonjs → dist}/BuildWorkflow.d.ts +4 -3
- package/{dist_commonjs/BuildWorkflow.cjs → dist/BuildWorkflow.js} +17 -0
- package/dist/BuildWorkflow.js.map +1 -0
- package/{dist_commonjs → dist}/BuildWorkflowValidator.d.ts +1 -1
- package/{dist_commonjs/BuildWorkflowValidator.cjs → dist/BuildWorkflowValidator.js} +19 -19
- package/dist/BuildWorkflowValidator.js.map +1 -0
- package/dist/StepMetrics.d.ts +10 -0
- package/dist/StepMetrics.js +3 -0
- package/dist/StepMetrics.js.map +1 -0
- package/{dist_commonjs → dist}/StepsConfigParser.d.ts +5 -5
- package/{dist_commonjs/StepsConfigParser.cjs → dist/StepsConfigParser.js} +14 -13
- package/dist/StepsConfigParser.js.map +1 -0
- package/{dist_esm → dist}/cli/cli.d.ts +3 -3
- package/{dist_commonjs/cli/cli.cjs → dist/cli/cli.js} +6 -6
- package/dist/cli/cli.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/{dist_commonjs/index.cjs → dist/index.js} +30 -30
- package/dist/index.js.map +1 -0
- package/{dist_commonjs/interpolation.cjs → dist/interpolation.js} +3 -3
- package/dist/interpolation.js.map +1 -0
- package/{dist_commonjs/scripts/runCustomFunction.cjs → dist/scripts/runCustomFunction.js} +9 -9
- package/dist/scripts/runCustomFunction.js.map +1 -0
- package/{dist_commonjs → dist}/utils/customFunction.d.ts +4 -4
- package/{dist_commonjs/utils/customFunction.cjs → dist/utils/customFunction.js} +4 -6
- package/dist/utils/customFunction.js.map +1 -0
- package/{dist_commonjs/utils/shell/bin.cjs → dist/utils/shell/bin.js} +1 -3
- package/dist/utils/shell/bin.js.map +1 -0
- package/{dist_commonjs/utils/template.cjs → dist/utils/template.js} +7 -7
- package/dist/utils/template.js.map +1 -0
- package/package.json +12 -24
- package/dist_commonjs/AbstractConfigParser.js.map +0 -1
- package/dist_commonjs/BuildConfig.js.map +0 -1
- package/dist_commonjs/BuildConfigParser.d.ts +0 -33
- package/dist_commonjs/BuildConfigParser.js.map +0 -1
- package/dist_commonjs/BuildFunction.d.ts +0 -43
- package/dist_commonjs/BuildFunction.js.map +0 -1
- package/dist_commonjs/BuildFunctionGroup.js.map +0 -1
- package/dist_commonjs/BuildStep.d.ts +0 -98
- package/dist_commonjs/BuildStep.js.map +0 -1
- package/dist_commonjs/BuildStepContext.js.map +0 -1
- package/dist_commonjs/BuildStepInput.d.ts +0 -47
- package/dist_commonjs/BuildStepInput.js.map +0 -1
- package/dist_commonjs/BuildStepOutput.js.map +0 -1
- package/dist_commonjs/BuildWorkflow.js.map +0 -1
- package/dist_commonjs/BuildWorkflowValidator.js.map +0 -1
- package/dist_commonjs/StepsConfigParser.js.map +0 -1
- package/dist_commonjs/cli/cli.d.ts +0 -18
- package/dist_commonjs/cli/cli.js.map +0 -1
- package/dist_commonjs/index.d.ts +0 -18
- package/dist_commonjs/index.js.map +0 -1
- package/dist_commonjs/interpolation.js.map +0 -1
- package/dist_commonjs/scripts/runCustomFunction.js.map +0 -1
- package/dist_commonjs/utils/customFunction.js.map +0 -1
- package/dist_commonjs/utils/shell/bin.js.map +0 -1
- package/dist_commonjs/utils/template.js.map +0 -1
- package/dist_esm/AbstractConfigParser.d.ts +0 -23
- package/dist_esm/AbstractConfigParser.js +0 -61
- package/dist_esm/AbstractConfigParser.js.map +0 -1
- package/dist_esm/BuildConfig.d.ts +0 -79
- package/dist_esm/BuildConfig.js +0 -279
- package/dist_esm/BuildConfig.js.map +0 -1
- package/dist_esm/BuildConfigParser.js +0 -232
- package/dist_esm/BuildConfigParser.js.map +0 -1
- package/dist_esm/BuildFunction.js +0 -60
- package/dist_esm/BuildFunction.js.map +0 -1
- package/dist_esm/BuildFunctionGroup.d.ts +0 -23
- package/dist_esm/BuildFunctionGroup.js +0 -36
- package/dist_esm/BuildFunctionGroup.js.map +0 -1
- package/dist_esm/BuildRuntimePlatform.d.ts +0 -4
- package/dist_esm/BuildRuntimePlatform.js +0 -6
- package/dist_esm/BuildRuntimePlatform.js.map +0 -1
- package/dist_esm/BuildStep.js +0 -353
- package/dist_esm/BuildStep.js.map +0 -1
- package/dist_esm/BuildStepContext.d.ts +0 -82
- package/dist_esm/BuildStepContext.js +0 -200
- package/dist_esm/BuildStepContext.js.map +0 -1
- package/dist_esm/BuildStepEnv.d.ts +0 -1
- package/dist_esm/BuildStepEnv.js +0 -2
- package/dist_esm/BuildStepEnv.js.map +0 -1
- package/dist_esm/BuildStepInput.js +0 -150
- package/dist_esm/BuildStepInput.js.map +0 -1
- package/dist_esm/BuildStepOutput.d.ts +0 -33
- package/dist_esm/BuildStepOutput.js +0 -57
- package/dist_esm/BuildStepOutput.js.map +0 -1
- package/dist_esm/BuildTemporaryFiles.d.ts +0 -5
- package/dist_esm/BuildTemporaryFiles.js +0 -31
- package/dist_esm/BuildTemporaryFiles.js.map +0 -1
- package/dist_esm/BuildWorkflow.d.ts +0 -13
- package/dist_esm/BuildWorkflow.js +0 -38
- package/dist_esm/BuildWorkflow.js.map +0 -1
- package/dist_esm/BuildWorkflowValidator.d.ts +0 -10
- package/dist_esm/BuildWorkflowValidator.js +0 -121
- package/dist_esm/BuildWorkflowValidator.js.map +0 -1
- package/dist_esm/StepsConfigParser.d.ts +0 -24
- package/dist_esm/StepsConfigParser.js +0 -132
- package/dist_esm/StepsConfigParser.js.map +0 -1
- package/dist_esm/cli/cli.js +0 -61
- package/dist_esm/cli/cli.js.map +0 -1
- package/dist_esm/errors.d.ts +0 -24
- package/dist_esm/errors.js +0 -24
- package/dist_esm/errors.js.map +0 -1
- package/dist_esm/index.d.ts +0 -18
- package/dist_esm/index.js +0 -18
- package/dist_esm/index.js.map +0 -1
- package/dist_esm/interpolation.d.ts +0 -5
- package/dist_esm/interpolation.js +0 -26
- package/dist_esm/interpolation.js.map +0 -1
- package/dist_esm/scripts/runCustomFunction.d.ts +0 -1
- package/dist_esm/scripts/runCustomFunction.js +0 -100
- package/dist_esm/scripts/runCustomFunction.js.map +0 -1
- package/dist_esm/utils/customFunction.d.ts +0 -18
- package/dist_esm/utils/customFunction.js +0 -49
- package/dist_esm/utils/customFunction.js.map +0 -1
- package/dist_esm/utils/expodash/duplicates.d.ts +0 -1
- package/dist_esm/utils/expodash/duplicates.js +0 -14
- package/dist_esm/utils/expodash/duplicates.js.map +0 -1
- package/dist_esm/utils/expodash/uniq.d.ts +0 -1
- package/dist_esm/utils/expodash/uniq.js +0 -5
- package/dist_esm/utils/expodash/uniq.js.map +0 -1
- package/dist_esm/utils/hashFiles.d.ts +0 -6
- package/dist_esm/utils/hashFiles.js +0 -31
- package/dist_esm/utils/hashFiles.js.map +0 -1
- package/dist_esm/utils/jsepEval.d.ts +0 -1
- package/dist_esm/utils/jsepEval.js +0 -169
- package/dist_esm/utils/jsepEval.js.map +0 -1
- package/dist_esm/utils/nullthrows.d.ts +0 -1
- package/dist_esm/utils/nullthrows.js +0 -7
- package/dist_esm/utils/nullthrows.js.map +0 -1
- package/dist_esm/utils/shell/bin.d.ts +0 -1
- package/dist_esm/utils/shell/bin.js +0 -5
- package/dist_esm/utils/shell/bin.js.map +0 -1
- package/dist_esm/utils/shell/command.d.ts +0 -4
- package/dist_esm/utils/shell/command.js +0 -13
- package/dist_esm/utils/shell/command.js.map +0 -1
- package/dist_esm/utils/shell/spawn.d.ts +0 -15
- package/dist_esm/utils/shell/spawn.js +0 -16
- package/dist_esm/utils/shell/spawn.js.map +0 -1
- package/dist_esm/utils/template.d.ts +0 -19
- package/dist_esm/utils/template.js +0 -106
- package/dist_esm/utils/template.js.map +0 -1
- /package/{dist_commonjs → dist}/BuildRuntimePlatform.d.ts +0 -0
- /package/{dist_commonjs/BuildRuntimePlatform.cjs → dist/BuildRuntimePlatform.js} +0 -0
- /package/{dist_commonjs → dist}/BuildRuntimePlatform.js.map +0 -0
- /package/{dist_commonjs → dist}/BuildStepEnv.d.ts +0 -0
- /package/{dist_commonjs/BuildStepEnv.cjs → dist/BuildStepEnv.js} +0 -0
- /package/{dist_commonjs → dist}/BuildStepEnv.js.map +0 -0
- /package/{dist_commonjs/BuildTemporaryFiles.cjs → dist/BuildTemporaryFiles.js} +0 -0
- /package/{dist_commonjs → dist}/errors.d.ts +0 -0
- /package/{dist_commonjs/errors.cjs → dist/errors.js} +0 -0
- /package/{dist_commonjs → dist}/errors.js.map +0 -0
- /package/{dist_commonjs → dist}/interpolation.d.ts +0 -0
- /package/{dist_commonjs → dist}/scripts/runCustomFunction.d.ts +0 -0
- /package/{dist_commonjs → dist}/utils/expodash/duplicates.d.ts +0 -0
- /package/{dist_commonjs/utils/expodash/duplicates.cjs → dist/utils/expodash/duplicates.js} +0 -0
- /package/{dist_commonjs → dist}/utils/expodash/duplicates.js.map +0 -0
- /package/{dist_commonjs → dist}/utils/expodash/uniq.d.ts +0 -0
- /package/{dist_commonjs/utils/expodash/uniq.cjs → dist/utils/expodash/uniq.js} +0 -0
- /package/{dist_commonjs → dist}/utils/expodash/uniq.js.map +0 -0
- /package/{dist_commonjs → dist}/utils/hashFiles.d.ts +0 -0
- /package/{dist_commonjs/utils/hashFiles.cjs → dist/utils/hashFiles.js} +0 -0
- /package/{dist_commonjs → dist}/utils/hashFiles.js.map +0 -0
- /package/{dist_commonjs → dist}/utils/jsepEval.d.ts +0 -0
- /package/{dist_commonjs/utils/jsepEval.cjs → dist/utils/jsepEval.js} +0 -0
- /package/{dist_commonjs → dist}/utils/jsepEval.js.map +0 -0
- /package/{dist_commonjs → dist}/utils/nullthrows.d.ts +0 -0
- /package/{dist_commonjs/utils/nullthrows.cjs → dist/utils/nullthrows.js} +0 -0
- /package/{dist_commonjs → dist}/utils/nullthrows.js.map +0 -0
- /package/{dist_commonjs → dist}/utils/shell/bin.d.ts +0 -0
- /package/{dist_commonjs → dist}/utils/shell/command.d.ts +0 -0
- /package/{dist_commonjs/utils/shell/command.cjs → dist/utils/shell/command.js} +0 -0
- /package/{dist_commonjs → dist}/utils/shell/command.js.map +0 -0
- /package/{dist_commonjs → dist}/utils/shell/spawn.d.ts +0 -0
- /package/{dist_commonjs/utils/shell/spawn.cjs → dist/utils/shell/spawn.js} +0 -0
- /package/{dist_commonjs → dist}/utils/shell/spawn.js.map +0 -0
- /package/{dist_commonjs → dist}/utils/template.d.ts +0 -0
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import assert from 'assert';
|
|
2
|
-
import { createLogger } from '@expo/logger';
|
|
3
|
-
import cloneDeep from 'lodash.clonedeep';
|
|
4
|
-
import { BuildStepOutput } from '../BuildStepOutput.js';
|
|
5
|
-
import { deserializeInputs, } from '../utils/customFunction.js';
|
|
6
|
-
import { BuildStepContext } from '../BuildStepContext.js';
|
|
7
|
-
import { spawnAsync } from '../utils/shell/spawn.js';
|
|
8
|
-
async function runCustomJsFunctionAsync() {
|
|
9
|
-
const customJavascriptFunctionModulePath = process.argv[2];
|
|
10
|
-
const functionArgs = process.argv[3];
|
|
11
|
-
assert(customJavascriptFunctionModulePath, 'customJavascriptFunctionModulePath is required');
|
|
12
|
-
assert(functionArgs, 'serializedFunctionParams is required');
|
|
13
|
-
let serializedFunctionArguments;
|
|
14
|
-
try {
|
|
15
|
-
serializedFunctionArguments = JSON.parse(functionArgs);
|
|
16
|
-
}
|
|
17
|
-
catch (e) {
|
|
18
|
-
console.error('Failed to parse serializedFunctionParams');
|
|
19
|
-
throw e;
|
|
20
|
-
}
|
|
21
|
-
const logger = createLogger({
|
|
22
|
-
name: 'customFunctionLogger',
|
|
23
|
-
streams: [
|
|
24
|
-
{
|
|
25
|
-
type: 'raw',
|
|
26
|
-
stream: {
|
|
27
|
-
write: (rec) => {
|
|
28
|
-
if (rec) {
|
|
29
|
-
switch (rec.level) {
|
|
30
|
-
case 20: // Debug level
|
|
31
|
-
if (rec.msg) {
|
|
32
|
-
console.debug(rec.msg);
|
|
33
|
-
}
|
|
34
|
-
break;
|
|
35
|
-
case 30: // Info level
|
|
36
|
-
if (rec.msg) {
|
|
37
|
-
console.log(rec.msg);
|
|
38
|
-
}
|
|
39
|
-
break;
|
|
40
|
-
case 40: // Warn level
|
|
41
|
-
if (rec.msg) {
|
|
42
|
-
console.warn(rec.msg);
|
|
43
|
-
}
|
|
44
|
-
break;
|
|
45
|
-
case 50: // Error level
|
|
46
|
-
case 60: // Fatal level
|
|
47
|
-
if (rec.msg) {
|
|
48
|
-
console.error(rec.msg);
|
|
49
|
-
}
|
|
50
|
-
break;
|
|
51
|
-
default:
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
});
|
|
60
|
-
const ctx = BuildStepContext.deserialize(serializedFunctionArguments.ctx, logger);
|
|
61
|
-
const inputs = deserializeInputs(serializedFunctionArguments.inputs);
|
|
62
|
-
const outputs = Object.fromEntries(Object.entries(serializedFunctionArguments.outputs).map(([id, output]) => [
|
|
63
|
-
id,
|
|
64
|
-
BuildStepOutput.deserialize(output),
|
|
65
|
-
]));
|
|
66
|
-
const env = serializedFunctionArguments.env;
|
|
67
|
-
const envBefore = cloneDeep(serializedFunctionArguments.env);
|
|
68
|
-
let customModule;
|
|
69
|
-
try {
|
|
70
|
-
customModule = await require(customJavascriptFunctionModulePath);
|
|
71
|
-
}
|
|
72
|
-
catch (e) {
|
|
73
|
-
console.error('Failed to load custom function module');
|
|
74
|
-
throw e;
|
|
75
|
-
}
|
|
76
|
-
const customJavascriptFunction = customModule.default;
|
|
77
|
-
await customJavascriptFunction(ctx, { inputs, outputs, env });
|
|
78
|
-
const promises = [];
|
|
79
|
-
for (const output of Object.values(outputs)) {
|
|
80
|
-
if (output.rawValue) {
|
|
81
|
-
assert(output.value, 'output.value is required');
|
|
82
|
-
promises.push(spawnAsync('set-output', [output.id, output.value], {
|
|
83
|
-
env,
|
|
84
|
-
stdio: 'pipe',
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
for (const envName of Object.keys(env)) {
|
|
89
|
-
const envValue = env[envName];
|
|
90
|
-
if (envValue !== envBefore[envName] && envValue) {
|
|
91
|
-
promises.push(spawnAsync('set-env', [envName, envValue], {
|
|
92
|
-
env,
|
|
93
|
-
stdio: 'pipe',
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
await Promise.all(promises);
|
|
98
|
-
}
|
|
99
|
-
void runCustomJsFunctionAsync();
|
|
100
|
-
//# sourceMappingURL=runCustomFunction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runCustomFunction.js","sourceRoot":"","sources":["../../src/scripts/runCustomFunction.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,SAAS,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAEL,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,KAAK,UAAU,wBAAwB;IACrC,MAAM,kCAAkC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3D,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAErC,MAAM,CAAC,kCAAkC,EAAE,gDAAgD,CAAC,CAAC;IAC7F,MAAM,CAAC,YAAY,EAAE,sCAAsC,CAAC,CAAC;IAE7D,IAAI,2BAAmE,CAAC;IACxE,IAAI,CAAC;QACH,2BAA2B,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC1D,MAAM,CAAC,CAAC;IACV,CAAC;IA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QAC9B,IAAI,QAAQ,KAAK,SAAS,CAAC,OAAO,CAAC,IAAI,QAAQ,EAAE,CAAC;YAChD,QAAQ,CAAC,IAAI,CACX,UAAU,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE;gBACzC,GAAG;gBACH,KAAK,EAAE,MAAM;aACd,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;AAED,KAAK,wBAAwB,EAAE,CAAC","sourcesContent":["import assert from 'assert';\n\nimport { createLogger } from '@expo/logger';\nimport { SpawnPromise, SpawnResult } from '@expo/spawn-async';\nimport cloneDeep from 'lodash.clonedeep';\n\nimport { BuildStepOutput } from '../BuildStepOutput.js';\nimport {\n SerializedCustomBuildFunctionArguments,\n deserializeInputs,\n} from '../utils/customFunction.js';\nimport { BuildStepContext } from '../BuildStepContext.js';\nimport { BuildStepFunction } from '../BuildStep.js';\nimport { spawnAsync } from '../utils/shell/spawn.js';\n\nasync function runCustomJsFunctionAsync(): Promise<void> {\n const customJavascriptFunctionModulePath = process.argv[2];\n const functionArgs = process.argv[3];\n\n assert(customJavascriptFunctionModulePath, 'customJavascriptFunctionModulePath is required');\n assert(functionArgs, 'serializedFunctionParams is required');\n\n let serializedFunctionArguments: SerializedCustomBuildFunctionArguments;\n try {\n serializedFunctionArguments = JSON.parse(functionArgs);\n } catch (e) {\n console.error('Failed to parse serializedFunctionParams');\n throw e;\n }\n\n const logger = createLogger({\n name: 'customFunctionLogger',\n streams: [\n {\n type: 'raw',\n stream: {\n write: (rec: any) => {\n if (rec) {\n switch (rec.level) {\n case 20: // Debug level\n if (rec.msg) {\n console.debug(rec.msg);\n }\n break;\n case 30: // Info level\n if (rec.msg) {\n console.log(rec.msg);\n }\n break;\n case 40: // Warn level\n if (rec.msg) {\n console.warn(rec.msg);\n }\n break;\n case 50: // Error level\n case 60: // Fatal level\n if (rec.msg) {\n console.error(rec.msg);\n }\n break;\n default:\n break;\n }\n }\n },\n },\n },\n ],\n });\n\n const ctx = BuildStepContext.deserialize(serializedFunctionArguments.ctx, logger);\n const inputs = deserializeInputs(serializedFunctionArguments.inputs);\n const outputs = Object.fromEntries(\n Object.entries(serializedFunctionArguments.outputs).map(([id, output]) => [\n id,\n BuildStepOutput.deserialize(output),\n ])\n );\n const env = serializedFunctionArguments.env;\n const envBefore = cloneDeep(serializedFunctionArguments.env);\n\n let customModule: { default: BuildStepFunction };\n try {\n customModule = await require(customJavascriptFunctionModulePath);\n } catch (e) {\n console.error('Failed to load custom function module');\n throw e;\n }\n\n const customJavascriptFunction = customModule.default;\n\n await customJavascriptFunction(ctx, { inputs, outputs, env });\n\n const promises: SpawnPromise<SpawnResult>[] = [];\n for (const output of Object.values(outputs)) {\n if (output.rawValue) {\n assert(output.value, 'output.value is required');\n promises.push(\n spawnAsync('set-output', [output.id, output.value], {\n env,\n stdio: 'pipe',\n })\n );\n }\n }\n for (const envName of Object.keys(env)) {\n const envValue = env[envName];\n if (envValue !== envBefore[envName] && envValue) {\n promises.push(\n spawnAsync('set-env', [envName, envValue], {\n env,\n stdio: 'pipe',\n })\n );\n }\n }\n await Promise.all(promises);\n}\n\nvoid runCustomJsFunctionAsync();\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BuildStepFunction } from '../BuildStep.js';
|
|
2
|
-
import { BuildStepEnv } from '../BuildStepEnv.js';
|
|
3
|
-
import { SerializedBuildStepOutput } from '../BuildStepOutput.js';
|
|
4
|
-
import { SerializedBuildStepContext } from '../BuildStepContext.js';
|
|
5
|
-
export declare const SCRIPTS_PATH: string;
|
|
6
|
-
type SerializedBuildStepInput = {
|
|
7
|
-
serializedValue: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
export interface SerializedCustomBuildFunctionArguments {
|
|
10
|
-
env: BuildStepEnv;
|
|
11
|
-
inputs: Record<string, SerializedBuildStepInput>;
|
|
12
|
-
outputs: Record<string, SerializedBuildStepOutput>;
|
|
13
|
-
ctx: SerializedBuildStepContext;
|
|
14
|
-
}
|
|
15
|
-
export declare function serializeInputs(inputs: Parameters<BuildStepFunction>[1]['inputs']): SerializedCustomBuildFunctionArguments['inputs'];
|
|
16
|
-
export declare function deserializeInputs(inputs: SerializedCustomBuildFunctionArguments['inputs']): Parameters<BuildStepFunction>[1]['inputs'];
|
|
17
|
-
export declare function createCustomFunctionCall(rawCustomFunctionModulePath: string): BuildStepFunction;
|
|
18
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { createContext } from 'this-file';
|
|
3
|
-
import fs from 'fs-extra';
|
|
4
|
-
import { spawnAsync } from './shell/spawn.js';
|
|
5
|
-
const thisFileCtx = createContext();
|
|
6
|
-
export const SCRIPTS_PATH = path.join(thisFileCtx.dirname, '../../dist_commonjs/scripts');
|
|
7
|
-
export function serializeInputs(inputs) {
|
|
8
|
-
return Object.fromEntries(Object.entries(inputs).map(([id, input]) => [
|
|
9
|
-
id,
|
|
10
|
-
{ serializedValue: input === undefined ? undefined : JSON.stringify(input.value) },
|
|
11
|
-
]));
|
|
12
|
-
}
|
|
13
|
-
export function deserializeInputs(inputs) {
|
|
14
|
-
return Object.fromEntries(Object.entries(inputs).map(([id, { serializedValue }]) => [
|
|
15
|
-
id,
|
|
16
|
-
{ value: serializedValue === undefined ? undefined : JSON.parse(serializedValue) },
|
|
17
|
-
]));
|
|
18
|
-
}
|
|
19
|
-
export function createCustomFunctionCall(rawCustomFunctionModulePath) {
|
|
20
|
-
return async (ctx, { env, inputs, outputs }) => {
|
|
21
|
-
let customFunctionModulePath = rawCustomFunctionModulePath;
|
|
22
|
-
if (!(await fs.exists(ctx.global.projectSourceDirectory))) {
|
|
23
|
-
const relative = path.relative(path.resolve(ctx.global.projectSourceDirectory), customFunctionModulePath);
|
|
24
|
-
customFunctionModulePath = path.resolve(path.join(ctx.global.projectTargetDirectory, relative));
|
|
25
|
-
}
|
|
26
|
-
const serializedArguments = {
|
|
27
|
-
env,
|
|
28
|
-
inputs: serializeInputs(inputs),
|
|
29
|
-
outputs: Object.fromEntries(Object.entries(outputs).map(([id, output]) => [id, output.serialize()])),
|
|
30
|
-
ctx: ctx.serialize(),
|
|
31
|
-
};
|
|
32
|
-
try {
|
|
33
|
-
await spawnAsync('node', [
|
|
34
|
-
path.join(SCRIPTS_PATH, 'runCustomFunction.cjs'),
|
|
35
|
-
customFunctionModulePath,
|
|
36
|
-
JSON.stringify(serializedArguments),
|
|
37
|
-
], {
|
|
38
|
-
logger: ctx.logger,
|
|
39
|
-
cwd: ctx.workingDirectory,
|
|
40
|
-
env,
|
|
41
|
-
stdio: 'pipe',
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
throw new Error(`Custom function exited with non-zero exit code.`);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=customFunction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"customFunction.js","sourceRoot":"","sources":["../../src/utils/customFunction.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,MAAM,UAAU,CAAC;AAO1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,WAAW,GAAG,aAAa,EAAE,CAAC;AAEpC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAC;AAW1F,MAAM,UAAU,eAAe,CAC7B,MAAkD;IAElD,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;QAC1C,EAAE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zB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CACxE;YACD,GAAG,EAAE,GAAG,CAAC,SAAS,EAAE;SACrB,CAAC;QACF,IAAI,CAAC;YACH,MAAM,UAAU,CACd,MAAM,EACN;gBACE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,uBAAuB,CAAC;gBAChD,wBAAwB;gBACxB,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC;aACpC,EACD;gBACE,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,GAAG,EAAE,GAAG,CAAC,gBAAgB;gBACzB,GAAG;gBACH,KAAK,EAAE,MAAM;aACd,CACF,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;IACH,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import path from 'path';\n\nimport { createContext } from 'this-file';\nimport fs from 'fs-extra';\n\nimport { BuildStepFunction } from '../BuildStep.js';\nimport { BuildStepEnv } from '../BuildStepEnv.js';\nimport { SerializedBuildStepOutput } from '../BuildStepOutput.js';\nimport { SerializedBuildStepContext } from '../BuildStepContext.js';\n\nimport { spawnAsync } from './shell/spawn.js';\n\nconst thisFileCtx = createContext();\n\nexport const SCRIPTS_PATH = path.join(thisFileCtx.dirname, '../../dist_commonjs/scripts');\n\ntype SerializedBuildStepInput = { serializedValue: string | undefined };\n\nexport interface SerializedCustomBuildFunctionArguments {\n env: BuildStepEnv;\n inputs: Record<string, SerializedBuildStepInput>;\n outputs: Record<string, SerializedBuildStepOutput>;\n ctx: SerializedBuildStepContext;\n}\n\nexport function serializeInputs(\n inputs: Parameters<BuildStepFunction>[1]['inputs']\n): SerializedCustomBuildFunctionArguments['inputs'] {\n return Object.fromEntries(\n Object.entries(inputs).map(([id, input]) => [\n id,\n { serializedValue: input === undefined ? undefined : JSON.stringify(input.value) },\n ])\n );\n}\n\nexport function deserializeInputs(\n inputs: SerializedCustomBuildFunctionArguments['inputs']\n): Parameters<BuildStepFunction>[1]['inputs'] {\n return Object.fromEntries(\n Object.entries(inputs).map(([id, { serializedValue }]) => [\n id,\n { value: serializedValue === undefined ? undefined : JSON.parse(serializedValue) },\n ])\n );\n}\n\nexport function createCustomFunctionCall(rawCustomFunctionModulePath: string): BuildStepFunction {\n return async (ctx, { env, inputs, outputs }) => {\n let customFunctionModulePath = rawCustomFunctionModulePath;\n if (!(await fs.exists(ctx.global.projectSourceDirectory))) {\n const relative = path.relative(\n path.resolve(ctx.global.projectSourceDirectory),\n customFunctionModulePath\n );\n customFunctionModulePath = path.resolve(\n path.join(ctx.global.projectTargetDirectory, relative)\n );\n }\n const serializedArguments: SerializedCustomBuildFunctionArguments = {\n env,\n inputs: serializeInputs(inputs),\n outputs: Object.fromEntries(\n Object.entries(outputs).map(([id, output]) => [id, output.serialize()])\n ),\n ctx: ctx.serialize(),\n };\n try {\n await spawnAsync(\n 'node',\n [\n path.join(SCRIPTS_PATH, 'runCustomFunction.cjs'),\n customFunctionModulePath,\n JSON.stringify(serializedArguments),\n ],\n {\n logger: ctx.logger,\n cwd: ctx.workingDirectory,\n env,\n stdio: 'pipe',\n }\n );\n } catch {\n throw new Error(`Custom function exited with non-zero exit code.`);\n }\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function duplicates<T>(items: T[]): T[];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export function duplicates(items) {
|
|
2
|
-
const visitedItemsSet = new Set();
|
|
3
|
-
const duplicatedItemsSet = new Set();
|
|
4
|
-
for (const item of items) {
|
|
5
|
-
if (visitedItemsSet.has(item)) {
|
|
6
|
-
duplicatedItemsSet.add(item);
|
|
7
|
-
}
|
|
8
|
-
else {
|
|
9
|
-
visitedItemsSet.add(item);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return [...duplicatedItemsSet];
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=duplicates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"duplicates.js","sourceRoot":"","sources":["../../../src/utils/expodash/duplicates.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAI,KAAU;IACtC,MAAM,eAAe,GAAG,IAAI,GAAG,EAAK,CAAC;IACrC,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAK,CAAC;IACxC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,kBAAkB,CAAC,CAAC;AACjC,CAAC","sourcesContent":["export function duplicates<T>(items: T[]): T[] {\n const visitedItemsSet = new Set<T>();\n const duplicatedItemsSet = new Set<T>();\n for (const item of items) {\n if (visitedItemsSet.has(item)) {\n duplicatedItemsSet.add(item);\n } else {\n visitedItemsSet.add(item);\n }\n }\n return [...duplicatedItemsSet];\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function uniq<T>(items: T[]): T[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uniq.js","sourceRoot":"","sources":["../../../src/utils/expodash/uniq.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI,CAAI,KAAU;IAChC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClB,CAAC","sourcesContent":["export function uniq<T>(items: T[]): T[] {\n const set = new Set(items);\n return [...set];\n}\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hashes the contents of multiple files and returns a combined SHA256 hash.
|
|
3
|
-
* @param filePaths Array of absolute file paths to hash
|
|
4
|
-
* @returns Combined SHA256 hash of all files, or empty string if no files exist
|
|
5
|
-
*/
|
|
6
|
-
export declare function hashFiles(filePaths: string[]): string;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'crypto';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
/**
|
|
4
|
-
* Hashes the contents of multiple files and returns a combined SHA256 hash.
|
|
5
|
-
* @param filePaths Array of absolute file paths to hash
|
|
6
|
-
* @returns Combined SHA256 hash of all files, or empty string if no files exist
|
|
7
|
-
*/
|
|
8
|
-
export function hashFiles(filePaths) {
|
|
9
|
-
const combinedHash = createHash('sha256');
|
|
10
|
-
let hasFound = false;
|
|
11
|
-
for (const filePath of filePaths) {
|
|
12
|
-
try {
|
|
13
|
-
if (fs.pathExistsSync(filePath)) {
|
|
14
|
-
const fileContent = fs.readFileSync(filePath);
|
|
15
|
-
const fileHash = createHash('sha256').update(fileContent).digest();
|
|
16
|
-
combinedHash.write(fileHash);
|
|
17
|
-
hasFound = true;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
catch (err) {
|
|
21
|
-
throw new Error(`Failed to hash file ${filePath}: ${err.message}`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
combinedHash.end();
|
|
25
|
-
const result = combinedHash.digest('hex');
|
|
26
|
-
if (!hasFound) {
|
|
27
|
-
return '';
|
|
28
|
-
}
|
|
29
|
-
return result;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=hashFiles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hashFiles.js","sourceRoot":"","sources":["../../src/utils/hashFiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1B;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,SAAmB;IAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1C,IAAI,QAAQ,GAAG,KAAK,CAAC;IAErB,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,IAAI,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAChC,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;gBAC9C,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,CAAC;gBACnE,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;gBAC7B,QAAQ,GAAG,IAAI,CAAC;YAClB,CAAC;QACH,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACrE,CAAC;IACH,CAAC;IAED,YAAY,CAAC,GAAG,EAAE,CAAC;IACnB,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAE1C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { createHash } from 'crypto';\n\nimport fs from 'fs-extra';\n\n/**\n * Hashes the contents of multiple files and returns a combined SHA256 hash.\n * @param filePaths Array of absolute file paths to hash\n * @returns Combined SHA256 hash of all files, or empty string if no files exist\n */\nexport function hashFiles(filePaths: string[]): string {\n const combinedHash = createHash('sha256');\n let hasFound = false;\n\n for (const filePath of filePaths) {\n try {\n if (fs.pathExistsSync(filePath)) {\n const fileContent = fs.readFileSync(filePath);\n const fileHash = createHash('sha256').update(fileContent).digest();\n combinedHash.write(fileHash);\n hasFound = true;\n }\n } catch (err: any) {\n throw new Error(`Failed to hash file ${filePath}: ${err.message}`);\n }\n }\n\n combinedHash.end();\n const result = combinedHash.digest('hex');\n\n if (!hasFound) {\n return '';\n }\n\n return result;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function jsepEval(expression: string, context?: Record<string, unknown>): unknown;
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
// https://github.com/Sensative/jsep-eval/blob/master/src/jsep-eval.js
|
|
2
|
-
// - migrated to TypeScript
|
|
3
|
-
// - small refactoring (splitting operators into unary/binary)
|
|
4
|
-
// - lack of LogicalExpression we don't need, because our version of JSEP does not expose it
|
|
5
|
-
// - lack of Promise wrapper we don't need
|
|
6
|
-
import assert from 'assert';
|
|
7
|
-
import jsep from 'jsep';
|
|
8
|
-
import get from 'lodash.get';
|
|
9
|
-
const binaryOperatorFunctions = {
|
|
10
|
-
'===': (a, b) => a === b,
|
|
11
|
-
'!==': (a, b) => a !== b,
|
|
12
|
-
'==': (a, b) => a == b, // eslint-disable-line
|
|
13
|
-
'!=': (a, b) => a != b, // eslint-disable-line
|
|
14
|
-
'>': (a, b) => a > b,
|
|
15
|
-
'<': (a, b) => a < b,
|
|
16
|
-
'>=': (a, b) => a >= b,
|
|
17
|
-
'<=': (a, b) => a <= b,
|
|
18
|
-
'+': (a, b) => a + b,
|
|
19
|
-
'-': (a, b) => a - b,
|
|
20
|
-
'*': (a, b) => a * b,
|
|
21
|
-
'/': (a, b) => a / b,
|
|
22
|
-
'%': (a, b) => a % b, // remainder
|
|
23
|
-
'**': (a, b) => a ** b, // exponentiation
|
|
24
|
-
'&': (a, b) => a & b, // bitwise AND
|
|
25
|
-
'|': (a, b) => a | b, // bitwise OR
|
|
26
|
-
'^': (a, b) => a ^ b, // bitwise XOR
|
|
27
|
-
'<<': (a, b) => a << b, // left shift
|
|
28
|
-
'>>': (a, b) => a >> b, // sign-propagating right shift
|
|
29
|
-
'>>>': (a, b) => a >>> b, // zero-fill right shift
|
|
30
|
-
// Let's make a home for the logical operators here as well
|
|
31
|
-
'||': (a, b) => a || b,
|
|
32
|
-
'&&': (a, b) => a && b,
|
|
33
|
-
};
|
|
34
|
-
const unaryOperatorFunctions = {
|
|
35
|
-
'!': (a) => !a,
|
|
36
|
-
'~': (a) => ~a, // bitwise NOT
|
|
37
|
-
'+': (a) => +a, // unary plus
|
|
38
|
-
'-': (a) => -a, // unary negation
|
|
39
|
-
'++': (a) => ++a, // increment
|
|
40
|
-
'--': (a) => --a, // decrement
|
|
41
|
-
};
|
|
42
|
-
function isValid(expression, types) {
|
|
43
|
-
return types.includes(expression.type);
|
|
44
|
-
}
|
|
45
|
-
function getParameterPath(node, context) {
|
|
46
|
-
// it's a MEMBER expression
|
|
47
|
-
// EXAMPLES: a[b] (computed)
|
|
48
|
-
// a.b (not computed)
|
|
49
|
-
const computed = node.computed;
|
|
50
|
-
const object = node.object;
|
|
51
|
-
const property = node.property;
|
|
52
|
-
// object is either 'IDENTIFIER', 'MEMBER', or 'THIS'
|
|
53
|
-
assert(isValid(object, ['MemberExpression', 'Identifier', 'ThisExpression']), 'Invalid object type');
|
|
54
|
-
assert(property, 'Member expression property is missing');
|
|
55
|
-
let objectPath = '';
|
|
56
|
-
if (object.type === 'ThisExpression') {
|
|
57
|
-
objectPath = '';
|
|
58
|
-
}
|
|
59
|
-
else if (isValid(object, ['Identifier'])) {
|
|
60
|
-
objectPath = object.name;
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
objectPath = getParameterPath(object, context);
|
|
64
|
-
}
|
|
65
|
-
if (computed) {
|
|
66
|
-
// if computed -> evaluate anew
|
|
67
|
-
const propertyPath = evaluateExpressionNode(property, context);
|
|
68
|
-
return objectPath + '[' + propertyPath + ']';
|
|
69
|
-
}
|
|
70
|
-
else if (property.type === 'Identifier') {
|
|
71
|
-
return (objectPath ? objectPath + '.' : '') + property.name;
|
|
72
|
-
}
|
|
73
|
-
else if (property.type === 'CallExpression') {
|
|
74
|
-
const propertyPath = evaluateExpressionNode(property, context);
|
|
75
|
-
return (objectPath ? objectPath + '.' : '') + propertyPath;
|
|
76
|
-
}
|
|
77
|
-
else if (property.type === 'Literal') {
|
|
78
|
-
return (objectPath ? objectPath + '.' : '') + `${property.value}`;
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
assert(isValid(property, ['MemberExpression']), 'Invalid object type');
|
|
82
|
-
const propertyPath = getParameterPath(property, context);
|
|
83
|
-
return (objectPath ? objectPath + '.' : '') + propertyPath;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function evaluateExpressionNode(node, context) {
|
|
87
|
-
switch (node.type) {
|
|
88
|
-
case 'Literal': {
|
|
89
|
-
return node.value;
|
|
90
|
-
}
|
|
91
|
-
case 'ThisExpression': {
|
|
92
|
-
return context;
|
|
93
|
-
}
|
|
94
|
-
case 'Compound': {
|
|
95
|
-
const compoundNode = node;
|
|
96
|
-
const expressions = compoundNode.body.map((el) => evaluateExpressionNode(el, context));
|
|
97
|
-
return expressions.pop();
|
|
98
|
-
}
|
|
99
|
-
case 'UnaryExpression': {
|
|
100
|
-
const unaryNode = node;
|
|
101
|
-
if (!(unaryNode.operator in unaryOperatorFunctions)) {
|
|
102
|
-
throw new Error(`Unsupported unary operator: ${unaryNode.operator}`);
|
|
103
|
-
}
|
|
104
|
-
const operatorFn = unaryOperatorFunctions[unaryNode.operator];
|
|
105
|
-
const argument = evaluateExpressionNode(unaryNode.argument, context);
|
|
106
|
-
return operatorFn(argument);
|
|
107
|
-
}
|
|
108
|
-
case 'BinaryExpression': {
|
|
109
|
-
const binaryNode = node;
|
|
110
|
-
if (!(binaryNode.operator in binaryOperatorFunctions)) {
|
|
111
|
-
throw new Error(`Unsupported binary operator: ${binaryNode.operator}`);
|
|
112
|
-
}
|
|
113
|
-
const operator = binaryOperatorFunctions[binaryNode.operator];
|
|
114
|
-
const left = evaluateExpressionNode(binaryNode.left, context);
|
|
115
|
-
const right = evaluateExpressionNode(binaryNode.right, context);
|
|
116
|
-
return operator(left, right);
|
|
117
|
-
}
|
|
118
|
-
case 'ConditionalExpression': {
|
|
119
|
-
const conditionalNode = node;
|
|
120
|
-
const test = evaluateExpressionNode(conditionalNode.test, context);
|
|
121
|
-
const consequent = evaluateExpressionNode(conditionalNode.consequent, context);
|
|
122
|
-
const alternate = evaluateExpressionNode(conditionalNode.alternate, context);
|
|
123
|
-
return test ? consequent : alternate;
|
|
124
|
-
}
|
|
125
|
-
case 'CallExpression': {
|
|
126
|
-
const allowedCalleeTypes = [
|
|
127
|
-
'MemberExpression',
|
|
128
|
-
'Identifier',
|
|
129
|
-
'ThisExpression',
|
|
130
|
-
];
|
|
131
|
-
const callNode = node;
|
|
132
|
-
if (!allowedCalleeTypes.includes(callNode.callee.type)) {
|
|
133
|
-
throw new Error(`Invalid function callee type: ${callNode.callee.type}. Expected one of [${allowedCalleeTypes.join(', ')}].`);
|
|
134
|
-
}
|
|
135
|
-
const callee = evaluateExpressionNode(callNode.callee, context);
|
|
136
|
-
const args = callNode.arguments.map((arg) => evaluateExpressionNode(arg, context));
|
|
137
|
-
assert(typeof callee === 'function', 'Expected a function');
|
|
138
|
-
// eslint-disable-next-line prefer-spread
|
|
139
|
-
return callee.apply(null, args);
|
|
140
|
-
}
|
|
141
|
-
case 'Identifier': {
|
|
142
|
-
const identifier = node.name;
|
|
143
|
-
if (!(identifier in context)) {
|
|
144
|
-
throw new Error(`Invalid identifier "${identifier}". Expected one of [${Object.keys(context).join(', ')}].`);
|
|
145
|
-
}
|
|
146
|
-
return get(context, identifier);
|
|
147
|
-
}
|
|
148
|
-
case 'MemberExpression': {
|
|
149
|
-
const memberNode = node;
|
|
150
|
-
return get(evaluateExpressionNode(memberNode.object, context), getParameterPath({
|
|
151
|
-
type: 'MemberExpression',
|
|
152
|
-
object: { type: 'ThisExpression' },
|
|
153
|
-
property: memberNode.property,
|
|
154
|
-
computed: false,
|
|
155
|
-
}, context));
|
|
156
|
-
}
|
|
157
|
-
case 'ArrayExpression': {
|
|
158
|
-
const elements = node.elements.map((el) => el ? evaluateExpressionNode(el, context) : null);
|
|
159
|
-
return elements;
|
|
160
|
-
}
|
|
161
|
-
default:
|
|
162
|
-
throw new Error(`Unsupported expression type: ${node.type}`);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
export function jsepEval(expression, context) {
|
|
166
|
-
const tree = jsep(expression);
|
|
167
|
-
return evaluateExpressionNode(tree, context !== null && context !== void 0 ? context : {});
|
|
168
|
-
}
|
|
169
|
-
//# sourceMappingURL=jsepEval.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jsepEval.js","sourceRoot":"","sources":["../../src/utils/jsepEval.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,2BAA2B;AAC3B,8DAA8D;AAC9D,4FAA4F;AAC5F,0CAA0C;AAE1C,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,MAAM,uBAAuB,GAAG;IAC9B,KAAK,EAAE,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAClC,KAAK,EAAE,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAClC,IAAI,EAAE,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,sBAAsB;IACxD,IAAI,EAAE,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,sBAAsB;IACxD,GAAG,EAAE,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC;IAC9B,GAAG,EAAE,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,GAAG,CA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A6B,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAClE,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAChD,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,gCAAgC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,UAAkB,EAAE,OAAiC;IAC5E,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9B,OAAO,sBAAsB,CAAC,IAAI,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC;AACrD,CAAC","sourcesContent":["// https://github.com/Sensative/jsep-eval/blob/master/src/jsep-eval.js\n// - migrated to TypeScript\n// - small refactoring (splitting operators into unary/binary)\n// - lack of LogicalExpression we don't need, because our version of JSEP does not expose it\n// - lack of Promise wrapper we don't need\n\nimport assert from 'assert';\n\nimport jsep from 'jsep';\nimport get from 'lodash.get';\n\nconst binaryOperatorFunctions = {\n '===': (a: any, b: any) => a === b,\n '!==': (a: any, b: any) => a !== b,\n '==': (a: any, b: any) => a == b, // eslint-disable-line\n '!=': (a: any, b: any) => a != b, // eslint-disable-line\n '>': (a: any, b: any) => a > b,\n '<': (a: any, b: any) => a < b,\n '>=': (a: any, b: any) => a >= b,\n '<=': (a: any, b: any) => a <= b,\n '+': (a: any, b: any) => a + b,\n '-': (a: any, b: any) => a - b,\n '*': (a: any, b: any) => a * b,\n '/': (a: any, b: any) => a / b,\n '%': (a: any, b: any) => a % b, // remainder\n '**': (a: any, b: any) => a ** b, // exponentiation\n '&': (a: any, b: any) => a & b, // bitwise AND\n '|': (a: any, b: any) => a | b, // bitwise OR\n '^': (a: any, b: any) => a ^ b, // bitwise XOR\n '<<': (a: any, b: any) => a << b, // left shift\n '>>': (a: any, b: any) => a >> b, // sign-propagating right shift\n '>>>': (a: any, b: any) => a >>> b, // zero-fill right shift\n // Let's make a home for the logical operators here as well\n '||': (a: any, b: any) => a || b,\n '&&': (a: any, b: any) => a && b,\n};\ntype BinaryOperator = keyof typeof binaryOperatorFunctions;\n\nconst unaryOperatorFunctions = {\n '!': (a: any) => !a,\n '~': (a: any) => ~a, // bitwise NOT\n '+': (a: any) => +a, // unary plus\n '-': (a: any) => -a, // unary negation\n '++': (a: any) => ++a, // increment\n '--': (a: any) => --a, // decrement\n};\ntype UnaryOperator = keyof typeof unaryOperatorFunctions;\n\nfunction isValid<T extends jsep.ExpressionType>(\n expression: jsep.Expression,\n types: T[]\n): expression is jsep.CoreExpression & { type: T } {\n return types.includes(expression.type as T);\n}\n\nfunction getParameterPath(node: jsep.MemberExpression, context: Record<string, unknown>): string {\n // it's a MEMBER expression\n // EXAMPLES: a[b] (computed)\n // a.b (not computed)\n const computed = node.computed;\n const object = node.object;\n const property = node.property;\n\n // object is either 'IDENTIFIER', 'MEMBER', or 'THIS'\n assert(\n isValid(object, ['MemberExpression', 'Identifier', 'ThisExpression']),\n 'Invalid object type'\n );\n assert(property, 'Member expression property is missing');\n\n let objectPath = '';\n if (object.type === 'ThisExpression') {\n objectPath = '';\n } else if (isValid(object, ['Identifier'])) {\n objectPath = object.name;\n } else {\n objectPath = getParameterPath(object, context);\n }\n\n if (computed) {\n // if computed -> evaluate anew\n const propertyPath = evaluateExpressionNode(property, context);\n return objectPath + '[' + propertyPath + ']';\n } else if (property.type === 'Identifier') {\n return (objectPath ? objectPath + '.' : '') + property.name;\n } else if (property.type === 'CallExpression') {\n const propertyPath = evaluateExpressionNode(property, context);\n return (objectPath ? objectPath + '.' : '') + propertyPath;\n } else if (property.type === 'Literal') {\n return (objectPath ? objectPath + '.' : '') + `${property.value}`;\n } else {\n assert(isValid(property, ['MemberExpression']), 'Invalid object type');\n const propertyPath = getParameterPath(property, context);\n return (objectPath ? objectPath + '.' : '') + propertyPath;\n }\n}\n\nfunction evaluateExpressionNode(node: jsep.Expression, context: Record<string, unknown>): unknown {\n switch (node.type as jsep.ExpressionType) {\n case 'Literal': {\n return (node as jsep.Literal).value;\n }\n case 'ThisExpression': {\n return context;\n }\n case 'Compound': {\n const compoundNode = node as jsep.Compound;\n const expressions = compoundNode.body.map((el) => evaluateExpressionNode(el, context));\n return expressions.pop();\n }\n case 'UnaryExpression': {\n const unaryNode = node as jsep.UnaryExpression;\n if (!(unaryNode.operator in unaryOperatorFunctions)) {\n throw new Error(`Unsupported unary operator: ${unaryNode.operator}`);\n }\n const operatorFn = unaryOperatorFunctions[unaryNode.operator as UnaryOperator];\n const argument = evaluateExpressionNode(unaryNode.argument, context);\n return operatorFn(argument);\n }\n case 'BinaryExpression': {\n const binaryNode = node as jsep.BinaryExpression;\n if (!(binaryNode.operator in binaryOperatorFunctions)) {\n throw new Error(`Unsupported binary operator: ${binaryNode.operator}`);\n }\n const operator = binaryOperatorFunctions[binaryNode.operator as BinaryOperator];\n const left = evaluateExpressionNode(binaryNode.left, context);\n const right = evaluateExpressionNode(binaryNode.right, context);\n return operator(left, right);\n }\n case 'ConditionalExpression': {\n const conditionalNode = node as jsep.ConditionalExpression;\n const test = evaluateExpressionNode(conditionalNode.test, context);\n const consequent = evaluateExpressionNode(conditionalNode.consequent, context);\n const alternate = evaluateExpressionNode(conditionalNode.alternate, context);\n return test ? consequent : alternate;\n }\n case 'CallExpression': {\n const allowedCalleeTypes: jsep.ExpressionType[] = [\n 'MemberExpression',\n 'Identifier',\n 'ThisExpression',\n ];\n const callNode = node as jsep.CallExpression;\n if (!allowedCalleeTypes.includes(callNode.callee.type as jsep.ExpressionType)) {\n throw new Error(\n `Invalid function callee type: ${\n callNode.callee.type\n }. Expected one of [${allowedCalleeTypes.join(', ')}].`\n );\n }\n const callee = evaluateExpressionNode(callNode.callee, context);\n const args = callNode.arguments.map((arg) => evaluateExpressionNode(arg, context));\n assert(typeof callee === 'function', 'Expected a function');\n // eslint-disable-next-line prefer-spread\n return callee.apply(null, args);\n }\n case 'Identifier': {\n const identifier = (node as jsep.Identifier).name;\n if (!(identifier in context)) {\n throw new Error(\n `Invalid identifier \"${identifier}\". Expected one of [${Object.keys(context).join(\n ', '\n )}].`\n );\n }\n return get(context, identifier);\n }\n case 'MemberExpression': {\n const memberNode = node as jsep.MemberExpression;\n return get(\n evaluateExpressionNode(memberNode.object, context),\n getParameterPath(\n {\n type: 'MemberExpression',\n object: { type: 'ThisExpression' },\n property: memberNode.property,\n computed: false,\n } as jsep.MemberExpression,\n context\n )\n );\n }\n case 'ArrayExpression': {\n const elements = (node as jsep.ArrayExpression).elements.map((el) =>\n el ? evaluateExpressionNode(el, context) : null\n );\n return elements;\n }\n default:\n throw new Error(`Unsupported expression type: ${node.type}`);\n }\n}\n\nexport function jsepEval(expression: string, context?: Record<string, unknown>): unknown {\n const tree = jsep(expression);\n return evaluateExpressionNode(tree, context ?? {});\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function nullthrows<T>(value: T | null | undefined, message?: string): NonNullable<T>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export function nullthrows(value, message) {
|
|
2
|
-
if (value != null) {
|
|
3
|
-
return value;
|
|
4
|
-
}
|
|
5
|
-
throw new TypeError(message !== null && message !== void 0 ? message : `Expected value not to be null or undefined but got ${value}`);
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=nullthrows.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nullthrows.js","sourceRoot":"","sources":["../../src/utils/nullthrows.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAI,KAA2B,EAAE,OAAgB;IACzE,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,IAAI,SAAS,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,sDAAsD,KAAK,EAAE,CAAC,CAAC;AAChG,CAAC","sourcesContent":["export function nullthrows<T>(value: T | null | undefined, message?: string): NonNullable<T> {\n if (value != null) {\n return value;\n }\n throw new TypeError(message ?? `Expected value not to be null or undefined but got ${value}`);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const BIN_PATH: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../../src/utils/shell/bin.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,GAAG,GAAG,aAAa,EAAE,CAAC;AAE5B,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import path from 'path';\n\nimport { createContext } from 'this-file';\n\nconst ctx = createContext();\n\nexport const BIN_PATH = path.join(ctx.dirname, '../../../bin');\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export function getShellCommandAndArgs(shell, script) {
|
|
2
|
-
const splits = shell.split(' ');
|
|
3
|
-
const command = splits[0];
|
|
4
|
-
const args = [...splits.slice(1)];
|
|
5
|
-
if (script) {
|
|
6
|
-
args.push(script);
|
|
7
|
-
}
|
|
8
|
-
return {
|
|
9
|
-
command,
|
|
10
|
-
args,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/utils/shell/command.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,sBAAsB,CACpC,KAAa,EACb,MAAe;IAEf,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1B,MAAM,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,IAAI,MAAM,EAAE,CAAC;QACX,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IACD,OAAO;QACL,OAAO;QACP,IAAI;KACL,CAAC;AACJ,CAAC","sourcesContent":["export function getShellCommandAndArgs(\n shell: string,\n script?: string\n): { command: string; args?: string[] } {\n const splits = shell.split(' ');\n const command = splits[0];\n const args = [...splits.slice(1)];\n if (script) {\n args.push(script);\n }\n return {\n command,\n args,\n };\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IOType } from 'child_process';
|
|
2
|
-
import { bunyan, PipeMode } from '@expo/logger';
|
|
3
|
-
import { SpawnResult, SpawnPromise, SpawnOptions as SpawnOptionsOriginal } from '@expo/spawn-async';
|
|
4
|
-
type SpawnOptions = Omit<SpawnOptionsOriginal, 'stdio' | 'ignoreStdio'> & {
|
|
5
|
-
lineTransformer?: (line: string) => string | null;
|
|
6
|
-
mode?: PipeMode;
|
|
7
|
-
} & ({
|
|
8
|
-
logger: bunyan;
|
|
9
|
-
stdio: 'pipe' | [IOType, 'pipe', 'pipe', ...IOType[]];
|
|
10
|
-
} | {
|
|
11
|
-
logger?: never;
|
|
12
|
-
stdio?: SpawnOptionsOriginal['stdio'];
|
|
13
|
-
});
|
|
14
|
-
export declare function spawnAsync(command: string, args: string[], allOptions?: SpawnOptions): SpawnPromise<SpawnResult>;
|
|
15
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { pipeSpawnOutput } from '@expo/logger';
|
|
2
|
-
import spawnAsyncOriginal from '@expo/spawn-async';
|
|
3
|
-
// If
|
|
4
|
-
// eslint-disable-next-line async-protect/async-suffix
|
|
5
|
-
export function spawnAsync(command, args, allOptions = {
|
|
6
|
-
stdio: 'inherit',
|
|
7
|
-
cwd: process.cwd(),
|
|
8
|
-
}) {
|
|
9
|
-
const { logger, ...options } = allOptions;
|
|
10
|
-
const promise = spawnAsyncOriginal(command, args, options);
|
|
11
|
-
if (logger && promise.child) {
|
|
12
|
-
pipeSpawnOutput(logger, promise.child, options);
|
|
13
|
-
}
|
|
14
|
-
return promise;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=spawn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spawn.js","sourceRoot":"","sources":["../../../src/utils/shell/spawn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAoB,MAAM,cAAc,CAAC;AACjE,OAAO,kBAIN,MAAM,mBAAmB,CAAC;AAoB3B,KAAK;AAEL,sDAAsD;AACtD,MAAM,UAAU,UAAU,CACxB,OAAe,EACf,IAAc,EACd,aAA2B;IACzB,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;CACnB;IAED,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC;IAC1C,MAAM,OAAO,GAAG,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3D,IAAI,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAC5B,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { IOType } from 'child_process';\n\nimport { pipeSpawnOutput, bunyan, PipeMode } from '@expo/logger';\nimport spawnAsyncOriginal, {\n SpawnResult,\n SpawnPromise,\n SpawnOptions as SpawnOptionsOriginal,\n} from '@expo/spawn-async';\n\n// We omit 'ignoreStdio' to simplify logic -- only 'stdio' governs stdio.\n// We omit 'stdio' here to add further down in a logger-based union.\ntype SpawnOptions = Omit<SpawnOptionsOriginal, 'stdio' | 'ignoreStdio'> & {\n lineTransformer?: (line: string) => string | null;\n mode?: PipeMode;\n} & (\n | {\n // If logger is passed, we require stdio to be pipe.\n logger: bunyan;\n stdio: 'pipe' | [IOType, 'pipe', 'pipe', ...IOType[]];\n }\n | {\n // If logger is not passed, stdio can be anything.\n // Defaults to inherit.\n logger?: never;\n stdio?: SpawnOptionsOriginal['stdio'];\n }\n );\n// If\n\n// eslint-disable-next-line async-protect/async-suffix\nexport function spawnAsync(\n command: string,\n args: string[],\n allOptions: SpawnOptions = {\n stdio: 'inherit',\n cwd: process.cwd(),\n }\n): SpawnPromise<SpawnResult> {\n const { logger, ...options } = allOptions;\n const promise = spawnAsyncOriginal(command, args, options);\n if (logger && promise.child) {\n pipeSpawnOutput(logger, promise.child, options);\n }\n return promise;\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const BUILD_STEP_INPUT_EXPRESSION_REGEXP: RegExp;
|
|
2
|
-
export declare const BUILD_STEP_OUTPUT_EXPRESSION_REGEXP: RegExp;
|
|
3
|
-
export declare const BUILD_GLOBAL_CONTEXT_EXPRESSION_REGEXP: RegExp;
|
|
4
|
-
export declare const BUILD_STEP_OR_BUILD_GLOBAL_CONTEXT_REFERENCE_REGEX: RegExp;
|
|
5
|
-
export declare function interpolateWithInputs(templateString: string, inputs: Record<string, string>): string;
|
|
6
|
-
export declare function interpolateWithOutputs<InterpolableType extends string | object>(interpolableValue: InterpolableType, fn: (path: string) => string): InterpolableType;
|
|
7
|
-
export declare function interpolateStringWithOutputs(templateString: string, fn: (path: string) => string): string;
|
|
8
|
-
export declare function interpolateObjectWithOutputs(interpolableObject: object, fn: (path: string) => string): object;
|
|
9
|
-
export declare function getObjectValueForInterpolation(path: string, obj: Record<string, unknown>): string | number | boolean | null;
|
|
10
|
-
export declare function interpolateWithGlobalContext<InterpolableType extends string | object>(interpolableValue: InterpolableType, fn: (path: string) => string): InterpolableType;
|
|
11
|
-
export declare function interpolateStringWithGlobalContext(templateString: string, fn: (path: string) => string): string;
|
|
12
|
-
export declare function interpolateObjectWithGlobalContext(templateObject: object, fn: (path: string) => string): object;
|
|
13
|
-
interface BuildOutputPath {
|
|
14
|
-
stepId: string;
|
|
15
|
-
outputId: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function findOutputPaths(templateString: string): BuildOutputPath[];
|
|
18
|
-
export declare function parseOutputPath(outputPathWithObjectName: string): BuildOutputPath;
|
|
19
|
-
export {};
|