@pikku/inspector 0.12.27 → 0.12.29

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/add/add-file-with-factory.js +1 -0
  3. package/dist/add/add-functions.js +9 -3
  4. package/dist/add/add-rpc-invocations.js +27 -0
  5. package/dist/error-codes.d.ts +2 -1
  6. package/dist/error-codes.js +1 -0
  7. package/dist/inspector.js +2 -0
  8. package/dist/types.d.ts +9 -0
  9. package/dist/utils/filter-inspector-state.js +7 -6
  10. package/dist/utils/get-files-and-methods.d.ts +2 -1
  11. package/dist/utils/get-files-and-methods.js +2 -1
  12. package/dist/utils/load-addon-functions-meta.js +14 -0
  13. package/dist/utils/post-process.js +8 -1
  14. package/dist/utils/resolve-deploy-target.d.ts +3 -2
  15. package/dist/utils/resolve-deploy-target.js +4 -3
  16. package/dist/utils/serialize-inspector-state.d.ts +9 -0
  17. package/dist/utils/serialize-inspector-state.js +4 -0
  18. package/dist/utils/workflow/derive-workflow-plan.js +19 -0
  19. package/dist/utils/workflow/dsl/extract-dsl-workflow.js +26 -1
  20. package/dist/utils/workflow/dsl/patterns.d.ts +4 -0
  21. package/dist/utils/workflow/dsl/patterns.js +12 -0
  22. package/dist/utils/workflow/graph/workflow-graph.types.d.ts +0 -2
  23. package/dist/visit.js +1 -0
  24. package/package.json +2 -2
  25. package/src/add/add-file-with-factory.ts +1 -0
  26. package/src/add/add-functions.ts +9 -3
  27. package/src/add/add-rpc-invocations.ts +41 -0
  28. package/src/add/pii-check.test.ts +5 -2
  29. package/src/add/rpc-type-cast.test.ts +123 -0
  30. package/src/error-codes.ts +2 -0
  31. package/src/inspector.ts +2 -0
  32. package/src/types.ts +12 -0
  33. package/src/utils/filter-inspector-state.test.ts +110 -1
  34. package/src/utils/filter-inspector-state.ts +13 -7
  35. package/src/utils/get-files-and-methods.ts +6 -0
  36. package/src/utils/load-addon-functions-meta.ts +23 -0
  37. package/src/utils/post-process.ts +8 -1
  38. package/src/utils/resolve-deploy-target.test.ts +30 -0
  39. package/src/utils/resolve-deploy-target.ts +5 -3
  40. package/src/utils/serialize-inspector-state.ts +17 -0
  41. package/src/utils/workflow/derive-workflow-plan.test.ts +18 -0
  42. package/src/utils/workflow/derive-workflow-plan.ts +20 -0
  43. package/src/utils/workflow/dsl/extract-dsl-workflow.ts +31 -0
  44. package/src/utils/workflow/dsl/patterns.ts +19 -0
  45. package/src/utils/workflow/graph/workflow-graph.types.ts +0 -2
  46. package/src/visit.ts +6 -0
  47. package/tsconfig.tsbuildinfo +1 -1
@@ -42,6 +42,25 @@ export function isWorkflowSleepCall(
42
42
  )
43
43
  }
44
44
 
45
+ /**
46
+ * Check if a call expression is workflow.suspend()
47
+ */
48
+ export function isWorkflowSuspendCall(
49
+ node: ts.CallExpression,
50
+ _checker: ts.TypeChecker
51
+ ): boolean {
52
+ if (!ts.isPropertyAccessExpression(node.expression)) {
53
+ return false
54
+ }
55
+
56
+ const propAccess = node.expression
57
+ return (
58
+ propAccess.name.text === 'suspend' &&
59
+ ts.isIdentifier(propAccess.expression) &&
60
+ propAccess.expression.text === 'workflow'
61
+ )
62
+ }
63
+
45
64
  /**
46
65
  * Check if a throw statement throws WorkflowCancelledException
47
66
  * Matches: throw new WorkflowCancelledException(...) or throw WorkflowCancelledException(...)
@@ -87,8 +87,6 @@ export interface NodeOptions {
87
87
  retryDelay?: string
88
88
  /** Timeout for node execution (e.g., '30s', '5m') */
89
89
  timeout?: string
90
- /** If true, execute via queue (async). Default: false (inline) */
91
- async?: boolean
92
90
  }
93
91
 
94
92
  /**
package/src/visit.ts CHANGED
@@ -87,6 +87,12 @@ export const visitSetup = (
87
87
  )
88
88
 
89
89
  addFileWithFactory(node, checker, state.configFactories, 'CreateConfig')
90
+ addFileWithFactory(
91
+ node,
92
+ checker,
93
+ state.serverLifecycleFactories,
94
+ 'ServerLifecycle'
95
+ )
90
96
 
91
97
  addRPCInvocations(node, state, logger)
92
98
  addWireAddon(node, state, logger)