omkit 0.8.19 → 0.8.21

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.
@@ -35,10 +35,12 @@ export function discover(tsconfigPath) {
35
35
  warnings.push(formatDiagnostic(d));
36
36
  const names = omkitImports(sf);
37
37
  const outlines = outlinesIn(sf, names.om, importedNames(sf));
38
+ // Only `om(...)` is runnable on its own. A `step(...)` is an inline child of whatever run
39
+ // launches it — it throws outside one — so it is part of an om's outline, never an entry.
38
40
  const visit = (node) => {
39
41
  if (ts.isCallExpression(node) &&
40
42
  ts.isIdentifier(node.expression) &&
41
- (node.expression.text === names.om || node.expression.text === names.step)) {
43
+ node.expression.text === names.om) {
42
44
  const arg = node.arguments[0];
43
45
  if (arg && ts.isStringLiteralLike(arg)) {
44
46
  const { calls, summary } = outlines.get(arg.text) ?? {};
@@ -240,13 +242,11 @@ function isOmkitImport(stmt) {
240
242
  ts.isStringLiteral(stmt.moduleSpecifier) &&
241
243
  stmt.moduleSpecifier.text === "omkit");
242
244
  }
243
- /** Record the local binding for an imported `om` / `step` / `action` specifier. */
245
+ /** Record the local binding for an imported `om` / `action` specifier. */
244
246
  function bindName(names, el) {
245
247
  const imported = (el.propertyName ?? el.name).text;
246
248
  if (imported === "om")
247
249
  names.om = el.name.text;
248
- else if (imported === "step")
249
- names.step = el.name.text;
250
250
  else if (imported === "action")
251
251
  names.action = el.name.text;
252
252
  }