@kosdev-code/kos-ui-sdk 0.1.0-next.868 → 0.1.0-next.888
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/core/core/decorators/kos-service-request-model-factory.test-d.d.ts +2 -0
- package/core/core/decorators/kos-service-request-model-factory.test-d.d.ts.map +1 -0
- package/core/core/decorators/kos-service-request.d.ts +1 -1
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/model/kos-service-request-manager.d.ts.map +1 -1
- package/{index-D64IOwMG.js → index-BUwbSjst.js} +5 -7
- package/index-BUwbSjst.js.map +1 -0
- package/{index-DsRhHHtS.cjs → index-DUoSahlA.cjs} +5 -7
- package/index-DUoSahlA.cjs.map +1 -0
- package/index.cjs +52 -22
- package/index.cjs.map +1 -1
- package/index.js +53 -23
- package/index.js.map +1 -1
- package/models/decorators/future-service.d.ts.map +1 -1
- package/models/utils/openapi-index.d.ts +2 -2
- package/models/utils/services/kos/daily/openapi.d.ts +5514 -4341
- package/models/utils/services/kos/daily/service.d.ts +64 -5
- package/models/utils/services/kos/daily/service.d.ts.map +1 -1
- package/models/utils/services/vfs/daily/openapi.d.ts +42 -42
- package/models/utils/services/vfs/daily/service.d.ts +61 -2
- package/models/utils/services/vfs/daily/service.d.ts.map +1 -1
- package/models/utils/services-index.d.ts +2 -2
- package/models/utils/services-index.d.ts.map +1 -1
- package/package.json +3 -3
- package/testing.cjs +1 -1
- package/testing.js +1 -1
- package/index-D64IOwMG.js.map +0 -1
- package/index-DsRhHHtS.cjs.map +0 -1
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChildModels, P as ParentModel, O as OptionsRequired, a as CompanionParentModel, b as ContainerAwareSetup, K as KosContextManager, F as FutureContainerSetup, M as MultipleFutureContainerSetup, L as LogConfig, c as LoggerSetup, d as KosLoggerFactory, e as KosModelSymbol, f as ModelEffects, R as ReferenceConfig, T as TroubleAwareSetup, D as DependencyModels, g as DependencyLifecycle, E as ExtensionManager, S as SubscriptionHandlers, h as KosViewModelSymbol, V as ViewModelConfig, i as StateMachineSetup, j as injectStateMachineSupport, k as KosModelVisitor, l as KosCore, s as sendKosMessageResponse, m as KosLog, u as uuid, p as publish, n as subscribe, I as INDEX_RECORD_SYMBOL, o as INDEX_COLLECTION_KEY, q as KosContainerIndexEvents, r as isIndexableItem, t as Kos, v as isKosModel, B as BASE_URL, w as ServiceFactory, x as KosModelRegistrationFactory, y as ObservableData, z as kosAction, A as kosTopicHandler, G as kosModel, H as resolveServiceUrl, J as getKosModelSync, N as isKosModelReady, Q as modelFactory, U as registerExtensionPoint, W as FutureService, X as FutureAliases, Y as whenReady, Z as kosAutoEffect, _ as isKosExecutionContext, $ as KOS_EXECUTION_CONTEXT, a0 as EXTENSION_FUTURE_LIFECYCLE_WRAPPER, a1 as kosObservable, a2 as sendKosHttpMessageResponse, a3 as SingletonKosModelRegistrationFactory, a4 as kosWhen, a5 as destroyKosModel, a6 as KOS_MODEL_ID, a7 as KosModelContainer, a8 as api$9, a9 as KosDataContainer, aa as get, ab as getQueryParams, ac as kosEffect, ad as FutureHandler, ae as resolveKosCompanion, af as createClient, ag as kosFetch, ah as EXTENSION_CANVAS_RENDERER, ai as post, aj as FetchError, ak as KosWsEvents, al as RegistrationManager, am as registerKosModel, an as registerLegacyModel, ao as kosServiceRequest$8, ap as WebSocketTransport, aq as kosComputed, ar as WebSocketEvents, as as modelHookCache, at as isUpdateable, au as KosModelState, av as KosModelEvents, aw as clearModelHookCacheEntry, ax as getKosModel$1 } from "./index-
|
|
2
|
-
import { ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI } from "./index-
|
|
1
|
+
import { C as ChildModels, P as ParentModel, O as OptionsRequired, a as CompanionParentModel, b as ContainerAwareSetup, K as KosContextManager, F as FutureContainerSetup, M as MultipleFutureContainerSetup, L as LogConfig, c as LoggerSetup, d as KosLoggerFactory, e as KosModelSymbol, f as ModelEffects, R as ReferenceConfig, T as TroubleAwareSetup, D as DependencyModels, g as DependencyLifecycle, E as ExtensionManager, S as SubscriptionHandlers, h as KosViewModelSymbol, V as ViewModelConfig, i as StateMachineSetup, j as injectStateMachineSupport, k as KosModelVisitor, l as KosCore, s as sendKosMessageResponse, m as KosLog, u as uuid, p as publish, n as subscribe, I as INDEX_RECORD_SYMBOL, o as INDEX_COLLECTION_KEY, q as KosContainerIndexEvents, r as isIndexableItem, t as Kos, v as isKosModel, B as BASE_URL, w as ServiceFactory, x as KosModelRegistrationFactory, y as ObservableData, z as kosAction, A as kosTopicHandler, G as kosModel, H as resolveServiceUrl, J as getKosModelSync, N as isKosModelReady, Q as modelFactory, U as registerExtensionPoint, W as FutureService, X as FutureAliases, Y as whenReady, Z as kosAutoEffect, _ as isKosExecutionContext, $ as KOS_EXECUTION_CONTEXT, a0 as EXTENSION_FUTURE_LIFECYCLE_WRAPPER, a1 as kosObservable, a2 as sendKosHttpMessageResponse, a3 as SingletonKosModelRegistrationFactory, a4 as kosWhen, a5 as destroyKosModel, a6 as KOS_MODEL_ID, a7 as KosModelContainer, a8 as api$9, a9 as KosDataContainer, aa as get, ab as getQueryParams, ac as kosEffect, ad as FutureHandler, ae as resolveKosCompanion, af as createClient, ag as kosFetch, ah as EXTENSION_CANVAS_RENDERER, ai as post, aj as FetchError, ak as KosWsEvents, al as RegistrationManager, am as registerKosModel, an as registerLegacyModel, ao as kosServiceRequest$8, ap as WebSocketTransport, aq as kosComputed, ar as WebSocketEvents, as as modelHookCache, at as isUpdateable, au as KosModelState, av as KosModelEvents, aw as clearModelHookCacheEntry, ax as getKosModel$1 } from "./index-BUwbSjst.js";
|
|
2
|
+
import { ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI } from "./index-BUwbSjst.js";
|
|
3
3
|
import { action, reaction, autorun, makeAutoObservable, runInAction, observable } from "mobx";
|
|
4
4
|
import { makeAutoObservable as makeAutoObservable2, makeObservable } from "mobx";
|
|
5
5
|
import log$s from "loglevel";
|
|
@@ -3086,6 +3086,10 @@ const FutureManager = {
|
|
|
3086
3086
|
getFuture
|
|
3087
3087
|
};
|
|
3088
3088
|
const isFutureResponse = (response) => !response || !response.data;
|
|
3089
|
+
const resolveFutureHandler = (model) => {
|
|
3090
|
+
const handlerProperty = model?.[MultipleFutureContainerSetup]?.handlerProperty ?? model?.[FutureContainerSetup]?.handlerProperty ?? "futureHandler";
|
|
3091
|
+
return model[handlerProperty];
|
|
3092
|
+
};
|
|
3089
3093
|
function wrapWithFutureLifecycle(original, methodName, props = {}) {
|
|
3090
3094
|
const {
|
|
3091
3095
|
alias,
|
|
@@ -3115,7 +3119,7 @@ function wrapWithFutureLifecycle(original, methodName, props = {}) {
|
|
|
3115
3119
|
KosLog.debug(`future ${future.id} is ready`);
|
|
3116
3120
|
kosAction(() => {
|
|
3117
3121
|
KosLog.debug(`Adding future ${future.id} to futureHandler`);
|
|
3118
|
-
this.
|
|
3122
|
+
resolveFutureHandler(this).addFuture(future, alias);
|
|
3119
3123
|
});
|
|
3120
3124
|
if (abortController && abortControllerInstance) {
|
|
3121
3125
|
effectDisposer = kosAutoEffect(() => {
|
|
@@ -3188,7 +3192,7 @@ function wrapWithFutureLifecycle(original, methodName, props = {}) {
|
|
|
3188
3192
|
);
|
|
3189
3193
|
}
|
|
3190
3194
|
} else {
|
|
3191
|
-
this.
|
|
3195
|
+
resolveFutureHandler(this).removeFuture(alias);
|
|
3192
3196
|
}
|
|
3193
3197
|
cleanup();
|
|
3194
3198
|
return response;
|
|
@@ -10346,10 +10350,10 @@ let CanvasDispatcherModelImpl = class {
|
|
|
10346
10350
|
}
|
|
10347
10351
|
async handlePatternApplication(req, res) {
|
|
10348
10352
|
const pattern = req.params.pattern;
|
|
10349
|
-
const
|
|
10350
|
-
const rendererModel = this._endpointRenderers.getModel(
|
|
10353
|
+
const endpoint2 = req.params.endpoint;
|
|
10354
|
+
const rendererModel = this._endpointRenderers.getModel(endpoint2);
|
|
10351
10355
|
if (!rendererModel) {
|
|
10352
|
-
res.status?.(404).send({ error: `Endpoint "${
|
|
10356
|
+
res.status?.(404).send({ error: `Endpoint "${endpoint2}" not found` });
|
|
10353
10357
|
return;
|
|
10354
10358
|
}
|
|
10355
10359
|
if (!this._patterns.has(pattern)) {
|
|
@@ -10379,10 +10383,10 @@ let CanvasDispatcherModelImpl = class {
|
|
|
10379
10383
|
res.status?.(400).send({ error: "Invalid color format" });
|
|
10380
10384
|
return;
|
|
10381
10385
|
}
|
|
10382
|
-
const
|
|
10383
|
-
const rendererModel = this._endpointRenderers.getModel(
|
|
10386
|
+
const endpoint2 = req.params.endpoint;
|
|
10387
|
+
const rendererModel = this._endpointRenderers.getModel(endpoint2);
|
|
10384
10388
|
if (!rendererModel) {
|
|
10385
|
-
res.status?.(404).send({ error: `Endpoint "${
|
|
10389
|
+
res.status?.(404).send({ error: `Endpoint "${endpoint2}" not found` });
|
|
10386
10390
|
return;
|
|
10387
10391
|
}
|
|
10388
10392
|
const { r, b, g } = rgb;
|
|
@@ -12177,18 +12181,31 @@ const updateRegion = async (region) => {
|
|
|
12177
12181
|
regionInfo.updateProperty(region);
|
|
12178
12182
|
};
|
|
12179
12183
|
async function getKosServiceApi() {
|
|
12180
|
-
const { default: API } = await import("./index-
|
|
12184
|
+
const { default: API } = await import("./index-BUwbSjst.js").then((n) => n.cJ);
|
|
12181
12185
|
return API;
|
|
12182
12186
|
}
|
|
12183
12187
|
function kosServiceRequest$7(params2) {
|
|
12184
12188
|
return kosServiceRequest$8(params2);
|
|
12185
12189
|
}
|
|
12190
|
+
function endpoint$1(path, method) {
|
|
12191
|
+
return { path, method };
|
|
12192
|
+
}
|
|
12193
|
+
function serviceRequest$1(ep, opts) {
|
|
12194
|
+
return kosServiceRequest$7({
|
|
12195
|
+
path: ep.path,
|
|
12196
|
+
method: ep.method,
|
|
12197
|
+
errorHandler: { strategy: "log", defaultValue: null },
|
|
12198
|
+
...opts
|
|
12199
|
+
});
|
|
12200
|
+
}
|
|
12186
12201
|
const api$7 = createClient();
|
|
12187
12202
|
const service$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12188
12203
|
__proto__: null,
|
|
12189
12204
|
api: api$7,
|
|
12190
12205
|
default: api$7,
|
|
12191
|
-
|
|
12206
|
+
endpoint: endpoint$1,
|
|
12207
|
+
kosServiceRequest: kosServiceRequest$7,
|
|
12208
|
+
serviceRequest: serviceRequest$1
|
|
12192
12209
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12193
12210
|
function kosServiceRequest$6(params2) {
|
|
12194
12211
|
return kosServiceRequest$8(params2);
|
|
@@ -12223,12 +12240,25 @@ const service$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
12223
12240
|
function kosServiceRequest$3(params2) {
|
|
12224
12241
|
return kosServiceRequest$8(params2);
|
|
12225
12242
|
}
|
|
12243
|
+
function endpoint(path, method) {
|
|
12244
|
+
return { path, method };
|
|
12245
|
+
}
|
|
12246
|
+
function serviceRequest(ep, opts) {
|
|
12247
|
+
return kosServiceRequest$3({
|
|
12248
|
+
path: ep.path,
|
|
12249
|
+
method: ep.method,
|
|
12250
|
+
errorHandler: { strategy: "log", defaultValue: null },
|
|
12251
|
+
...opts
|
|
12252
|
+
});
|
|
12253
|
+
}
|
|
12226
12254
|
const api$3 = createClient();
|
|
12227
12255
|
const service$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12228
12256
|
__proto__: null,
|
|
12229
12257
|
api: api$3,
|
|
12230
12258
|
default: api$3,
|
|
12231
|
-
|
|
12259
|
+
endpoint,
|
|
12260
|
+
kosServiceRequest: kosServiceRequest$3,
|
|
12261
|
+
serviceRequest
|
|
12232
12262
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12233
12263
|
function kosServiceRequest$2(params2) {
|
|
12234
12264
|
return kosServiceRequest$8(params2);
|
|
@@ -12903,8 +12933,8 @@ GpioChipModelImpl = __decorateClass$2([
|
|
|
12903
12933
|
const GpioChip = GpioChipModelImpl.Registration;
|
|
12904
12934
|
const GPIO_CHIP_PATH = "/api/kos/gpio/chips";
|
|
12905
12935
|
const GPIO_PIN_PATH = "/api/kos/gpio/pins";
|
|
12906
|
-
const gpioServiceRequest = kosServiceRequest$
|
|
12907
|
-
const gpioApi = api$
|
|
12936
|
+
const gpioServiceRequest = kosServiceRequest$4;
|
|
12937
|
+
const gpioApi = api$4;
|
|
12908
12938
|
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12909
12939
|
__proto__: null,
|
|
12910
12940
|
GPIO_CHIP_PATH,
|
|
@@ -15838,10 +15868,10 @@ export {
|
|
|
15838
15868
|
KOS_EXECUTION_CONTEXT,
|
|
15839
15869
|
KOS_MODEL_ID,
|
|
15840
15870
|
KOS_RECOVERING_SESSION_KEY,
|
|
15841
|
-
service$
|
|
15842
|
-
service$
|
|
15843
|
-
service$
|
|
15844
|
-
service$
|
|
15871
|
+
service$7 as KOS_SERVICE,
|
|
15872
|
+
service$6 as KOS_SERVICE_1_6_5,
|
|
15873
|
+
service$5 as KOS_SERVICE_1_8_1,
|
|
15874
|
+
service$4 as KOS_SERVICE_1_9_X,
|
|
15845
15875
|
KeyValue,
|
|
15846
15876
|
index$c as KeyValueServices,
|
|
15847
15877
|
Kos,
|
|
@@ -15988,10 +16018,10 @@ export {
|
|
|
15988
16018
|
UsbUpdate,
|
|
15989
16019
|
UsbUpdateContainer,
|
|
15990
16020
|
index$3 as UsbUpdateServices,
|
|
15991
|
-
service as VFS_SERVICE,
|
|
15992
|
-
service$
|
|
15993
|
-
service$
|
|
15994
|
-
service
|
|
16021
|
+
service$3 as VFS_SERVICE,
|
|
16022
|
+
service$2 as VFS_SERVICE_1_6_5,
|
|
16023
|
+
service$1 as VFS_SERVICE_1_8_1,
|
|
16024
|
+
service as VFS_SERVICE_1_9_X,
|
|
15995
16025
|
ViewModelConfig,
|
|
15996
16026
|
WS_EVENT_TYPE,
|
|
15997
16027
|
WebSocketEvents,
|