@matter/general 0.11.0-alpha.0-20241005-e3e4e4a7a
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/LICENSE +201 -0
- package/README.md +3 -0
- package/dist/cjs/MatterError.d.ts +95 -0
- package/dist/cjs/MatterError.d.ts.map +1 -0
- package/dist/cjs/MatterError.js +177 -0
- package/dist/cjs/MatterError.js.map +6 -0
- package/dist/cjs/codec/Base64Codec.d.ts +23 -0
- package/dist/cjs/codec/Base64Codec.d.ts.map +1 -0
- package/dist/cjs/codec/Base64Codec.js +134 -0
- package/dist/cjs/codec/Base64Codec.js.map +6 -0
- package/dist/cjs/codec/DerCodec.d.ts +83 -0
- package/dist/cjs/codec/DerCodec.d.ts.map +1 -0
- package/dist/cjs/codec/DerCodec.js +286 -0
- package/dist/cjs/codec/DerCodec.js.map +6 -0
- package/dist/cjs/codec/DerTypes.d.ts +73 -0
- package/dist/cjs/codec/DerTypes.d.ts.map +1 -0
- package/dist/cjs/codec/DerTypes.js +132 -0
- package/dist/cjs/codec/DerTypes.js.map +6 -0
- package/dist/cjs/codec/DnsCodec.d.ts +86 -0
- package/dist/cjs/codec/DnsCodec.d.ts.map +1 -0
- package/dist/cjs/codec/DnsCodec.js +355 -0
- package/dist/cjs/codec/DnsCodec.js.map +6 -0
- package/dist/cjs/codec/index.d.ts +10 -0
- package/dist/cjs/codec/index.d.ts.map +1 -0
- package/dist/cjs/codec/index.js +27 -0
- package/dist/cjs/codec/index.js.map +6 -0
- package/dist/cjs/crypto/Crypto.d.ts +169 -0
- package/dist/cjs/crypto/Crypto.d.ts.map +1 -0
- package/dist/cjs/crypto/Crypto.js +103 -0
- package/dist/cjs/crypto/Crypto.js.map +6 -0
- package/dist/cjs/crypto/CryptoConstants.d.ts +19 -0
- package/dist/cjs/crypto/CryptoConstants.d.ts.map +1 -0
- package/dist/cjs/crypto/CryptoConstants.js +48 -0
- package/dist/cjs/crypto/CryptoConstants.js.map +6 -0
- package/dist/cjs/crypto/Key.d.ts +171 -0
- package/dist/cjs/crypto/Key.d.ts.map +1 -0
- package/dist/cjs/crypto/Key.js +356 -0
- package/dist/cjs/crypto/Key.js.map +6 -0
- package/dist/cjs/crypto/Spake2p.d.ts +40 -0
- package/dist/cjs/crypto/Spake2p.d.ts.map +1 -0
- package/dist/cjs/crypto/Spake2p.js +128 -0
- package/dist/cjs/crypto/Spake2p.js.map +6 -0
- package/dist/cjs/crypto/index.d.ts +10 -0
- package/dist/cjs/crypto/index.d.ts.map +1 -0
- package/dist/cjs/crypto/index.js +27 -0
- package/dist/cjs/crypto/index.js.map +6 -0
- package/dist/cjs/environment/Environment.d.ts +96 -0
- package/dist/cjs/environment/Environment.d.ts.map +1 -0
- package/dist/cjs/environment/Environment.js +199 -0
- package/dist/cjs/environment/Environment.js.map +6 -0
- package/dist/cjs/environment/Environmental.d.ts +52 -0
- package/dist/cjs/environment/Environmental.d.ts.map +1 -0
- package/dist/cjs/environment/Environmental.js +33 -0
- package/dist/cjs/environment/Environmental.js.map +6 -0
- package/dist/cjs/environment/RuntimeService.d.ts +107 -0
- package/dist/cjs/environment/RuntimeService.d.ts.map +1 -0
- package/dist/cjs/environment/RuntimeService.js +222 -0
- package/dist/cjs/environment/RuntimeService.js.map +6 -0
- package/dist/cjs/environment/VariableService.d.ts +58 -0
- package/dist/cjs/environment/VariableService.d.ts.map +1 -0
- package/dist/cjs/environment/VariableService.js +257 -0
- package/dist/cjs/environment/VariableService.js.map +6 -0
- package/dist/cjs/environment/index.d.ts +10 -0
- package/dist/cjs/environment/index.d.ts.map +1 -0
- package/dist/cjs/environment/index.js +27 -0
- package/dist/cjs/environment/index.js.map +6 -0
- package/dist/cjs/index.d.ts +17 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +34 -0
- package/dist/cjs/index.js.map +6 -0
- package/dist/cjs/log/Diagnostic.d.ts +140 -0
- package/dist/cjs/log/Diagnostic.d.ts.map +1 -0
- package/dist/cjs/log/Diagnostic.js +297 -0
- package/dist/cjs/log/Diagnostic.js.map +6 -0
- package/dist/cjs/log/DiagnosticSource.d.ts +16 -0
- package/dist/cjs/log/DiagnosticSource.d.ts.map +1 -0
- package/dist/cjs/log/DiagnosticSource.js +45 -0
- package/dist/cjs/log/DiagnosticSource.js.map +6 -0
- package/dist/cjs/log/LogFormat.d.ts +33 -0
- package/dist/cjs/log/LogFormat.d.ts.map +1 -0
- package/dist/cjs/log/LogFormat.js +503 -0
- package/dist/cjs/log/LogFormat.js.map +6 -0
- package/dist/cjs/log/LogLevel.d.ts +18 -0
- package/dist/cjs/log/LogLevel.d.ts.map +1 -0
- package/dist/cjs/log/LogLevel.js +57 -0
- package/dist/cjs/log/LogLevel.js.map +6 -0
- package/dist/cjs/log/Logger.d.ts +220 -0
- package/dist/cjs/log/Logger.d.ts.map +1 -0
- package/dist/cjs/log/Logger.js +401 -0
- package/dist/cjs/log/Logger.js.map +6 -0
- package/dist/cjs/log/index.d.ts +11 -0
- package/dist/cjs/log/index.d.ts.map +1 -0
- package/dist/cjs/log/index.js +28 -0
- package/dist/cjs/log/index.js.map +6 -0
- package/dist/cjs/math/ReedSolomon.d.ts +11 -0
- package/dist/cjs/math/ReedSolomon.d.ts.map +1 -0
- package/dist/cjs/math/ReedSolomon.js +109 -0
- package/dist/cjs/math/ReedSolomon.js.map +6 -0
- package/dist/cjs/math/Verhoeff.d.ts +17 -0
- package/dist/cjs/math/Verhoeff.d.ts.map +1 -0
- package/dist/cjs/math/Verhoeff.js +64 -0
- package/dist/cjs/math/Verhoeff.js.map +6 -0
- package/dist/cjs/math/index.d.ts +8 -0
- package/dist/cjs/math/index.d.ts.map +1 -0
- package/dist/cjs/math/index.js +25 -0
- package/dist/cjs/math/index.js.map +6 -0
- package/dist/cjs/net/Channel.d.ts +24 -0
- package/dist/cjs/net/Channel.d.ts.map +1 -0
- package/dist/cjs/net/Channel.js +35 -0
- package/dist/cjs/net/Channel.js.map +6 -0
- package/dist/cjs/net/NetInterface.d.ts +24 -0
- package/dist/cjs/net/NetInterface.d.ts.map +1 -0
- package/dist/cjs/net/NetInterface.js +42 -0
- package/dist/cjs/net/NetInterface.js.map +6 -0
- package/dist/cjs/net/Network.d.ts +54 -0
- package/dist/cjs/net/Network.d.ts.map +1 -0
- package/dist/cjs/net/Network.js +50 -0
- package/dist/cjs/net/Network.js.map +6 -0
- package/dist/cjs/net/ServerAddress.d.ts +17 -0
- package/dist/cjs/net/ServerAddress.d.ts.map +1 -0
- package/dist/cjs/net/ServerAddress.js +32 -0
- package/dist/cjs/net/ServerAddress.js.map +6 -0
- package/dist/cjs/net/TransportInterface.d.ts +40 -0
- package/dist/cjs/net/TransportInterface.d.ts.map +1 -0
- package/dist/cjs/net/TransportInterface.js +55 -0
- package/dist/cjs/net/TransportInterface.js.map +6 -0
- package/dist/cjs/net/UdpChannel.d.ts +25 -0
- package/dist/cjs/net/UdpChannel.d.ts.map +1 -0
- package/dist/cjs/net/UdpChannel.js +30 -0
- package/dist/cjs/net/UdpChannel.js.map +6 -0
- package/dist/cjs/net/UdpInterface.d.ts +35 -0
- package/dist/cjs/net/UdpInterface.d.ts.map +1 -0
- package/dist/cjs/net/UdpInterface.js +82 -0
- package/dist/cjs/net/UdpInterface.js.map +6 -0
- package/dist/cjs/net/UdpMulticastServer.d.ts +30 -0
- package/dist/cjs/net/UdpMulticastServer.d.ts.map +1 -0
- package/dist/cjs/net/UdpMulticastServer.js +133 -0
- package/dist/cjs/net/UdpMulticastServer.js.map +6 -0
- package/dist/cjs/net/index.d.ts +17 -0
- package/dist/cjs/net/index.d.ts.map +1 -0
- package/dist/cjs/net/index.js +34 -0
- package/dist/cjs/net/index.js.map +6 -0
- package/dist/cjs/net/mock/MockNetwork.d.ts +19 -0
- package/dist/cjs/net/mock/MockNetwork.d.ts.map +1 -0
- package/dist/cjs/net/mock/MockNetwork.js +56 -0
- package/dist/cjs/net/mock/MockNetwork.js.map +6 -0
- package/dist/cjs/net/mock/MockUdpChannel.d.ts +27 -0
- package/dist/cjs/net/mock/MockUdpChannel.d.ts.map +1 -0
- package/dist/cjs/net/mock/MockUdpChannel.js +76 -0
- package/dist/cjs/net/mock/MockUdpChannel.js.map +6 -0
- package/dist/cjs/net/mock/NetworkSimulator.d.ts +18 -0
- package/dist/cjs/net/mock/NetworkSimulator.d.ts.map +1 -0
- package/dist/cjs/net/mock/NetworkSimulator.js +73 -0
- package/dist/cjs/net/mock/NetworkSimulator.js.map +6 -0
- package/dist/cjs/package.json +6 -0
- package/dist/cjs/polyfills/disposable.d.ts +7 -0
- package/dist/cjs/polyfills/disposable.d.ts.map +1 -0
- package/dist/cjs/polyfills/disposable.js +19 -0
- package/dist/cjs/polyfills/disposable.js.map +6 -0
- package/dist/cjs/polyfills/index.d.ts +7 -0
- package/dist/cjs/polyfills/index.d.ts.map +1 -0
- package/dist/cjs/polyfills/index.js +8 -0
- package/dist/cjs/polyfills/index.js.map +6 -0
- package/dist/cjs/storage/Storage.d.ts +54 -0
- package/dist/cjs/storage/Storage.d.ts.map +1 -0
- package/dist/cjs/storage/Storage.js +38 -0
- package/dist/cjs/storage/Storage.js.map +6 -0
- package/dist/cjs/storage/StorageBackendMemory.d.ts +27 -0
- package/dist/cjs/storage/StorageBackendMemory.d.ts.map +1 -0
- package/dist/cjs/storage/StorageBackendMemory.js +131 -0
- package/dist/cjs/storage/StorageBackendMemory.js.map +6 -0
- package/dist/cjs/storage/StorageContext.d.ts +26 -0
- package/dist/cjs/storage/StorageContext.d.ts.map +1 -0
- package/dist/cjs/storage/StorageContext.js +117 -0
- package/dist/cjs/storage/StorageContext.js.map +6 -0
- package/dist/cjs/storage/StorageManager.d.ts +17 -0
- package/dist/cjs/storage/StorageManager.d.ts.map +1 -0
- package/dist/cjs/storage/StorageManager.js +59 -0
- package/dist/cjs/storage/StorageManager.js.map +6 -0
- package/dist/cjs/storage/StorageService.d.ts +35 -0
- package/dist/cjs/storage/StorageService.d.ts.map +1 -0
- package/dist/cjs/storage/StorageService.js +82 -0
- package/dist/cjs/storage/StorageService.js.map +6 -0
- package/dist/cjs/storage/StringifyTools.d.ts +16 -0
- package/dist/cjs/storage/StringifyTools.d.ts.map +1 -0
- package/dist/cjs/storage/StringifyTools.js +105 -0
- package/dist/cjs/storage/StringifyTools.js.map +6 -0
- package/dist/cjs/storage/index.d.ts +12 -0
- package/dist/cjs/storage/index.d.ts.map +1 -0
- package/dist/cjs/storage/index.js +29 -0
- package/dist/cjs/storage/index.js.map +6 -0
- package/dist/cjs/time/Time.d.ts +66 -0
- package/dist/cjs/time/Time.d.ts.map +1 -0
- package/dist/cjs/time/Time.js +137 -0
- package/dist/cjs/time/Time.js.map +6 -0
- package/dist/cjs/time/index.d.ts +7 -0
- package/dist/cjs/time/index.d.ts.map +1 -0
- package/dist/cjs/time/index.js +24 -0
- package/dist/cjs/time/index.js.map +6 -0
- package/dist/cjs/tsconfig.tsbuildinfo +1 -0
- package/dist/cjs/util/Array.d.ts +12 -0
- package/dist/cjs/util/Array.d.ts.map +1 -0
- package/dist/cjs/util/Array.js +24 -0
- package/dist/cjs/util/Array.js.map +6 -0
- package/dist/cjs/util/Bytes.d.ts +23 -0
- package/dist/cjs/util/Bytes.d.ts.map +1 -0
- package/dist/cjs/util/Bytes.js +95 -0
- package/dist/cjs/util/Bytes.js.map +6 -0
- package/dist/cjs/util/Cache.d.ts +33 -0
- package/dist/cjs/util/Cache.d.ts.map +1 -0
- package/dist/cjs/util/Cache.js +114 -0
- package/dist/cjs/util/Cache.js.map +6 -0
- package/dist/cjs/util/Construction.d.ts +182 -0
- package/dist/cjs/util/Construction.d.ts.map +1 -0
- package/dist/cjs/util/Construction.js +417 -0
- package/dist/cjs/util/Construction.js.map +6 -0
- package/dist/cjs/util/DataReadQueue.d.ts +17 -0
- package/dist/cjs/util/DataReadQueue.d.ts.map +1 -0
- package/dist/cjs/util/DataReadQueue.js +76 -0
- package/dist/cjs/util/DataReadQueue.js.map +6 -0
- package/dist/cjs/util/DataReader.d.ts +32 -0
- package/dist/cjs/util/DataReader.d.ts.map +1 -0
- package/dist/cjs/util/DataReader.js +101 -0
- package/dist/cjs/util/DataReader.js.map +6 -0
- package/dist/cjs/util/DataWriter.d.ts +26 -0
- package/dist/cjs/util/DataWriter.d.ts.map +1 -0
- package/dist/cjs/util/DataWriter.js +114 -0
- package/dist/cjs/util/DataWriter.js.map +6 -0
- package/dist/cjs/util/DeepCopy.d.ts +12 -0
- package/dist/cjs/util/DeepCopy.d.ts.map +1 -0
- package/dist/cjs/util/DeepCopy.js +58 -0
- package/dist/cjs/util/DeepCopy.js.map +6 -0
- package/dist/cjs/util/DeepEqual.d.ts +7 -0
- package/dist/cjs/util/DeepEqual.d.ts.map +1 -0
- package/dist/cjs/util/DeepEqual.js +55 -0
- package/dist/cjs/util/DeepEqual.js.map +6 -0
- package/dist/cjs/util/Error.d.ts +12 -0
- package/dist/cjs/util/Error.d.ts.map +1 -0
- package/dist/cjs/util/Error.js +41 -0
- package/dist/cjs/util/Error.js.map +6 -0
- package/dist/cjs/util/GeneratedClass.d.ts +62 -0
- package/dist/cjs/util/GeneratedClass.d.ts.map +1 -0
- package/dist/cjs/util/GeneratedClass.js +117 -0
- package/dist/cjs/util/GeneratedClass.js.map +6 -0
- package/dist/cjs/util/Introspection.d.ts +38 -0
- package/dist/cjs/util/Introspection.d.ts.map +1 -0
- package/dist/cjs/util/Introspection.js +85 -0
- package/dist/cjs/util/Introspection.js.map +6 -0
- package/dist/cjs/util/Ip.d.ts +8 -0
- package/dist/cjs/util/Ip.d.ts.map +1 -0
- package/dist/cjs/util/Ip.js +90 -0
- package/dist/cjs/util/Ip.js.map +6 -0
- package/dist/cjs/util/Lifecycle.d.ts +97 -0
- package/dist/cjs/util/Lifecycle.d.ts.map +1 -0
- package/dist/cjs/util/Lifecycle.js +89 -0
- package/dist/cjs/util/Lifecycle.js.map +6 -0
- package/dist/cjs/util/Multiplex.d.ts +14 -0
- package/dist/cjs/util/Multiplex.d.ts.map +1 -0
- package/dist/cjs/util/Multiplex.js +22 -0
- package/dist/cjs/util/Multiplex.js.map +6 -0
- package/dist/cjs/util/Mutex.d.ts +34 -0
- package/dist/cjs/util/Mutex.d.ts.map +1 -0
- package/dist/cjs/util/Mutex.js +105 -0
- package/dist/cjs/util/Mutex.js.map +6 -0
- package/dist/cjs/util/NamedHandler.d.ts +21 -0
- package/dist/cjs/util/NamedHandler.d.ts.map +1 -0
- package/dist/cjs/util/NamedHandler.js +54 -0
- package/dist/cjs/util/NamedHandler.js.map +6 -0
- package/dist/cjs/util/Number.d.ts +37 -0
- package/dist/cjs/util/Number.d.ts.map +1 -0
- package/dist/cjs/util/Number.js +97 -0
- package/dist/cjs/util/Number.js.map +6 -0
- package/dist/cjs/util/Observable.d.ts +197 -0
- package/dist/cjs/util/Observable.d.ts.map +1 -0
- package/dist/cjs/util/Observable.js +340 -0
- package/dist/cjs/util/Observable.js.map +6 -0
- package/dist/cjs/util/PromiseQueue.d.ts +25 -0
- package/dist/cjs/util/PromiseQueue.d.ts.map +1 -0
- package/dist/cjs/util/PromiseQueue.js +107 -0
- package/dist/cjs/util/PromiseQueue.js.map +6 -0
- package/dist/cjs/util/Promises.d.ts +68 -0
- package/dist/cjs/util/Promises.d.ts.map +1 -0
- package/dist/cjs/util/Promises.js +199 -0
- package/dist/cjs/util/Promises.js.map +6 -0
- package/dist/cjs/util/Set.d.ts +60 -0
- package/dist/cjs/util/Set.d.ts.map +1 -0
- package/dist/cjs/util/Set.js +145 -0
- package/dist/cjs/util/Set.js.map +6 -0
- package/dist/cjs/util/Singleton.d.ts +7 -0
- package/dist/cjs/util/Singleton.d.ts.map +1 -0
- package/dist/cjs/util/Singleton.js +36 -0
- package/dist/cjs/util/Singleton.js.map +6 -0
- package/dist/cjs/util/Stream.d.ts +16 -0
- package/dist/cjs/util/Stream.d.ts.map +1 -0
- package/dist/cjs/util/Stream.js +38 -0
- package/dist/cjs/util/Stream.js.map +6 -0
- package/dist/cjs/util/String.d.ts +39 -0
- package/dist/cjs/util/String.d.ts.map +1 -0
- package/dist/cjs/util/String.js +208 -0
- package/dist/cjs/util/String.js.map +6 -0
- package/dist/cjs/util/Type.d.ts +84 -0
- package/dist/cjs/util/Type.d.ts.map +1 -0
- package/dist/cjs/util/Type.js +52 -0
- package/dist/cjs/util/Type.js.map +6 -0
- package/dist/cjs/util/index.d.ts +30 -0
- package/dist/cjs/util/index.d.ts.map +1 -0
- package/dist/cjs/util/index.js +47 -0
- package/dist/cjs/util/index.js.map +6 -0
- package/dist/esm/MatterError.d.ts +95 -0
- package/dist/esm/MatterError.d.ts.map +1 -0
- package/dist/esm/MatterError.js +157 -0
- package/dist/esm/MatterError.js.map +6 -0
- package/dist/esm/codec/Base64Codec.d.ts +23 -0
- package/dist/esm/codec/Base64Codec.d.ts.map +1 -0
- package/dist/esm/codec/Base64Codec.js +114 -0
- package/dist/esm/codec/Base64Codec.js.map +6 -0
- package/dist/esm/codec/DerCodec.d.ts +83 -0
- package/dist/esm/codec/DerCodec.d.ts.map +1 -0
- package/dist/esm/codec/DerCodec.js +266 -0
- package/dist/esm/codec/DerCodec.js.map +6 -0
- package/dist/esm/codec/DerTypes.d.ts +73 -0
- package/dist/esm/codec/DerTypes.d.ts.map +1 -0
- package/dist/esm/codec/DerTypes.js +122 -0
- package/dist/esm/codec/DerTypes.js.map +6 -0
- package/dist/esm/codec/DnsCodec.d.ts +86 -0
- package/dist/esm/codec/DnsCodec.d.ts.map +1 -0
- package/dist/esm/codec/DnsCodec.js +335 -0
- package/dist/esm/codec/DnsCodec.js.map +6 -0
- package/dist/esm/codec/index.d.ts +10 -0
- package/dist/esm/codec/index.d.ts.map +1 -0
- package/dist/esm/codec/index.js +10 -0
- package/dist/esm/codec/index.js.map +6 -0
- package/dist/esm/crypto/Crypto.d.ts +169 -0
- package/dist/esm/crypto/Crypto.d.ts.map +1 -0
- package/dist/esm/crypto/Crypto.js +73 -0
- package/dist/esm/crypto/Crypto.js.map +6 -0
- package/dist/esm/crypto/CryptoConstants.d.ts +19 -0
- package/dist/esm/crypto/CryptoConstants.d.ts.map +1 -0
- package/dist/esm/crypto/CryptoConstants.js +28 -0
- package/dist/esm/crypto/CryptoConstants.js.map +6 -0
- package/dist/esm/crypto/Key.d.ts +171 -0
- package/dist/esm/crypto/Key.d.ts.map +1 -0
- package/dist/esm/crypto/Key.js +336 -0
- package/dist/esm/crypto/Key.js.map +6 -0
- package/dist/esm/crypto/Spake2p.d.ts +40 -0
- package/dist/esm/crypto/Spake2p.d.ts.map +1 -0
- package/dist/esm/crypto/Spake2p.js +108 -0
- package/dist/esm/crypto/Spake2p.js.map +6 -0
- package/dist/esm/crypto/index.d.ts +10 -0
- package/dist/esm/crypto/index.d.ts.map +1 -0
- package/dist/esm/crypto/index.js +10 -0
- package/dist/esm/crypto/index.js.map +6 -0
- package/dist/esm/environment/Environment.d.ts +96 -0
- package/dist/esm/environment/Environment.d.ts.map +1 -0
- package/dist/esm/environment/Environment.js +179 -0
- package/dist/esm/environment/Environment.js.map +6 -0
- package/dist/esm/environment/Environmental.d.ts +52 -0
- package/dist/esm/environment/Environmental.d.ts.map +1 -0
- package/dist/esm/environment/Environmental.js +13 -0
- package/dist/esm/environment/Environmental.js.map +6 -0
- package/dist/esm/environment/RuntimeService.d.ts +107 -0
- package/dist/esm/environment/RuntimeService.d.ts.map +1 -0
- package/dist/esm/environment/RuntimeService.js +202 -0
- package/dist/esm/environment/RuntimeService.js.map +6 -0
- package/dist/esm/environment/VariableService.d.ts +58 -0
- package/dist/esm/environment/VariableService.d.ts.map +1 -0
- package/dist/esm/environment/VariableService.js +237 -0
- package/dist/esm/environment/VariableService.js.map +6 -0
- package/dist/esm/environment/index.d.ts +10 -0
- package/dist/esm/environment/index.d.ts.map +1 -0
- package/dist/esm/environment/index.js +10 -0
- package/dist/esm/environment/index.js.map +6 -0
- package/dist/esm/index.d.ts +17 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +17 -0
- package/dist/esm/index.js.map +6 -0
- package/dist/esm/log/Diagnostic.d.ts +140 -0
- package/dist/esm/log/Diagnostic.d.ts.map +1 -0
- package/dist/esm/log/Diagnostic.js +277 -0
- package/dist/esm/log/Diagnostic.js.map +6 -0
- package/dist/esm/log/DiagnosticSource.d.ts +16 -0
- package/dist/esm/log/DiagnosticSource.d.ts.map +1 -0
- package/dist/esm/log/DiagnosticSource.js +25 -0
- package/dist/esm/log/DiagnosticSource.js.map +6 -0
- package/dist/esm/log/LogFormat.d.ts +33 -0
- package/dist/esm/log/LogFormat.d.ts.map +1 -0
- package/dist/esm/log/LogFormat.js +483 -0
- package/dist/esm/log/LogFormat.js.map +6 -0
- package/dist/esm/log/LogLevel.d.ts +18 -0
- package/dist/esm/log/LogLevel.d.ts.map +1 -0
- package/dist/esm/log/LogLevel.js +37 -0
- package/dist/esm/log/LogLevel.js.map +6 -0
- package/dist/esm/log/Logger.d.ts +220 -0
- package/dist/esm/log/Logger.d.ts.map +1 -0
- package/dist/esm/log/Logger.js +381 -0
- package/dist/esm/log/Logger.js.map +6 -0
- package/dist/esm/log/index.d.ts +11 -0
- package/dist/esm/log/index.d.ts.map +1 -0
- package/dist/esm/log/index.js +11 -0
- package/dist/esm/log/index.js.map +6 -0
- package/dist/esm/math/ReedSolomon.d.ts +11 -0
- package/dist/esm/math/ReedSolomon.d.ts.map +1 -0
- package/dist/esm/math/ReedSolomon.js +89 -0
- package/dist/esm/math/ReedSolomon.js.map +6 -0
- package/dist/esm/math/Verhoeff.d.ts +17 -0
- package/dist/esm/math/Verhoeff.d.ts.map +1 -0
- package/dist/esm/math/Verhoeff.js +44 -0
- package/dist/esm/math/Verhoeff.js.map +6 -0
- package/dist/esm/math/index.d.ts +8 -0
- package/dist/esm/math/index.d.ts.map +1 -0
- package/dist/esm/math/index.js +8 -0
- package/dist/esm/math/index.js.map +6 -0
- package/dist/esm/net/Channel.d.ts +24 -0
- package/dist/esm/net/Channel.d.ts.map +1 -0
- package/dist/esm/net/Channel.js +15 -0
- package/dist/esm/net/Channel.js.map +6 -0
- package/dist/esm/net/NetInterface.d.ts +24 -0
- package/dist/esm/net/NetInterface.d.ts.map +1 -0
- package/dist/esm/net/NetInterface.js +22 -0
- package/dist/esm/net/NetInterface.js.map +6 -0
- package/dist/esm/net/Network.d.ts +54 -0
- package/dist/esm/net/Network.d.ts.map +1 -0
- package/dist/esm/net/Network.js +30 -0
- package/dist/esm/net/Network.js.map +6 -0
- package/dist/esm/net/ServerAddress.d.ts +17 -0
- package/dist/esm/net/ServerAddress.d.ts.map +1 -0
- package/dist/esm/net/ServerAddress.js +12 -0
- package/dist/esm/net/ServerAddress.js.map +6 -0
- package/dist/esm/net/TransportInterface.d.ts +40 -0
- package/dist/esm/net/TransportInterface.d.ts.map +1 -0
- package/dist/esm/net/TransportInterface.js +35 -0
- package/dist/esm/net/TransportInterface.js.map +6 -0
- package/dist/esm/net/UdpChannel.d.ts +25 -0
- package/dist/esm/net/UdpChannel.d.ts.map +1 -0
- package/dist/esm/net/UdpChannel.js +10 -0
- package/dist/esm/net/UdpChannel.js.map +6 -0
- package/dist/esm/net/UdpInterface.d.ts +35 -0
- package/dist/esm/net/UdpInterface.d.ts.map +1 -0
- package/dist/esm/net/UdpInterface.js +62 -0
- package/dist/esm/net/UdpInterface.js.map +6 -0
- package/dist/esm/net/UdpMulticastServer.d.ts +30 -0
- package/dist/esm/net/UdpMulticastServer.d.ts.map +1 -0
- package/dist/esm/net/UdpMulticastServer.js +113 -0
- package/dist/esm/net/UdpMulticastServer.js.map +6 -0
- package/dist/esm/net/index.d.ts +17 -0
- package/dist/esm/net/index.d.ts.map +1 -0
- package/dist/esm/net/index.js +17 -0
- package/dist/esm/net/index.js.map +6 -0
- package/dist/esm/net/mock/MockNetwork.d.ts +19 -0
- package/dist/esm/net/mock/MockNetwork.d.ts.map +1 -0
- package/dist/esm/net/mock/MockNetwork.js +36 -0
- package/dist/esm/net/mock/MockNetwork.js.map +6 -0
- package/dist/esm/net/mock/MockUdpChannel.d.ts +27 -0
- package/dist/esm/net/mock/MockUdpChannel.d.ts.map +1 -0
- package/dist/esm/net/mock/MockUdpChannel.js +56 -0
- package/dist/esm/net/mock/MockUdpChannel.js.map +6 -0
- package/dist/esm/net/mock/NetworkSimulator.d.ts +18 -0
- package/dist/esm/net/mock/NetworkSimulator.d.ts.map +1 -0
- package/dist/esm/net/mock/NetworkSimulator.js +53 -0
- package/dist/esm/net/mock/NetworkSimulator.js.map +6 -0
- package/dist/esm/package.json +6 -0
- package/dist/esm/polyfills/disposable.d.ts +7 -0
- package/dist/esm/polyfills/disposable.d.ts.map +1 -0
- package/dist/esm/polyfills/disposable.js +18 -0
- package/dist/esm/polyfills/disposable.js.map +6 -0
- package/dist/esm/polyfills/index.d.ts +7 -0
- package/dist/esm/polyfills/index.d.ts.map +1 -0
- package/dist/esm/polyfills/index.js +7 -0
- package/dist/esm/polyfills/index.js.map +6 -0
- package/dist/esm/storage/Storage.d.ts +54 -0
- package/dist/esm/storage/Storage.d.ts.map +1 -0
- package/dist/esm/storage/Storage.js +18 -0
- package/dist/esm/storage/Storage.js.map +6 -0
- package/dist/esm/storage/StorageBackendMemory.d.ts +27 -0
- package/dist/esm/storage/StorageBackendMemory.d.ts.map +1 -0
- package/dist/esm/storage/StorageBackendMemory.js +111 -0
- package/dist/esm/storage/StorageBackendMemory.js.map +6 -0
- package/dist/esm/storage/StorageContext.d.ts +26 -0
- package/dist/esm/storage/StorageContext.d.ts.map +1 -0
- package/dist/esm/storage/StorageContext.js +97 -0
- package/dist/esm/storage/StorageContext.js.map +6 -0
- package/dist/esm/storage/StorageManager.d.ts +17 -0
- package/dist/esm/storage/StorageManager.d.ts.map +1 -0
- package/dist/esm/storage/StorageManager.js +39 -0
- package/dist/esm/storage/StorageManager.js.map +6 -0
- package/dist/esm/storage/StorageService.d.ts +35 -0
- package/dist/esm/storage/StorageService.d.ts.map +1 -0
- package/dist/esm/storage/StorageService.js +62 -0
- package/dist/esm/storage/StorageService.js.map +6 -0
- package/dist/esm/storage/StringifyTools.d.ts +16 -0
- package/dist/esm/storage/StringifyTools.d.ts.map +1 -0
- package/dist/esm/storage/StringifyTools.js +85 -0
- package/dist/esm/storage/StringifyTools.js.map +6 -0
- package/dist/esm/storage/index.d.ts +12 -0
- package/dist/esm/storage/index.d.ts.map +1 -0
- package/dist/esm/storage/index.js +12 -0
- package/dist/esm/storage/index.js.map +6 -0
- package/dist/esm/time/Time.d.ts +66 -0
- package/dist/esm/time/Time.d.ts.map +1 -0
- package/dist/esm/time/Time.js +117 -0
- package/dist/esm/time/Time.js.map +6 -0
- package/dist/esm/time/index.d.ts +7 -0
- package/dist/esm/time/index.d.ts.map +1 -0
- package/dist/esm/time/index.js +7 -0
- package/dist/esm/time/index.js.map +6 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/dist/esm/util/Array.d.ts +12 -0
- package/dist/esm/util/Array.d.ts.map +1 -0
- package/dist/esm/util/Array.js +8 -0
- package/dist/esm/util/Array.js.map +6 -0
- package/dist/esm/util/Bytes.d.ts +23 -0
- package/dist/esm/util/Bytes.d.ts.map +1 -0
- package/dist/esm/util/Bytes.js +75 -0
- package/dist/esm/util/Bytes.js.map +6 -0
- package/dist/esm/util/Cache.d.ts +33 -0
- package/dist/esm/util/Cache.d.ts.map +1 -0
- package/dist/esm/util/Cache.js +94 -0
- package/dist/esm/util/Cache.js.map +6 -0
- package/dist/esm/util/Construction.d.ts +182 -0
- package/dist/esm/util/Construction.d.ts.map +1 -0
- package/dist/esm/util/Construction.js +397 -0
- package/dist/esm/util/Construction.js.map +6 -0
- package/dist/esm/util/DataReadQueue.d.ts +17 -0
- package/dist/esm/util/DataReadQueue.d.ts.map +1 -0
- package/dist/esm/util/DataReadQueue.js +56 -0
- package/dist/esm/util/DataReadQueue.js.map +6 -0
- package/dist/esm/util/DataReader.d.ts +32 -0
- package/dist/esm/util/DataReader.d.ts.map +1 -0
- package/dist/esm/util/DataReader.js +81 -0
- package/dist/esm/util/DataReader.js.map +6 -0
- package/dist/esm/util/DataWriter.d.ts +26 -0
- package/dist/esm/util/DataWriter.d.ts.map +1 -0
- package/dist/esm/util/DataWriter.js +94 -0
- package/dist/esm/util/DataWriter.js.map +6 -0
- package/dist/esm/util/DeepCopy.d.ts +12 -0
- package/dist/esm/util/DeepCopy.d.ts.map +1 -0
- package/dist/esm/util/DeepCopy.js +38 -0
- package/dist/esm/util/DeepCopy.js.map +6 -0
- package/dist/esm/util/DeepEqual.d.ts +7 -0
- package/dist/esm/util/DeepEqual.d.ts.map +1 -0
- package/dist/esm/util/DeepEqual.js +35 -0
- package/dist/esm/util/DeepEqual.js.map +6 -0
- package/dist/esm/util/Error.d.ts +12 -0
- package/dist/esm/util/Error.d.ts.map +1 -0
- package/dist/esm/util/Error.js +21 -0
- package/dist/esm/util/Error.js.map +6 -0
- package/dist/esm/util/GeneratedClass.d.ts +62 -0
- package/dist/esm/util/GeneratedClass.d.ts.map +1 -0
- package/dist/esm/util/GeneratedClass.js +97 -0
- package/dist/esm/util/GeneratedClass.js.map +6 -0
- package/dist/esm/util/Introspection.d.ts +38 -0
- package/dist/esm/util/Introspection.d.ts.map +1 -0
- package/dist/esm/util/Introspection.js +65 -0
- package/dist/esm/util/Introspection.js.map +6 -0
- package/dist/esm/util/Ip.d.ts +8 -0
- package/dist/esm/util/Ip.d.ts.map +1 -0
- package/dist/esm/util/Ip.js +70 -0
- package/dist/esm/util/Ip.js.map +6 -0
- package/dist/esm/util/Lifecycle.d.ts +97 -0
- package/dist/esm/util/Lifecycle.d.ts.map +1 -0
- package/dist/esm/util/Lifecycle.js +69 -0
- package/dist/esm/util/Lifecycle.js.map +6 -0
- package/dist/esm/util/Multiplex.d.ts +14 -0
- package/dist/esm/util/Multiplex.d.ts.map +1 -0
- package/dist/esm/util/Multiplex.js +6 -0
- package/dist/esm/util/Multiplex.js.map +6 -0
- package/dist/esm/util/Mutex.d.ts +34 -0
- package/dist/esm/util/Mutex.d.ts.map +1 -0
- package/dist/esm/util/Mutex.js +85 -0
- package/dist/esm/util/Mutex.js.map +6 -0
- package/dist/esm/util/NamedHandler.d.ts +21 -0
- package/dist/esm/util/NamedHandler.d.ts.map +1 -0
- package/dist/esm/util/NamedHandler.js +34 -0
- package/dist/esm/util/NamedHandler.js.map +6 -0
- package/dist/esm/util/Number.d.ts +37 -0
- package/dist/esm/util/Number.d.ts.map +1 -0
- package/dist/esm/util/Number.js +77 -0
- package/dist/esm/util/Number.js.map +6 -0
- package/dist/esm/util/Observable.d.ts +197 -0
- package/dist/esm/util/Observable.d.ts.map +1 -0
- package/dist/esm/util/Observable.js +320 -0
- package/dist/esm/util/Observable.js.map +6 -0
- package/dist/esm/util/PromiseQueue.d.ts +25 -0
- package/dist/esm/util/PromiseQueue.d.ts.map +1 -0
- package/dist/esm/util/PromiseQueue.js +87 -0
- package/dist/esm/util/PromiseQueue.js.map +6 -0
- package/dist/esm/util/Promises.d.ts +68 -0
- package/dist/esm/util/Promises.d.ts.map +1 -0
- package/dist/esm/util/Promises.js +179 -0
- package/dist/esm/util/Promises.js.map +6 -0
- package/dist/esm/util/Set.d.ts +60 -0
- package/dist/esm/util/Set.d.ts.map +1 -0
- package/dist/esm/util/Set.js +125 -0
- package/dist/esm/util/Set.js.map +6 -0
- package/dist/esm/util/Singleton.d.ts +7 -0
- package/dist/esm/util/Singleton.d.ts.map +1 -0
- package/dist/esm/util/Singleton.js +16 -0
- package/dist/esm/util/Singleton.js.map +6 -0
- package/dist/esm/util/Stream.d.ts +16 -0
- package/dist/esm/util/Stream.d.ts.map +1 -0
- package/dist/esm/util/Stream.js +18 -0
- package/dist/esm/util/Stream.js.map +6 -0
- package/dist/esm/util/String.d.ts +39 -0
- package/dist/esm/util/String.d.ts.map +1 -0
- package/dist/esm/util/String.js +188 -0
- package/dist/esm/util/String.js.map +6 -0
- package/dist/esm/util/Type.d.ts +84 -0
- package/dist/esm/util/Type.d.ts.map +1 -0
- package/dist/esm/util/Type.js +32 -0
- package/dist/esm/util/Type.js.map +6 -0
- package/dist/esm/util/index.d.ts +30 -0
- package/dist/esm/util/index.d.ts.map +1 -0
- package/dist/esm/util/index.js +30 -0
- package/dist/esm/util/index.js.map +6 -0
- package/package.json +76 -0
- package/src/MatterError.ts +205 -0
- package/src/codec/Base64Codec.ts +137 -0
- package/src/codec/DerCodec.ts +300 -0
- package/src/codec/DerTypes.ts +145 -0
- package/src/codec/DnsCodec.ts +393 -0
- package/src/codec/index.ts +10 -0
- package/src/crypto/Crypto.ts +136 -0
- package/src/crypto/CryptoConstants.ts +19 -0
- package/src/crypto/Key.ts +600 -0
- package/src/crypto/Spake2p.ts +128 -0
- package/src/crypto/index.ts +10 -0
- package/src/environment/Environment.ts +215 -0
- package/src/environment/Environmental.ts +60 -0
- package/src/environment/RuntimeService.ts +301 -0
- package/src/environment/VariableService.ts +308 -0
- package/src/environment/index.ts +10 -0
- package/src/index.ts +17 -0
- package/src/log/Diagnostic.ts +454 -0
- package/src/log/DiagnosticSource.ts +30 -0
- package/src/log/LogFormat.ts +646 -0
- package/src/log/LogLevel.ts +36 -0
- package/src/log/Logger.ts +474 -0
- package/src/log/index.ts +11 -0
- package/src/math/ReedSolomon.ts +100 -0
- package/src/math/Verhoeff.ts +47 -0
- package/src/math/index.ts +8 -0
- package/src/net/Channel.ts +30 -0
- package/src/net/NetInterface.ts +33 -0
- package/src/net/Network.ts +70 -0
- package/src/net/ServerAddress.ts +22 -0
- package/src/net/TransportInterface.ts +56 -0
- package/src/net/UdpChannel.ts +30 -0
- package/src/net/UdpInterface.ts +75 -0
- package/src/net/UdpMulticastServer.ts +138 -0
- package/src/net/index.ts +17 -0
- package/src/net/mock/MockNetwork.ts +42 -0
- package/src/net/mock/MockUdpChannel.ts +69 -0
- package/src/net/mock/NetworkSimulator.ts +63 -0
- package/src/polyfills/disposable.ts +24 -0
- package/src/polyfills/index.ts +7 -0
- package/src/storage/Storage.ts +61 -0
- package/src/storage/StorageBackendMemory.ts +131 -0
- package/src/storage/StorageContext.ts +111 -0
- package/src/storage/StorageManager.ts +39 -0
- package/src/storage/StorageService.ts +73 -0
- package/src/storage/StringifyTools.ts +107 -0
- package/src/storage/index.ts +12 -0
- package/src/time/Time.ts +179 -0
- package/src/time/index.ts +7 -0
- package/src/tsconfig.json +10 -0
- package/src/util/Array.ts +15 -0
- package/src/util/Bytes.ts +73 -0
- package/src/util/Cache.ts +111 -0
- package/src/util/Construction.ts +717 -0
- package/src/util/DataReadQueue.ts +55 -0
- package/src/util/DataReader.ts +100 -0
- package/src/util/DataWriter.ts +109 -0
- package/src/util/DeepCopy.ts +47 -0
- package/src/util/DeepEqual.ts +49 -0
- package/src/util/Error.ts +32 -0
- package/src/util/GeneratedClass.ts +204 -0
- package/src/util/Introspection.ts +93 -0
- package/src/util/Ip.ts +71 -0
- package/src/util/Lifecycle.ts +135 -0
- package/src/util/Multiplex.ts +14 -0
- package/src/util/Mutex.ts +100 -0
- package/src/util/NamedHandler.ts +52 -0
- package/src/util/Number.ts +71 -0
- package/src/util/Observable.ts +550 -0
- package/src/util/PromiseQueue.ts +102 -0
- package/src/util/Promises.ts +278 -0
- package/src/util/Set.ts +189 -0
- package/src/util/Singleton.ts +13 -0
- package/src/util/Stream.ts +19 -0
- package/src/util/String.ts +248 -0
- package/src/util/Type.ts +145 -0
- package/src/util/index.ts +30 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2024 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
declare const inspect: unique symbol;
|
|
7
|
+
/**
|
|
8
|
+
* Error base class for all errors thrown by this library.
|
|
9
|
+
*/
|
|
10
|
+
export declare class MatterError extends Error {
|
|
11
|
+
/**
|
|
12
|
+
* Convert the error to formatted text.
|
|
13
|
+
*
|
|
14
|
+
* Matter encodes errors with modern JS features including {@link Error#cause} and {@link AggregateError#errors}
|
|
15
|
+
* subfields. You can use this function to ensure all error details are presented regardless of environment.
|
|
16
|
+
*/
|
|
17
|
+
format(format?: "plain" | "ansi" | "html", indents?: number): string;
|
|
18
|
+
/**
|
|
19
|
+
* Node.js-style object inspection.
|
|
20
|
+
*
|
|
21
|
+
* Node's default inspection only prevents two levels of depth which may hide critical information. It's also
|
|
22
|
+
* considerably more verbose than native matter.js formatting. We therefore offer this custom implementation.
|
|
23
|
+
*
|
|
24
|
+
* Note that this conforms to Node's API but is not dependent on Node.
|
|
25
|
+
*/
|
|
26
|
+
[inspect](depth: number, inspectionOptions?: {
|
|
27
|
+
colors?: boolean;
|
|
28
|
+
}): unknown;
|
|
29
|
+
/**
|
|
30
|
+
* Rethrow an error unless it is an instance of this class.
|
|
31
|
+
*/
|
|
32
|
+
static accept<T extends MatterError>(this: new (...args: any[]) => T, error: unknown): asserts error is T;
|
|
33
|
+
/**
|
|
34
|
+
* Rethrow an error if it is an instance of this class.
|
|
35
|
+
*/
|
|
36
|
+
static reject(error: unknown): void;
|
|
37
|
+
/**
|
|
38
|
+
* The fallback formatter factory. This produces a limited plaintext formatter.
|
|
39
|
+
*/
|
|
40
|
+
static defaultFormatterFactory: () => typeof fallbackFormatter;
|
|
41
|
+
/**
|
|
42
|
+
* The error formatter factory. The default formatter is replaced by Matter.js in ./Format.ts.
|
|
43
|
+
*/
|
|
44
|
+
static formatterFor: (formatName: string) => (value: unknown, indents?: number) => unknown;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Error thrown when a Platform specific implementation was not added and so a provider (Network, Time, Crypto, etc)
|
|
48
|
+
* is not available.
|
|
49
|
+
*/
|
|
50
|
+
export declare class NoProviderError extends MatterError {
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Error thrown when an internal error occurs like unexpected cases or missing data that should be there. Please
|
|
54
|
+
* report such errors.
|
|
55
|
+
*/
|
|
56
|
+
export declare class InternalError extends MatterError {
|
|
57
|
+
}
|
|
58
|
+
/** Error thrown when a feature is not implemented yet. Please report such errors. */
|
|
59
|
+
export declare class NotImplementedError extends InternalError {
|
|
60
|
+
}
|
|
61
|
+
/** Error thrown when an unexpected case in the matter flow is encountered. Please report such errors. */
|
|
62
|
+
export declare class MatterFlowError extends MatterError {
|
|
63
|
+
}
|
|
64
|
+
/** Error thrown when an unexpected data is encountered. Please report such errors. */
|
|
65
|
+
export declare class UnexpectedDataError extends MatterError {
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Error thrown if most likely an implementation error is detected. Please check and correct your implementation and
|
|
69
|
+
* provided data. if you are sure your code is correct please report the issue.
|
|
70
|
+
*/
|
|
71
|
+
export declare class ImplementationError extends MatterError {
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Thrown for write attempts against immutable data.
|
|
75
|
+
*/
|
|
76
|
+
export declare class ReadOnlyError extends ImplementationError {
|
|
77
|
+
constructor(message?: string);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Thrown for errors that have multiple underlying causes.
|
|
81
|
+
*/
|
|
82
|
+
export declare class MatterAggregateError extends AggregateError {
|
|
83
|
+
constructor(causes: Iterable<unknown>, message?: string);
|
|
84
|
+
[inspect]: (depth: number, inspectionOptions?: {
|
|
85
|
+
colors?: boolean;
|
|
86
|
+
}) => unknown;
|
|
87
|
+
format: (format?: "plain" | "ansi" | "html", indents?: number) => string;
|
|
88
|
+
static [Symbol.hasInstance](instance: unknown): boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* It's never reasonable to fail to present error information so we include this rudimentary fallback error formatter.
|
|
92
|
+
*/
|
|
93
|
+
declare function fallbackFormatter(value: unknown, indents?: number): string;
|
|
94
|
+
export {};
|
|
95
|
+
//# sourceMappingURL=MatterError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MatterError.d.ts","sourceRoot":"","sources":["../../src/MatterError.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,QAAA,MAAM,OAAO,eAA2C,CAAC;AAEzD;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;IAClC;;;;;OAKG;IACH,MAAM,CAAC,MAAM,GAAE,OAAO,GAAG,MAAM,GAAG,MAAgB,EAAE,OAAO,SAAI,GAgB1C,MAAM;IAG3B;;;;;;;OAOG;IACH,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE;IAcjE;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC;IAOzG;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAMnC;;OAEG;IACH,MAAM,CAAC,uBAAuB,iCAA2B;IAEzD;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAClD;CAU3C;AAED;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,WAAW;CAAG;AAEnD;;;GAGG;AACH,qBAAa,aAAc,SAAQ,WAAW;CAAG;AAEjD,qFAAqF;AACrF,qBAAa,mBAAoB,SAAQ,aAAa;CAAG;AAEzD,yGAAyG;AACzG,qBAAa,eAAgB,SAAQ,WAAW;CAAG;AAEnD,sFAAsF;AACtF,qBAAa,mBAAoB,SAAQ,WAAW;CAAG;AAEvD;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;CAAG;AAEvD;;GAEG;AACH,qBAAa,aAAc,SAAQ,mBAAmB;gBACtC,OAAO,SAA2B;CAGjD;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;gBACxC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM;IAKvD,CAAC,OAAO,CAAC,UAnGQ,MAAM,sBAAsB;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,aAmGtB;IAC3C,MAAM,YA/HS,OAAO,GAAG,MAAM,GAAG,MAAM,uBAgBnB,MAAM,CA+GW;WAGtB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,OAAO;CAMzD;AAED;;GAEG;AACH,iBAAS,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,SAAI,UA2CrD"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var MatterError_exports = {};
|
|
20
|
+
__export(MatterError_exports, {
|
|
21
|
+
ImplementationError: () => ImplementationError,
|
|
22
|
+
InternalError: () => InternalError,
|
|
23
|
+
MatterAggregateError: () => MatterAggregateError,
|
|
24
|
+
MatterError: () => MatterError,
|
|
25
|
+
MatterFlowError: () => MatterFlowError,
|
|
26
|
+
NoProviderError: () => NoProviderError,
|
|
27
|
+
NotImplementedError: () => NotImplementedError,
|
|
28
|
+
ReadOnlyError: () => ReadOnlyError,
|
|
29
|
+
UnexpectedDataError: () => UnexpectedDataError
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(MatterError_exports);
|
|
32
|
+
var import_Error = require("./util/Error.js");
|
|
33
|
+
/**
|
|
34
|
+
* @license
|
|
35
|
+
* Copyright 2022-2024 Matter.js Authors
|
|
36
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
37
|
+
*/
|
|
38
|
+
const inspect = Symbol.for("nodejs.util.inspect.custom");
|
|
39
|
+
class MatterError extends Error {
|
|
40
|
+
/**
|
|
41
|
+
* Convert the error to formatted text.
|
|
42
|
+
*
|
|
43
|
+
* Matter encodes errors with modern JS features including {@link Error#cause} and {@link AggregateError#errors}
|
|
44
|
+
* subfields. You can use this function to ensure all error details are presented regardless of environment.
|
|
45
|
+
*/
|
|
46
|
+
format(format = "plain", indents = 0) {
|
|
47
|
+
let formatterFor = MatterError.formatterFor;
|
|
48
|
+
if (typeof formatterFor !== "function") {
|
|
49
|
+
formatterFor = MatterError.defaultFormatterFactory;
|
|
50
|
+
}
|
|
51
|
+
let formatter = formatterFor(format);
|
|
52
|
+
if (typeof formatter !== "function") {
|
|
53
|
+
formatter = fallbackFormatter;
|
|
54
|
+
}
|
|
55
|
+
let result = formatter(this, indents);
|
|
56
|
+
if (typeof result !== "string") {
|
|
57
|
+
result = `${result}`;
|
|
58
|
+
}
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Node.js-style object inspection.
|
|
63
|
+
*
|
|
64
|
+
* Node's default inspection only prevents two levels of depth which may hide critical information. It's also
|
|
65
|
+
* considerably more verbose than native matter.js formatting. We therefore offer this custom implementation.
|
|
66
|
+
*
|
|
67
|
+
* Note that this conforms to Node's API but is not dependent on Node.
|
|
68
|
+
*/
|
|
69
|
+
[inspect](depth, inspectionOptions) {
|
|
70
|
+
const formatterFor = MatterError.formatterFor;
|
|
71
|
+
if (typeof formatterFor !== "function") {
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
const format = formatterFor(inspectionOptions?.colors ? "ansi" : "plain");
|
|
75
|
+
if (typeof format !== "function") {
|
|
76
|
+
return this;
|
|
77
|
+
}
|
|
78
|
+
return format(this, depth);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Rethrow an error unless it is an instance of this class.
|
|
82
|
+
*/
|
|
83
|
+
static accept(error) {
|
|
84
|
+
if (error instanceof this) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Rethrow an error if it is an instance of this class.
|
|
91
|
+
*/
|
|
92
|
+
static reject(error) {
|
|
93
|
+
if (error instanceof this) {
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The fallback formatter factory. This produces a limited plaintext formatter.
|
|
99
|
+
*/
|
|
100
|
+
static defaultFormatterFactory = () => fallbackFormatter;
|
|
101
|
+
/**
|
|
102
|
+
* The error formatter factory. The default formatter is replaced by Matter.js in ./Format.ts.
|
|
103
|
+
*/
|
|
104
|
+
static formatterFor = MatterError.defaultFormatterFactory;
|
|
105
|
+
// TODO - this is probably correct; MatterAggregateError should be typeof MatterError. Need to diagnose some test
|
|
106
|
+
// breakage before enabling though
|
|
107
|
+
// static [Symbol.hasInstance](instance: unknown) {
|
|
108
|
+
// if (instance instanceof MatterAggregateError) {
|
|
109
|
+
// return true;
|
|
110
|
+
// }
|
|
111
|
+
// return Error[Symbol.hasInstance](instance);
|
|
112
|
+
// }
|
|
113
|
+
}
|
|
114
|
+
class NoProviderError extends MatterError {
|
|
115
|
+
}
|
|
116
|
+
class InternalError extends MatterError {
|
|
117
|
+
}
|
|
118
|
+
class NotImplementedError extends InternalError {
|
|
119
|
+
}
|
|
120
|
+
class MatterFlowError extends MatterError {
|
|
121
|
+
}
|
|
122
|
+
class UnexpectedDataError extends MatterError {
|
|
123
|
+
}
|
|
124
|
+
class ImplementationError extends MatterError {
|
|
125
|
+
}
|
|
126
|
+
class ReadOnlyError extends ImplementationError {
|
|
127
|
+
constructor(message = "This view is read-only") {
|
|
128
|
+
super(message);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
class MatterAggregateError extends AggregateError {
|
|
132
|
+
constructor(causes, message) {
|
|
133
|
+
causes = [...causes].map(import_Error.errorOf);
|
|
134
|
+
super(causes, message);
|
|
135
|
+
}
|
|
136
|
+
[inspect] = MatterError.prototype[inspect];
|
|
137
|
+
format = MatterError.prototype.format;
|
|
138
|
+
// TODO - see comment on MatterError. If that one is correct this is incorrect
|
|
139
|
+
static [Symbol.hasInstance](instance) {
|
|
140
|
+
if (instance instanceof MatterError) {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
return AggregateError[Symbol.hasInstance](instance);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function fallbackFormatter(value, indents = 0) {
|
|
147
|
+
if (value === void 0 || value === null) {
|
|
148
|
+
return `${value}`;
|
|
149
|
+
}
|
|
150
|
+
function formatOne(value2, indents2, messagePrefix) {
|
|
151
|
+
const { message, stack, cause, errors } = value2;
|
|
152
|
+
let indent;
|
|
153
|
+
if (typeof indents2 !== "number" || indents2 < 0) {
|
|
154
|
+
indent = "";
|
|
155
|
+
} else {
|
|
156
|
+
indent = " ".repeat(indents2);
|
|
157
|
+
}
|
|
158
|
+
const buffer = [`${indent}${messagePrefix}${message ?? "(unknown error)"}`];
|
|
159
|
+
if (stack !== void 0 && stack !== null) {
|
|
160
|
+
const frames = stack.toString().split("\n");
|
|
161
|
+
frames.shift();
|
|
162
|
+
buffer.push(...frames.map((f) => `${indent} ${f.trim()}`));
|
|
163
|
+
}
|
|
164
|
+
if (cause !== void 0) {
|
|
165
|
+
buffer.push(formatOne(cause, indents2, "Caused by: "));
|
|
166
|
+
}
|
|
167
|
+
if (typeof errors?.[Symbol.iterator] === "function") {
|
|
168
|
+
let causeNumber = 0;
|
|
169
|
+
for (const error of errors) {
|
|
170
|
+
buffer.push(formatOne(error, indents2 + 1, `Cause #${causeNumber++}: `));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return buffer.join("\n");
|
|
174
|
+
}
|
|
175
|
+
return formatOne(value, indents, "");
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=MatterError.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/MatterError.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,mBAAwB;AANxB;AAAA;AAAA;AAAA;AAAA;AAQA,MAAM,UAAU,OAAO,IAAI,4BAA4B;AAKhD,MAAM,oBAAoB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOnC,OAAO,SAAoC,SAAS,UAAU,GAAG;AAC7D,QAAI,eAAe,YAAY;AAC/B,QAAI,OAAO,iBAAiB,YAAY;AACpC,qBAAe,YAAY;AAAA,IAC/B;AAEA,QAAI,YAAY,aAAa,MAAM;AACnC,QAAI,OAAO,cAAc,YAAY;AACjC,kBAAY;AAAA,IAChB;AAEA,QAAI,SAAS,UAAU,MAAM,OAAO;AACp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"names": ["value", "indents"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2024 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export declare namespace Base64 {
|
|
7
|
+
/**
|
|
8
|
+
* Encodes base64.
|
|
9
|
+
*
|
|
10
|
+
* @param input an indexable sequence of bytes
|
|
11
|
+
* @param url set to true to encode as base46url
|
|
12
|
+
* @returns an encoded string
|
|
13
|
+
*/
|
|
14
|
+
function encode(input: ArrayLike<number>, url?: boolean): string;
|
|
15
|
+
/**
|
|
16
|
+
* Decodes base64.
|
|
17
|
+
*
|
|
18
|
+
* @param input binary data encoded as a base64 or base64url string
|
|
19
|
+
* @returns decoded bytes in a ByteArray
|
|
20
|
+
*/
|
|
21
|
+
function decode(input: string): Uint8Array;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=Base64Codec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Base64Codec.d.ts","sourceRoot":"","sources":["../../../src/codec/Base64Codec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqCH,yBAAiB,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,SAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,GAAG,UAAQ,UA+B3D;IAED;;;;;OAKG;IACH,SAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,cA+CnC;CACJ"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var Base64Codec_exports = {};
|
|
20
|
+
__export(Base64Codec_exports, {
|
|
21
|
+
Base64: () => Base64
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Base64Codec_exports);
|
|
24
|
+
/**
|
|
25
|
+
* @license
|
|
26
|
+
* Copyright 2022-2024 Matter.js Authors
|
|
27
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
28
|
+
*/
|
|
29
|
+
function cp(text) {
|
|
30
|
+
return text.codePointAt(0) ?? 0;
|
|
31
|
+
}
|
|
32
|
+
const A2B = [];
|
|
33
|
+
const B2A = new Uint8Array(64);
|
|
34
|
+
const B2A_URL = new Uint8Array(64);
|
|
35
|
+
const PAD = cp("=");
|
|
36
|
+
{
|
|
37
|
+
let addRange = function(start, stop) {
|
|
38
|
+
const end = cp(stop) + 1;
|
|
39
|
+
for (let i = cp(start); i < end; i++) {
|
|
40
|
+
A2B[i] = pos;
|
|
41
|
+
B2A[pos++] = i;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var addRange2 = addRange;
|
|
45
|
+
let pos = 0;
|
|
46
|
+
addRange("A", "Z");
|
|
47
|
+
addRange("a", "z");
|
|
48
|
+
addRange("0", "9");
|
|
49
|
+
addRange("+", "+");
|
|
50
|
+
addRange("/", "/");
|
|
51
|
+
const slashValue = A2B[cp("/")];
|
|
52
|
+
const plusValue = A2B[cp("+")];
|
|
53
|
+
A2B[cp("_")] = slashValue;
|
|
54
|
+
A2B[cp("-")] = plusValue;
|
|
55
|
+
B2A_URL.set(B2A);
|
|
56
|
+
B2A_URL[slashValue] = cp("_");
|
|
57
|
+
B2A_URL[plusValue] = cp("-");
|
|
58
|
+
}
|
|
59
|
+
var Base64;
|
|
60
|
+
((Base642) => {
|
|
61
|
+
function encode(input, url = false) {
|
|
62
|
+
const dict = url ? B2A_URL : B2A;
|
|
63
|
+
let outLength = Math.trunc(input.length / 3) * 4;
|
|
64
|
+
if (url) {
|
|
65
|
+
const partial = input.length % 3;
|
|
66
|
+
if (partial) outLength += partial + 1;
|
|
67
|
+
} else {
|
|
68
|
+
outLength += input.length % 3 ? 4 : 0;
|
|
69
|
+
}
|
|
70
|
+
const out = new Uint8Array(outLength);
|
|
71
|
+
for (let inPos = 0, outPos = 0; outPos < outLength; ) {
|
|
72
|
+
const n = (input[inPos++] << 16) + ((input[inPos++] ?? 0) << 8) + (input[inPos++] ?? 0);
|
|
73
|
+
out[outPos++] = dict[n >>> 18];
|
|
74
|
+
out[outPos++] = dict[n >>> 12 & 63];
|
|
75
|
+
if (inPos - input.length === 2) {
|
|
76
|
+
if (!url) out[outPos++] = PAD;
|
|
77
|
+
} else {
|
|
78
|
+
out[outPos++] = dict[n >>> 6 & 63];
|
|
79
|
+
}
|
|
80
|
+
if (inPos > input.length) {
|
|
81
|
+
if (!url) out[outPos++] = PAD;
|
|
82
|
+
} else {
|
|
83
|
+
out[outPos++] = dict[n & 63];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return new TextDecoder("iso-8859-1").decode(out);
|
|
87
|
+
}
|
|
88
|
+
Base642.encode = encode;
|
|
89
|
+
function decode(input) {
|
|
90
|
+
if (!input.length) {
|
|
91
|
+
return new Uint8Array();
|
|
92
|
+
}
|
|
93
|
+
let inputLength = input.length;
|
|
94
|
+
while (input.codePointAt(inputLength - 1) === PAD) inputLength--;
|
|
95
|
+
let outLength = Math.trunc(inputLength / 4) * 3;
|
|
96
|
+
switch (inputLength % 4) {
|
|
97
|
+
case 3:
|
|
98
|
+
outLength += 2;
|
|
99
|
+
break;
|
|
100
|
+
case 2:
|
|
101
|
+
outLength += 1;
|
|
102
|
+
break;
|
|
103
|
+
case 1:
|
|
104
|
+
throw new Error("Invalid base-64 encoding");
|
|
105
|
+
}
|
|
106
|
+
const out = new Uint8Array(outLength);
|
|
107
|
+
for (let inPos = 0, outPos = 0; ; ) {
|
|
108
|
+
let lookup2 = function() {
|
|
109
|
+
if (inPos >= inputLength) return 0;
|
|
110
|
+
const v = A2B[input.codePointAt(inPos++) ?? -1];
|
|
111
|
+
if (v === void 0) {
|
|
112
|
+
throw new Error("Invalid base-64 encoding");
|
|
113
|
+
}
|
|
114
|
+
return v;
|
|
115
|
+
};
|
|
116
|
+
var lookup = lookup2;
|
|
117
|
+
const n = (lookup2() << 18) + (lookup2() << 12) + (lookup2() << 6) + lookup2();
|
|
118
|
+
out[outPos++] = n >>> 16;
|
|
119
|
+
if (outPos < outLength) {
|
|
120
|
+
out[outPos++] = n >>> 8 & 255;
|
|
121
|
+
} else {
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
if (outPos < outLength) {
|
|
125
|
+
out[outPos++] = n & 255;
|
|
126
|
+
} else {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return out;
|
|
131
|
+
}
|
|
132
|
+
Base642.decode = decode;
|
|
133
|
+
})(Base64 || (Base64 = {}));
|
|
134
|
+
//# sourceMappingURL=Base64Codec.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/codec/Base64Codec.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,GAAG,MAAc;AACtB,SA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