actionspack 0.1.0 → 0.1.1
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/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as why, f as scan, i as update, l as verify, r as tree, s as pack, t as diff } from "./commands-
|
|
2
|
+
import { a as why, f as scan, i as update, l as verify, r as tree, s as pack, t as diff } from "./commands-CPJczWTq.mjs";
|
|
3
3
|
import { styleText } from "node:util";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { cac } from "cac";
|
|
@@ -158,7 +158,7 @@ function canEvaluateExpression(expr, values) {
|
|
|
158
158
|
if (expr instanceof ContextAccess) return Object.hasOwn(values, expr.name.lexeme);
|
|
159
159
|
if (expr instanceof FunctionCall) return expr.args.every((arg) => canEvaluateExpression(arg, values));
|
|
160
160
|
if (expr instanceof Grouping) return canEvaluateExpression(expr.group, values);
|
|
161
|
-
if (expr instanceof IndexAccess) return
|
|
161
|
+
if (expr instanceof IndexAccess) return hasStaticValueForIndexAccess(expr, values) || canEvaluateExpression(expr.expr, values) && canEvaluateExpression(expr.index, values);
|
|
162
162
|
if (expr instanceof Literal) return true;
|
|
163
163
|
if (expr instanceof Logical) return expr.args.every((arg) => canEvaluateExpression(arg, values));
|
|
164
164
|
if (expr instanceof Star) return false;
|
|
@@ -217,7 +217,18 @@ function dataLiteral(value) {
|
|
|
217
217
|
return valueLiteral(dataValue(value));
|
|
218
218
|
}
|
|
219
219
|
function replacementForIndexAccess(expr, values) {
|
|
220
|
-
|
|
220
|
+
if (!hasValueForIndexAccess(expr, values)) return;
|
|
221
|
+
const value = valueForIndexAccess(expr, values);
|
|
222
|
+
if (typeof value === "string") {
|
|
223
|
+
const body = expressionBody(value.trim());
|
|
224
|
+
if (body !== void 0) return `(${body})`;
|
|
225
|
+
}
|
|
226
|
+
return valueLiteral(value);
|
|
227
|
+
}
|
|
228
|
+
function hasStaticValueForIndexAccess(expr, values) {
|
|
229
|
+
if (!hasValueForIndexAccess(expr, values)) return false;
|
|
230
|
+
const value = valueForIndexAccess(expr, values);
|
|
231
|
+
return typeof value !== "string" || expressionBody(value.trim()) === void 0;
|
|
221
232
|
}
|
|
222
233
|
function printIndexAccess(expr, values) {
|
|
223
234
|
const target = printExpression(expr.expr, values);
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as why, c as packWorkflow, d as collectWorkflowDependencies, f as scan, i as update, l as verify, n as diffLockfiles, o as assertNoRemoteUses, r as tree, s as pack, t as diff, u as collectStepDependencies } from "./commands-
|
|
1
|
+
import { a as why, c as packWorkflow, d as collectWorkflowDependencies, f as scan, i as update, l as verify, n as diffLockfiles, o as assertNoRemoteUses, r as tree, s as pack, t as diff, u as collectStepDependencies } from "./commands-CPJczWTq.mjs";
|
|
2
2
|
export { assertNoRemoteUses, collectStepDependencies, collectWorkflowDependencies, diff, diffLockfiles, pack, packWorkflow, scan, tree, update, verify, why };
|