@flighthq/power 0.5.1-next.973.788d3d7 → 0.6.0

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/README.md CHANGED
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/power`. The `@flight
13
13
  This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
14
14
 
15
15
  - [Flight project](https://github.com/flighthq/flight)
16
- - [Source for @flighthq/power@0.5.1-next.973.788d3d7](https://github.com/flighthq/flight/tree/788d3d7375cca3a0233cecedda1a4e031bd26dec/packages/power)
17
- - [License](https://github.com/flighthq/flight/blob/788d3d7375cca3a0233cecedda1a4e031bd26dec/LICENSE.md)
16
+ - [Source for @flighthq/power@0.6.0](https://github.com/flighthq/flight/tree/ead804bfaef3e691a2e6e43e9711ddd3fd8a84a2/packages/power)
17
+ - [License](https://github.com/flighthq/flight/blob/ead804bfaef3e691a2e6e43e9711ddd3fd8a84a2/LICENSE.md)
@@ -0,0 +1 @@
1
+ {"version":"7.0.2","root":[[85,86]],"packageJsons":["../../../node_modules/@standard-schema/spec/package.json","../../../node_modules/@testing-library/jest-dom/package.json","../../../node_modules/@types/aria-query/package.json","../../../node_modules/@types/chai/package.json","../../../node_modules/@types/deep-eql/package.json","../../../node_modules/@types/node/package.json","../../../node_modules/@vitest/coverage-v8/package.json","../../../node_modules/@vitest/expect/package.json","../../../node_modules/@vitest/mocker/package.json","../../../node_modules/@vitest/pretty-format/package.json","../../../node_modules/@vitest/runner/package.json","../../../node_modules/@vitest/snapshot/package.json","../../../node_modules/@vitest/spy/package.json","../../../node_modules/@vitest/utils/package.json","../../../node_modules/@webgpu/types/package.json","../../../node_modules/aria-query/package.json","../../../node_modules/assertion-error/package.json","../../../node_modules/chai/package.json","../../../node_modules/deep-eql/package.json","../../../node_modules/expect-type/package.json","../../../node_modules/jiti/package.json","../../../node_modules/jsdom/package.json","../../../node_modules/terser/package.json","../../../node_modules/tinybench/package.json","../../../node_modules/tinyrainbow/package.json","../../../node_modules/tsx/package.json","../../../node_modules/vite/package.json","../../../node_modules/vite/types/package.json","../../../node_modules/vitest/package.json","../../../node_modules/yaml/package.json","../../entity/package.json","../package.json","../../signals/package.json"],"missingPackageJsons":["../../../node_modules/@edge-runtime/vm/package.json","../../../node_modules/@opentelemetry/api/package.json","../../../node_modules/@standard-schema/spec/dist/package.json","../../../node_modules/@testing-library/jest-dom/node_modules/aria-query/package.json","../../../node_modules/@testing-library/jest-dom/node_modules/jest/package.json","../../../node_modules/@testing-library/jest-dom/types/package.json","../../../node_modules/@types/jest/package.json","../../../node_modules/@types/testing-library__jest-dom/package.json","../../../node_modules/@types/vitest/globals/package.json","../../../node_modules/@types/webgpu__types/package.json","../../../node_modules/@vitest/browser-playwright/package.json","../../../node_modules/@vitest/browser-preview/package.json","../../../node_modules/@vitest/browser-webdriverio/package.json","../../../node_modules/@vitest/coverage-istanbul/package.json","../../../node_modules/@vitest/expect/dist/package.json","../../../node_modules/@vitest/mocker/dist/package.json","../../../node_modules/@vitest/pretty-format/dist/package.json","../../../node_modules/@vitest/runner/dist/package.json","../../../node_modules/@vitest/runner/utils/package.json","../../../node_modules/@vitest/snapshot/dist/package.json","../../../node_modules/@vitest/spy/dist/package.json","../../../node_modules/@vitest/ui/package.json","../../../node_modules/@vitest/utils/diff/package.json","../../../node_modules/@vitest/utils/display/package.json","../../../node_modules/@vitest/utils/dist/package.json","../../../node_modules/@webgpu/types/dist/package.json","../../../node_modules/expect-type/dist/package.json","../../../node_modules/happy-dom/package.json","../../../node_modules/jest/package.json","../../../node_modules/less/package.json","../../../node_modules/lightningcss/package.json","../../../node_modules/msw/package.json","../../../node_modules/sass-embedded/package.json","../../../node_modules/sass/package.json","../../../node_modules/stylus/package.json","../../../node_modules/sugarss/package.json","../../../node_modules/tinybench/dist/package.json","../../../node_modules/tinyrainbow/dist/package.json","../../../node_modules/vite/dist/node/chunks/package.json","../../../node_modules/vite/dist/node/package.json","../../../node_modules/vite/dist/package.json","../../../node_modules/vite/module-runner/package.json","../../../node_modules/vitest/dist/chunks/package.json","../../../node_modules/vitest/dist/package.json","../../../node_modules/vitest/globals/package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts","lib.dom.asynciterable.d.ts","lib.webworker.importscripts.d.ts","lib.scripthost.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","lib.es2022.full.d.ts","../../entity/dist/types.d.ts","../../entity/dist/binding.d.ts","../../entity/dist/clone.d.ts","../../entity/dist/enableEntityRuntimeGuards.d.ts","../../entity/dist/entity.d.ts","../../entity/dist/entityUid.d.ts","../../entity/dist/explainEntityRuntimeWrite.d.ts","../../entity/dist/guards.d.ts","../../entity/dist/runtime.d.ts","../../entity/dist/contract.d.ts","../../signals/dist/types.d.ts","../../signals/dist/connection.d.ts","../../signals/dist/emitter.d.ts","../../signals/dist/internal.d.ts","../../signals/dist/safe.d.ts","../../signals/dist/scope.d.ts","../../signals/dist/signal.d.ts","../../signals/dist/slot.d.ts","../../signals/dist/throttle.d.ts","../../signals/dist/signalTypes.d.ts","../../signals/dist/contract.d.ts","../src/types.ts","../src/contract.power-types.ts","../../../node_modules/@types/aria-query/index.d.ts","../../../node_modules/@testing-library/jest-dom/types/matchers.d.ts","../../../node_modules/@testing-library/jest-dom/types/jest.d.ts","../../../node_modules/@testing-library/jest-dom/types/index.d.ts","../../../node_modules/@vitest/pretty-format/dist/index.d.ts","../../../node_modules/@vitest/utils/dist/display.d.ts","../../../node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/@vitest/utils/dist/timers.d.ts","../../../node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts","../../../node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/@vitest/runner/dist/tasks.d-DEYaIMIu.d.ts","../../../node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/traces.d.D2T_R8rx.d.ts","../../../node_modules/vite/types/hmrPayload.d.ts","../../../node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts","../../../node_modules/vite/types/customEvent.d.ts","../../../node_modules/vite/types/hot.d.ts","../../../node_modules/vite/dist/node/module-runner.d.ts","../../../node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts","../../../node_modules/@vitest/snapshot/dist/rawSnapshot.d-D_X3-62x.d.ts","../../../node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/config.d.A1h_Y6Jt.d.ts","../../../node_modules/vitest/dist/chunks/environment.d.CrsxCzP1.d.ts","../../../node_modules/vitest/dist/chunks/rpc.d.B_8sPU0w.d.ts","../../../node_modules/vitest/dist/chunks/worker.d.ZpHpO4yb.d.ts","../../../node_modules/vitest/dist/chunks/browser.d.BcoexmFG.d.ts","../../../node_modules/@vitest/spy/optional-types.d.ts","../../../node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/tinyrainbow/dist/index.d.ts","../../../node_modules/@standard-schema/spec/dist/index.d.ts","../../../node_modules/@types/deep-eql/index.d.ts","../../../node_modules/assertion-error/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/tinybench/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts","../../../node_modules/vitest/dist/chunks/global.d.DVsSRdQ5.d.ts","../../../node_modules/vitest/optional-runtime-types.d.ts","../../../node_modules/@vitest/mocker/dist/types.d-BjI5eAwu.d.ts","../../../node_modules/@vitest/mocker/dist/index.d-B41z0AuW.d.ts","../../../node_modules/@vitest/mocker/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/suite.d.udJtyAgw.d.ts","../../../node_modules/vitest/dist/chunks/evaluatedModules.d.BxJ5omdx.d.ts","../../../node_modules/vitest/dist/runners.d.ts","../../../node_modules/expect-type/dist/utils.d.ts","../../../node_modules/expect-type/dist/overloads.d.ts","../../../node_modules/expect-type/dist/branding.d.ts","../../../node_modules/expect-type/dist/messages.d.ts","../../../node_modules/expect-type/dist/index.d.ts","../../../node_modules/vitest/dist/index.d.ts","../../../node_modules/vitest/globals.d.ts","../../../node_modules/@webgpu/types/dist/index.d.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},"abad6dd56cc8caf095c165df8124d237","abad6dd56cc8caf095c165df8124d237",{"version":"2a9941db0809c9ad0e8837ed629b1dcc","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d051b93324f36bcc68d152a5ca0988cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},"0eb5b8b97bde45c8fde5cd07c33f6631","22772bc49abb63e5c9ba66ac5fb78a3d","daf7ba9e176366b3caf843bd266d163a","1cd6ad8dcb5625d764e0d55a82295469","76aca40ee07d543a14c24ba839109332","6f54f49ea7e96bdd7a9078f6c94e88fd","e9fd0536114fa9a746eacd5bc23969e5","add935c05420698ee2f670e9c7605d49","8202b77f954e4d5a21783859414fcc7c","524a08ff038d375ae8c86bf6481e17d2","9ff787c1324b2d4c07a342936293f47a","921f8c08344aa1539405420fcf952a20","21a1b4607cb18ab00b1254cb35a77c57","d80705d2e260aba56aa54c416f471fbd","a821537667385a2906566c8bc69a21ed","387cee0627331c24f641f87fc905bff1","859418c3a3f1b2e9500476d829fc6093","32e33ec68ba1aa1147aab680de3b7c90","67c59d76f923f64e85a373fb5a2bbb13","5676a2feb7e6b36f973571c4a4500566","dd2bc19aa76d59fe40aa6c6fb9a33365","7ef4fc8b5166fc742b557034c24ec46b",{"version":"c10612d03be9e0b62ff0ed7503a2a629","signature":"8f48837ce4532280fbb52db69ad43b24","impliedNodeFormat":1},{"version":"e430e900c51735f1ba7a928f8c20cd9b","signature":"468c7ce1a28c9cefb028d9537341fdd3","impliedNodeFormat":1},"56d080dfccb3c53a2d6c74c4f24252e3","75ebd62d9641cc8b34ba9b09be8283a9",{"version":"753f71e16f2994f332390bb1c997b0e3","affectsGlobalScope":true,"impliedNodeFormat":1},"8def0ea0e249f49397d74a4f5bdd45a5",{"version":"ed63d99e1e5c371dc120bef1b84057fc","impliedNodeFormat":99},{"version":"4d3fb552bfc7fb53c9195b2fafb512c0","impliedNodeFormat":99},{"version":"fbf7ba69043f86dc506ba28263e2e783","impliedNodeFormat":99},{"version":"a611eb6935df7737a77b34b01c631a4a","impliedNodeFormat":99},{"version":"6d08f6f1d0ee294c119d0e66f826331a","impliedNodeFormat":99},{"version":"d0abb8fa314728650d85450ff59db909","impliedNodeFormat":99},{"version":"abe007be89c2ad52c4d67fc2b0f6da6b","impliedNodeFormat":99},{"version":"ae1fe3925f3a2c8dfbb269ac2a50f5a6","impliedNodeFormat":99},{"version":"ee8ce731ff781ae7011350481a1af176","impliedNodeFormat":99},{"version":"08dcd98985ae16732a9be03d2b56aea6","impliedNodeFormat":99},{"version":"47f7401876f3c0a5b80bd01fbdfaed2b","impliedNodeFormat":99},"ab8e1ea59f16bc290a0451d09dc5a52e",{"version":"e9d43fb880595ac4ee66a56a364fd5fb","impliedNodeFormat":99},"24367c4ec7d778084b3a83bbdc5a23d4","edbf4843929ee5fe6521503f424e4464",{"version":"5e0eecd60ec8ccc15c22c507248ef1aa","impliedNodeFormat":99},{"version":"0221e2868d1f0d6df8321d945764aadb","impliedNodeFormat":99},{"version":"d2f6ad6f161f0a522886f64842c96a0e","impliedNodeFormat":99},{"version":"618ace1500cc84e42bc2e47c64f8c407","impliedNodeFormat":99},{"version":"9dd3c481cc870c4bf19e59d34f030a27","impliedNodeFormat":99},{"version":"b5c81396e966d59acab5a45f66b70866","impliedNodeFormat":99},{"version":"f94aa434ddb9e71f6e80395de85f6850","impliedNodeFormat":99},{"version":"3486e8f7f01b9874a793ddd451eb62a5","impliedNodeFormat":99},{"version":"cb0e7222aae349c2fb4f89b26efa81bd","impliedNodeFormat":99},{"version":"b9129d694ae6cf810850117dda49d045","impliedNodeFormat":99},{"version":"0d7bbad7f82c886c5f36730065aec119","impliedNodeFormat":99},{"version":"369460c2755240ac2d3d006f09adb5ca","impliedNodeFormat":99},{"version":"4509fca76e721cdf9edb2d028395a117","impliedNodeFormat":99},"548472bfd4ebe2f1c8f494b960a27836",{"version":"fa98b0905a86da0a95fa8fd3e974e038","impliedNodeFormat":99},{"version":"5ede871fecbb2b6f672a99d3c3c6bee7","affectsGlobalScope":true,"impliedNodeFormat":99},{"version":"2c51637edf65b89d39356deff680ed36","affectsGlobalScope":true,"impliedNodeFormat":99},{"version":"0bf0efdacfd4bfadb631a4376097e382","impliedNodeFormat":99},{"version":"bd01f3bcdc72c9256e5cd5093d132df3","impliedNodeFormat":99},{"version":"b01bdc9acbaf3eb24eef464959e8e627","impliedNodeFormat":99},{"version":"2a75a1a065e5d0439fa1514d9c89b0eb","impliedNodeFormat":99},{"version":"b9129d694ae6cf810850117dda49d045","impliedNodeFormat":99},{"version":"c01d22bc96b89eedc0ed1f11d8c270ab","impliedNodeFormat":99},{"version":"c15bc5b81c64386efb6f85fb596c4349","impliedNodeFormat":99},{"version":"5794a694c1f75a9cc38cb5e9c757224e","impliedNodeFormat":99},{"version":"4040d5640775a803b2ca1aa914f7a1d4","impliedNodeFormat":99},{"version":"5ed96746ee2e7eb084ad54f0e0e518bc","impliedNodeFormat":99},{"version":"eba7786b00a4e551c36bafa71bfb1876","impliedNodeFormat":99},"8d8a98bf45979ce5401d9ca4027940cd","7d98e95d38525423bbe0f05e0a508a41","96920299d013de56061cbc74a1d658b2","439adabdf29be1212ec7acc292679f21","3eb46d20ed056dcbfa5e75bad9014661",{"version":"b46aa1886055db890de9be52a97b301e","impliedNodeFormat":99},{"version":"23cbcf6109a45b21e5b22d5f36f59db4","affectsGlobalScope":true,"impliedNodeFormat":99},{"version":"851c83981c28a32944597c743f666820","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[89],[88],[87],[119,120],[92,98,116,117,118,121],[128],[128,129],[96,98,99],[96,98],[96],[91,96,107,108],[91,96,107],[115],[91,97],[91],[93],[91,92,93,94,95],[134,135],[134,135,136,137],[134,136],[134],[102],[102,103,104,105],[104],[100,123,124,126],[100,101,113,126],[91,98,100,101,109,126],[106],[91,100,101,109,122,125],[100,101,106,109,126],[100,123,124,125,126],[100,106,110,111,112,126],[91,96,98,100,101,106,109,110,111,112,113,114,116,122,123,124,125,126,127,130,131,132,133,138],[91,98,100,101,109,110,123,124,125,126,131],[139],[64],[64,65,66,67,68,69,70,71,72],[85],[73,84],[74],[74,75,76,77,78,79,80,81,82,83],[73]],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","rewriteRelativeImportExtensions":true,"rootDir":"../src","skipLibCheck":true,"strict":true,"sourceMap":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo.contract","useDefineForClassFields":true},"referencedMap":[[90,1],[89,2],[88,3],[121,4],[122,5],[129,6],[130,7],[100,8],[99,9],[123,8],[107,10],[109,11],[108,12],[116,13],[98,14],[92,15],[94,16],[96,17],[97,15],[136,18],[138,19],[137,20],[135,21],[103,22],[106,23],[104,22],[105,24],[125,25],[114,26],[110,27],[111,10],[132,28],[126,29],[112,30],[131,31],[113,32],[139,33],[133,34],[140,35],[65,36],[66,36],[73,37],[67,36],[68,36],[69,36],[70,36],[71,36],[72,36],[86,38],[85,39],[75,40],[84,41],[76,40],[78,40],[79,40],[80,40],[83,40],[81,40],[82,40],[74,42]],"latestChangedDtsFile":"./contract.power-types.d.ts"}
@@ -0,0 +1 @@
1
+ {"version":"7.0.2","root":[[87,90]],"packageJsons":["../../../node_modules/@standard-schema/spec/package.json","../../../node_modules/@testing-library/jest-dom/package.json","../../../node_modules/@types/aria-query/package.json","../../../node_modules/@types/chai/package.json","../../../node_modules/@types/deep-eql/package.json","../../../node_modules/@types/node/package.json","../../../node_modules/@vitest/coverage-v8/package.json","../../../node_modules/@vitest/expect/package.json","../../../node_modules/@vitest/mocker/package.json","../../../node_modules/@vitest/pretty-format/package.json","../../../node_modules/@vitest/runner/package.json","../../../node_modules/@vitest/snapshot/package.json","../../../node_modules/@vitest/spy/package.json","../../../node_modules/@vitest/utils/package.json","../../../node_modules/@webgpu/types/package.json","../../../node_modules/aria-query/package.json","../../../node_modules/assertion-error/package.json","../../../node_modules/chai/package.json","../../../node_modules/deep-eql/package.json","../../../node_modules/expect-type/package.json","../../../node_modules/jiti/package.json","../../../node_modules/jsdom/package.json","../../../node_modules/terser/package.json","../../../node_modules/tinybench/package.json","../../../node_modules/tinyrainbow/package.json","../../../node_modules/tsx/package.json","../../../node_modules/vite/package.json","../../../node_modules/vite/types/package.json","../../../node_modules/vitest/package.json","../../../node_modules/yaml/package.json","../../entity/package.json","../package.json","../../signals/package.json"],"missingPackageJsons":["../../../node_modules/@edge-runtime/vm/package.json","../../../node_modules/@opentelemetry/api/package.json","../../../node_modules/@standard-schema/spec/dist/package.json","../../../node_modules/@testing-library/jest-dom/node_modules/aria-query/package.json","../../../node_modules/@testing-library/jest-dom/node_modules/jest/package.json","../../../node_modules/@testing-library/jest-dom/types/package.json","../../../node_modules/@types/jest/package.json","../../../node_modules/@types/testing-library__jest-dom/package.json","../../../node_modules/@types/vitest/globals/package.json","../../../node_modules/@types/webgpu__types/package.json","../../../node_modules/@vitest/browser-playwright/package.json","../../../node_modules/@vitest/browser-preview/package.json","../../../node_modules/@vitest/browser-webdriverio/package.json","../../../node_modules/@vitest/coverage-istanbul/package.json","../../../node_modules/@vitest/expect/dist/package.json","../../../node_modules/@vitest/mocker/dist/package.json","../../../node_modules/@vitest/pretty-format/dist/package.json","../../../node_modules/@vitest/runner/dist/package.json","../../../node_modules/@vitest/runner/utils/package.json","../../../node_modules/@vitest/snapshot/dist/package.json","../../../node_modules/@vitest/spy/dist/package.json","../../../node_modules/@vitest/ui/package.json","../../../node_modules/@vitest/utils/diff/package.json","../../../node_modules/@vitest/utils/display/package.json","../../../node_modules/@vitest/utils/dist/package.json","../../../node_modules/@webgpu/types/dist/package.json","../../../node_modules/expect-type/dist/package.json","../../../node_modules/happy-dom/package.json","../../../node_modules/jest/package.json","../../../node_modules/less/package.json","../../../node_modules/lightningcss/package.json","../../../node_modules/msw/package.json","../../../node_modules/sass-embedded/package.json","../../../node_modules/sass/package.json","../../../node_modules/stylus/package.json","../../../node_modules/sugarss/package.json","../../../node_modules/tinybench/dist/package.json","../../../node_modules/tinyrainbow/dist/package.json","../../../node_modules/vite/dist/node/chunks/package.json","../../../node_modules/vite/dist/node/package.json","../../../node_modules/vite/dist/package.json","../../../node_modules/vite/module-runner/package.json","../../../node_modules/vitest/dist/chunks/package.json","../../../node_modules/vitest/dist/package.json","../../../node_modules/vitest/globals/package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts","lib.dom.asynciterable.d.ts","lib.webworker.importscripts.d.ts","lib.scripthost.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","lib.es2022.full.d.ts","../../entity/dist/types.d.ts","../../entity/dist/binding.d.ts","../../entity/dist/clone.d.ts","../../entity/dist/enableEntityRuntimeGuards.d.ts","../../entity/dist/entity.d.ts","../../entity/dist/entityUid.d.ts","../../entity/dist/explainEntityRuntimeWrite.d.ts","../../entity/dist/guards.d.ts","../../entity/dist/runtime.d.ts","../../entity/dist/contract.d.ts","../../signals/dist/types.d.ts","../../signals/dist/connection.d.ts","../../signals/dist/emitter.d.ts","../../signals/dist/internal.d.ts","../../signals/dist/safe.d.ts","../../signals/dist/scope.d.ts","../../signals/dist/signal.d.ts","../../signals/dist/slot.d.ts","../../signals/dist/throttle.d.ts","../../signals/dist/signalTypes.d.ts","../../signals/dist/contract.d.ts","./types.d.ts","./contract.power-types.d.ts","../src/power.ts","../src/contract.ts","../src/index.ts","../src/power.test.ts","../../../node_modules/@types/aria-query/index.d.ts","../../../node_modules/@testing-library/jest-dom/types/matchers.d.ts","../../../node_modules/@testing-library/jest-dom/types/jest.d.ts","../../../node_modules/@testing-library/jest-dom/types/index.d.ts","../../../node_modules/@vitest/pretty-format/dist/index.d.ts","../../../node_modules/@vitest/utils/dist/display.d.ts","../../../node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/@vitest/utils/dist/timers.d.ts","../../../node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts","../../../node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/@vitest/runner/dist/tasks.d-DEYaIMIu.d.ts","../../../node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/traces.d.D2T_R8rx.d.ts","../../../node_modules/vite/types/hmrPayload.d.ts","../../../node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts","../../../node_modules/vite/types/customEvent.d.ts","../../../node_modules/vite/types/hot.d.ts","../../../node_modules/vite/dist/node/module-runner.d.ts","../../../node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts","../../../node_modules/@vitest/snapshot/dist/rawSnapshot.d-D_X3-62x.d.ts","../../../node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/config.d.A1h_Y6Jt.d.ts","../../../node_modules/vitest/dist/chunks/environment.d.CrsxCzP1.d.ts","../../../node_modules/vitest/dist/chunks/rpc.d.B_8sPU0w.d.ts","../../../node_modules/vitest/dist/chunks/worker.d.ZpHpO4yb.d.ts","../../../node_modules/vitest/dist/chunks/browser.d.BcoexmFG.d.ts","../../../node_modules/@vitest/spy/optional-types.d.ts","../../../node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/tinyrainbow/dist/index.d.ts","../../../node_modules/@standard-schema/spec/dist/index.d.ts","../../../node_modules/@types/deep-eql/index.d.ts","../../../node_modules/assertion-error/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/tinybench/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts","../../../node_modules/vitest/dist/chunks/global.d.DVsSRdQ5.d.ts","../../../node_modules/vitest/optional-runtime-types.d.ts","../../../node_modules/@vitest/mocker/dist/types.d-BjI5eAwu.d.ts","../../../node_modules/@vitest/mocker/dist/index.d-B41z0AuW.d.ts","../../../node_modules/@vitest/mocker/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/suite.d.udJtyAgw.d.ts","../../../node_modules/vitest/dist/chunks/evaluatedModules.d.BxJ5omdx.d.ts","../../../node_modules/vitest/dist/runners.d.ts","../../../node_modules/expect-type/dist/utils.d.ts","../../../node_modules/expect-type/dist/overloads.d.ts","../../../node_modules/expect-type/dist/branding.d.ts","../../../node_modules/expect-type/dist/messages.d.ts","../../../node_modules/expect-type/dist/index.d.ts","../../../node_modules/vitest/dist/index.d.ts","../../../node_modules/vitest/globals.d.ts","../../../node_modules/@webgpu/types/dist/index.d.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},"abad6dd56cc8caf095c165df8124d237","abad6dd56cc8caf095c165df8124d237",{"version":"2a9941db0809c9ad0e8837ed629b1dcc","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d051b93324f36bcc68d152a5ca0988cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},"0eb5b8b97bde45c8fde5cd07c33f6631","22772bc49abb63e5c9ba66ac5fb78a3d","daf7ba9e176366b3caf843bd266d163a","1cd6ad8dcb5625d764e0d55a82295469","76aca40ee07d543a14c24ba839109332","6f54f49ea7e96bdd7a9078f6c94e88fd","e9fd0536114fa9a746eacd5bc23969e5","add935c05420698ee2f670e9c7605d49","8202b77f954e4d5a21783859414fcc7c","524a08ff038d375ae8c86bf6481e17d2","9ff787c1324b2d4c07a342936293f47a","921f8c08344aa1539405420fcf952a20","21a1b4607cb18ab00b1254cb35a77c57","d80705d2e260aba56aa54c416f471fbd","a821537667385a2906566c8bc69a21ed","387cee0627331c24f641f87fc905bff1","859418c3a3f1b2e9500476d829fc6093","32e33ec68ba1aa1147aab680de3b7c90","67c59d76f923f64e85a373fb5a2bbb13","5676a2feb7e6b36f973571c4a4500566","dd2bc19aa76d59fe40aa6c6fb9a33365","7ef4fc8b5166fc742b557034c24ec46b","5a4b27f31d8ecc57a6211f075533beca","8d47006ef909cb5fc3b745a184a31fe2",{"version":"d84d03b02ce064d947fb69e01413379e","signature":"5a1a984f3318028471757217de58a500","impliedNodeFormat":1},"f4f822d199893e14fcea970d56ca164b",{"version":"da4a6f998af425d3b59fb90ae76859ce","signature":"ec4a624b5a1490c3e3e8c2d94fa944bb","impliedNodeFormat":1},{"version":"4de6f7d4e3acbd4372f7dc9efc2ced16","signature":"abe7d9981d6018efb6b2b794f40a1607","impliedNodeFormat":1},"56d080dfccb3c53a2d6c74c4f24252e3","75ebd62d9641cc8b34ba9b09be8283a9",{"version":"753f71e16f2994f332390bb1c997b0e3","affectsGlobalScope":true,"impliedNodeFormat":1},"8def0ea0e249f49397d74a4f5bdd45a5",{"version":"ed63d99e1e5c371dc120bef1b84057fc","impliedNodeFormat":99},{"version":"4d3fb552bfc7fb53c9195b2fafb512c0","impliedNodeFormat":99},{"version":"fbf7ba69043f86dc506ba28263e2e783","impliedNodeFormat":99},{"version":"a611eb6935df7737a77b34b01c631a4a","impliedNodeFormat":99},{"version":"6d08f6f1d0ee294c119d0e66f826331a","impliedNodeFormat":99},{"version":"d0abb8fa314728650d85450ff59db909","impliedNodeFormat":99},{"version":"abe007be89c2ad52c4d67fc2b0f6da6b","impliedNodeFormat":99},{"version":"ae1fe3925f3a2c8dfbb269ac2a50f5a6","impliedNodeFormat":99},{"version":"ee8ce731ff781ae7011350481a1af176","impliedNodeFormat":99},{"version":"08dcd98985ae16732a9be03d2b56aea6","impliedNodeFormat":99},{"version":"47f7401876f3c0a5b80bd01fbdfaed2b","impliedNodeFormat":99},"ab8e1ea59f16bc290a0451d09dc5a52e",{"version":"e9d43fb880595ac4ee66a56a364fd5fb","impliedNodeFormat":99},"24367c4ec7d778084b3a83bbdc5a23d4","edbf4843929ee5fe6521503f424e4464",{"version":"5e0eecd60ec8ccc15c22c507248ef1aa","impliedNodeFormat":99},{"version":"0221e2868d1f0d6df8321d945764aadb","impliedNodeFormat":99},{"version":"d2f6ad6f161f0a522886f64842c96a0e","impliedNodeFormat":99},{"version":"618ace1500cc84e42bc2e47c64f8c407","impliedNodeFormat":99},{"version":"9dd3c481cc870c4bf19e59d34f030a27","impliedNodeFormat":99},{"version":"b5c81396e966d59acab5a45f66b70866","impliedNodeFormat":99},{"version":"f94aa434ddb9e71f6e80395de85f6850","impliedNodeFormat":99},{"version":"3486e8f7f01b9874a793ddd451eb62a5","impliedNodeFormat":99},{"version":"cb0e7222aae349c2fb4f89b26efa81bd","impliedNodeFormat":99},{"version":"b9129d694ae6cf810850117dda49d045","impliedNodeFormat":99},{"version":"0d7bbad7f82c886c5f36730065aec119","impliedNodeFormat":99},{"version":"369460c2755240ac2d3d006f09adb5ca","impliedNodeFormat":99},{"version":"4509fca76e721cdf9edb2d028395a117","impliedNodeFormat":99},"548472bfd4ebe2f1c8f494b960a27836",{"version":"fa98b0905a86da0a95fa8fd3e974e038","impliedNodeFormat":99},{"version":"5ede871fecbb2b6f672a99d3c3c6bee7","affectsGlobalScope":true,"impliedNodeFormat":99},{"version":"2c51637edf65b89d39356deff680ed36","affectsGlobalScope":true,"impliedNodeFormat":99},{"version":"0bf0efdacfd4bfadb631a4376097e382","impliedNodeFormat":99},{"version":"bd01f3bcdc72c9256e5cd5093d132df3","impliedNodeFormat":99},{"version":"b01bdc9acbaf3eb24eef464959e8e627","impliedNodeFormat":99},{"version":"2a75a1a065e5d0439fa1514d9c89b0eb","impliedNodeFormat":99},{"version":"b9129d694ae6cf810850117dda49d045","impliedNodeFormat":99},{"version":"c01d22bc96b89eedc0ed1f11d8c270ab","impliedNodeFormat":99},{"version":"c15bc5b81c64386efb6f85fb596c4349","impliedNodeFormat":99},{"version":"5794a694c1f75a9cc38cb5e9c757224e","impliedNodeFormat":99},{"version":"4040d5640775a803b2ca1aa914f7a1d4","impliedNodeFormat":99},{"version":"5ed96746ee2e7eb084ad54f0e0e518bc","impliedNodeFormat":99},{"version":"eba7786b00a4e551c36bafa71bfb1876","impliedNodeFormat":99},"8d8a98bf45979ce5401d9ca4027940cd","7d98e95d38525423bbe0f05e0a508a41","96920299d013de56061cbc74a1d658b2","439adabdf29be1212ec7acc292679f21","3eb46d20ed056dcbfa5e75bad9014661",{"version":"b46aa1886055db890de9be52a97b301e","impliedNodeFormat":99},{"version":"23cbcf6109a45b21e5b22d5f36f59db4","affectsGlobalScope":true,"impliedNodeFormat":99},{"version":"851c83981c28a32944597c743f666820","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[93],[92],[91],[123,124],[96,102,120,121,122,125],[132],[132,133],[100,102,103],[100,102],[100],[95,100,111,112],[95,100,111],[119],[95,101],[95],[97],[95,96,97,98,99],[138,139],[138,139,140,141],[138,140],[138],[106],[106,107,108,109],[108],[104,127,128,130],[104,105,117,130],[95,102,104,105,113,130],[110],[95,104,105,113,126,129],[104,105,110,113,130],[104,127,128,129,130],[104,110,114,115,116,130],[95,100,102,104,105,110,113,114,115,116,117,118,120,126,127,128,129,130,131,134,135,136,137,142],[95,102,104,105,113,114,127,128,129,130,135],[143],[64],[64,65,66,67,68,69,70,71,72],[85],[73,84],[86,87],[88],[73,84,85,87],[73,84,85],[74],[74,75,76,77,78,79,80,81,82,83],[73]],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","rewriteRelativeImportExtensions":true,"rootDir":"../src","skipLibCheck":true,"strict":true,"sourceMap":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo.runtime","useDefineForClassFields":true},"referencedMap":[[94,1],[93,2],[92,3],[125,4],[126,5],[133,6],[134,7],[104,8],[103,9],[127,8],[111,10],[113,11],[112,12],[120,13],[102,14],[96,15],[98,16],[100,17],[101,15],[140,18],[142,19],[141,20],[139,21],[107,22],[110,23],[108,22],[109,24],[129,25],[118,26],[114,27],[115,10],[136,28],[130,29],[116,30],[135,31],[117,32],[143,33],[137,34],[144,35],[65,36],[66,36],[73,37],[67,36],[68,36],[69,36],[70,36],[71,36],[72,36],[86,38],[85,39],[88,40],[89,41],[90,42],[87,43],[75,44],[84,45],[76,44],[78,44],[79,44],[80,44],[83,44],[81,44],[82,44],[74,46]],"latestChangedDtsFile":"./power.test.d.ts"}
@@ -1,3 +1,4 @@
1
- export * from './power';
2
- export { initializePower } from './power';
1
+ export * from './contract.power-types.ts';
2
+ export * from './power.ts';
3
+ export { initializePower } from './power.ts';
3
4
  //# sourceMappingURL=contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
package/dist/contract.js CHANGED
@@ -1,3 +1,4 @@
1
- export * from './power';
2
- export { initializePower } from './power';
1
+ export * from './contract.power-types.js';
2
+ export * from './power.js';
3
+ export { initializePower } from './power.js';
3
4
  //# sourceMappingURL=contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type { ElectronPowerCapabilities, HostPowerBatteryHealthCapability, HostPowerCapabilities, HostPowerChangeCapability, HostPowerIdleCapability, HostPowerKeepAwakeCapability, HostPowerSessionLockCapability, HostPowerStatusCapability, HostPowerSuspensionCapability, HostPowerThermalCapability, Power, PowerBatteryHealth, PowerBatteryHealthState, PowerIdleState, PowerKeepAwakeAcquireReason, PowerKeepAwakeAcquireResult, PowerKeepAwakeMode, PowerKeepAwakeReleaseReason, PowerKeepAwakeReleaseResult, PowerStatus, PowerThermalState, WebPowerCapabilities, WebPowerReadingCapabilities, } from './types.ts';
2
+ //# sourceMappingURL=contract.power-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.power-types.d.ts","sourceRoot":"","sources":["../src/contract.power-types.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,yBAAyB,EACzB,gCAAgC,EAChC,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,KAAK,EACL,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,2BAA2B,EAC3B,2BAA2B,EAC3B,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=contract.power-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.power-types.js","sourceRoot":"","sources":["../src/contract.power-types.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export { acquirePowerKeepAwake, attachPower, createPower, destroyPowerKeepAwake, detachPower, disposePower, enablePowerSignals, getPowerBatteryHealth, getPowerIdlePollingIntervalMs, getPowerStatus, getPowerSystemIdleState, getPowerSystemIdleTime, getPowerThermalState, isPowerKeepAwakeActive, makePowerBatteryHealth, makePowerStatus, releasePowerKeepAwake, setPowerIdlePollingIntervalMs, } from './contract';
1
+ export { acquirePowerKeepAwake, attachPower, createPower, destroyPowerKeepAwake, detachPower, disposePower, enablePowerSignals, getPowerBatteryHealth, getPowerIdlePollingIntervalMs, getPowerStatus, getPowerSystemIdleState, getPowerSystemIdleTime, getPowerThermalState, isPowerKeepAwakeActive, makePowerBatteryHealth, makePowerStatus, releasePowerKeepAwake, setPowerIdlePollingIntervalMs, } from './contract.ts';
2
+ export type { ElectronPowerCapabilities, HostPowerBatteryHealthCapability, HostPowerCapabilities, HostPowerChangeCapability, HostPowerIdleCapability, HostPowerKeepAwakeCapability, HostPowerSessionLockCapability, HostPowerStatusCapability, HostPowerSuspensionCapability, HostPowerThermalCapability, Power, PowerBatteryHealth, PowerBatteryHealthState, PowerIdleState, PowerKeepAwakeAcquireReason, PowerKeepAwakeAcquireResult, PowerKeepAwakeMode, PowerKeepAwakeReleaseReason, PowerKeepAwakeReleaseResult, PowerStatus, PowerThermalState, WebPowerCapabilities, WebPowerReadingCapabilities, } from './contract.ts';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,6BAA6B,EAC7B,cAAc,EACd,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,6BAA6B,EAC7B,cAAc,EACd,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,yBAAyB,EACzB,gCAAgC,EAChC,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,KAAK,EACL,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,2BAA2B,EAC3B,2BAA2B,EAC3B,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { acquirePowerKeepAwake, attachPower, createPower, destroyPowerKeepAwake, detachPower, disposePower, enablePowerSignals, getPowerBatteryHealth, getPowerIdlePollingIntervalMs, getPowerStatus, getPowerSystemIdleState, getPowerSystemIdleTime, getPowerThermalState, isPowerKeepAwakeActive, makePowerBatteryHealth, makePowerStatus, releasePowerKeepAwake, setPowerIdlePollingIntervalMs, } from './contract';
1
+ export { acquirePowerKeepAwake, attachPower, createPower, destroyPowerKeepAwake, detachPower, disposePower, enablePowerSignals, getPowerBatteryHealth, getPowerIdlePollingIntervalMs, getPowerStatus, getPowerSystemIdleState, getPowerSystemIdleTime, getPowerThermalState, isPowerKeepAwakeActive, makePowerBatteryHealth, makePowerStatus, releasePowerKeepAwake, setPowerIdlePollingIntervalMs, } from './contract.js';
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,6BAA6B,EAC7B,cAAc,EACd,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,6BAA6B,EAC7B,cAAc,EACd,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,eAAe,CAAC"}
package/dist/power.d.ts CHANGED
@@ -1,27 +1,22 @@
1
- import type { EntityConstruction, HasPowerIdle, HasPowerKeepAwake, HasPowerStatus, HasPowerThermal, Power, PowerAttachHost, PowerBatteryHealth, PowerIdleState, PowerKeepAwakeAcquireResult, PowerKeepAwakeMode, PowerKeepAwakeReleaseResult, PowerStatus, PowerThermalState } from '@flighthq/types/contract';
2
- export declare function acquirePowerKeepAwake(host: HasPowerKeepAwake, mode?: PowerKeepAwakeMode): Promise<PowerKeepAwakeAcquireResult>;
3
- export declare function attachPower(host: PowerAttachHost, power: Power, idleThresholdSeconds?: number): void;
1
+ import type { EntityConstruction } from '@flighthq/entity/contract';
2
+ import type { HostPowerBatteryHealthCapability, HostPowerChangeCapability, HostPowerIdleCapability, HostPowerKeepAwakeCapability, HostPowerSessionLockCapability, HostPowerStatusCapability, HostPowerSuspensionCapability, HostPowerThermalCapability, Power, PowerBatteryHealth, PowerIdleState, PowerKeepAwakeAcquireResult, PowerKeepAwakeMode, PowerKeepAwakeReleaseResult, PowerStatus, PowerThermalState } from './types.ts';
3
+ export declare function acquirePowerKeepAwake(hostPowerKeepAwake: Readonly<HostPowerKeepAwakeCapability>, mode?: PowerKeepAwakeMode): Promise<PowerKeepAwakeAcquireResult>;
4
+ export declare function attachPower(hostPowerStatus: Readonly<HostPowerStatusCapability> | undefined, hostPowerChange: Readonly<HostPowerChangeCapability> | undefined, hostPowerSessionLock: Readonly<HostPowerSessionLockCapability> | undefined, hostPowerSuspension: Readonly<HostPowerSuspensionCapability> | undefined, hostPowerThermal: Readonly<HostPowerThermalCapability> | undefined, hostPowerIdle: Readonly<HostPowerIdleCapability> | undefined, power: Power, idleThresholdSeconds?: number): void;
4
5
  export declare function createPower(): Power;
5
- export declare function destroyPowerKeepAwake(...hosts: readonly HasPowerKeepAwake[]): void;
6
+ export declare function destroyPowerKeepAwake(...hostPowerKeepAwake: readonly Readonly<HostPowerKeepAwakeCapability>[]): void;
6
7
  export declare function detachPower(power: Power): void;
7
8
  export declare function disposePower(power: Power): void;
8
9
  export declare function enablePowerSignals(power: Power): void;
9
- export declare function getPowerBatteryHealth(host: {
10
- readonly power: {
11
- readonly batteryHealth: {
12
- getBatteryHealth(out: PowerBatteryHealth): PowerBatteryHealth;
13
- };
14
- };
15
- }, out: PowerBatteryHealth): PowerBatteryHealth;
10
+ export declare function getPowerBatteryHealth(hostPowerBatteryHealth: Readonly<HostPowerBatteryHealthCapability>, out: PowerBatteryHealth): PowerBatteryHealth;
16
11
  export declare function getPowerIdlePollingIntervalMs(): number;
17
- export declare function getPowerStatus(host: HasPowerStatus, out: PowerStatus): PowerStatus;
18
- export declare function getPowerSystemIdleState(host: HasPowerIdle, thresholdSeconds: number): PowerIdleState;
19
- export declare function getPowerSystemIdleTime(host: HasPowerIdle): number;
20
- export declare function getPowerThermalState(host: HasPowerThermal): PowerThermalState;
12
+ export declare function getPowerStatus(hostPowerStatus: Readonly<HostPowerStatusCapability>, out: PowerStatus): PowerStatus;
13
+ export declare function getPowerSystemIdleState(hostPowerIdle: Readonly<HostPowerIdleCapability>, thresholdSeconds: number): PowerIdleState;
14
+ export declare function getPowerSystemIdleTime(hostPowerIdle: Readonly<HostPowerIdleCapability>): number;
15
+ export declare function getPowerThermalState(hostPowerThermal: Readonly<HostPowerThermalCapability>): PowerThermalState;
21
16
  export declare function initializePower(out: EntityConstruction<Power>): void;
22
- export declare function isPowerKeepAwakeActive(host: HasPowerKeepAwake): boolean;
17
+ export declare function isPowerKeepAwakeActive(hostPowerKeepAwake: Readonly<HostPowerKeepAwakeCapability>): boolean;
23
18
  export declare function makePowerBatteryHealth(): PowerBatteryHealth;
24
19
  export declare function makePowerStatus(): PowerStatus;
25
- export declare function releasePowerKeepAwake(host: HasPowerKeepAwake): Promise<PowerKeepAwakeReleaseResult>;
20
+ export declare function releasePowerKeepAwake(hostPowerKeepAwake: Readonly<HostPowerKeepAwakeCapability>): Promise<PowerKeepAwakeReleaseResult>;
26
21
  export declare function setPowerIdlePollingIntervalMs(intervalMs: number): void;
27
22
  //# sourceMappingURL=power.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"power.d.ts","sourceRoot":"","sources":["../src/power.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,2BAA2B,EAE3B,kBAAkB,EAClB,2BAA2B,EAC3B,WAAW,EACX,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AASlC,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,iBAAiB,EACvB,IAAI,GAAE,kBAA0C,GAC/C,OAAO,CAAC,2BAA2B,CAAC,CAEtC;AAQD,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,oBAAoB,SAAK,GAAG,IAAI,CA+DhG;AAED,wBAAgB,WAAW,IAAI,KAAK,CAInC;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CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAW/C;AAGD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAUrD;AAED,wBAAgB,qBAAqB,CACnC,sBAAsB,EAAE,QAAQ,CAAC,gCAAgC,CAAC,EAClE,GAAG,EAAE,kBAAkB,GACtB,kBAAkB,CAEpB;AAED,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD;AAED,wBAAgB,cAAc,CAAC,eAAe,EAAE,QAAQ,CAAC,yBAAyB,CAAC,EAAE,GAAG,EAAE,WAAW,GAAG,WAAW,CAElH;AAED,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,QAAQ,CAAC,uBAAuB,CAAC,EAChD,gBAAgB,EAAE,MAAM,GACvB,cAAc,CAEhB;AAED,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,QAAQ,CAAC,uBAAuB,CAAC,GAAG,MAAM,CAE/F;AAED,wBAAgB,oBAAoB,CAAC,gBAAgB,EAAE,QAAQ,CAAC,0BAA0B,CAAC,GAAG,iBAAiB,CAE9G;AAID,wBAAgB,eAAe,CAAC,GAAG,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,IAAI,CAUpE;AAED,wBAAgB,sBAAsB,CAAC,kBAAkB,EAAE,QAAQ,CAAC,4BAA4B,CAAC,GAAG,OAAO,CAE1G;AAKD,wBAAgB,sBAAsB,IAAI,kBAAkB,CAQ3D;AAID,wBAAgB,eAAe,IAAI,WAAW,CAW7C;AAID,wBAAgB,qBAAqB,CACnC,kBAAkB,EAAE,QAAQ,CAAC,4BAA4B,CAAC,GACzD,OAAO,CAAC,2BAA2B,CAAC,CAEtC;AAED,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAEtE"}
package/dist/power.js CHANGED
@@ -1,4 +1,4 @@
1
- import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
1
+ import { allocateEntity } from '@flighthq/entity/contract';
2
2
  import { clearSignal, createSignal, emitSignal, hasSignalSlots } from '@flighthq/signals/contract';
3
3
  // AN ATTEMPT IS NEVER AN OUTCOME. The previous seam recorded that an operation had been STARTED and
4
4
  // reported that as availability: a denied Wake Lock request was observed as 'available' because the
@@ -6,8 +6,8 @@ import { clearSignal, createSignal, emitSignal, hasSignalSlots } from '@flighthq
6
6
  // after the underlying operation has actually completed.
7
7
  // Acquires a keep-awake lock, resolving only once the provider has really taken it. `ok` means the
8
8
  // provider acquired its mechanism — not that the hardware can never sleep for other policy reasons.
9
- export function acquirePowerKeepAwake(host, mode = 'PreventDisplaySleep') {
10
- return host.power.keepAwake.acquire(mode);
9
+ export function acquirePowerKeepAwake(hostPowerKeepAwake, mode = 'PreventDisplaySleep') {
10
+ return hostPowerKeepAwake.acquire(mode);
11
11
  }
12
12
  // Starts delivering the host's power events into `power`'s signals. Re-attaching detaches first, so one
13
13
  // entity never holds two live subscriptions.
@@ -15,11 +15,11 @@ export function acquirePowerKeepAwake(host, mode = 'PreventDisplaySleep') {
15
15
  // Each unsubscribe is ORIGIN-PINNED: it is kept beside the entity that opened it, so detaching one
16
16
  // entity ends exactly its own subscriptions. Teardown ATTEMPTS ALL of them even if one throws, because
17
17
  // abandoning the rest would leak every subscription after the first failure.
18
- export function attachPower(host, power, idleThresholdSeconds = 60) {
18
+ export function attachPower(hostPowerStatus, hostPowerChange, hostPowerSessionLock, hostPowerSuspension, hostPowerThermal, hostPowerIdle, power, idleThresholdSeconds = 60) {
19
19
  detachPower(power);
20
20
  const teardowns = [];
21
- const status = host.power.status;
22
- const change = host.power.change;
21
+ const status = hostPowerStatus;
22
+ const change = hostPowerChange;
23
23
  if (change !== undefined) {
24
24
  let wasCharging = status !== undefined ? status.getStatus(makePowerStatus()).isCharging : false;
25
25
  teardowns.push(change.subscribe(() => {
@@ -32,21 +32,21 @@ export function attachPower(host, power, idleThresholdSeconds = 60) {
32
32
  wasCharging = current.isCharging;
33
33
  const transition = current.isCharging ? power.onCharging : power.onDischarging;
34
34
  if (transition !== null)
35
- emitSignal(transition);
35
+ emitSignal(transition, undefined);
36
36
  }
37
37
  }));
38
38
  }
39
- const sessionLock = host.power.sessionLock;
39
+ const sessionLock = hostPowerSessionLock;
40
40
  if (sessionLock !== undefined) {
41
41
  teardowns.push(sessionLock.subscribeLock(() => emitSignalWhenPresent(power.onLockScreen)));
42
42
  teardowns.push(sessionLock.subscribeUnlock(() => emitSignalWhenPresent(power.onUnlockScreen)));
43
43
  }
44
- const suspension = host.power.suspension;
44
+ const suspension = hostPowerSuspension;
45
45
  if (suspension !== undefined) {
46
46
  teardowns.push(suspension.subscribeSuspend(() => emitSignalWhenPresent(power.onSuspend)));
47
47
  teardowns.push(suspension.subscribeResume(() => emitSignalWhenPresent(power.onResume)));
48
48
  }
49
- const thermal = host.power.thermal;
49
+ const thermal = hostPowerThermal;
50
50
  if (thermal !== undefined) {
51
51
  teardowns.push(thermal.subscribeThermalStateChange((state) => {
52
52
  if (power.onThermalStateChange !== null)
@@ -56,7 +56,7 @@ export function attachPower(host, power, idleThresholdSeconds = 60) {
56
56
  // Idle is polled because no host pushes idle transitions. The interval exists only when the host
57
57
  // actually offers the idle slot: a host that would answer a constant 'Unknown' omits the slot, so
58
58
  // nothing polls a value that provably cannot change.
59
- const idle = host.power.idle;
59
+ const idle = hostPowerIdle;
60
60
  if (idle !== undefined) {
61
61
  let lastIdleState = idle.getIdleState(idleThresholdSeconds);
62
62
  const idleIntervalId = setInterval(() => {
@@ -66,7 +66,7 @@ export function attachPower(host, power, idleThresholdSeconds = 60) {
66
66
  const current = idle.getIdleState(idleThresholdSeconds);
67
67
  if (current !== lastIdleState) {
68
68
  lastIdleState = current;
69
- emitSignal(idleSignal);
69
+ emitSignal(idleSignal, undefined);
70
70
  }
71
71
  }, _idlePollingIntervalMs);
72
72
  teardowns.push(() => clearInterval(idleIntervalId));
@@ -76,7 +76,7 @@ export function attachPower(host, power, idleThresholdSeconds = 60) {
76
76
  export function createPower() {
77
77
  const out = allocateEntity();
78
78
  initializePower(out);
79
- return finishEntity(out);
79
+ return out;
80
80
  }
81
81
  // Stops delivery without discarding the entity. Runs every teardown this entity opened, ATTEMPTING ALL
82
82
  // of them: one throwing unsubscribe must not strand the rest. Does not touch the provider — that is
@@ -88,10 +88,9 @@ export function createPower() {
88
88
  // Attempt-all: every obligation is tried even after one throws, and the first error is rethrown once the
89
89
  // siblings have run. A provider whose destroy threw is RETAINED, so a later call retries only the
90
90
  // failures; the ones that succeeded are forgotten and never destroyed twice.
91
- export function destroyPowerKeepAwake(...hosts) {
91
+ export function destroyPowerKeepAwake(...hostPowerKeepAwake) {
92
92
  const pending = new Set();
93
- for (const host of hosts) {
94
- const provider = host.power.keepAwake;
93
+ for (const provider of hostPowerKeepAwake) {
95
94
  if (!_destroyedKeepAwake.has(provider))
96
95
  pending.add(provider);
97
96
  }
@@ -161,23 +160,23 @@ export function enablePowerSignals(power) {
161
160
  power.onThermalStateChange ??= createSignal();
162
161
  power.onUnlockScreen ??= createSignal();
163
162
  }
164
- export function getPowerBatteryHealth(host, out) {
165
- return host.power.batteryHealth.getBatteryHealth(out);
163
+ export function getPowerBatteryHealth(hostPowerBatteryHealth, out) {
164
+ return hostPowerBatteryHealth.getBatteryHealth(out);
166
165
  }
167
166
  export function getPowerIdlePollingIntervalMs() {
168
167
  return _idlePollingIntervalMs;
169
168
  }
170
- export function getPowerStatus(host, out) {
171
- return host.power.status.getStatus(out);
169
+ export function getPowerStatus(hostPowerStatus, out) {
170
+ return hostPowerStatus.getStatus(out);
172
171
  }
173
- export function getPowerSystemIdleState(host, thresholdSeconds) {
174
- return host.power.idle.getIdleState(thresholdSeconds);
172
+ export function getPowerSystemIdleState(hostPowerIdle, thresholdSeconds) {
173
+ return hostPowerIdle.getIdleState(thresholdSeconds);
175
174
  }
176
- export function getPowerSystemIdleTime(host) {
177
- return host.power.idle.getIdleTimeSeconds();
175
+ export function getPowerSystemIdleTime(hostPowerIdle) {
176
+ return hostPowerIdle.getIdleTimeSeconds();
178
177
  }
179
- export function getPowerThermalState(host) {
180
- return host.power.thermal.getThermalState();
178
+ export function getPowerThermalState(hostPowerThermal) {
179
+ return hostPowerThermal.getThermalState();
181
180
  }
182
181
  // Allocates a Power event entity with its signals left null. Call enablePowerSignals to allocate the
183
182
  // signals to connect to, and attachPower to start delivering host events into them.
@@ -192,8 +191,8 @@ export function initializePower(out) {
192
191
  out.onThermalStateChange = null;
193
192
  out.onUnlockScreen = null;
194
193
  }
195
- export function isPowerKeepAwakeActive(host) {
196
- return host.power.keepAwake.isActive();
194
+ export function isPowerKeepAwakeActive(hostPowerKeepAwake) {
195
+ return hostPowerKeepAwake.isActive();
197
196
  }
198
197
  // Allocates a PowerBatteryHealth value with the domain's complete unknown encoding. Not a create*: this
199
198
  // is a plain value the queries fill, with no identity — but it earns a function because the -1/'Unknown'
@@ -223,15 +222,15 @@ export function makePowerStatus() {
223
222
  }
224
223
  // Releases a keep-awake lock, resolving only once the provider has really let it go. State is never
225
224
  // published before the awaited release succeeds.
226
- export function releasePowerKeepAwake(host) {
227
- return host.power.keepAwake.release();
225
+ export function releasePowerKeepAwake(hostPowerKeepAwake) {
226
+ return hostPowerKeepAwake.release();
228
227
  }
229
228
  export function setPowerIdlePollingIntervalMs(intervalMs) {
230
229
  _idlePollingIntervalMs = intervalMs > 0 ? intervalMs : 1;
231
230
  }
232
231
  function emitSignalWhenPresent(signal) {
233
232
  if (signal !== null)
234
- emitSignal(signal);
233
+ emitSignal(signal, undefined);
235
234
  }
236
235
  let _idlePollingIntervalMs = 5000;
237
236
  // Origin-pinned teardown bookkeeping: each entity's own unsubscribes, held beside the entity rather
package/dist/power.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"power.js","sourceRoot":"","sources":["../src/power.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC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AAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,qBAAqB,CAAC,MAA0B;IACvD,IAAI,MAAM,KAAK,IAAI;QAAE,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC;AAED,IAAI,sBAAsB,GAAG,IAAI,CAAC;AAElC,oGAAoG;AACpG,8EAA8E;AAC9E,MAAM,cAAc,GAAG,IAAI,OAAO,EAAyB,CAAC;AAE5D,oGAAoG;AACpG,iFAAiF;AACjF,MAAM,mBAAmB,GAAG,IAAI,OAAO,EAAgC,CAAC;AAGxE,SAAS,cAAc,CAAI,KAA6E;IACtG,KAAK,KAAK,CAAC;AACb,CAAC"}
@@ -0,0 +1,89 @@
1
+ import type { EntityRaw, EntityRuntime, EntityRuntimeKey } from '@flighthq/entity/contract';
2
+ import type { Signal } from '@flighthq/signals/contract';
3
+ export interface PowerBatteryHealth {
4
+ capacityWearLevel: number;
5
+ cycleCount: number;
6
+ healthState: PowerBatteryHealthState;
7
+ temperatureCelsius: number;
8
+ voltage: number;
9
+ }
10
+ export type PowerBatteryHealthState = 'Good' | 'Fair' | 'Poor' | 'Unknown';
11
+ export type PowerIdleState = 'Active' | 'Idle' | 'Unknown';
12
+ export type PowerKeepAwakeMode = 'PreventDisplaySleep' | 'PreventAppSuspension';
13
+ export type PowerThermalState = 'Nominal' | 'Fair' | 'Serious' | 'Critical' | 'Unknown';
14
+ export interface PowerStatus {
15
+ batteryLevel: number;
16
+ chargingTime: number;
17
+ dischargingTime: number;
18
+ isBatteryLow: boolean;
19
+ isCharging: boolean;
20
+ isLowPower: boolean;
21
+ isOnBattery: boolean;
22
+ thermalState: PowerThermalState;
23
+ }
24
+ export type PowerKeepAwakeAcquireReason = 'ok' | 'unavailable' | 'denied' | 'failed';
25
+ export type PowerKeepAwakeReleaseReason = 'ok' | 'inactive' | 'failed';
26
+ export interface PowerKeepAwakeAcquireResult {
27
+ readonly reason: PowerKeepAwakeAcquireReason;
28
+ }
29
+ export interface PowerKeepAwakeReleaseResult {
30
+ readonly reason: PowerKeepAwakeReleaseReason;
31
+ }
32
+ export interface HostPowerStatusCapability {
33
+ getStatus(out: PowerStatus): PowerStatus;
34
+ }
35
+ export interface HostPowerChangeCapability {
36
+ subscribe(listener: () => void): () => void;
37
+ }
38
+ export interface HostPowerKeepAwakeCapability {
39
+ acquire(mode: PowerKeepAwakeMode): Promise<PowerKeepAwakeAcquireResult>;
40
+ destroy?(): void;
41
+ isActive(): boolean;
42
+ release(): Promise<PowerKeepAwakeReleaseResult>;
43
+ }
44
+ export interface HostPowerIdleCapability {
45
+ getIdleState(thresholdSeconds: number): PowerIdleState;
46
+ getIdleTimeSeconds(): number;
47
+ }
48
+ export interface HostPowerSessionLockCapability {
49
+ subscribeLock(listener: () => void): () => void;
50
+ subscribeUnlock(listener: () => void): () => void;
51
+ }
52
+ export interface HostPowerSuspensionCapability {
53
+ subscribeResume(listener: () => void): () => void;
54
+ subscribeSuspend(listener: () => void): () => void;
55
+ }
56
+ export interface HostPowerBatteryHealthCapability {
57
+ getBatteryHealth(out: PowerBatteryHealth): PowerBatteryHealth;
58
+ }
59
+ export interface HostPowerThermalCapability {
60
+ getThermalState(): PowerThermalState;
61
+ subscribeThermalStateChange(listener: (state: PowerThermalState) => void): () => void;
62
+ }
63
+ /** The complete power capability group. An omitted slot is capability absence. */
64
+ export interface HostPowerCapabilities {
65
+ readonly batteryHealth?: HostPowerBatteryHealthCapability;
66
+ readonly change?: HostPowerChangeCapability;
67
+ readonly idle?: HostPowerIdleCapability;
68
+ readonly keepAwake?: HostPowerKeepAwakeCapability;
69
+ readonly sessionLock?: HostPowerSessionLockCapability;
70
+ readonly status?: HostPowerStatusCapability;
71
+ readonly suspension?: HostPowerSuspensionCapability;
72
+ readonly thermal?: HostPowerThermalCapability;
73
+ }
74
+ export type ElectronPowerCapabilities = Required<Pick<HostPowerCapabilities, 'batteryHealth' | 'change' | 'idle' | 'keepAwake' | 'sessionLock' | 'status' | 'suspension'>> & Pick<HostPowerCapabilities, 'thermal'>;
75
+ export type WebPowerReadingCapabilities = Required<Pick<HostPowerCapabilities, 'change' | 'status'>>;
76
+ export type WebPowerCapabilities = Required<Pick<HostPowerCapabilities, 'change' | 'keepAwake' | 'status' | 'suspension'>>;
77
+ export interface Power extends EntityRaw {
78
+ [EntityRuntimeKey]: EntityRuntime | undefined;
79
+ onChange: Signal<Readonly<PowerStatus>> | null;
80
+ onCharging: Signal<void> | null;
81
+ onDischarging: Signal<void> | null;
82
+ onIdleStateChange: Signal<void> | null;
83
+ onLockScreen: Signal<void> | null;
84
+ onResume: Signal<void> | null;
85
+ onSuspend: Signal<void> | null;
86
+ onThermalStateChange: Signal<PowerThermalState> | null;
87
+ onUnlockScreen: Signal<void> | null;
88
+ }
89
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAKzD,MAAM,WAAW,kBAAkB;IAEjC,iBAAiB,EAAE,MAAM,CAAC;IAE1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,uBAAuB,CAAC;IAErC,kBAAkB,EAAE,MAAM,CAAC;IAE3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAG3E,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAI3D,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;AAGhF,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,M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2B,GAAG,QAAQ,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;AAErG,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CACzC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,CAAC,CAC9E,CAAC;AAKF,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC9C,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACvC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC/B,oBAAoB,EAAE,MAAM,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;IACvD,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACrC"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/power",
3
- "version": "0.5.1-next.973.788d3d7",
3
+ "version": "0.6.0",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,18 +32,19 @@
32
32
  "scripts": {
33
33
  "build": "tsc -b",
34
34
  "clean": "tsc -b --clean",
35
+ "generate": "tsx ../../scripts/generate-rust-package.ts --crate flight-power --package power",
36
+ "generate:check": "tsx ../../scripts/generate-rust-package.ts --crate flight-power --package power --check",
35
37
  "test": "vitest run --config vitest.config.ts",
36
38
  "test:watch": "vitest --watch --config vitest.config.ts",
37
39
  "prepack": "npm run clean && npm run clean:dist && npm run build",
38
40
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
41
  },
40
42
  "dependencies": {
41
- "@flighthq/entity": "0.5.1-next.973.788d3d7",
42
- "@flighthq/signals": "0.5.1-next.973.788d3d7",
43
- "@flighthq/types": "0.5.1-next.973.788d3d7"
43
+ "@flighthq/entity": "0.6.0",
44
+ "@flighthq/signals": "0.6.0"
44
45
  },
45
46
  "devDependencies": {
46
- "typescript": "^5.3.0"
47
+ "typescript": "^7.0.2"
47
48
  },
48
49
  "description": "Battery level, charging state, low-power signals and screen keep-awake over a swappable web/native backend",
49
50
  "sideEffects": false
package/src/power.test.ts CHANGED
@@ -1,20 +1,7 @@
1
- import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
1
+ import { allocateEntity } from '@flighthq/entity/contract';
2
+ import { EntityRuntimeKey } from '@flighthq/entity/contract';
3
+ import type { EntityWithoutRuntime } from '@flighthq/entity/contract';
2
4
  import { connectSignal } from '@flighthq/signals/contract';
3
- import { EntityRuntimeKey } from '@flighthq/types/contract';
4
- import type {
5
- EntityWithoutRuntime,
6
- HasPowerKeepAwake,
7
- PowerAttachHost,
8
- PowerChangeBackend,
9
- PowerIdleState,
10
- PowerIdleBackend,
11
- PowerKeepAwakeBackend,
12
- PowerSessionLockBackend,
13
- PowerStatus,
14
- PowerStatusBackend,
15
- PowerThermalBackend,
16
- PowerThermalState,
17
- } from '@flighthq/types/contract';
18
5
 
19
6
  import {
20
7
  acquirePowerKeepAwake,
@@ -36,11 +23,40 @@ import {
36
23
  makePowerStatus,
37
24
  releasePowerKeepAwake,
38
25
  setPowerIdlePollingIntervalMs,
39
- } from './power';
26
+ } from './power.ts';
27
+ import type {
28
+ HostPowerCapabilities,
29
+ HostPowerBatteryHealthCapability,
30
+ HostPowerKeepAwakeCapability,
31
+ HostPowerChangeCapability,
32
+ PowerIdleState,
33
+ HostPowerIdleCapability,
34
+ HostPowerSessionLockCapability,
35
+ PowerStatus,
36
+ HostPowerStatusCapability,
37
+ HostPowerThermalCapability,
38
+ PowerBatteryHealth,
39
+ PowerThermalState,
40
+ } from './types.ts';
40
41
 
41
42
  // A host built from exactly the slots a test needs. Nothing installs anywhere, so two hosts can be live
42
43
  // at once — the property the ambient seam could not express.
43
- function statusHost(status: Partial<PowerStatus>): PowerAttachHost & { emitChange(): void } {
44
+ interface TestPowerHost {
45
+ readonly power: Partial<HostPowerCapabilities>;
46
+ }
47
+
48
+ function powerAttachProviders(host: TestPowerHost) {
49
+ return [
50
+ host.power.status,
51
+ host.power.change,
52
+ host.power.sessionLock,
53
+ host.power.suspension,
54
+ host.power.thermal,
55
+ host.power.idle,
56
+ ] as const;
57
+ }
58
+
59
+ function statusHost(status: Partial<PowerStatus>): TestPowerHost & { emitChange(): void } {
44
60
  const listeners = new Set<() => void>();
45
61
  return {
46
62
  emitChange(): void {
@@ -48,34 +64,38 @@ function statusHost(status: Partial<PowerStatus>): PowerAttachHost & { emitChang
48
64
  },
49
65
  power: {
50
66
  change: (() => {
51
- const out = allocateEntity<any>();
67
+ const out = allocateEntity<any>() as any;
52
68
  out.subscribe = (listener: () => void): (() => void) => {
53
69
  listeners.add(listener);
54
70
  return () => listeners.delete(listener);
55
71
  };
56
- return finishEntity(out);
72
+ return out;
57
73
  })(),
58
74
  status: (() => {
59
- const out = allocateEntity<any>();
75
+ const out = allocateEntity<any>() as any;
60
76
  out.getStatus = (out: PowerStatus): PowerStatus => {
61
77
  return Object.assign(out, status);
62
78
  };
63
- return finishEntity(out);
79
+ return out;
64
80
  })(),
65
81
  },
66
82
  };
67
83
  }
68
84
 
69
- function keepAwakeHost(overrides: Partial<HasPowerKeepAwake['power']['keepAwake']> = {}): HasPowerKeepAwake {
85
+ function keepAwakeHost(
86
+ overrides: Partial<
87
+ { readonly power: { readonly keepAwake: HostPowerKeepAwakeCapability } }['power']['keepAwake']
88
+ > = {},
89
+ ): { readonly power: { readonly keepAwake: HostPowerKeepAwakeCapability } } {
70
90
  return {
71
91
  power: {
72
92
  keepAwake: (() => {
73
- const out = allocateEntity<any>();
93
+ const out = allocateEntity<any>() as any;
74
94
  out.acquire = async () => ({ reason: 'ok' }) as const;
75
95
  out.isActive = () => false;
76
96
  out.release = async () => ({ reason: 'ok' }) as const;
77
97
  Object.assign(out, overrides);
78
- return finishEntity(out);
98
+ return out;
79
99
  })(),
80
100
  },
81
101
  };
@@ -90,7 +110,9 @@ describe('acquirePowerKeepAwake', () => {
90
110
  return { reason: 'denied' } as const;
91
111
  },
92
112
  });
93
- await expect(acquirePowerKeepAwake(host, 'PreventAppSuspension')).resolves.toEqual({ reason: 'denied' });
113
+ await expect(acquirePowerKeepAwake(host.power.keepAwake, 'PreventAppSuspension')).resolves.toEqual({
114
+ reason: 'denied',
115
+ });
94
116
  expect(seen).toBe('PreventAppSuspension');
95
117
  });
96
118
 
@@ -102,7 +124,7 @@ describe('acquirePowerKeepAwake', () => {
102
124
  return { reason: 'ok' } as const;
103
125
  },
104
126
  });
105
- await acquirePowerKeepAwake(host);
127
+ await acquirePowerKeepAwake(host.power.keepAwake);
106
128
  expect(seen).toBe('PreventDisplaySleep');
107
129
  });
108
130
  });
@@ -114,7 +136,7 @@ describe('attachPower', () => {
114
136
  enablePowerSignals(power);
115
137
  const seen: Readonly<PowerStatus>[] = [];
116
138
  connectSignal(power.onChange!, (status) => seen.push(status));
117
- attachPower(host, power);
139
+ attachPower(...powerAttachProviders(host), power);
118
140
  host.emitChange();
119
141
  host.emitChange();
120
142
  expect(seen).toHaveLength(2);
@@ -126,23 +148,23 @@ describe('attachPower', () => {
126
148
  it('derives charging transitions from status changes', () => {
127
149
  let charging = false;
128
150
  const listeners = new Set<() => void>();
129
- const host: PowerAttachHost = {
151
+ const host: TestPowerHost = {
130
152
  power: {
131
153
  change: (() => {
132
- const out = allocateEntity<any>();
154
+ const out = allocateEntity<any>() as any;
133
155
  out.subscribe = (listener: () => void): (() => void) => {
134
156
  listeners.add(listener);
135
157
  return () => listeners.delete(listener);
136
158
  };
137
- return finishEntity(out);
159
+ return out;
138
160
  })(),
139
161
  status: (() => {
140
- const out = allocateEntity<any>();
162
+ const out = allocateEntity<any>() as any;
141
163
  out.getStatus = (out: PowerStatus): PowerStatus => {
142
164
  out.isCharging = charging;
143
165
  return out;
144
166
  };
145
- return finishEntity(out);
167
+ return out;
146
168
  })(),
147
169
  },
148
170
  };
@@ -152,7 +174,7 @@ describe('attachPower', () => {
152
174
  let discharged = 0;
153
175
  connectSignal(power.onCharging!, () => charged++);
154
176
  connectSignal(power.onDischarging!, () => discharged++);
155
- attachPower(host, power);
177
+ attachPower(...powerAttachProviders(host), power);
156
178
  charging = true;
157
179
  for (const l of listeners) l();
158
180
  charging = false;
@@ -163,16 +185,16 @@ describe('attachPower', () => {
163
185
 
164
186
  it('delivers the thermal state as the event payload', () => {
165
187
  const listeners = new Set<(state: PowerThermalState) => void>();
166
- const host: PowerAttachHost = {
188
+ const host: TestPowerHost = {
167
189
  power: {
168
190
  thermal: (() => {
169
- const out = allocateEntity<any>();
191
+ const out = allocateEntity<any>() as any;
170
192
  out.getThermalState = () => 'Serious';
171
193
  out.subscribeThermalStateChange = (listener: (state: PowerThermalState) => void): (() => void) => {
172
194
  listeners.add(listener);
173
195
  return () => listeners.delete(listener);
174
196
  };
175
- return finishEntity(out);
197
+ return out;
176
198
  })(),
177
199
  },
178
200
  };
@@ -180,7 +202,7 @@ describe('attachPower', () => {
180
202
  enablePowerSignals(power);
181
203
  const seen: PowerThermalState[] = [];
182
204
  connectSignal(power.onThermalStateChange!, (state) => seen.push(state));
183
- attachPower(host, power);
205
+ attachPower(...powerAttachProviders(host), power);
184
206
  for (const l of listeners) l('Critical');
185
207
  // ★ An event that only said "something changed" left the state unreadable; the payload is the point.
186
208
  expect(seen).toEqual(['Critical']);
@@ -189,7 +211,7 @@ describe('attachPower', () => {
189
211
  it('never polls when the host offers no idle slot', () => {
190
212
  const spy = vi.spyOn(globalThis, 'setInterval');
191
213
  const power = createPower();
192
- attachPower(statusHost({}), power);
214
+ attachPower(...powerAttachProviders(statusHost({})), power);
193
215
  expect(spy).not.toHaveBeenCalled();
194
216
  spy.mockRestore();
195
217
  });
@@ -200,8 +222,8 @@ describe('attachPower', () => {
200
222
  enablePowerSignals(power);
201
223
  let count = 0;
202
224
  connectSignal(power.onChange!, () => count++);
203
- attachPower(host, power);
204
- attachPower(host, power);
225
+ attachPower(...powerAttachProviders(host), power);
226
+ attachPower(...powerAttachProviders(host), power);
205
227
  host.emitChange();
206
228
  expect(count).toBe(1);
207
229
  });
@@ -218,16 +240,20 @@ describe('createPower', () => {
218
240
  describe('destroyPowerKeepAwake', () => {
219
241
  // Builds the provider ONCE so two hosts can genuinely alias the same object; spreading it per host
220
242
  // would silently make them distinct and the alias assertion would prove nothing.
221
- function keepAwakeProvider(destroy?: () => void): HasPowerKeepAwake['power']['keepAwake'] {
222
- const out = allocateEntity<any>();
243
+ function keepAwakeProvider(
244
+ destroy?: () => void,
245
+ ): { readonly power: { readonly keepAwake: HostPowerKeepAwakeCapability } }['power']['keepAwake'] {
246
+ const out = allocateEntity<any>() as any;
223
247
  out.acquire = async () => ({ reason: 'ok' }) as const;
224
248
  out.destroy = destroy;
225
249
  out.isActive = () => false;
226
250
  out.release = async () => ({ reason: 'ok' }) as const;
227
- return finishEntity(out);
251
+ return out;
228
252
  }
229
253
 
230
- function keepAwakeHostWith(provider: HasPowerKeepAwake['power']['keepAwake']): HasPowerKeepAwake {
254
+ function keepAwakeHostWith(
255
+ provider: { readonly power: { readonly keepAwake: HostPowerKeepAwakeCapability } }['power']['keepAwake'],
256
+ ): { readonly power: { readonly keepAwake: HostPowerKeepAwakeCapability } } {
231
257
  return { power: { keepAwake: provider } };
232
258
  }
233
259
 
@@ -235,7 +261,7 @@ describe('destroyPowerKeepAwake', () => {
235
261
  it('destroys each distinct provider exactly once, even when hosts alias one', () => {
236
262
  let destroyed = 0;
237
263
  const shared = keepAwakeProvider(() => destroyed++);
238
- destroyPowerKeepAwake(keepAwakeHostWith(shared), keepAwakeHostWith(shared));
264
+ destroyPowerKeepAwake(keepAwakeHostWith(shared).power.keepAwake, keepAwakeHostWith(shared).power.keepAwake);
239
265
  expect(destroyed).toBe(1);
240
266
  });
241
267
 
@@ -245,7 +271,9 @@ describe('destroyPowerKeepAwake', () => {
245
271
  throw new Error('first failed');
246
272
  });
247
273
  const healthy = keepAwakeProvider(() => (secondDestroyed = true));
248
- expect(() => destroyPowerKeepAwake(keepAwakeHostWith(failing), keepAwakeHostWith(healthy))).toThrow('first failed');
274
+ expect(() =>
275
+ destroyPowerKeepAwake(keepAwakeHostWith(failing).power.keepAwake, keepAwakeHostWith(healthy).power.keepAwake),
276
+ ).toThrow('first failed');
249
277
  expect(secondDestroyed).toBe(true);
250
278
  });
251
279
 
@@ -257,8 +285,12 @@ describe('destroyPowerKeepAwake', () => {
257
285
  if (attempts === 1) throw new Error('transient');
258
286
  });
259
287
  const healthy = keepAwakeProvider(() => healthyDestroyed++);
260
- expect(() => destroyPowerKeepAwake(keepAwakeHostWith(flaky), keepAwakeHostWith(healthy))).toThrow();
261
- expect(() => destroyPowerKeepAwake(keepAwakeHostWith(flaky), keepAwakeHostWith(healthy))).not.toThrow();
288
+ expect(() =>
289
+ destroyPowerKeepAwake(keepAwakeHostWith(flaky).power.keepAwake, keepAwakeHostWith(healthy).power.keepAwake),
290
+ ).toThrow();
291
+ expect(() =>
292
+ destroyPowerKeepAwake(keepAwakeHostWith(flaky).power.keepAwake, keepAwakeHostWith(healthy).power.keepAwake),
293
+ ).not.toThrow();
262
294
  expect(attempts).toBe(2);
263
295
  expect(healthyDestroyed).toBe(1);
264
296
  });
@@ -271,7 +303,7 @@ describe('detachPower', () => {
271
303
  enablePowerSignals(power);
272
304
  let count = 0;
273
305
  connectSignal(power.onChange!, () => count++);
274
- attachPower(host, power);
306
+ attachPower(...powerAttachProviders(host), power);
275
307
  detachPower(power);
276
308
  host.emitChange();
277
309
  expect(count).toBe(0);
@@ -282,22 +314,22 @@ describe('detachPower', () => {
282
314
  // after the first failure leaks.
283
315
  it('runs every teardown even when one throws', () => {
284
316
  let unlockTornDown = false;
285
- const host: PowerAttachHost = {
317
+ const host: TestPowerHost = {
286
318
  power: {
287
319
  sessionLock: (() => {
288
- const out = allocateEntity<any>();
320
+ const out = allocateEntity<any>() as any;
289
321
  out.subscribeLock = () => () => {
290
322
  throw new Error('lock teardown failed');
291
323
  };
292
324
  out.subscribeUnlock = () => () => {
293
325
  unlockTornDown = true;
294
326
  };
295
- return finishEntity(out);
327
+ return out;
296
328
  })(),
297
329
  },
298
330
  };
299
331
  const power = createPower();
300
- attachPower(host, power);
332
+ attachPower(...powerAttachProviders(host), power);
301
333
  expect(() => detachPower(power)).toThrow('lock teardown failed');
302
334
  expect(unlockTornDown).toBe(true);
303
335
  });
@@ -309,8 +341,8 @@ describe('detachPower', () => {
309
341
  enablePowerSignals(kept);
310
342
  let count = 0;
311
343
  connectSignal(kept.onChange!, () => count++);
312
- attachPower(host, kept);
313
- attachPower(host, dropped);
344
+ attachPower(...powerAttachProviders(host), kept);
345
+ attachPower(...powerAttachProviders(host), dropped);
314
346
  detachPower(dropped);
315
347
  host.emitChange();
316
348
  expect(count).toBe(1);
@@ -324,7 +356,7 @@ describe('disposePower', () => {
324
356
  enablePowerSignals(power);
325
357
  let count = 0;
326
358
  connectSignal(power.onChange!, () => count++);
327
- attachPower(host, power);
359
+ attachPower(...powerAttachProviders(host), power);
328
360
  disposePower(power);
329
361
  host.emitChange();
330
362
  expect(count).toBe(0);
@@ -346,17 +378,15 @@ describe('enablePowerSignals', () => {
346
378
  describe('getPowerBatteryHealth', () => {
347
379
  it('fills and returns the caller-owned out parameter', () => {
348
380
  const out = makePowerBatteryHealth();
349
- const host = {
350
- power: {
351
- batteryHealth: {
352
- getBatteryHealth(target: typeof out): typeof out {
353
- target.cycleCount = 12;
354
- return target;
355
- },
356
- },
357
- },
358
- };
359
- expect(getPowerBatteryHealth(host, out)).toBe(out);
381
+ const provider = (() => {
382
+ const target = {} as HostPowerBatteryHealthCapability;
383
+ target.getBatteryHealth = (health: PowerBatteryHealth): PowerBatteryHealth => {
384
+ health.cycleCount = 12;
385
+ return health;
386
+ };
387
+ return target;
388
+ })();
389
+ expect(getPowerBatteryHealth(provider, out)).toBe(out);
360
390
  expect(out.cycleCount).toBe(12);
361
391
  });
362
392
  });
@@ -372,7 +402,7 @@ describe('getPowerIdlePollingIntervalMs', () => {
372
402
  describe('getPowerStatus', () => {
373
403
  it('fills the caller-owned out parameter', () => {
374
404
  const out = makePowerStatus();
375
- expect(getPowerStatus(statusHost({ isCharging: true }) as never, out)).toBe(out);
405
+ expect(getPowerStatus(statusHost({ isCharging: true }).power.status!, out)).toBe(out);
376
406
  expect(out.isCharging).toBe(true);
377
407
  });
378
408
  });
@@ -383,17 +413,17 @@ describe('getPowerSystemIdleState', () => {
383
413
  const host = {
384
414
  power: {
385
415
  idle: (() => {
386
- const out = allocateEntity<any>();
416
+ const out = allocateEntity<any>() as any;
387
417
  out.getIdleState = (t: number): PowerIdleState => {
388
418
  seen = t;
389
419
  return 'Idle';
390
420
  };
391
421
  out.getIdleTimeSeconds = () => 0;
392
- return finishEntity(out);
422
+ return out;
393
423
  })(),
394
424
  },
395
425
  };
396
- expect(getPowerSystemIdleState(host, 90)).toBe('Idle');
426
+ expect(getPowerSystemIdleState(host.power.idle, 90)).toBe('Idle');
397
427
  expect(seen).toBe(90);
398
428
  });
399
429
  });
@@ -403,14 +433,14 @@ describe('getPowerSystemIdleTime', () => {
403
433
  const host = {
404
434
  power: {
405
435
  idle: (() => {
406
- const out = allocateEntity<any>();
436
+ const out = allocateEntity<any>() as any;
407
437
  out.getIdleState = (): PowerIdleState => 'Active';
408
438
  out.getIdleTimeSeconds = () => 42;
409
- return finishEntity(out);
439
+ return out;
410
440
  })(),
411
441
  },
412
442
  };
413
- expect(getPowerSystemIdleTime(host)).toBe(42);
443
+ expect(getPowerSystemIdleTime(host.power.idle)).toBe(42);
414
444
  });
415
445
  });
416
446
 
@@ -419,14 +449,14 @@ describe('getPowerThermalState', () => {
419
449
  const host = {
420
450
  power: {
421
451
  thermal: (() => {
422
- const out = allocateEntity<any>();
452
+ const out = allocateEntity<any>() as any;
423
453
  out.getThermalState = (): PowerThermalState => 'Fair';
424
454
  out.subscribeThermalStateChange = () => () => {};
425
- return finishEntity(out);
455
+ return out;
426
456
  })(),
427
457
  },
428
458
  };
429
- expect(getPowerThermalState(host)).toBe('Fair');
459
+ expect(getPowerThermalState(host.power.thermal)).toBe('Fair');
430
460
  });
431
461
  });
432
462
 
@@ -438,7 +468,7 @@ describe('initializePower', () => {
438
468
 
439
469
  describe('isPowerKeepAwakeActive', () => {
440
470
  it('reports the provider state', () => {
441
- expect(isPowerKeepAwakeActive(keepAwakeHost({ isActive: () => true }))).toBe(true);
471
+ expect(isPowerKeepAwakeActive(keepAwakeHost({ isActive: () => true }).power.keepAwake)).toBe(true);
442
472
  });
443
473
  });
444
474
 
@@ -481,7 +511,7 @@ describe('makePowerStatus', () => {
481
511
  describe('releasePowerKeepAwake', () => {
482
512
  it('resolves the provider outcome', async () => {
483
513
  const host = keepAwakeHost({ release: async () => ({ reason: 'inactive' }) as const });
484
- await expect(releasePowerKeepAwake(host)).resolves.toEqual({ reason: 'inactive' });
514
+ await expect(releasePowerKeepAwake(host.power.keepAwake)).resolves.toEqual({ reason: 'inactive' });
485
515
  });
486
516
  });
487
517
  describe('setPowerIdlePollingIntervalMs', () => {