@nextera.one/axis-server-sdk 2.3.13 → 2.3.14
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/index.js +18 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -10
- package/dist/index.mjs.map +1 -1
- package/dist/sensors/index.js +18 -10
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/index.mjs +18 -10
- package/dist/sensors/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/sensors/index.mjs
CHANGED
|
@@ -2922,9 +2922,14 @@ var init_intent_router = __esm({
|
|
|
2922
2922
|
* Routes a decoded AXIS frame to the appropriate handler.
|
|
2923
2923
|
*
|
|
2924
2924
|
* **Precedence:**
|
|
2925
|
-
* 1.
|
|
2926
|
-
* 2.
|
|
2927
|
-
* 3.
|
|
2925
|
+
* 1. SDK meta-intents (`CHAIN.EXEC`, `INTENT.EXEC`)
|
|
2926
|
+
* 2. Dynamically registered handlers from modules
|
|
2927
|
+
* 3. Simple SDK built-in fallback (`system.ping`, `public.ping`, `system.time`, `system.echo`)
|
|
2928
|
+
*
|
|
2929
|
+
* Registered app handlers intentionally win over simple built-ins. This lets
|
|
2930
|
+
* applications attach sensors, rate limits, and custom responses to intents
|
|
2931
|
+
* like `system.ping` while keeping a default fallback for apps that do not
|
|
2932
|
+
* register their own handler.
|
|
2928
2933
|
*
|
|
2929
2934
|
* @param {AxisFrame} frame - The validated and decoded binary frame
|
|
2930
2935
|
* @returns {Promise<AxisEffect>} The resulting effect of the execution
|
|
@@ -2978,6 +2983,16 @@ var init_intent_router = __esm({
|
|
|
2978
2983
|
* This keeps route() focused on observer/error lifecycle concerns.
|
|
2979
2984
|
*/
|
|
2980
2985
|
async routeResolvedIntent(intent, frame) {
|
|
2986
|
+
if (isChainExecIntent(intent)) {
|
|
2987
|
+
const chainRequest = this.parseChainRequestBody(frame.body);
|
|
2988
|
+
return this.executeChainRequest(frame, chainRequest);
|
|
2989
|
+
}
|
|
2990
|
+
if (isIntentExecIntent(intent)) {
|
|
2991
|
+
return this.routeIntentExec(frame);
|
|
2992
|
+
}
|
|
2993
|
+
if (this.handlers.has(intent)) {
|
|
2994
|
+
return this.routeRegisteredIntent(intent, frame);
|
|
2995
|
+
}
|
|
2981
2996
|
const builtinEffect = routeSystemBuiltinIntent(
|
|
2982
2997
|
intent,
|
|
2983
2998
|
frame.body,
|
|
@@ -2989,13 +3004,6 @@ var init_intent_router = __esm({
|
|
|
2989
3004
|
}
|
|
2990
3005
|
return builtinEffect;
|
|
2991
3006
|
}
|
|
2992
|
-
if (isChainExecIntent(intent)) {
|
|
2993
|
-
const chainRequest = this.parseChainRequestBody(frame.body);
|
|
2994
|
-
return this.executeChainRequest(frame, chainRequest);
|
|
2995
|
-
}
|
|
2996
|
-
if (isIntentExecIntent(intent)) {
|
|
2997
|
-
return this.routeIntentExec(frame);
|
|
2998
|
-
}
|
|
2999
3007
|
return this.routeRegisteredIntent(intent, frame);
|
|
3000
3008
|
}
|
|
3001
3009
|
/**
|