Update TypeScript
This commit is contained in:
1 parent
1748b49a3b
commit
f5ccc2f707
8 files changed
+576
-8
No files matched your search
@@ -300,8 +300,8 @@ export function subset(exp1, exp2): boolean {
|
||||
return !naiveDpll(clauses, vars);
|
||||
}
|
||||
|
||||
export function extractParams(exp): string[] {
|
||||
const params = new Set();
|
||||
export function extractParams(exp): Expression[] {
|
||||
const params = new Set<Expression>();
|
||||
map(exp, e => {
|
||||
if (isArray(e) && e[0] === "PARAM") params.add(e[1]);
|
||||
return e;
|
||||
|
||||
+1
-1
@@ -451,7 +451,7 @@ async function applyPresets(sessionContext: SessionContext): Promise<void> {
|
||||
|
||||
filteredPresets.push(preset);
|
||||
for (const k of extractParams(preset.precondition))
|
||||
parameters[k] = Path.parse(k);
|
||||
if (typeof k === "string") parameters[k] = Path.parse(k);
|
||||
}
|
||||
|
||||
const declarations = Object.values(parameters).map(v => ({
|
||||
|
||||
@@ -165,6 +165,9 @@ async function fetchPresets(): Promise<Preset[]> {
|
||||
precondition = mongoQueryToFilter(JSON.parse(preset["precondition"]));
|
||||
}
|
||||
|
||||
// Simplify expression
|
||||
precondition = expression.evaluate(precondition);
|
||||
|
||||
const _provisions = preset["provisions"] || [];
|
||||
|
||||
// Generate provisions from the old configuration format
|
||||
|
||||
+2
-1
@@ -208,7 +208,8 @@ for (const [resource, flags] of Object.entries(resources)) {
|
||||
for (const [k, v] of Object.entries(columns)) {
|
||||
const e = evaluate(parse(v as string), null, now);
|
||||
columns[k] = e;
|
||||
for (const p of extractParams(e)) options.projection[p] = 1;
|
||||
for (const p of extractParams(e))
|
||||
if (typeof p === "string") options.projection[p] = 1;
|
||||
}
|
||||
|
||||
// Exclude temporary tasks and faults
|
||||
|
||||
Reference in new issue
Block a user