@milaboratories/pl-middle-layer 1.55.21 → 1.55.22

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.
@@ -37,6 +37,7 @@ function getServiceInjectors() {
37
37
  findTableColumn: (tableSpec, selector) => vm.exportSingleValue(driver.findTableColumn(vm.importObjectViaJson(tableSpec), vm.importObjectViaJson(selector)))
38
38
  };
39
39
  },
40
+ Dialog: () => ({}),
40
41
  PFrame: ({ host, vm }) => ({
41
42
  createPFrame: (def) => vm.exportSingleValue(host.createPFrame(vm.importObjectViaJson(def))),
42
43
  createPTable: (def) => vm.exportSingleValue(host.createPTable(vm.importObjectViaJson(def))),
@@ -1 +1 @@
1
- {"version":3,"file":"service_injectors.cjs","names":["Services","ServiceNotRegisteredError","PoolEntryGuard"],"sources":["../../src/js_render/service_injectors.ts"],"sourcesContent":["import type { QuickJSHandle, VmFunctionImplementation } from \"quickjs-emscripten\";\nimport type { InferServiceModel, ServiceBrand } from \"@milaboratories/pl-model-common\";\nimport { Services, ServiceNotRegisteredError } from \"@milaboratories/pl-model-common\";\nimport type {\n AxesId,\n AxesSpec,\n DataInfo,\n PColumn,\n PColumnSpec,\n PColumnValues,\n PTableColumnId,\n PTableColumnSpec,\n SingleAxisSelector,\n BuildQueryInput,\n DeleteColumnRequest,\n DiscoverColumnsRequest,\n PFrameDef,\n SpecQuery,\n PTableDef,\n PTableDefV2,\n SpecFrameHandle,\n} from \"@milaboratories/pl-model-common\";\nimport { PoolEntryGuard } from \"@milaboratories/pl-model-common\";\nimport type { JsExecutionContext } from \"./context\";\nimport type { ComputableContextHelper } from \"./computable_context\";\n\ntype VmMethod = VmFunctionImplementation<QuickJSHandle>;\n\nexport type ServiceInjectorContext = {\n host: ComputableContextHelper;\n vm: JsExecutionContext;\n};\n\n// Each injector returns a record of method name -> VM function implementation.\n// The framework automatically registers them with serviceFnKey(serviceId, methodName).\nexport type ServiceInjector<Methods extends string = string> = (\n ctx: ServiceInjectorContext,\n) => Record<Methods, VmMethod>;\n\n// Type-safe injector for a specific service — must return all methods from the model interface.\ntype ServiceInjectorFor<S extends keyof typeof Services> = ServiceInjector<\n string & keyof InferServiceModel<ServiceBrand<(typeof Services)[S]>>\n>;\n\n// Complete, type-checked injector map.\n// Adding a service to Services without an entry here is a compile-time error.\n// Missing a method from the interface is also a compile-time error.\ntype ServiceInjectorMap = { [K in keyof typeof Services]: ServiceInjectorFor<K> };\n\nexport function getServiceInjectors(): ServiceInjectorMap {\n return {\n PFrameSpec: ({ host, vm }: ServiceInjectorContext) => {\n const driver = host.serviceRegistry.get(Services.PFrameSpec);\n if (!driver)\n throw new ServiceNotRegisteredError(\n `Service \"${Services.PFrameSpec}\" has no factory in ModelServiceRegistry. Provide a non-null factory.`,\n );\n\n return {\n createSpecFrame: (specs: QuickJSHandle) => {\n using guard = new PoolEntryGuard(\n driver.createSpecFrame(vm.importObjectViaJson(specs) as Record<string, PColumnSpec>),\n );\n host.addOnDestroy(guard.entry.unref);\n const entry = guard.keep();\n // TODO: add [Symbol.dispose] once QuickJS supports ES2024 explicit resource management\n const obj = vm.vm.newObject();\n vm.vm.newString(entry.key).consume((k) => vm.vm.setProp(obj, \"key\", k));\n vm.vm\n .newFunction(\"unref\", () => {\n entry.unref();\n })\n .consume((fn) => vm.vm.setProp(obj, \"unref\", fn));\n return obj;\n },\n\n listColumns: (handle: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.listColumns(vm.vm.getString(handle) as SpecFrameHandle)),\n\n discoverColumns: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.discoverColumns(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as DiscoverColumnsRequest,\n ),\n ),\n\n buildQuery: (input: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.buildQuery(vm.importObjectViaJson(input) as BuildQueryInput),\n ),\n\n deleteColumn: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.deleteColumn(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as DeleteColumnRequest,\n ),\n ),\n\n evaluateQuery: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.evaluateQuery(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as SpecQuery,\n ),\n ),\n\n expandAxes: (spec: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.expandAxes(vm.importObjectViaJson(spec) as AxesSpec)),\n\n collapseAxes: (ids: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.collapseAxes(vm.importObjectViaJson(ids) as AxesId)),\n\n findAxis: (spec: QuickJSHandle, selector: QuickJSHandle) =>\n vm.exportSingleValue(\n driver.findAxis(\n vm.importObjectViaJson(spec) as AxesSpec,\n vm.importObjectViaJson(selector) as SingleAxisSelector,\n ),\n ),\n\n findTableColumn: (tableSpec: QuickJSHandle, selector: QuickJSHandle) =>\n vm.exportSingleValue(\n driver.findTableColumn(\n vm.importObjectViaJson(tableSpec) as PTableColumnSpec[],\n vm.importObjectViaJson(selector) as PTableColumnId,\n ),\n ),\n };\n },\n\n PFrame: ({ host, vm }: ServiceInjectorContext) => ({\n createPFrame: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPFrame(\n vm.importObjectViaJson(def) as PFrameDef<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n\n createPTable: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPTable(\n vm.importObjectViaJson(def) as PTableDef<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n\n createPTableV2: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPTableV2(\n vm.importObjectViaJson(def) as PTableDefV2<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n }),\n };\n}\n"],"mappings":";;;;AAiDA,SAAgB,sBAA0C;AACxD,QAAO;EACL,aAAa,EAAE,MAAM,SAAiC;GACpD,MAAM,SAAS,KAAK,gBAAgB,IAAIA,gCAAAA,SAAS,WAAW;AAC5D,OAAI,CAAC,OACH,OAAM,IAAIC,gCAAAA,0BACR,YAAYD,gCAAAA,SAAS,WAAW,uEACjC;AAEH,UAAO;IACL,kBAAkB,UAAyB;;;MACzC,MAAM,QAAA,YAAA,EAAQ,IAAIE,gCAAAA,eAChB,OAAO,gBAAgB,GAAG,oBAAoB,MAAM,CAAgC,CACrF,CAAA;AACD,WAAK,aAAa,MAAM,MAAM,MAAM;MACpC,MAAM,QAAQ,MAAM,MAAM;MAE1B,MAAM,MAAM,GAAG,GAAG,WAAW;AAC7B,SAAG,GAAG,UAAU,MAAM,IAAI,CAAC,SAAS,MAAM,GAAG,GAAG,QAAQ,KAAK,OAAO,EAAE,CAAC;AACvE,SAAG,GACA,YAAY,eAAe;AAC1B,aAAM,OAAO;QACb,CACD,SAAS,OAAO,GAAG,GAAG,QAAQ,KAAK,SAAS,GAAG,CAAC;AACnD,aAAO;;;;;;;IAGT,cAAc,WACZ,GAAG,oBAAoB,OAAO,YAAY,GAAG,GAAG,UAAU,OAAO,CAAoB,CAAC;IAExF,kBAAkB,QAAuB,YACvC,GAAG,oBACD,OAAO,gBACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,aAAa,UACX,GAAG,oBACD,OAAO,WAAW,GAAG,oBAAoB,MAAM,CAAoB,CACpE;IAEH,eAAe,QAAuB,YACpC,GAAG,oBACD,OAAO,aACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,gBAAgB,QAAuB,YACrC,GAAG,oBACD,OAAO,cACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,aAAa,SACX,GAAG,oBAAoB,OAAO,WAAW,GAAG,oBAAoB,KAAK,CAAa,CAAC;IAErF,eAAe,QACb,GAAG,oBAAoB,OAAO,aAAa,GAAG,oBAAoB,IAAI,CAAW,CAAC;IAEpF,WAAW,MAAqB,aAC9B,GAAG,kBACD,OAAO,SACL,GAAG,oBAAoB,KAAK,EAC5B,GAAG,oBAAoB,SAAS,CACjC,CACF;IAEH,kBAAkB,WAA0B,aAC1C,GAAG,kBACD,OAAO,gBACL,GAAG,oBAAoB,UAAU,EACjC,GAAG,oBAAoB,SAAS,CACjC,CACF;IACJ;;EAGH,SAAS,EAAE,MAAM,UAAkC;GACjD,eAAe,QACb,GAAG,kBACD,KAAK,aACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GAEH,eAAe,QACb,GAAG,kBACD,KAAK,aACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GAEH,iBAAiB,QACf,GAAG,kBACD,KAAK,eACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GACJ;EACF"}
1
+ {"version":3,"file":"service_injectors.cjs","names":["Services","ServiceNotRegisteredError","PoolEntryGuard"],"sources":["../../src/js_render/service_injectors.ts"],"sourcesContent":["import type { QuickJSHandle, VmFunctionImplementation } from \"quickjs-emscripten\";\nimport type { InferServiceModel, ServiceBrand } from \"@milaboratories/pl-model-common\";\nimport { Services, ServiceNotRegisteredError } from \"@milaboratories/pl-model-common\";\nimport type {\n AxesId,\n AxesSpec,\n DataInfo,\n PColumn,\n PColumnSpec,\n PColumnValues,\n PTableColumnId,\n PTableColumnSpec,\n SingleAxisSelector,\n BuildQueryInput,\n DeleteColumnRequest,\n DiscoverColumnsRequest,\n PFrameDef,\n SpecQuery,\n PTableDef,\n PTableDefV2,\n SpecFrameHandle,\n} from \"@milaboratories/pl-model-common\";\nimport { PoolEntryGuard } from \"@milaboratories/pl-model-common\";\nimport type { JsExecutionContext } from \"./context\";\nimport type { ComputableContextHelper } from \"./computable_context\";\n\ntype VmMethod = VmFunctionImplementation<QuickJSHandle>;\n\nexport type ServiceInjectorContext = {\n host: ComputableContextHelper;\n vm: JsExecutionContext;\n};\n\n// Each injector returns a record of method name -> VM function implementation.\n// The framework automatically registers them with serviceFnKey(serviceId, methodName).\nexport type ServiceInjector<Methods extends string = string> = (\n ctx: ServiceInjectorContext,\n) => Record<Methods, VmMethod>;\n\n// Type-safe injector for a specific service — must return all methods from the model interface.\ntype ServiceInjectorFor<S extends keyof typeof Services> = ServiceInjector<\n string & keyof InferServiceModel<ServiceBrand<(typeof Services)[S]>>\n>;\n\n// Complete, type-checked injector map.\n// Adding a service to Services without an entry here is a compile-time error.\n// Missing a method from the interface is also a compile-time error.\ntype ServiceInjectorMap = { [K in keyof typeof Services]: ServiceInjectorFor<K> };\n\nexport function getServiceInjectors(): ServiceInjectorMap {\n return {\n PFrameSpec: ({ host, vm }: ServiceInjectorContext) => {\n const driver = host.serviceRegistry.get(Services.PFrameSpec);\n if (!driver)\n throw new ServiceNotRegisteredError(\n `Service \"${Services.PFrameSpec}\" has no factory in ModelServiceRegistry. Provide a non-null factory.`,\n );\n\n return {\n createSpecFrame: (specs: QuickJSHandle) => {\n using guard = new PoolEntryGuard(\n driver.createSpecFrame(vm.importObjectViaJson(specs) as Record<string, PColumnSpec>),\n );\n host.addOnDestroy(guard.entry.unref);\n const entry = guard.keep();\n // TODO: add [Symbol.dispose] once QuickJS supports ES2024 explicit resource management\n const obj = vm.vm.newObject();\n vm.vm.newString(entry.key).consume((k) => vm.vm.setProp(obj, \"key\", k));\n vm.vm\n .newFunction(\"unref\", () => {\n entry.unref();\n })\n .consume((fn) => vm.vm.setProp(obj, \"unref\", fn));\n return obj;\n },\n\n listColumns: (handle: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.listColumns(vm.vm.getString(handle) as SpecFrameHandle)),\n\n discoverColumns: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.discoverColumns(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as DiscoverColumnsRequest,\n ),\n ),\n\n buildQuery: (input: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.buildQuery(vm.importObjectViaJson(input) as BuildQueryInput),\n ),\n\n deleteColumn: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.deleteColumn(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as DeleteColumnRequest,\n ),\n ),\n\n evaluateQuery: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.evaluateQuery(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as SpecQuery,\n ),\n ),\n\n expandAxes: (spec: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.expandAxes(vm.importObjectViaJson(spec) as AxesSpec)),\n\n collapseAxes: (ids: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.collapseAxes(vm.importObjectViaJson(ids) as AxesId)),\n\n findAxis: (spec: QuickJSHandle, selector: QuickJSHandle) =>\n vm.exportSingleValue(\n driver.findAxis(\n vm.importObjectViaJson(spec) as AxesSpec,\n vm.importObjectViaJson(selector) as SingleAxisSelector,\n ),\n ),\n\n findTableColumn: (tableSpec: QuickJSHandle, selector: QuickJSHandle) =>\n vm.exportSingleValue(\n driver.findTableColumn(\n vm.importObjectViaJson(tableSpec) as PTableColumnSpec[],\n vm.importObjectViaJson(selector) as PTableColumnId,\n ),\n ),\n };\n },\n\n // Dialog has no model-side surface — workflow scripts cannot open save dialogs.\n // Declared as an empty injector to satisfy the exhaustive ServiceInjectorMap.\n Dialog: () => ({}) as Record<never, VmMethod>,\n\n PFrame: ({ host, vm }: ServiceInjectorContext) => ({\n createPFrame: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPFrame(\n vm.importObjectViaJson(def) as PFrameDef<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n\n createPTable: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPTable(\n vm.importObjectViaJson(def) as PTableDef<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n\n createPTableV2: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPTableV2(\n vm.importObjectViaJson(def) as PTableDefV2<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n }),\n };\n}\n"],"mappings":";;;;AAiDA,SAAgB,sBAA0C;AACxD,QAAO;EACL,aAAa,EAAE,MAAM,SAAiC;GACpD,MAAM,SAAS,KAAK,gBAAgB,IAAIA,gCAAAA,SAAS,WAAW;AAC5D,OAAI,CAAC,OACH,OAAM,IAAIC,gCAAAA,0BACR,YAAYD,gCAAAA,SAAS,WAAW,uEACjC;AAEH,UAAO;IACL,kBAAkB,UAAyB;;;MACzC,MAAM,QAAA,YAAA,EAAQ,IAAIE,gCAAAA,eAChB,OAAO,gBAAgB,GAAG,oBAAoB,MAAM,CAAgC,CACrF,CAAA;AACD,WAAK,aAAa,MAAM,MAAM,MAAM;MACpC,MAAM,QAAQ,MAAM,MAAM;MAE1B,MAAM,MAAM,GAAG,GAAG,WAAW;AAC7B,SAAG,GAAG,UAAU,MAAM,IAAI,CAAC,SAAS,MAAM,GAAG,GAAG,QAAQ,KAAK,OAAO,EAAE,CAAC;AACvE,SAAG,GACA,YAAY,eAAe;AAC1B,aAAM,OAAO;QACb,CACD,SAAS,OAAO,GAAG,GAAG,QAAQ,KAAK,SAAS,GAAG,CAAC;AACnD,aAAO;;;;;;;IAGT,cAAc,WACZ,GAAG,oBAAoB,OAAO,YAAY,GAAG,GAAG,UAAU,OAAO,CAAoB,CAAC;IAExF,kBAAkB,QAAuB,YACvC,GAAG,oBACD,OAAO,gBACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,aAAa,UACX,GAAG,oBACD,OAAO,WAAW,GAAG,oBAAoB,MAAM,CAAoB,CACpE;IAEH,eAAe,QAAuB,YACpC,GAAG,oBACD,OAAO,aACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,gBAAgB,QAAuB,YACrC,GAAG,oBACD,OAAO,cACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,aAAa,SACX,GAAG,oBAAoB,OAAO,WAAW,GAAG,oBAAoB,KAAK,CAAa,CAAC;IAErF,eAAe,QACb,GAAG,oBAAoB,OAAO,aAAa,GAAG,oBAAoB,IAAI,CAAW,CAAC;IAEpF,WAAW,MAAqB,aAC9B,GAAG,kBACD,OAAO,SACL,GAAG,oBAAoB,KAAK,EAC5B,GAAG,oBAAoB,SAAS,CACjC,CACF;IAEH,kBAAkB,WAA0B,aAC1C,GAAG,kBACD,OAAO,gBACL,GAAG,oBAAoB,UAAU,EACjC,GAAG,oBAAoB,SAAS,CACjC,CACF;IACJ;;EAKH,eAAe,EAAE;EAEjB,SAAS,EAAE,MAAM,UAAkC;GACjD,eAAe,QACb,GAAG,kBACD,KAAK,aACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GAEH,eAAe,QACb,GAAG,kBACD,KAAK,aACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GAEH,iBAAiB,QACf,GAAG,kBACD,KAAK,eACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GACJ;EACF"}
@@ -36,6 +36,7 @@ function getServiceInjectors() {
36
36
  findTableColumn: (tableSpec, selector) => vm.exportSingleValue(driver.findTableColumn(vm.importObjectViaJson(tableSpec), vm.importObjectViaJson(selector)))
37
37
  };
38
38
  },
39
+ Dialog: () => ({}),
39
40
  PFrame: ({ host, vm }) => ({
40
41
  createPFrame: (def) => vm.exportSingleValue(host.createPFrame(vm.importObjectViaJson(def))),
41
42
  createPTable: (def) => vm.exportSingleValue(host.createPTable(vm.importObjectViaJson(def))),
@@ -1 +1 @@
1
- {"version":3,"file":"service_injectors.js","names":[],"sources":["../../src/js_render/service_injectors.ts"],"sourcesContent":["import type { QuickJSHandle, VmFunctionImplementation } from \"quickjs-emscripten\";\nimport type { InferServiceModel, ServiceBrand } from \"@milaboratories/pl-model-common\";\nimport { Services, ServiceNotRegisteredError } from \"@milaboratories/pl-model-common\";\nimport type {\n AxesId,\n AxesSpec,\n DataInfo,\n PColumn,\n PColumnSpec,\n PColumnValues,\n PTableColumnId,\n PTableColumnSpec,\n SingleAxisSelector,\n BuildQueryInput,\n DeleteColumnRequest,\n DiscoverColumnsRequest,\n PFrameDef,\n SpecQuery,\n PTableDef,\n PTableDefV2,\n SpecFrameHandle,\n} from \"@milaboratories/pl-model-common\";\nimport { PoolEntryGuard } from \"@milaboratories/pl-model-common\";\nimport type { JsExecutionContext } from \"./context\";\nimport type { ComputableContextHelper } from \"./computable_context\";\n\ntype VmMethod = VmFunctionImplementation<QuickJSHandle>;\n\nexport type ServiceInjectorContext = {\n host: ComputableContextHelper;\n vm: JsExecutionContext;\n};\n\n// Each injector returns a record of method name -> VM function implementation.\n// The framework automatically registers them with serviceFnKey(serviceId, methodName).\nexport type ServiceInjector<Methods extends string = string> = (\n ctx: ServiceInjectorContext,\n) => Record<Methods, VmMethod>;\n\n// Type-safe injector for a specific service — must return all methods from the model interface.\ntype ServiceInjectorFor<S extends keyof typeof Services> = ServiceInjector<\n string & keyof InferServiceModel<ServiceBrand<(typeof Services)[S]>>\n>;\n\n// Complete, type-checked injector map.\n// Adding a service to Services without an entry here is a compile-time error.\n// Missing a method from the interface is also a compile-time error.\ntype ServiceInjectorMap = { [K in keyof typeof Services]: ServiceInjectorFor<K> };\n\nexport function getServiceInjectors(): ServiceInjectorMap {\n return {\n PFrameSpec: ({ host, vm }: ServiceInjectorContext) => {\n const driver = host.serviceRegistry.get(Services.PFrameSpec);\n if (!driver)\n throw new ServiceNotRegisteredError(\n `Service \"${Services.PFrameSpec}\" has no factory in ModelServiceRegistry. Provide a non-null factory.`,\n );\n\n return {\n createSpecFrame: (specs: QuickJSHandle) => {\n using guard = new PoolEntryGuard(\n driver.createSpecFrame(vm.importObjectViaJson(specs) as Record<string, PColumnSpec>),\n );\n host.addOnDestroy(guard.entry.unref);\n const entry = guard.keep();\n // TODO: add [Symbol.dispose] once QuickJS supports ES2024 explicit resource management\n const obj = vm.vm.newObject();\n vm.vm.newString(entry.key).consume((k) => vm.vm.setProp(obj, \"key\", k));\n vm.vm\n .newFunction(\"unref\", () => {\n entry.unref();\n })\n .consume((fn) => vm.vm.setProp(obj, \"unref\", fn));\n return obj;\n },\n\n listColumns: (handle: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.listColumns(vm.vm.getString(handle) as SpecFrameHandle)),\n\n discoverColumns: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.discoverColumns(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as DiscoverColumnsRequest,\n ),\n ),\n\n buildQuery: (input: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.buildQuery(vm.importObjectViaJson(input) as BuildQueryInput),\n ),\n\n deleteColumn: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.deleteColumn(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as DeleteColumnRequest,\n ),\n ),\n\n evaluateQuery: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.evaluateQuery(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as SpecQuery,\n ),\n ),\n\n expandAxes: (spec: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.expandAxes(vm.importObjectViaJson(spec) as AxesSpec)),\n\n collapseAxes: (ids: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.collapseAxes(vm.importObjectViaJson(ids) as AxesId)),\n\n findAxis: (spec: QuickJSHandle, selector: QuickJSHandle) =>\n vm.exportSingleValue(\n driver.findAxis(\n vm.importObjectViaJson(spec) as AxesSpec,\n vm.importObjectViaJson(selector) as SingleAxisSelector,\n ),\n ),\n\n findTableColumn: (tableSpec: QuickJSHandle, selector: QuickJSHandle) =>\n vm.exportSingleValue(\n driver.findTableColumn(\n vm.importObjectViaJson(tableSpec) as PTableColumnSpec[],\n vm.importObjectViaJson(selector) as PTableColumnId,\n ),\n ),\n };\n },\n\n PFrame: ({ host, vm }: ServiceInjectorContext) => ({\n createPFrame: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPFrame(\n vm.importObjectViaJson(def) as PFrameDef<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n\n createPTable: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPTable(\n vm.importObjectViaJson(def) as PTableDef<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n\n createPTableV2: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPTableV2(\n vm.importObjectViaJson(def) as PTableDefV2<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n }),\n };\n}\n"],"mappings":";;;AAiDA,SAAgB,sBAA0C;AACxD,QAAO;EACL,aAAa,EAAE,MAAM,SAAiC;GACpD,MAAM,SAAS,KAAK,gBAAgB,IAAI,SAAS,WAAW;AAC5D,OAAI,CAAC,OACH,OAAM,IAAI,0BACR,YAAY,SAAS,WAAW,uEACjC;AAEH,UAAO;IACL,kBAAkB,UAAyB;;;MACzC,MAAM,QAAA,YAAA,EAAQ,IAAI,eAChB,OAAO,gBAAgB,GAAG,oBAAoB,MAAM,CAAgC,CACrF,CAAA;AACD,WAAK,aAAa,MAAM,MAAM,MAAM;MACpC,MAAM,QAAQ,MAAM,MAAM;MAE1B,MAAM,MAAM,GAAG,GAAG,WAAW;AAC7B,SAAG,GAAG,UAAU,MAAM,IAAI,CAAC,SAAS,MAAM,GAAG,GAAG,QAAQ,KAAK,OAAO,EAAE,CAAC;AACvE,SAAG,GACA,YAAY,eAAe;AAC1B,aAAM,OAAO;QACb,CACD,SAAS,OAAO,GAAG,GAAG,QAAQ,KAAK,SAAS,GAAG,CAAC;AACnD,aAAO;;;;;;;IAGT,cAAc,WACZ,GAAG,oBAAoB,OAAO,YAAY,GAAG,GAAG,UAAU,OAAO,CAAoB,CAAC;IAExF,kBAAkB,QAAuB,YACvC,GAAG,oBACD,OAAO,gBACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,aAAa,UACX,GAAG,oBACD,OAAO,WAAW,GAAG,oBAAoB,MAAM,CAAoB,CACpE;IAEH,eAAe,QAAuB,YACpC,GAAG,oBACD,OAAO,aACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,gBAAgB,QAAuB,YACrC,GAAG,oBACD,OAAO,cACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,aAAa,SACX,GAAG,oBAAoB,OAAO,WAAW,GAAG,oBAAoB,KAAK,CAAa,CAAC;IAErF,eAAe,QACb,GAAG,oBAAoB,OAAO,aAAa,GAAG,oBAAoB,IAAI,CAAW,CAAC;IAEpF,WAAW,MAAqB,aAC9B,GAAG,kBACD,OAAO,SACL,GAAG,oBAAoB,KAAK,EAC5B,GAAG,oBAAoB,SAAS,CACjC,CACF;IAEH,kBAAkB,WAA0B,aAC1C,GAAG,kBACD,OAAO,gBACL,GAAG,oBAAoB,UAAU,EACjC,GAAG,oBAAoB,SAAS,CACjC,CACF;IACJ;;EAGH,SAAS,EAAE,MAAM,UAAkC;GACjD,eAAe,QACb,GAAG,kBACD,KAAK,aACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GAEH,eAAe,QACb,GAAG,kBACD,KAAK,aACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GAEH,iBAAiB,QACf,GAAG,kBACD,KAAK,eACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GACJ;EACF"}
1
+ {"version":3,"file":"service_injectors.js","names":[],"sources":["../../src/js_render/service_injectors.ts"],"sourcesContent":["import type { QuickJSHandle, VmFunctionImplementation } from \"quickjs-emscripten\";\nimport type { InferServiceModel, ServiceBrand } from \"@milaboratories/pl-model-common\";\nimport { Services, ServiceNotRegisteredError } from \"@milaboratories/pl-model-common\";\nimport type {\n AxesId,\n AxesSpec,\n DataInfo,\n PColumn,\n PColumnSpec,\n PColumnValues,\n PTableColumnId,\n PTableColumnSpec,\n SingleAxisSelector,\n BuildQueryInput,\n DeleteColumnRequest,\n DiscoverColumnsRequest,\n PFrameDef,\n SpecQuery,\n PTableDef,\n PTableDefV2,\n SpecFrameHandle,\n} from \"@milaboratories/pl-model-common\";\nimport { PoolEntryGuard } from \"@milaboratories/pl-model-common\";\nimport type { JsExecutionContext } from \"./context\";\nimport type { ComputableContextHelper } from \"./computable_context\";\n\ntype VmMethod = VmFunctionImplementation<QuickJSHandle>;\n\nexport type ServiceInjectorContext = {\n host: ComputableContextHelper;\n vm: JsExecutionContext;\n};\n\n// Each injector returns a record of method name -> VM function implementation.\n// The framework automatically registers them with serviceFnKey(serviceId, methodName).\nexport type ServiceInjector<Methods extends string = string> = (\n ctx: ServiceInjectorContext,\n) => Record<Methods, VmMethod>;\n\n// Type-safe injector for a specific service — must return all methods from the model interface.\ntype ServiceInjectorFor<S extends keyof typeof Services> = ServiceInjector<\n string & keyof InferServiceModel<ServiceBrand<(typeof Services)[S]>>\n>;\n\n// Complete, type-checked injector map.\n// Adding a service to Services without an entry here is a compile-time error.\n// Missing a method from the interface is also a compile-time error.\ntype ServiceInjectorMap = { [K in keyof typeof Services]: ServiceInjectorFor<K> };\n\nexport function getServiceInjectors(): ServiceInjectorMap {\n return {\n PFrameSpec: ({ host, vm }: ServiceInjectorContext) => {\n const driver = host.serviceRegistry.get(Services.PFrameSpec);\n if (!driver)\n throw new ServiceNotRegisteredError(\n `Service \"${Services.PFrameSpec}\" has no factory in ModelServiceRegistry. Provide a non-null factory.`,\n );\n\n return {\n createSpecFrame: (specs: QuickJSHandle) => {\n using guard = new PoolEntryGuard(\n driver.createSpecFrame(vm.importObjectViaJson(specs) as Record<string, PColumnSpec>),\n );\n host.addOnDestroy(guard.entry.unref);\n const entry = guard.keep();\n // TODO: add [Symbol.dispose] once QuickJS supports ES2024 explicit resource management\n const obj = vm.vm.newObject();\n vm.vm.newString(entry.key).consume((k) => vm.vm.setProp(obj, \"key\", k));\n vm.vm\n .newFunction(\"unref\", () => {\n entry.unref();\n })\n .consume((fn) => vm.vm.setProp(obj, \"unref\", fn));\n return obj;\n },\n\n listColumns: (handle: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.listColumns(vm.vm.getString(handle) as SpecFrameHandle)),\n\n discoverColumns: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.discoverColumns(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as DiscoverColumnsRequest,\n ),\n ),\n\n buildQuery: (input: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.buildQuery(vm.importObjectViaJson(input) as BuildQueryInput),\n ),\n\n deleteColumn: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.deleteColumn(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as DeleteColumnRequest,\n ),\n ),\n\n evaluateQuery: (handle: QuickJSHandle, request: QuickJSHandle) =>\n vm.exportObjectViaJson(\n driver.evaluateQuery(\n vm.vm.getString(handle) as SpecFrameHandle,\n vm.importObjectViaJson(request) as SpecQuery,\n ),\n ),\n\n expandAxes: (spec: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.expandAxes(vm.importObjectViaJson(spec) as AxesSpec)),\n\n collapseAxes: (ids: QuickJSHandle) =>\n vm.exportObjectViaJson(driver.collapseAxes(vm.importObjectViaJson(ids) as AxesId)),\n\n findAxis: (spec: QuickJSHandle, selector: QuickJSHandle) =>\n vm.exportSingleValue(\n driver.findAxis(\n vm.importObjectViaJson(spec) as AxesSpec,\n vm.importObjectViaJson(selector) as SingleAxisSelector,\n ),\n ),\n\n findTableColumn: (tableSpec: QuickJSHandle, selector: QuickJSHandle) =>\n vm.exportSingleValue(\n driver.findTableColumn(\n vm.importObjectViaJson(tableSpec) as PTableColumnSpec[],\n vm.importObjectViaJson(selector) as PTableColumnId,\n ),\n ),\n };\n },\n\n // Dialog has no model-side surface — workflow scripts cannot open save dialogs.\n // Declared as an empty injector to satisfy the exhaustive ServiceInjectorMap.\n Dialog: () => ({}) as Record<never, VmMethod>,\n\n PFrame: ({ host, vm }: ServiceInjectorContext) => ({\n createPFrame: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPFrame(\n vm.importObjectViaJson(def) as PFrameDef<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n\n createPTable: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPTable(\n vm.importObjectViaJson(def) as PTableDef<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n\n createPTableV2: (def: QuickJSHandle) =>\n vm.exportSingleValue(\n host.createPTableV2(\n vm.importObjectViaJson(def) as PTableDefV2<\n PColumn<string | PColumnValues | DataInfo<string>>\n >,\n ),\n ),\n }),\n };\n}\n"],"mappings":";;;AAiDA,SAAgB,sBAA0C;AACxD,QAAO;EACL,aAAa,EAAE,MAAM,SAAiC;GACpD,MAAM,SAAS,KAAK,gBAAgB,IAAI,SAAS,WAAW;AAC5D,OAAI,CAAC,OACH,OAAM,IAAI,0BACR,YAAY,SAAS,WAAW,uEACjC;AAEH,UAAO;IACL,kBAAkB,UAAyB;;;MACzC,MAAM,QAAA,YAAA,EAAQ,IAAI,eAChB,OAAO,gBAAgB,GAAG,oBAAoB,MAAM,CAAgC,CACrF,CAAA;AACD,WAAK,aAAa,MAAM,MAAM,MAAM;MACpC,MAAM,QAAQ,MAAM,MAAM;MAE1B,MAAM,MAAM,GAAG,GAAG,WAAW;AAC7B,SAAG,GAAG,UAAU,MAAM,IAAI,CAAC,SAAS,MAAM,GAAG,GAAG,QAAQ,KAAK,OAAO,EAAE,CAAC;AACvE,SAAG,GACA,YAAY,eAAe;AAC1B,aAAM,OAAO;QACb,CACD,SAAS,OAAO,GAAG,GAAG,QAAQ,KAAK,SAAS,GAAG,CAAC;AACnD,aAAO;;;;;;;IAGT,cAAc,WACZ,GAAG,oBAAoB,OAAO,YAAY,GAAG,GAAG,UAAU,OAAO,CAAoB,CAAC;IAExF,kBAAkB,QAAuB,YACvC,GAAG,oBACD,OAAO,gBACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,aAAa,UACX,GAAG,oBACD,OAAO,WAAW,GAAG,oBAAoB,MAAM,CAAoB,CACpE;IAEH,eAAe,QAAuB,YACpC,GAAG,oBACD,OAAO,aACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,gBAAgB,QAAuB,YACrC,GAAG,oBACD,OAAO,cACL,GAAG,GAAG,UAAU,OAAO,EACvB,GAAG,oBAAoB,QAAQ,CAChC,CACF;IAEH,aAAa,SACX,GAAG,oBAAoB,OAAO,WAAW,GAAG,oBAAoB,KAAK,CAAa,CAAC;IAErF,eAAe,QACb,GAAG,oBAAoB,OAAO,aAAa,GAAG,oBAAoB,IAAI,CAAW,CAAC;IAEpF,WAAW,MAAqB,aAC9B,GAAG,kBACD,OAAO,SACL,GAAG,oBAAoB,KAAK,EAC5B,GAAG,oBAAoB,SAAS,CACjC,CACF;IAEH,kBAAkB,WAA0B,aAC1C,GAAG,kBACD,OAAO,gBACL,GAAG,oBAAoB,UAAU,EACjC,GAAG,oBAAoB,SAAS,CACjC,CACF;IACJ;;EAKH,eAAe,EAAE;EAEjB,SAAS,EAAE,MAAM,UAAkC;GACjD,eAAe,QACb,GAAG,kBACD,KAAK,aACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GAEH,eAAe,QACb,GAAG,kBACD,KAAK,aACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GAEH,iBAAiB,QACf,GAAG,kBACD,KAAK,eACH,GAAG,oBAAoB,IAAI,CAG5B,CACF;GACJ;EACF"}
@@ -12,7 +12,8 @@ let _milaboratories_pf_spec_driver = require("@milaboratories/pf-spec-driver");
12
12
  function createModelServiceRegistry(options) {
13
13
  return new _milaboratories_pl_model_common.ModelServiceRegistry(_milaboratories_pl_model_common.Services, {
14
14
  PFrameSpec: () => new _milaboratories_pf_spec_driver.SpecDriver({ logger: options.logger }),
15
- PFrame: null
15
+ PFrame: null,
16
+ Dialog: null
16
17
  });
17
18
  }
18
19
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"service_factories.cjs","names":["ModelServiceRegistry","Services","SpecDriver"],"sources":["../src/service_factories.ts"],"sourcesContent":["/**\n * Model service factories — add a factory for each new service here.\n *\n * Each entry maps a Services key to a factory function that creates the\n * model-side driver instance, or null if the service has no model-side driver\n * (e.g. node services whose driver is provided by the desktop app).\n */\n\nimport { ModelServiceRegistry, Services } from \"@milaboratories/pl-model-common\";\nimport { SpecDriver } from \"@milaboratories/pf-spec-driver\";\nimport { type MiLogger } from \"@milaboratories/ts-helpers\";\n\nexport type ModelServiceOptions = {\n logger: MiLogger;\n};\n\nexport function createModelServiceRegistry(options: ModelServiceOptions) {\n return new ModelServiceRegistry(Services, {\n PFrameSpec: () => new SpecDriver({ logger: options.logger }),\n PFrame: null,\n });\n}\n"],"mappings":";;;;;;;;;;;AAgBA,SAAgB,2BAA2B,SAA8B;AACvE,QAAO,IAAIA,gCAAAA,qBAAqBC,gCAAAA,UAAU;EACxC,kBAAkB,IAAIC,+BAAAA,WAAW,EAAE,QAAQ,QAAQ,QAAQ,CAAC;EAC5D,QAAQ;EACT,CAAC"}
1
+ {"version":3,"file":"service_factories.cjs","names":["ModelServiceRegistry","Services","SpecDriver"],"sources":["../src/service_factories.ts"],"sourcesContent":["/**\n * Model service factories — add a factory for each new service here.\n *\n * Each entry maps a Services key to a factory function that creates the\n * model-side driver instance, or null if the service has no model-side driver\n * (e.g. node services whose driver is provided by the desktop app).\n */\n\nimport { ModelServiceRegistry, Services } from \"@milaboratories/pl-model-common\";\nimport { SpecDriver } from \"@milaboratories/pf-spec-driver\";\nimport { type MiLogger } from \"@milaboratories/ts-helpers\";\n\nexport type ModelServiceOptions = {\n logger: MiLogger;\n};\n\nexport function createModelServiceRegistry(options: ModelServiceOptions) {\n return new ModelServiceRegistry(Services, {\n PFrameSpec: () => new SpecDriver({ logger: options.logger }),\n PFrame: null,\n Dialog: null,\n });\n}\n"],"mappings":";;;;;;;;;;;AAgBA,SAAgB,2BAA2B,SAA8B;AACvE,QAAO,IAAIA,gCAAAA,qBAAqBC,gCAAAA,UAAU;EACxC,kBAAkB,IAAIC,+BAAAA,WAAW,EAAE,QAAQ,QAAQ,QAAQ,CAAC;EAC5D,QAAQ;EACR,QAAQ;EACT,CAAC"}
@@ -11,7 +11,8 @@ import { SpecDriver } from "@milaboratories/pf-spec-driver";
11
11
  function createModelServiceRegistry(options) {
12
12
  return new ModelServiceRegistry(Services, {
13
13
  PFrameSpec: () => new SpecDriver({ logger: options.logger }),
14
- PFrame: null
14
+ PFrame: null,
15
+ Dialog: null
15
16
  });
16
17
  }
17
18
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"service_factories.js","names":[],"sources":["../src/service_factories.ts"],"sourcesContent":["/**\n * Model service factories — add a factory for each new service here.\n *\n * Each entry maps a Services key to a factory function that creates the\n * model-side driver instance, or null if the service has no model-side driver\n * (e.g. node services whose driver is provided by the desktop app).\n */\n\nimport { ModelServiceRegistry, Services } from \"@milaboratories/pl-model-common\";\nimport { SpecDriver } from \"@milaboratories/pf-spec-driver\";\nimport { type MiLogger } from \"@milaboratories/ts-helpers\";\n\nexport type ModelServiceOptions = {\n logger: MiLogger;\n};\n\nexport function createModelServiceRegistry(options: ModelServiceOptions) {\n return new ModelServiceRegistry(Services, {\n PFrameSpec: () => new SpecDriver({ logger: options.logger }),\n PFrame: null,\n });\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,2BAA2B,SAA8B;AACvE,QAAO,IAAI,qBAAqB,UAAU;EACxC,kBAAkB,IAAI,WAAW,EAAE,QAAQ,QAAQ,QAAQ,CAAC;EAC5D,QAAQ;EACT,CAAC"}
1
+ {"version":3,"file":"service_factories.js","names":[],"sources":["../src/service_factories.ts"],"sourcesContent":["/**\n * Model service factories — add a factory for each new service here.\n *\n * Each entry maps a Services key to a factory function that creates the\n * model-side driver instance, or null if the service has no model-side driver\n * (e.g. node services whose driver is provided by the desktop app).\n */\n\nimport { ModelServiceRegistry, Services } from \"@milaboratories/pl-model-common\";\nimport { SpecDriver } from \"@milaboratories/pf-spec-driver\";\nimport { type MiLogger } from \"@milaboratories/ts-helpers\";\n\nexport type ModelServiceOptions = {\n logger: MiLogger;\n};\n\nexport function createModelServiceRegistry(options: ModelServiceOptions) {\n return new ModelServiceRegistry(Services, {\n PFrameSpec: () => new SpecDriver({ logger: options.logger }),\n PFrame: null,\n Dialog: null,\n });\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,2BAA2B,SAA8B;AACvE,QAAO,IAAI,qBAAqB,UAAU;EACxC,kBAAkB,IAAI,WAAW,EAAE,QAAQ,QAAQ,QAAQ,CAAC;EAC5D,QAAQ;EACR,QAAQ;EACT,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-middle-layer",
3
- "version": "1.55.21",
3
+ "version": "1.55.22",
4
4
  "description": "Pl Middle Layer",
5
5
  "keywords": [],
6
6
  "license": "UNLICENSED",
@@ -30,24 +30,24 @@
30
30
  "utility-types": "^3.11.0",
31
31
  "yaml": "^2.8.0",
32
32
  "zod": "~3.25.76",
33
- "@milaboratories/pf-driver": "1.3.11",
33
+ "@milaboratories/pf-driver": "1.4.0",
34
34
  "@milaboratories/computable": "2.9.2",
35
- "@milaboratories/pf-spec-driver": "1.3.3",
36
- "@milaboratories/pl-client": "3.1.7",
37
- "@milaboratories/pl-errors": "1.3.6",
35
+ "@milaboratories/pl-client": "3.1.8",
36
+ "@milaboratories/pf-spec-driver": "1.3.4",
38
37
  "@milaboratories/helpers": "1.14.1",
39
- "@milaboratories/pl-deployments": "2.17.6",
38
+ "@milaboratories/pl-drivers": "1.12.19",
39
+ "@milaboratories/pl-errors": "1.3.7",
40
+ "@milaboratories/pl-deployments": "2.17.7",
40
41
  "@milaboratories/pl-http": "1.2.4",
41
- "@milaboratories/pl-drivers": "1.12.18",
42
- "@milaboratories/pl-model-backend": "1.2.14",
43
- "@milaboratories/pl-tree": "1.9.16",
44
- "@milaboratories/pl-model-common": "1.35.0",
45
- "@milaboratories/pl-model-middle-layer": "1.18.4",
42
+ "@milaboratories/pl-model-common": "1.36.0",
43
+ "@milaboratories/pl-model-middle-layer": "1.18.5",
44
+ "@milaboratories/pl-model-backend": "1.2.15",
46
45
  "@milaboratories/resolve-helper": "1.1.3",
47
46
  "@milaboratories/ts-helpers": "1.8.1",
48
- "@platforma-sdk/model": "1.67.0",
49
- "@platforma-sdk/block-tools": "2.7.13",
50
- "@platforma-sdk/workflow-tengo": "5.15.0"
47
+ "@platforma-sdk/block-tools": "2.7.14",
48
+ "@platforma-sdk/model": "1.68.0",
49
+ "@platforma-sdk/workflow-tengo": "5.15.0",
50
+ "@milaboratories/pl-tree": "1.9.17"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "~24.5.2",
@@ -130,6 +130,10 @@ export function getServiceInjectors(): ServiceInjectorMap {
130
130
  };
131
131
  },
132
132
 
133
+ // Dialog has no model-side surface — workflow scripts cannot open save dialogs.
134
+ // Declared as an empty injector to satisfy the exhaustive ServiceInjectorMap.
135
+ Dialog: () => ({}) as Record<never, VmMethod>,
136
+
133
137
  PFrame: ({ host, vm }: ServiceInjectorContext) => ({
134
138
  createPFrame: (def: QuickJSHandle) =>
135
139
  vm.exportSingleValue(
@@ -18,5 +18,6 @@ export function createModelServiceRegistry(options: ModelServiceOptions) {
18
18
  return new ModelServiceRegistry(Services, {
19
19
  PFrameSpec: () => new SpecDriver({ logger: options.logger }),
20
20
  PFrame: null,
21
+ Dialog: null,
21
22
  });
22
23
  }