@fiodos/cli 0.1.30 → 0.1.31
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/package.json +2 -2
- package/src/wireHandlers.js +13 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiodos/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"description": "Fiodos CLI — analyzes your app's source code and generates the in-app voice-agent manifest, then wires the orb. Powers `npx @fiodos/cli analyze`.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@fiodos/core": "^0.1.
|
|
24
|
+
"@fiodos/core": "^0.1.13",
|
|
25
25
|
"esbuild": "^0.28.1",
|
|
26
26
|
"jsdom": "^24.0.0",
|
|
27
27
|
"typescript": "^5.6.0"
|
package/src/wireHandlers.js
CHANGED
|
@@ -953,13 +953,20 @@ function buildRegistryModule(plan, opts = {}) {
|
|
|
953
953
|
// Shared runner: one place normalizes any wired call into an action result,
|
|
954
954
|
// so each handler below stays a one-liner. `unknown` keeps the truthiness
|
|
955
955
|
// test legal even when the wired call returns void (e.g. db.delete(...)).
|
|
956
|
+
// "is not a function" here means a BRIDGE method whose host screen is not
|
|
957
|
+
// mounted yet — the SDK executor recognizes FYODOS_HANDLER_UNREADY, walks
|
|
958
|
+
// the user to the screen that hosts the action and retries automatically.
|
|
956
959
|
const runHelper = ts
|
|
957
960
|
? 'async function __fyodosRun(call: () => unknown): Promise<FiodosActionResult> {\n' +
|
|
958
961
|
' try {\n' +
|
|
959
962
|
' const result: unknown = await Promise.resolve(call());\n' +
|
|
960
963
|
" return { success: true, data: (result && typeof result === 'object') ? result as Record<string, unknown> : { result } };\n" +
|
|
961
964
|
' } catch (err) {\n' +
|
|
962
|
-
'
|
|
965
|
+
' const msg = err instanceof Error ? err.message : String(err);\n' +
|
|
966
|
+
" if (err instanceof TypeError && /is not a function/.test(msg)) {\n" +
|
|
967
|
+
" return { success: false, error: 'FYODOS_HANDLER_UNREADY: ' + msg };\n" +
|
|
968
|
+
' }\n' +
|
|
969
|
+
' return { success: false, error: msg };\n' +
|
|
963
970
|
' }\n' +
|
|
964
971
|
'}\n'
|
|
965
972
|
: 'async function __fyodosRun(call) {\n' +
|
|
@@ -967,7 +974,11 @@ function buildRegistryModule(plan, opts = {}) {
|
|
|
967
974
|
' const result = await Promise.resolve(call());\n' +
|
|
968
975
|
" return { success: true, data: (result && typeof result === 'object') ? result : { result } };\n" +
|
|
969
976
|
' } catch (err) {\n' +
|
|
970
|
-
'
|
|
977
|
+
' const msg = err instanceof Error ? err.message : String(err);\n' +
|
|
978
|
+
" if (err instanceof TypeError && /is not a function/.test(msg)) {\n" +
|
|
979
|
+
" return { success: false, error: 'FYODOS_HANDLER_UNREADY: ' + msg };\n" +
|
|
980
|
+
' }\n' +
|
|
981
|
+
' return { success: false, error: msg };\n' +
|
|
971
982
|
' }\n' +
|
|
972
983
|
'}\n';
|
|
973
984
|
|