@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.
- package/CHANGELOG.md +60 -0
- package/dist/add/add-file-with-factory.js +1 -0
- package/dist/add/add-functions.js +9 -3
- package/dist/add/add-rpc-invocations.js +27 -0
- package/dist/error-codes.d.ts +2 -1
- package/dist/error-codes.js +1 -0
- package/dist/inspector.js +2 -0
- package/dist/types.d.ts +9 -0
- package/dist/utils/filter-inspector-state.js +7 -6
- package/dist/utils/get-files-and-methods.d.ts +2 -1
- package/dist/utils/get-files-and-methods.js +2 -1
- package/dist/utils/load-addon-functions-meta.js +14 -0
- package/dist/utils/post-process.js +8 -1
- package/dist/utils/resolve-deploy-target.d.ts +3 -2
- package/dist/utils/resolve-deploy-target.js +4 -3
- package/dist/utils/serialize-inspector-state.d.ts +9 -0
- package/dist/utils/serialize-inspector-state.js +4 -0
- package/dist/utils/workflow/derive-workflow-plan.js +19 -0
- package/dist/utils/workflow/dsl/extract-dsl-workflow.js +26 -1
- package/dist/utils/workflow/dsl/patterns.d.ts +4 -0
- package/dist/utils/workflow/dsl/patterns.js +12 -0
- package/dist/utils/workflow/graph/workflow-graph.types.d.ts +0 -2
- package/dist/visit.js +1 -0
- package/package.json +2 -2
- package/src/add/add-file-with-factory.ts +1 -0
- package/src/add/add-functions.ts +9 -3
- package/src/add/add-rpc-invocations.ts +41 -0
- package/src/add/pii-check.test.ts +5 -2
- package/src/add/rpc-type-cast.test.ts +123 -0
- package/src/error-codes.ts +2 -0
- package/src/inspector.ts +2 -0
- package/src/types.ts +12 -0
- package/src/utils/filter-inspector-state.test.ts +110 -1
- package/src/utils/filter-inspector-state.ts +13 -7
- package/src/utils/get-files-and-methods.ts +6 -0
- package/src/utils/load-addon-functions-meta.ts +23 -0
- package/src/utils/post-process.ts +8 -1
- package/src/utils/resolve-deploy-target.test.ts +30 -0
- package/src/utils/resolve-deploy-target.ts +5 -3
- package/src/utils/serialize-inspector-state.ts +17 -0
- package/src/utils/workflow/derive-workflow-plan.test.ts +18 -0
- package/src/utils/workflow/derive-workflow-plan.ts +20 -0
- package/src/utils/workflow/dsl/extract-dsl-workflow.ts +31 -0
- package/src/utils/workflow/dsl/patterns.ts +19 -0
- package/src/utils/workflow/graph/workflow-graph.types.ts +0 -2
- package/src/visit.ts +6 -0
- 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(...)
|
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)
|