const calcTest = Command.make(
'test',
{ pathspec, verbose },
({ pathspec, verbose }) => {
const pyeff = Effect.tryPromise(() => loadPyodide())
return Effect.flatMap(pyeff, (pyodide) => {
return Effect.flatMap(calcs, (parentConfig) => {
const paths = Arr.match(pathspec, {
onEmpty: () => '',
onNonEmpty: (paths) => ` ${Arr.join(paths, ' ')}`,
})
const configs = Option.match(parentConfig.configs, {
onNone: () => '',
onSome: (map) =>
Array.from(map)
.map(([key, value]) => `${key}=${value}`)
.join(', '),
})
const services = buildServices(pyodide)
console.log(services)
return Console.log(
`Running 'calcs test${paths}' with '--verbose ${verbose} and configs: ${configs}'`,
)
})
})
},
)
const calcTest = Command.make(
'test',
{ pathspec, verbose },
({ pathspec, verbose }) => {
const pyeff = Effect.tryPromise(() => loadPyodide())
return Effect.flatMap(pyeff, (pyodide) => {
return Effect.flatMap(calcs, (parentConfig) => {
const paths = Arr.match(pathspec, {
onEmpty: () => '',
onNonEmpty: (paths) => ` ${Arr.join(paths, ' ')}`,
})
const configs = Option.match(parentConfig.configs, {
onNone: () => '',
onSome: (map) =>
Array.from(map)
.map(([key, value]) => `${key}=${value}`)
.join(', '),
})
const services = buildServices(pyodide)
console.log(services)
return Console.log(
`Running 'calcs test${paths}' with '--verbose ${verbose} and configs: ${configs}'`,
)
})
})
},
)