diff --git a/.prettierrc b/.prettierrc index 8448ee08b..ad4d89552 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,4 @@ { - "plugins": ["prettier-plugin-svelte"], "semi": false, "singleQuote": true, "tabWidth": 2, diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 822d5e442..c58f0dad5 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -69,7 +69,6 @@ - [Yarn Package Issues](#yarn-package-issues) - [If Yarn Keeps Updating to The Latest Version](#if-yarn-keeps-updating-to-the-latest-version) - [Yarn Test Issues](#yarn-test-issues) - - [Data Editor Opens Test Case Failing](#data-editor-opens-test-case-failing) - [TLS Certificate Issues](#tls-certificate-issues) - [Tests Failing When Connected Through SSH](#tests-failing-when-connected-through-ssh) - [Debugging Issues](#debugging-issues) @@ -397,7 +396,7 @@ Your window should look like the following. Note that you may have to move some ![ide-debug](https://github.com/user-attachments/assets/dbc8a48e-b528-4861-8163-6c167c4d60fa) -Here’s an example view of the data editor (OmegaEdit) with the schema on the left. +Here’s an example view of the Ωedit Data Editor dependency with the schema on the left. ![ide-debug2](https://github.com/user-attachments/assets/9b982947-2f9c-45b0-8d6f-7b86eef1bacd) @@ -489,7 +488,7 @@ As of typing this document (Feb 2025), the latest version of yarn is 4.6.0. If y ➤ YN0087: Migrated your project to the latest Yarn version �� ➤ YN0000: · Yarn 4.6.0 ➤ YN0000: ┌ Resolution step -➤ YN0085: │ + @omega-edit/client@npm:0.9.83, @tsconfig/svelte@npm:5.0.2, @types/glob@npm:8.1.0, @types/mocha@npm:10.0.6, @types/node@npm:20.11.30, @types/vscode-webview@npm:1.57.4, @types/vscode@npm:1.95.0, @viperproject/locate-java-home@npm:1.1.15, @vscode/debugadapter-testsupport@npm:1.65.0, @vscode/debugadapter@npm:1.67.0, @vscode/test-electron@npm:2.3.8, @vscode/vsce@npm:2.22.0, @vscode/webview-ui-toolkit@npm:1.4.0, await-notify@npm:1.0.1, chai@npm:4.4.1, and 703 more. +➤ YN0085: │ + @types/glob@npm:8.1.0, @types/mocha@npm:10.0.6, @types/node@npm:20.11.30, @types/vscode@npm:1.95.0, @viperproject/locate-java-home@npm:1.1.15, @vscode/debugadapter-testsupport@npm:1.65.0, @vscode/debugadapter@npm:1.67.0, @vscode/test-electron@npm:2.3.8, @vscode/vsce@npm:2.22.0, @vscode/webview-ui-toolkit@npm:1.4.0, await-notify@npm:1.0.1, chai@npm:4.4.1, and more. ➤ YN0000: └ Completed in 9s 958ms ➤ YN0000: ┌ Post-resolution validation ➤ YN0002: │ apache-daffodil-vscode@workspace:. doesn't provide react (pa7c88), requested by @vscode/webview-ui-toolkit. @@ -500,8 +499,6 @@ As of typing this document (Feb 2025), the latest version of yarn is 4.6.0. If y ➤ YN0000: └ Completed in 4m 47s ➤ YN0000: ┌ Link step ➤ YN0007: │ esbuild@npm:0.19.9 must be built because it never has been before or the last one failed -➤ YN0007: │ svelte-preprocess@npm:5.1.1 [5fe27] must be built because it never has been before or the last one failed -➤ YN0007: │ svelte-preprocess@npm:5.1.1 [ab741] must be built because it never has been before or the last one failed ➤ YN0007: │ keytar@npm:7.9.0 must be built because it never has been before or the last one failed ➤ YN0007: │ protobufjs@npm:7.4.0 must be built because it never has been before or the last one failed ➤ YN0000: └ Completed in 2m 40s @@ -514,10 +511,6 @@ To remedy this, you need to change versions of Yarn. Use `yarn set version 1.22. #### Yarn Test Issues -##### Data Editor Opens Test Case Failing - -This means port 9000 is Occupied. See the current workarounds section in ["data editor opens" test fails if Port 9000 is Occupied · Issue #1175 · apache/daffodil-vscode](https://github.com/apache/daffodil-vscode/issues/1175). - ##### TLS Certificate Issues HTTPS TLS certificates are verified by default. When running the test suite in certain environments (e.g., company VPN that uses endpoint protection), TLS certificate verifications may fail with a self-signed certificate error. If this is the case, either have node trust the endpoint protection certificate, or use one of these workarounds to disable the certificate verification: @@ -600,8 +593,6 @@ If issues persist, you may want to uninstall Node and reinstall it. If that does For issues not mentioned in this section, the log files for the debugger are located in your OS temp directory (e.g. `/tmp` for Ubuntu 24.04.2). The log file for the debugger should be named `daffodil-debugger-.log` when debugging the extension or `yarn-test-daffodil-debugger-.log` when running yarn test. -The log files for the data editor are located in your OS app data path (e.g. `/home//.local/share/omega_edit`). The log files for the data editor should be named `serv-.log` for the server logs and `dataEditor-.log` for the data editor logs when using the data editor or `test-serv-.log` and `test-dataEditor-.log` when running yarn test. - ## Development Specific ### Dependency Licensing Information diff --git a/LICENSE b/LICENSE index dc0ca0d88..13781c126 100644 --- a/LICENSE +++ b/LICENSE @@ -410,201 +410,6 @@ conditions of the following licenses. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- src/svelte/resources/fonts/RedHatMono-Regular.woff2 - This product bundles the above files from the 'RedHatFont' repo. (https://github.com/RedHatOfficial/RedHatFont) - These files are available under the SIL Open Font License, Version 1.1: - Copyright 2021 Red Hat, Inc., - with Reserved Font Name Red Hat. - - This Font Software is licensed under the SIL Open Font License, Version 1.1. - This license is copied below, and is also available with a FAQ at: - http://scripts.sil.org/OFL - - - ----------------------------------------------------------- - SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 - ----------------------------------------------------------- - - PREAMBLE - The goals of the Open Font License (OFL) are to stimulate worldwide - development of collaborative font projects, to support the font creation - efforts of academic and linguistic communities, and to provide a free and - open framework in which fonts may be shared and improved in partnership - with others. - - The OFL allows the licensed fonts to be used, studied, modified and - redistributed freely as long as they are not sold by themselves. The - fonts, including any derivative works, can be bundled, embedded, - redistributed and/or sold with any software provided that any reserved - names are not used by derivative works. The fonts and derivatives, - however, cannot be released under any other type of license. The - requirement for fonts to remain under this license does not apply - to any document created using the fonts or their derivatives. - - DEFINITIONS - "Font Software" refers to the set of files released by the Copyright - Holder(s) under this license and clearly marked as such. This may - include source files, build scripts and documentation. - - "Reserved Font Name" refers to any names specified as such after the - copyright statement(s). - - "Original Version" refers to the collection of Font Software components as - distributed by the Copyright Holder(s). - - "Modified Version" refers to any derivative made by adding to, deleting, - or substituting -- in part or in whole -- any of the components of the - Original Version, by changing formats or by porting the Font Software to a - new environment. - - "Author" refers to any designer, engineer, programmer, technical - writer or other person who contributed to the Font Software. - - PERMISSION & CONDITIONS - Permission is hereby granted, free of charge, to any person obtaining - a copy of the Font Software, to use, study, copy, merge, embed, modify, - redistribute, and sell modified and unmodified copies of the Font - Software, subject to the following conditions: - - 1) Neither the Font Software nor any of its individual components, - in Original or Modified Versions, may be sold by itself. - - 2) Original or Modified Versions of the Font Software may be bundled, - redistributed and/or sold with any software, provided that each copy - contains the above copyright notice and this license. These can be - included either as stand-alone text files, human-readable headers or - in the appropriate machine-readable metadata fields within text or - binary files as long as those fields can be easily viewed by the user. - - 3) No Modified Version of the Font Software may use the Reserved Font - Name(s) unless explicit written permission is granted by the corresponding - Copyright Holder. This restriction only applies to the primary font name as - presented to the users. - - 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font - Software shall not be used to promote, endorse or advertise any - Modified Version, except to acknowledge the contribution(s) of the - Copyright Holder(s) and the Author(s) or with their explicit written - permission. - - 5) The Font Software, modified or unmodified, in part or in whole, - must be distributed entirely under this license, and must not be - distributed under any other license. The requirement for fonts to - remain under this license does not apply to any document created - using the Font Software. - - TERMINATION - This license becomes null and void if any of the above conditions are - not met. - - DISCLAIMER - THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT - OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE - COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL - DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM - OTHER DEALINGS IN THE FONT SOFTWARE. - -- src/svelte/resources/fonts/SpaceGrotesk-Variable.woff2 - This product bundles the above files from the 'space-grotesk' repo. (https://github.com/floriankarsten/space-grotesk) - These files are available under the SIL Open Font License, Version 1.1: - Copyright 2020 The Space Grotesk Project Authors (https://github.com/floriankarsten/space-grotesk) - - This Font Software is licensed under the SIL Open Font License, Version 1.1. - This license is copied below, and is also available with a FAQ at: - http://scripts.sil.org/OFL - - - ----------------------------------------------------------- - SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 - ----------------------------------------------------------- - - PREAMBLE - The goals of the Open Font License (OFL) are to stimulate worldwide - development of collaborative font projects, to support the font creation - efforts of academic and linguistic communities, and to provide a free and - open framework in which fonts may be shared and improved in partnership - with others. - - The OFL allows the licensed fonts to be used, studied, modified and - redistributed freely as long as they are not sold by themselves. The - fonts, including any derivative works, can be bundled, embedded, - redistributed and/or sold with any software provided that any reserved - names are not used by derivative works. The fonts and derivatives, - however, cannot be released under any other type of license. The - requirement for fonts to remain under this license does not apply - to any document created using the fonts or their derivatives. - - DEFINITIONS - "Font Software" refers to the set of files released by the Copyright - Holder(s) under this license and clearly marked as such. This may - include source files, build scripts and documentation. - - "Reserved Font Name" refers to any names specified as such after the - copyright statement(s). - - "Original Version" refers to the collection of Font Software components as - distributed by the Copyright Holder(s). - - "Modified Version" refers to any derivative made by adding to, deleting, - or substituting -- in part or in whole -- any of the components of the - Original Version, by changing formats or by porting the Font Software to a - new environment. - - "Author" refers to any designer, engineer, programmer, technical - writer or other person who contributed to the Font Software. - - PERMISSION & CONDITIONS - Permission is hereby granted, free of charge, to any person obtaining - a copy of the Font Software, to use, study, copy, merge, embed, modify, - redistribute, and sell modified and unmodified copies of the Font - Software, subject to the following conditions: - - 1) Neither the Font Software nor any of its individual components, - in Original or Modified Versions, may be sold by itself. - - 2) Original or Modified Versions of the Font Software may be bundled, - redistributed and/or sold with any software, provided that each copy - contains the above copyright notice and this license. These can be - included either as stand-alone text files, human-readable headers or - in the appropriate machine-readable metadata fields within text or - binary files as long as those fields can be easily viewed by the user. - - 3) No Modified Version of the Font Software may use the Reserved Font - Name(s) unless explicit written permission is granted by the corresponding - Copyright Holder. This restriction only applies to the primary font name as - presented to the users. - - 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font - Software shall not be used to promote, endorse or advertise any - Modified Version, except to acknowledge the contribution(s) of the - Copyright Holder(s) and the Author(s) or with their explicit written - permission. - - 5) The Font Software, modified or unmodified, in part or in whole, - must be distributed entirely under this license, and must not be - distributed under any other license. The requirement for fonts to - remain under this license does not apply to any document created - using the Font Software. - - TERMINATION - This license becomes null and void if any of the above conditions are - not met. - - DISCLAIMER - THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT - OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE - COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL - DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM - OTHER DEALINGS IN THE FONT SOFTWARE. - The following NOTICE information applies to binary components distributed with this project: - com.fasterxml.jackson.core.jackson-core-2.13.4.jar diff --git a/README.md b/README.md index fc0a61077..5f20ef3b8 100644 --- a/README.md +++ b/README.md @@ -48,12 +48,12 @@ The Apache Daffodil™ Extension for Visual Studio provides a Daffodil parse deb ![image 3](images/DE-brief.png) -The Apache Daffodil™ Extension for Visual Studio Code provides an integrated data editor tuned specifically for challenging Daffodil use cases. It is designed to support large files, of any type, that are well beyond the limits of the standard text editor in VS Code. The Data Editor enables the editing of single or multiple bytes in various encodings. The Data Editor can seek to file offsets, search and replace byte sequences, profile data, and determine a file's content type. Features of the Data Editor will evolve to address the specific needs of the Daffodil community. +The Apache Daffodil™ Extension for Visual Studio Code integrates with the Ωedit™ Data Editor extension for challenging Daffodil use cases. The data editor is declared as a VS Code extension dependency and is designed to support large files, of any type, that are well beyond the limits of the standard text editor in VS Code. It enables editing single or multiple bytes in various encodings, seeking to file offsets, searching and replacing byte sequences, profiling data, and determining a file's content type. ### Data Debugger Integration ![image](https://github.com/apache/daffodil-vscode/assets/30351915/7f906c91-83bc-454e-a164-4dad51842887) -The Data Editor component can be configured to run alongside and open the designated file specified by the data debugger. During this operation, whenever the debug session steps to a new byte position or stops at a breakpoint, the data content within the Data Editor will illustrate the byte location. +The Data Editor can be configured to open the designated data file when a Daffodil debug session starts. As the debug session steps to new byte positions, Daffodil sends byte-location highlights to the Ωedit™ Data Editor so the parse location is visible in the data content. # Prerequisites diff --git a/build/package/LICENSE b/build/package/LICENSE index 734061a0d..c20ed0f20 100644 --- a/build/package/LICENSE +++ b/build/package/LICENSE @@ -210,7 +210,6 @@ the source code for these subcomponents is subject to the terms and conditions of the following licenses. - 'abort-controller' in extension/dist/ext/extension.js -- 'abort-controller' in node_modules/@omega-edit/client This product bundles 'abort-controller' from the above files. These packages are available under the MIT License: MIT License @@ -259,7 +258,6 @@ conditions of the following licenses. THE SOFTWARE. - 'atomic-sleep' in extension/dist/ext/extension.js -- 'atomic-sleep' in node_modules/@omega-edit/client This product bundles 'atomic-sleep' from the above files. These packages are available under the MIT License: The MIT License (MIT) @@ -285,13 +283,9 @@ conditions of the following licenses. OR OTHER DEALINGS IN THE SOFTWARE. - 'ansi-regex' in extension/dist/ext/extension.js -- 'ansi-regex' in node_modules/@omega-edit/client - 'ansi-styles' in extension/dist/ext/extension.js -- 'ansi-styles' in node_modules/@omega-edit/client - 'string-width' in extension/dist/ext/extension.js -- 'string-width' in node_modules/@omega-edit/client - 'wrap-ansi' in extension/dist/ext/extension.js -- 'wrap-ansi' in node_modules/@omega-edit/client This product bundles 'ansi-regex', 'ansi-styles', 'string-width' and 'wrap-ansi' from the above files. These packages are available under the MIT License: MIT License @@ -311,7 +305,6 @@ conditions of the following licenses. https://github.com/davidaq/node-await-notify - 'base64-js' in extension/dist/ext/extension.js -- 'base64-js' in node_modules/@omega-edit/client This product bundles 'base64-js' from the above files. These files are available under the MIT License: The MIT License (MIT) @@ -346,7 +339,6 @@ conditions of the following licenses. http://www.opensource.org/licenses/mit-license.php - 'buffer' in extension/dist/ext/extension.js -- 'buffer' in node_modules/@omega-edit/client This product bundles 'buffer' from the above files. These files are available under the MIT License: The MIT License (MIT) @@ -390,11 +382,8 @@ conditions of the following licenses. http://www.opensource.org/licenses/mit-license.php - 'cliui' in extension/dist/ext/extension.js -- 'cliui' in node_modules/@omega-edit/client - 'y18n' in extension/dist/ext/extension.js -- 'y18n' in node_modules/@omega-edit/client - 'yargs-parser' in extension/dist/ext/extension.js -- 'yargs-parser' in node_modules/@omega-edit/client This product bundles 'cliui', 'y18n' and 'yargs-parser' from the above files. These packages are available under the ISC License: Copyright (c) 2015, Contributors @@ -413,7 +402,6 @@ conditions of the following licenses. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - 'color-convert' in extension/dist/ext/extension.js -- 'color-convert' in node_modules/@omega-edit/client This product bundles 'color-convert' from the above files. This package is available under the MIT License: Copyright (c) 2011-2016 Heather Arthur . @@ -439,7 +427,6 @@ conditions of the following licenses. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'color-name' in extension/dist/ext/extension.js -- 'color-name' in node_modules/@omega-edit/client This product bundles 'color-name' from the above files. This package is available under the MIT License: The MIT License (MIT) @@ -452,7 +439,6 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'emoji-regex' in extension/dist/ext/extension.js -- 'emoji-regex' in node_modules/@omega-edit/client This product bundles 'emoji-regex' from the above files. This package is available under the MIT License: Copyright Mathias Bynens @@ -477,7 +463,6 @@ conditions of the following licenses. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'escalade' in extension/dist/ext/extension.js -- 'escalade' in node_modules/@omega-edit/client This product bundles 'escalade' from the above files. This package is available under the MIT License: MIT License @@ -491,7 +476,6 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'event-target-shim' in extension/dist/ext/extension.js -- 'event-target-shim' in node_modules/@omega-edit/client This product bundles 'event-target-shim' from the above files. This package is available under the MIT License: The MIT License (MIT) @@ -517,7 +501,6 @@ conditions of the following licenses. SOFTWARE. - 'events' in extension/dist/ext/extension.js -- 'events' in node_modules/@omega-edit/client This product bundles 'events' from the above files. This package is available under the MIT License: MIT @@ -544,7 +527,6 @@ conditions of the following licenses. USE OR OTHER DEALINGS IN THE SOFTWARE. - 'fast-redact' in extension/dist/ext/extension.js -- 'fast-redact' in node_modules/@omega-edit/client This product bundles 'fast-redact' from the above files. This package is available under the MIT License: The MIT License (MIT) @@ -622,7 +604,6 @@ conditions of the following licenses. THE SOFTWARE. - 'get-caller-file' in extension/dist/ext/extension.js -- 'get-caller-file' in node_modules/@omega-edit/client This product bundles 'get-caller-file' from the above files. This package is available under the ISC License: ISC License (ISC) @@ -633,7 +614,6 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - 'has-flag' in extension/dist/ext/extension.js -- 'has-flag' in node_modules/@omega-edit/client This product bundles 'has-flag' from the above files. This package is available under the MIT LICENSE: @@ -676,7 +656,6 @@ conditions of the following licenses. OTHER DEALINGS IN THE SOFTWARE. - 'ieee754' in in extension/dist/ext/extension.js -- 'ieee754' in node_modules/@omega-edit/client This product bundles 'ieee754' from the above files. This package is available under the BSD-3-Clause License: Copyright 2008 Fair Oaks Labs, Inc. @@ -692,7 +671,6 @@ conditions of the following licenses. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - 'is-fullwidth-code-point' in extension/dist/ext/extension.js -- 'is-fullwidth-code-point' in node_modules/@omega-edit/client This product bundles 'is-fullwidth-code-point' from the above files. These files are available under the MIT License: MIT License @@ -781,7 +759,6 @@ conditions of the following licenses. SOFTWARE. - 'lodash.camelcase' in extension/dist/ext/extension.js -- 'lodash.camelcase' in node_modules/@omega-edit/client This product bundles 'lodash.camelcase' from the above files. This package is available under the MIT License: The MIT License @@ -903,7 +880,6 @@ conditions of the following licenses. THE SOFTWARE. - 'ms' in extension/dist/ext/extension.js -- 'ms' in node_modules/@omega-edit/client This product bundles 'ms' from the above files. This package is available under the MIT LICENSE: @@ -930,7 +906,6 @@ conditions of the following licenses. SOFTWARE. - 'on-exit-leak-free' in extension/dist/ext/extension.js -- 'on-exit-leak-free' in node_modules/@omega-edit/client This product bundles 'on-exit-leak-free' from the above files. These files are available under the MIT License: MIT License @@ -984,7 +959,6 @@ conditions of the following licenses. OTHER DEALINGS IN THE SOFTWARE. - 'pino-abstract-transport' in extension/dist/ext/extension.js -- 'pino-abstract-transport' in node_modules/@omega-edit/client This product bundles 'pino-abstract-transport' from the above files. These files are available under the MIT License: MIT License @@ -1010,7 +984,6 @@ conditions of the following licenses. SOFTWARE. - 'pino-std-serializers' in extension/dist/ext/extension.js -- 'pino-std-serializers' in node_modules/@omega-edit/client This product bundles 'pino-std-serializers' from the above files. These files are available under the MIT License: Copyright Mateo Collina, David Mark Clements, James Sumners @@ -1022,7 +995,6 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'pino' in extension/dist/ext/extension.js -- 'pino' in node_modules/@omega-edit/client This product bundles 'pino' from the above files. These files are available under the MIT License: The MIT License (MIT) @@ -1051,7 +1023,6 @@ conditions of the following licenses. SOFTWARE. - 'process-warning' in extension/dist/ext/extension.js -- 'process-warning' in node_modules/@omega-edit/client This product bundles 'process-warning' from the above files. These files are available under the MIT License: MIT License @@ -1077,7 +1048,6 @@ conditions of the following licenses. SOFTWARE. - 'process' in extension/dist/ext/extension.js -- 'process' in node_modules/@omega-edit/client This product bundles 'process' from the above files. These files are available under the MIT License: (The MIT License) @@ -1104,7 +1074,6 @@ conditions of the following licenses. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - '@protobuf-ts/runtime' in extension/dist/ext/extension.js -- '@protobuf-ts/runtime' in node_modules/@omega-edit/client This product bundles '@protobuf-ts/runtime' from the above files. This package is available under the BSD-3-Clause License and Apache License 2.0: @@ -1139,7 +1108,6 @@ conditions of the following licenses. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - 'protobufjs' in extension/dist/ext/extension.js -- 'protobufjs' in node_modules/@omega-edit/client This product bundles 'protobufjs' from the above files. These packages are available under the BSD-3-Clause License: This license applies to all parts of protobuf.js except those files @@ -1183,7 +1151,6 @@ conditions of the following licenses. support library is itself covered by the above license. - 'quick-format-unescaped' in extension/dist/ext/extension.js -- 'quick-format-unescaped' in node_modules/@omega-edit/client This product bundles 'quick-format-unescaped' from the above files. These files are available under the MIT License: The MIT License (MIT) @@ -1209,7 +1176,6 @@ conditions of the following licenses. SOFTWARE. - 'readable-stream' in extension/dist/ext/extension.js -- 'readable-stream' in node_modules/@omega-edit/client This product bundles 'readable-stream' from the above files. These files are available under the MIT License: Node.js is licensed for use as follows: @@ -1261,7 +1227,6 @@ conditions of the following licenses. """ - 'real-require' in extension/dist/ext/extension.js -- 'real-require' in node_modules/@omega-edit/client This product bundles 'real-require' from the above files. These files are available under the MIT License: The MIT License (MIT) @@ -1287,7 +1252,6 @@ conditions of the following licenses. SOFTWARE. - 'require-directory' in extension/dist/ext/extension.js -- 'require-directory' in node_modules/@omega-edit/client This product bundles 'require-directory' from the above files. This package is available under the MIT License: The MIT License (MIT) @@ -1313,33 +1277,7 @@ conditions of the following licenses. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- 'safe-buffer' in node_modules/@omega-edit/client - This product bundles 'safe-buffer' from the above files. - These files are available under the MIT License: - The MIT License (MIT) - - Copyright (c) Feross Aboukhadijeh - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - 'safe-stable-stringify' in extension/dist/ext/extension.js -- 'safe-stable-stringify' in node_modules/@omega-edit/client This product bundles 'safe-stable-stringify' from the above files. These files are available under the MIT License: The MIT License (MIT) @@ -1384,7 +1322,6 @@ conditions of the following licenses. IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - 'sonic-boom' in extension/dist/ext/extension.js -- 'sonic-boom' in node_modules/@omega-edit/client This product bundles 'sonic-boom' from the above files. These files are available under the MIT License: MIT License @@ -1410,7 +1347,6 @@ conditions of the following licenses. SOFTWARE. - 'split2' in in extension/dist/ext/extension.js -- 'split2' in node_modules/@omega-edit/client This product bundles 'split2' from the above files. This package is available under the ISC License: Copyright (c) 2014-2018, Matteo Collina @@ -1427,59 +1363,7 @@ conditions of the following licenses. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- 'string_decoder' in node_modules/@omega-edit/client - This product bundles 'string_decoder' from the above files. - These files are available under the MIT License: - Node.js is licensed for use as follows: - - """ - Copyright Node.js contributors. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - """ - - This license applies to parts of Node.js originating from the - https://github.com/joyent/node repository: - - """ - Copyright Joyent, Inc. and other Node contributors. All rights reserved. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - """ - - 'strip-ansi' in extension/dist/ext/extension.js -- 'strip-ansi' in node_modules/@omega-edit/client This product bundles 'strip-ansi' from the above files. This package is available under the MIT LICENSE: @@ -1520,7 +1404,6 @@ conditions of the following licenses. SOFTWARE. - 'supports-color' in extension/dist/ext/extension.js -- 'supports-color' in node_modules/@omega-edit/client This product bundles 'supports-color' from the above files. This package is available under the MIT LICENSE: @@ -1535,7 +1418,6 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'thread-stream' in extension/dist/ext/extension.js -- 'thread-stream' in node_modules/@omega-edit/client This product bundles 'thread-stream' from the above files. These files are available under the MIT License: MIT License @@ -1616,25 +1498,15 @@ conditions of the following licenses. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - '@protobufjs/aspromise' in extension/dist/ext/extension.js -- '@protobufjs/aspromise' in node_modules/@omega-edit/client - '@protobufjs/base64' in extension/dist/ext/extension.js -- '@protobufjs/base64' in node_modules/@omega-edit/client - '@protobufjs/codegen' in extension/dist/ext/extension.js -- '@protobufjs/codegen' in node_modules/@omega-edit/client - '@protobufjs/eventemitter' in extension/dist/ext/extension.js -- '@protobufjs/eventemitter' in node_modules/@omega-edit/client - '@protobufjs/fetch' in extension/dist/ext/extension.js -- '@protobufjs/fetch' in node_modules/@omega-edit/client - '@protobufjs/float' in extension/dist/ext/extension.js -- '@protobufjs/float' in node_modules/@omega-edit/client - '@protobufjs/inquire' in extension/dist/ext/extension.js -- '@protobufjs/inquire' in node_modules/@omega-edit/client - '@protobufjs/path' in extension/dist/ext/extension.js -- '@protobufjs/path' in node_modules/@omega-edit/client - '@protobufjs/pool' in extension/dist/ext/extension.js -- '@protobufjs/pool' in node_modules/@omega-edit/client - '@protobufjs/utf8' in extension/dist/ext/extension.js -- '@protobufjs/utf8' in node_modules/@omega-edit/client This product bundles multiple '@protobufjs' packages from the above files. This package is available under the BSD-3-Clause LICENSE: @@ -1679,7 +1551,6 @@ conditions of the following licenses. support library is itself covered by the above license. - '@types/long' in extension/dist/ext/extension.js -- '@types/long' in node_modules/@omega-edit/client This product bundles '@types/long' from the above files. These packages are available under the MIT License: This project is licensed under the MIT license. @@ -1825,7 +1696,6 @@ conditions of the following licenses. IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - 'yargs' in extension/dist/ext/extension.js -- 'yargs' in node_modules/@omega-edit/client This product bundles 'yargs' from the above files. This package is available under the MIT License: MIT License @@ -2045,7 +1915,6 @@ conditions of the following licenses. suitability for any purpose. - '@types/node' in extension/dist/ext/extension.js -- '@types/node' in node_modules/@omega-edit/client This product bundles '@types/long' from the above files. These packages are available under the MIT License: This project is licensed under the MIT license. @@ -2072,7 +1941,6 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'wait-port' in extension/dist/ext/extension.js -- 'wait-port' in node_modules/@omega-edit/client This product bundles 'wait-port' from the above files. This package is available under the MIT LICENSE: @@ -2099,7 +1967,6 @@ conditions of the following licenses. SOFTWARE. - 'chalk' in extension/dist/ext/extension.js -- 'chalk' in node_modules/@omega-edit/client This product bundles 'chalk' from the above files. This package is available under the MIT LICENSE: @@ -2114,7 +1981,6 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'commander' in extension/dist/ext/extension.js -- 'commander' in node_modules/@omega-edit/client This product bundles 'commander' from the above files. This package is available under the MIT LICENSE: @@ -2142,7 +2008,6 @@ conditions of the following licenses. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'debug' in extension/dist/ext/extension.js -- 'debug' in node_modules/@omega-edit/client This product bundles 'debug' from the above files. This package is available under the MIT LICENSE: @@ -2167,7 +2032,6 @@ conditions of the following licenses. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - '@types/google-protobuf' in extension/dist/ext/extension.js -- '@types/google-protobuf' in node_modules/@omega-edit/client This product bundles '@types/google-protobuf' from the above files. This package is available under the MIT LICENSE: @@ -2181,7 +2045,6 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 'google-protobuf' in extension/dist/ext/extension.js -- 'google-protobuf' in node_modules/@omega-edit/client This product bundles 'google-protobuf' from the above files. This package is available under the BSD-3-Clause LICENSE: @@ -2216,9 +2079,7 @@ conditions of the following licenses. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ch.qos.logback.logback-classic-.jar in daffodil-debugger-.zip -- ch.qos.logback.logback-classic-.jar in node_modules/@omega-edit/server/lib - ch.qos.logback.logback-core-.jar in daffodil-debugger-.zip -- ch.qos.logback.logback-core-.jar in node_modules/@omega-edit/server/lib This product bundles 'logback' from the above files. These files are available under the Logback license: @@ -3129,32 +2990,6 @@ conditions of the following licenses. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- org.checkerframework.checker-qual-.jar in node_modules/@omega-edit/server/lib - This product bundles 'Checker Framework qualifiers' from the above files. - These files are available under the MIT - Checker Framework qualifiers - Copyright 2004-present by the Checker Framework developers - - MIT License: - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - com.fasterxml.jackson.core.jackson-core-.jar in daffodil-debugger-.zip This product bundles 'Jackson JSON processor' which bundles a shaded copy of FastDoubleParser . That code is available under the MIT license: @@ -3280,7 +3115,6 @@ conditions of the following licenses. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - org.slf4j.slf4j-api-.jar in daffodil-debugger-.zip -- org.slf4j.slf4j-api-.jar in node_modules/@omega-edit/server/lib This product bundles 'slf4j' from the above files. These files are available under the MIT license: @@ -3307,9 +3141,7 @@ conditions of the following licenses. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - org.typelevel.cats-core-.jar in daffodil-debugger-.zip -- org.typelevel.cats-core-.jar in node_modules/@omega-edit/server/lib - org.typelevel.cats-kernel-.jar in daffodil-debugger-.zip -- org.typelevel.cats-kernel-.jar in node_modules/@omega-edit/server/lib This product bundles 'cats' from the above files. These files are available under the MIT license: @@ -3363,104 +3195,7 @@ conditions of the following licenses. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- com.google.protobuf.protobuf-java-.jar in node_modules/@omega-edit/server/lib - This product bundles "Protocol Buffers" from the above files. - These files are are avaiable under the 3-Clause BSD License: - Copyright 2008 Google Inc. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Code generated by the Protocol Buffer compiler is owned by the owner - of the input file used when generating it. This code is not - standalone and requires a support library to be linked with it. This - support library is itself covered by the above license. - -- org.codehaus.mojo.animal-sniffer-annotations-.jar in node_modules/@omega-edit/server/lib - This product bundles "MojoHaus AnimalSniffer" from the above files. - These files are are avaiable under the MIT License: - The MIT License - - Copyright (c) 2009 codehaus.org. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - -- org.ow2.asm.asm-.jar in node_modules/@omega-edit/server/lib -- org.ow2.asm.asm-analysis-.jar in node_modules/@omega-edit/server/lib -- org.ow2.asm.asm-commons-.jar in node_modules/@omega-edit/server/lib -- org.ow2.asm.asm-tree-.jar in node_modules/@omega-edit/server/lib -- org.ow2.asm.asm-util-.jar in node_modules/@omega-edit/server/lib - This product bundle "ow2-asm" from the above files. - These files are are avaiable under the 3-Clause BSD License: - ASM: a very small and fast Java bytecode manipulation framework - Copyright (c) 2000-2011 INRIA, France Telecom - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. - - org.reactivestreams.reactive-streams-.jar in daffodil-debugger-.zip -- org.reactivestreams.reactive-streams-.jar in node_modules/@omega-edit/server/lib This product bundles "Reactive Streams" from the above files. These files are are avaiable under the MIT License: MIT No Attribution @@ -3471,73 +3206,6 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- com.beachape.enumeratum-macros_.jar in node_modules/@omega-edit/server/lib -- com.beachape.enumeratum_.jar in node_modules/@omega-edit/server/lib - This product bundles "Enumeratum" from the above files. - These files are avaiable under the MIT License: - The MIT License (MIT) - - Copyright (c) 2016 by Lloyd Chan - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - -- com.github.jnr.jnr-x86asm-.jar in node_modules/@omega-edit/server/lib - This product bundles "jnr-x86asm" from the above files. - These files are avaiable under the MIT License: - - Copyright (C) 2010 Wayne Meissner - Copyright (c) 2008-2009, Petr Kobalicek - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - -- com.google.code.findbugs.jsr305-.jar in node_modules/@omega-edit/server/lib - This product bundles 'findbugs.jsr305' from the above files. - These files are available under the New BSD (BSD 3) license: - - The JSR-305 reference implementation (lib/jsr305.jar) is - distributed under the terms of the New BSD license: - - http://www.opensource.org/licenses/bsd-license.php - - See the JSR-305 home page for more information: - - http://code.google.com/p/jsr-305/ - - relaxngDatatype.relaxngDatatype-.jar in daffodil-debugger-.zip This product bundles 'relaxngDatatype' from the above files. These files are available under the BSD-3-Clause License: @@ -4403,201 +4071,6 @@ conditions of the following licenses. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -- src/svelte/src/resources/fonts/RedHatMono-Regular.woff2 - This product bundles the above files from the 'RedHatFont' repo. (https://github.com/RedHatOfficial/RedHatFont) - These files are available under the SIL Open Font License, Version 1.1: - Copyright 2021 Red Hat, Inc., - with Reserved Font Name Red Hat. - - This Font Software is licensed under the SIL Open Font License, Version 1.1. - This license is copied below, and is also available with a FAQ at: - http://scripts.sil.org/OFL - - - ----------------------------------------------------------- - SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 - ----------------------------------------------------------- - - PREAMBLE - The goals of the Open Font License (OFL) are to stimulate worldwide - development of collaborative font projects, to support the font creation - efforts of academic and linguistic communities, and to provide a free and - open framework in which fonts may be shared and improved in partnership - with others. - - The OFL allows the licensed fonts to be used, studied, modified and - redistributed freely as long as they are not sold by themselves. The - fonts, including any derivative works, can be bundled, embedded, - redistributed and/or sold with any software provided that any reserved - names are not used by derivative works. The fonts and derivatives, - however, cannot be released under any other type of license. The - requirement for fonts to remain under this license does not apply - to any document created using the fonts or their derivatives. - - DEFINITIONS - "Font Software" refers to the set of files released by the Copyright - Holder(s) under this license and clearly marked as such. This may - include source files, build scripts and documentation. - - "Reserved Font Name" refers to any names specified as such after the - copyright statement(s). - - "Original Version" refers to the collection of Font Software components as - distributed by the Copyright Holder(s). - - "Modified Version" refers to any derivative made by adding to, deleting, - or substituting -- in part or in whole -- any of the components of the - Original Version, by changing formats or by porting the Font Software to a - new environment. - - "Author" refers to any designer, engineer, programmer, technical - writer or other person who contributed to the Font Software. - - PERMISSION & CONDITIONS - Permission is hereby granted, free of charge, to any person obtaining - a copy of the Font Software, to use, study, copy, merge, embed, modify, - redistribute, and sell modified and unmodified copies of the Font - Software, subject to the following conditions: - - 1) Neither the Font Software nor any of its individual components, - in Original or Modified Versions, may be sold by itself. - - 2) Original or Modified Versions of the Font Software may be bundled, - redistributed and/or sold with any software, provided that each copy - contains the above copyright notice and this license. These can be - included either as stand-alone text files, human-readable headers or - in the appropriate machine-readable metadata fields within text or - binary files as long as those fields can be easily viewed by the user. - - 3) No Modified Version of the Font Software may use the Reserved Font - Name(s) unless explicit written permission is granted by the corresponding - Copyright Holder. This restriction only applies to the primary font name as - presented to the users. - - 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font - Software shall not be used to promote, endorse or advertise any - Modified Version, except to acknowledge the contribution(s) of the - Copyright Holder(s) and the Author(s) or with their explicit written - permission. - - 5) The Font Software, modified or unmodified, in part or in whole, - must be distributed entirely under this license, and must not be - distributed under any other license. The requirement for fonts to - remain under this license does not apply to any document created - using the Font Software. - - TERMINATION - This license becomes null and void if any of the above conditions are - not met. - - DISCLAIMER - THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT - OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE - COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL - DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM - OTHER DEALINGS IN THE FONT SOFTWARE. - -- src/svelte/src/resources/fonts/SpaceGrotesk-Variable.woff2 - This product bundles the above files from the 'space-grotest' repo. (https://github.com/floriankarsten/space-grotesk) - These files are available under the SIL Open Font License, Version 1.1: - Copyright 2020 The Space Grotesk Project Authors (https://github.com/floriankarsten/space-grotesk) - - This Font Software is licensed under the SIL Open Font License, Version 1.1. - This license is copied below, and is also available with a FAQ at: - http://scripts.sil.org/OFL - - - ----------------------------------------------------------- - SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 - ----------------------------------------------------------- - - PREAMBLE - The goals of the Open Font License (OFL) are to stimulate worldwide - development of collaborative font projects, to support the font creation - efforts of academic and linguistic communities, and to provide a free and - open framework in which fonts may be shared and improved in partnership - with others. - - The OFL allows the licensed fonts to be used, studied, modified and - redistributed freely as long as they are not sold by themselves. The - fonts, including any derivative works, can be bundled, embedded, - redistributed and/or sold with any software provided that any reserved - names are not used by derivative works. The fonts and derivatives, - however, cannot be released under any other type of license. The - requirement for fonts to remain under this license does not apply - to any document created using the fonts or their derivatives. - - DEFINITIONS - "Font Software" refers to the set of files released by the Copyright - Holder(s) under this license and clearly marked as such. This may - include source files, build scripts and documentation. - - "Reserved Font Name" refers to any names specified as such after the - copyright statement(s). - - "Original Version" refers to the collection of Font Software components as - distributed by the Copyright Holder(s). - - "Modified Version" refers to any derivative made by adding to, deleting, - or substituting -- in part or in whole -- any of the components of the - Original Version, by changing formats or by porting the Font Software to a - new environment. - - "Author" refers to any designer, engineer, programmer, technical - writer or other person who contributed to the Font Software. - - PERMISSION & CONDITIONS - Permission is hereby granted, free of charge, to any person obtaining - a copy of the Font Software, to use, study, copy, merge, embed, modify, - redistribute, and sell modified and unmodified copies of the Font - Software, subject to the following conditions: - - 1) Neither the Font Software nor any of its individual components, - in Original or Modified Versions, may be sold by itself. - - 2) Original or Modified Versions of the Font Software may be bundled, - redistributed and/or sold with any software, provided that each copy - contains the above copyright notice and this license. These can be - included either as stand-alone text files, human-readable headers or - in the appropriate machine-readable metadata fields within text or - binary files as long as those fields can be easily viewed by the user. - - 3) No Modified Version of the Font Software may use the Reserved Font - Name(s) unless explicit written permission is granted by the corresponding - Copyright Holder. This restriction only applies to the primary font name as - presented to the users. - - 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font - Software shall not be used to promote, endorse or advertise any - Modified Version, except to acknowledge the contribution(s) of the - Copyright Holder(s) and the Author(s) or with their explicit written - permission. - - 5) The Font Software, modified or unmodified, in part or in whole, - must be distributed entirely under this license, and must not be - distributed under any other license. The requirement for fonts to - remain under this license does not apply to any document created - using the Font Software. - - TERMINATION - This license becomes null and void if any of the above conditions are - not met. - - DISCLAIMER - THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT - OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE - COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL - DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM - OTHER DEALINGS IN THE FONT SOFTWARE. - - src/language/semantics/dfdlExt.ts - src/language/semantics/documentChangeHandler.ts - src/language/semantics/functionData.ts @@ -4834,7 +4307,6 @@ conditions of the following licenses. - 'onetime' in extension/dist/ext/extension.js - 'path-key' in extension/dist/ext/extension.js - 'pid-port' in extension/dist/ext/extension.js -- 'pid-port' in @omega-edit/client - 'shebang-regex' in extension/dist/ext/extension.js - 'strip-final-newline' in extension/dist/ext/extension.js This produce bundles 'get-stream', 'is-stream', 'mimic-fn', 'npm-run-path', 'onetime', 'path-key', 'pid-port', 'shebang-regex', 'strip-final-newline' from the above files @@ -5251,7 +4723,6 @@ conditions of the following licenses. SOFTWARE. - '@pinojs/redact' in extension/dist/ext/extension.js -- '@pinojs/redact' in node_modules/@omega-edit/client This product bundles '@pinojs/redact' from the above files. These files are available under the MIT License: @@ -5413,6 +4884,18 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- 'lie' in extension/dist/ext/extension.js + This produces bundles 'lie' from the above files + These files are available under the MIT License: + + Copyright (c) 2014-2018 Calvin Metcalf, Jordan Harband + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + - 'pako' in extension/dist/ext/extension.js This produces bundles 'pako' from the above files These files are available under the MIT License: @@ -5539,6 +5022,84 @@ conditions of the following licenses. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- 'safe-buffer' in extension/dist/ext/extension.js + This produces bundles 'safe-buffer' from the above files + These files are available under the MIT License: + + The MIT License (MIT) + + Copyright (c) Feross Aboukhadijeh + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +- 'string_decoder' in extension/dist/ext/extension.js + This produces bundles 'string_decoder' from the above files + These files are available under the MIT License: + + Node.js is licensed for use as follows: + + """ + Copyright Node.js contributors. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + """ + + This license applies to parts of Node.js originating from the + https://github.com/joyent/node repository: + + """ + Copyright Joyent, Inc. and other Node contributors. All rights reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + """ + - 'isarray' in extension/dist/ext/extension.js This produces bundles 'isarray' from the above files These files are available under the MIT License: diff --git a/build/package/NONOTICE b/build/package/NONOTICE index 40d0ef4a6..1f0cbf4d8 100644 --- a/build/package/NONOTICE +++ b/build/package/NONOTICE @@ -10,13 +10,11 @@ Based on source code originally developed by The following binary components distributed with this project are licensed under the Apache License v2 but do not include NOTICE files in their repositories: -- '@grpc/grpc-js' in node_modules/@omega-edit/client - '@grpc/grpc-js' in extension/dist/ext/extension.js This product bundles '@grpc/grpc-js' from the above files. This package is available under the Apache License v2 without a NOTICE: Repository at: https://github.com/grpc/grpc-node/tree/master -- '@grpc/proto-loader' in node_modules/@omega-edit/client - '@grpc/proto-loader' in extension/dist/ext/extension.js This product bundles '@grpc/proto-loader' from the above files. This package is available under the Apache License v2 without a NOTICE: @@ -28,13 +26,11 @@ The following binary components distributed with this project are licensed under Repository at: https://github.com/ehmicky/human-signals - 'long' in extension/dist/ext/extension.js -- 'long' in node_modules/@omega-edit/client This product bundles 'long' from the above files. This package is available under the Apache License v2 without a NOTICE: Repository at: https://github.com/dcodeIO/long.js - '@protobuf-ts/runtime-rpc' in extension/dist/ext/extension.js -- '@protobuf-ts/runtime-rpc' in node_modules/@omega-edit/client This product bundles '@protobuf-ts/runtime-rpc' from the above files. This package is available under the Apache License v2 without a NOTICE: Repository at: https://github.com/timostamm/protobuf-ts @@ -45,20 +41,17 @@ The following binary components distributed with this project are licensed under Repository at: https://github.com/FasterXML/woodstox - com.google.code.gson.gson-.jar in daffodil-debugger-.zip -- com.google.code.gson.gson-.jar in node_modules/@omega-edit/server/lib This product bundles 'gso' from the above files. These packages are available under the Apache License v2 without a NOTICE: Repository at: https://github.com/google/gson - com.monovore.decline-effect_.jar in daffodil-debugger-.zip - com.monovore.decline_.jar in daffodil-debugger-.zip -- com.monovore.decline_.jar in node_modules/@omega-edit/server/lib This product bundles 'decline' from the above files. These packages are available under the Apache License v2 without a NOTICE: Repository at: https://github.com/bkirwi/decline - com.typesafe.config-.jar in daffodil-debugger-.zip -- com.typesafe.config-.jar in node_modules/@omega-edit/server/lib This product bundles 'config' from the above files. These packages are available under the Apache License v2 without a NOTICE: Repository at: https://github.com/lightbend/config @@ -86,86 +79,6 @@ The following binary components distributed with this project are licensed under These packages are available under the Apache License v2 without a NOTICE: Repository at: https://github.com/typelevel/log4cats -- com.github.jnr.jffi--native.jar in node_modules/@omega-edit/server/lib -- com.github.jnr.jffi-.jar in node_modules/@omega-edit/server/lib - This product bundles 'jffi' and 'jffi-native' from the above files. - These packages are available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/jnr/jffi - -- com.github.jnr.jnr-a64asm-.jar in node_modules/@omega-edit/server/lib - This product bundles 'jnr-a64asm' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/jnr/jnr-a64asm - -- com.github.jnr.jnr-ffi-.jar in node_modules/@omega-edit/server/lib - This product bundles 'jnr-ffi' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/jnr/jnr-ffi - -- com.google.errorprone.error_prone_annotations-.jar in node_modules/@omega-edit/server/lib - This product bundles 'error_prone_annotations' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/google/error-prone - -- com.google.guava.failureaccess-.jar in node_modules/@omega-edit/server/lib -- com.google.guava.guava--android.jar in node_modules/@omega-edit/server/lib -- com.google.guava.listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar in node_modules/@omega-edit/server/lib - This product bundles 'guava.failureaccess' and 'guava.guava-android' from the above files. - These packages are available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/google/guava - -- com.google.j2objc.j2objc-annotations-.jar in node_modules/@omega-edit/server/lib - This product bundles 'j2objc' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/google/j2objc - -- com.thesamet.scalapb.lenses_.jar in node_modules/@omega-edit/server/lib -- com.thesamet.scalapb.scalapb-runtime_.jar in node_modules/@omega-edit/server/lib - This product bundles 'scalapb.lenser' and 'scalapb.scalapb-runtime' from the above files. - These packages are available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/scalapb/ScalaPB - -- com.typesafe.ssl-config-core_.jar in node_modules/@omega-edit/server/lib - This product bundles 'ssl-config-core' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/lightbend/ssl-config - -- com.google.android.annotations-.jar in node_modules/@omega-edit/server/lib - This product bundles 'android.annotations' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/androidannotations/androidannotations - -- com.google.api.grpc.proto-google-common-protos-.jar in node_modules/@omega-edit/server/lib - This product bundles 'com.google.api.grpc.proto-google-common-protos' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/googleapis/api-common-protos - -- org.parboiled.parboiled_.jar in node_modules/@omega-edit/server/lib - This product bundles 'org.parboiled.parboiled' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/sirthias/parboiled - -- src/svelte/src/resources/icons/material-icons.woff2 - This product bundles 'material-icons' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/google/material-design-icons - -- com.intellij.annotations-.jar in node_modules/@omega-edit/server/lib - This product bundles 'Annotations for JVM-based languages' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/JetBrains/java-annotations#annotations-for-jvm-based-languages - -- com.optimaize.languagedetector.language-detector-.jar in node_modules/@omega-edit/server/lib - This product bundles 'language-detector' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/optimaize/language-detector#language-detector - -- net.arnx.jsonic-.jar in node_modules/@omega-edit/server/lib - This product bundles 'JSONIC' from the above files. - This package is available under the Apache License v2 without a NOTICE: - Repository at: https://github.com/hidekatsu-izuno/jsonic/ - NOTE: This one appears to be in a different language does this cause any issues? - - org.fusesource.jansi-.jar in daffodil-debugger-.zip This product bundles 'jansi' from the above files. This package is available under the Apache License v2 without a NOTICE: diff --git a/build/package/NOTICE b/build/package/NOTICE index 4a7cf7d9e..a9a1d6a10 100644 --- a/build/package/NOTICE +++ b/build/package/NOTICE @@ -267,11 +267,6 @@ The following NOTICE information applies to binary components distributed with t http://www.arbortext.com/customer_support/updates_and_technical_notes/catalogs/docs/README.htm - extension/dist/ext/extension.js -- io.grpc.grpc-api-.jar in node_modules/@omega-edit/server/lib -- io.grpc.grpc-context-.jar in node_modules/@omega-edit/server/lib -- io.grpc.grpc-core-.jar in node_modules/@omega-edit/server/lib -- io.grpc.grpc-netty-shaded-.jar in node_modules/@omega-edit/server/lib -- io.grpc.grpc-stub-.jar in node_modules/@omega-edit/server/lib Copyright 2014 gRPC authors. Licensed under the Apache License, Version 2.0 (the "License"); @@ -286,48 +281,6 @@ The following NOTICE information applies to binary components distributed with t See the License for the specific language governing permissions and limitations under the License. -- io.perfmark.perfmark-api-.jar in node_modules/@omega-edit/server/lib - Copyright 2019 Google LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ----------------------------------------------------------------------- - - This product contains a modified portion of 'Catapult', an open source - Trace Event viewer for Chome, Linux, and Android applications, which can - be obtained at: - - * LICENSE: - * traceviewer/src/main/resources/io/perfmark/traceviewer/third_party/catapult/LICENSE (New BSD License) - * HOMEPAGE: - * https://github.com/catapult-project/catapult - - This product contains a modified portion of 'Polymer', a library for Web - Components, which can be obtained at: - * LICENSE: - * traceviewer/src/main/resources/io/perfmark/traceviewer/third_party/polymer/LICENSE (New BSD License) - * HOMEPAGE: - * https://github.com/Polymer/polymer - - - This product contains a modified portion of 'ASM', an open source - Java Bytecode library, which can be obtained at: - - * LICENSE: - * agent/src/main/resources/io/perfmark/agent/third_party/asm/LICENSE (BSD style License) - * HOMEPAGE: - * https://asm.ow2.io/ - - org.apache.ant.ant-.jar in daffodil-debugger-.zip - org.apache.ant.ant-launcher-.jar in daffodil-debugger-.zip Apache Ant @@ -339,1859 +292,3 @@ The following NOTICE information applies to binary components distributed with t The task is based on code Copyright (c) 2002, Landmark Graphics Corp that has been kindly donated to the Apache Software Foundation. - -- org.apache.pekko.pekko-actor_.jar in node_modules/@omega-edit/server/lib -- org.apache.pekko.pekko-discovery_.jar in node_modules/@omega-edit/server/lib -- org.apache.pekko.pekko-slf4j_.jar in node_modules/@omega-edit/server/lib -- org.apache.pekko.pekko-stream_.jar in node_modules/@omega-edit/server/lib - Apache Pekko - Copyright 2022, 2023 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (https://www.apache.org/). - - This product contains significant parts that were originally based on software from Lightbend (Akka ). - Copyright (C) 2009-2022 Lightbend Inc. - - Apache Pekko is derived from Akka 2.6.x, the last version that was distributed under the - Apache License, Version 2.0 License. - - --------------- - - pekko-actor contains MurmurHash.scala which has changes made by the Scala-Lang team under an Apache 2.0 license. - - Copyright (c) 2002-2023 EPFL - Copyright (c) 2011-2023 Lightbend, Inc. - - Scala includes software developed at - LAMP/EPFL (https://lamp.epfl.ch/) and - Lightbend, Inc. (https://www.lightbend.com/). - - --------------- - - pekko-actor contains code from scala-collection-compat which was released under an Apache 2.0 license. - - scala-collection-compat - Copyright (c) 2002-2023 EPFL - Copyright (c) 2011-2023 Lightbend, Inc. - - Scala includes software developed at - LAMP/EPFL (https://lamp.epfl.ch/) and - Lightbend, Inc. (https://www.lightbend.com/). - - --------------- - - pekko-actor contains code from scala-library which was released under an Apache 2.0 license. - - Scala - Copyright (c) 2002-2023 EPFL - Copyright (c) 2011-2023 Lightbend, Inc. - - Scala includes software developed at - LAMP/EPFL (https://lamp.epfl.ch/) and - Lightbend, Inc. (https://www.lightbend.com/). - - --------------- - - pekko-actor contains code from Netty which was released under an Apache 2.0 license. - - The Netty Project - ================= - - Please visit the Netty web site for more information: - - * https://netty.io/ - - Copyright 2014 The Netty Project - - The Netty Project licenses this file to you under the Apache License, - version 2.0 (the "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at: - - https://www.apache.org/licenses/LICENSE-2.0 - - --------------- - - pekko-actor contains code from java-uuid-generator - in `org.apache.pekko.util.UUIDComparator.scala` which was released under an Apache 2.0 license. - - Java UUID generator library has been written by Tatu Saloranta (tatu.saloranta@iki.fi) - - Other developers who have contributed code are: - - * Eric Bie contributed extensive unit test suite which has helped ensure high implementation - quality - - --------------- - - pekko-remote contains CountMinSketch.java which was developed under an Apache 2.0 license. - - stream-lib - Copyright 2016 AddThis - - This product includes software developed by AddThis. - -- org.apache.pekko.pekko-http-core_.jar in node_modules/@omega-edit/server/lib -- org.apache.pekko.pekko-http-cors_.jar in node_modules/@omega-edit/server/lib -- org.apache.pekko.pekko-http_.jar in node_modules/@omega-edit/server/lib -- org.apache.pekko.pekko-parsing_.jar in node_modules/@omega-edit/server/lib - Apache Pekko-HTTP - Copyright 2022, 2023 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (https://www.apache.org/). - - This product contains significant parts that were originally based on software from Lightbend (Akka ). - Copyright (C) 2009-2022 Lightbend Inc. - - Apache Pekko-HTTP is derived from Akka-HTTP 10.2.x, the last version that was distributed under the - Apache License, Version 2.0 License. - - --------------- - - pekko-http-core contains code from scala-collection-compat distributed under the Apache 2.0 license. - - scala-collection-compat - Copyright (c) 2002-2023 EPFL - Copyright (c) 2011-2023 Lightbend, Inc. - - Scala includes software developed at - LAMP/EPFL (https://lamp.epfl.ch/) and - Lightbend, Inc. (https://www.lightbend.com/). - - Licensed under the Apache License, Version 2.0 (the "License"). - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------- - - pekko-http-core and pekko-http-tests contain code based on akka-sse - distributed under the Apache 2.0 license. - - Copyright 2015 Heiko Seeberger - - --------------- - - pekko-http-cors contains code that was donated by Lomig Mégard to the Apache Software Foundation - via a Software Grant Agreement - See . - -- org.apache.pekko.pekko-grpc-runtime_.jar in node_modules/@omega-edit/server/lib -- org.apache.pekko.pekko-protobuf-v3_.jar in node_modules/@omega-edit/server/lib - Apache Pekko gRPC - Copyright 2022, 2023 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (https://www.apache.org/). - - This product contains significant parts that were originally based on software from Lightbend (Akka ). - Copyright (C) 2009-2022 Lightbend Inc. - - Apache Pekko gRPC is derived from Akka gRPC 2.1.x, the last version that was distributed under the - Apache License, Version 2.0 License. - - --------------- - - interop-tests contains test code from grpc-java - distributed under the Apache 2.0 license. - - Copyright 2014 The gRPC Authors - -- org.scala-lang.modules.scala-collection-compat_.jar in node_modules/@omega-edit/server/lib - scala-collection-compat - Copyright (c) 2002-2023 EPFL - Copyright (c) 2011-2023 Lightbend, Inc. - - Scala includes software developed at - LAMP/EPFL (https://lamp.epfl.ch/) and - Lightbend, Inc. (https://www.lightbend.com/). - - Licensed under the Apache License, Version 2.0 (the "License"). - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -- org.scala-lang.modules.scala-java8-compat_.jar in node_modules/@omega-edit/server/lib - scala-java8-compat - Copyright (c) 2002-2023 EPFL - Copyright (c) 2011-2023 Lightbend, Inc. - - scala-java8-compat includes software developed at - LAMP/EPFL (https://lamp.epfl.ch/) and - Lightbend, Inc. (https://www.lightbend.com/). - - Licensed under the Apache License, Version 2.0 (the "License"). - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -- 'omega-edit' in extension/dist/ext/extension.js - Copyright 2021 Concurrent Technologies Corporation. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -- com.ctc.omega-edit-grpc-server-.jar in node_modules/@omega-edit/server/lib -- com.ctc.omega-edit-native_.jar in node_modules/@omega-edit/server/lib -- com.ctc.omega-edit-spi-.jar in node_modules/@omega-edit/server/lib -- com.ctc.omega-edit_.jar in node_modules/@omega-edit/server/lib - Ωedit - Copyright 2021-2022 Concurrent Technologies Corporation - -- io.grpc.grpc-protobuf-.jar in node_modules/@omega-edit/server/lib -- io.grpc.grpc-protobuf-lite-.jar in node_modules/@omega-edit/server/lib - Copyright 2014 The gRPC Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ----------------------------------------------------------------------- - - This product contains a modified portion of 'OkHttp', an open source - HTTP & SPDY client for Android and Java applications, which can be obtained - at: - - * LICENSE: - * okhttp/third_party/okhttp/LICENSE (Apache License 2.0) - * HOMEPAGE: - * https://github.com/square/okhttp - * LOCATION_IN_GRPC: - * okhttp/third_party/okhttp - - This product contains a modified portion of 'Envoy', an open source - cloud-native high-performance edge/middle/service proxy, which can be - obtained at: - - * LICENSE: - * xds/third_party/envoy/LICENSE (Apache License 2.0) - * NOTICE: - * xds/third_party/envoy/NOTICE - * HOMEPAGE: - * https://www.envoyproxy.io - * LOCATION_IN_GRPC: - * xds/third_party/envoy - - This product contains a modified portion of 'protoc-gen-validate (PGV)', - an open source protoc plugin to generate polyglot message validators, - which can be obtained at: - - * LICENSE: - * xds/third_party/protoc-gen-validate/LICENSE (Apache License 2.0) - * NOTICE: - * xds/third_party/protoc-gen-validate/NOTICE - * HOMEPAGE: - * https://github.com/envoyproxy/protoc-gen-validate - * LOCATION_IN_GRPC: - * xds/third_party/protoc-gen-validate - - This product contains a modified portion of 'udpa', - an open source universal data plane API, which can be obtained at: - - * LICENSE: - * xds/third_party/udpa/LICENSE (Apache License 2.0) - * HOMEPAGE: - * https://github.com/cncf/udpa - * LOCATION_IN_GRPC: - * xds/third_party/udpa - -- @omega-edit/client -- @omega-edit/server -- @omega-edit/server/bin - Ωedit - Copyright 2021-2022 Concurrent Technologies Corporation - -- org.apache.tika.tika-core-.jar in node_modules/@omega-edit/server/lib -- org.apache.tika.tika-langdetect-optimaize-.jar in node_modules/@omega-edit/server/lib - Apache Tika - Copyright 2021 The Apache Software Foundation - - This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). - - Copyright 1993-2010 University Corporation for Atmospheric Research/Unidata - This software contains code derived from UCAR/Unidata's NetCDF library. - - Tika-server component uses CDDL-licensed dependencies: jersey (http://jersey.java.net/) and - Grizzly (http://grizzly.java.net/) - - Tika-parsers component uses CDDL/LGPL dual-licensed dependency: jhighlight (https://github.com/codelibs/jhighlight) - - OpenCSV: Copyright 2005 Bytecode Pty Ltd. Licensed under the Apache License, Version 2.0 - - IPTC Photo Metadata descriptions Copyright 2010 International Press Telecommunications Council. - - Tika-mimetypes.xml includes mimetype definitions that were adapted from the PRONOM Technical Registry - by The National Archives (http://www.nationalarchives.gov.uk/PRONOM/Default.aspx). PRONOM is published - under the Open Government License 3.0 (http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) - - ------------------------------- - For compatibility with Java > 8 - org.glassfish.jaxb:jaxb-runtime - - License: CDDL 1.1, GPL2 w/ CPE - - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 - 1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - 2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - - 3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - - 4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - - 5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - - 7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - - 8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - - 9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - - 10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - - NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) - - The code released under the CDDL shall be governed by the laws of the - State of California (excluding conflict-of-law provisions). Any - litigation relating to this License shall be subject to the jurisdiction - of the Federal Courts of the Northern District of California and the - state courts of the State of California, with venue lying in Santa Clara - County, California. - - The GNU General Public License (GPL) Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor - Boston, MA 02110-1335 - USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your freedom to - share and change it. By contrast, the GNU General Public License is - intended to guarantee your freedom to share and change free software--to - make sure the software is free for all its users. This General Public - License applies to most of the Free Software Foundation's software and - to any other program whose authors commit to using it. (Some other Free - Software Foundation software is covered by the GNU Library General - Public License instead.) You can apply it to your programs, too. - - When we speak of free software, we are referring to freedom, not price. - Our General Public Licenses are designed to make sure that you have the - freedom to distribute copies of free software (and charge for this - service if you wish), that you receive source code or can get it if you - want it, that you can change the software or use pieces of it in new - free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid anyone - to deny you these rights or to ask you to surrender the rights. These - restrictions translate to certain responsibilities for you if you - distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether gratis - or for a fee, you must give the recipients all the rights that you have. - You must make sure that they, too, receive or can get the source code. - And you must show them these terms so they know their rights. - - We protect your rights with two steps: (1) copyright the software, and - (2) offer you this license which gives you legal permission to copy, - distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain - that everyone understands that there is no warranty for this free - software. If the software is modified by someone else and passed on, we - want its recipients to know that what they have is not the original, so - that any problems introduced by others will not reflect on the original - authors' reputations. - - Finally, any free program is threatened constantly by software patents. - We wish to avoid the danger that redistributors of a free program will - individually obtain patent licenses, in effect making the program - proprietary. To prevent this, we have made it clear that any patent must - be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and - modification follow. - - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains a - notice placed by the copyright holder saying it may be distributed under - the terms of this General Public License. The "Program", below, refers - to any such program or work, and a "work based on the Program" means - either the Program or any derivative work under copyright law: that is - to say, a work containing the Program or a portion of it, either - verbatim or with modifications and/or translated into another language. - (Hereinafter, translation is included without limitation in the term - "modification".) Each licensee is addressed as "you". - - Activities other than copying, distribution and modification are not - covered by this License; they are outside its scope. The act of running - the Program is not restricted, and the output from the Program is - covered only if its contents constitute a work based on the Program - (independent of having been made by running the Program). Whether that - is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's source - code as you receive it, in any medium, provided that you conspicuously - and appropriately publish on each copy an appropriate copyright notice - and disclaimer of warranty; keep intact all the notices that refer to - this License and to the absence of any warranty; and give any other - recipients of the Program a copy of this License along with the Program. - - You may charge a fee for the physical act of transferring a copy, and - you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion of - it, thus forming a work based on the Program, and copy and distribute - such modifications or work under the terms of Section 1 above, provided - that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any part - thereof, to be licensed as a whole at no charge to all third parties - under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a notice - that there is no warranty (or else, saying that you provide a - warranty) and that users may redistribute the program under these - conditions, and telling the user how to view a copy of this License. - (Exception: if the Program itself is interactive but does not - normally print such an announcement, your work based on the Program - is not required to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the Program, and - can be reasonably considered independent and separate works in - themselves, then this License, and its terms, do not apply to those - sections when you distribute them as separate works. But when you - distribute the same sections as part of a whole which is a work based on - the Program, the distribution of the whole must be on the terms of this - License, whose permissions for other licensees extend to the entire - whole, and thus to each and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or contest - your rights to work written entirely by you; rather, the intent is to - exercise the right to control the distribution of derivative or - collective works based on the Program. - - In addition, mere aggregation of another work not based on the Program - with the Program (or with a work based on the Program) on a volume of a - storage or distribution medium does not bring the other work under the - scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms of - Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections 1 - and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your cost - of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer to - distribute corresponding source code. (This alternative is allowed - only for noncommercial distribution and only if you received the - program in object code or executable form with such an offer, in - accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete source code - means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to control - compilation and installation of the executable. However, as a special - exception, the source code distributed need not include anything that is - normally distributed (in either source or binary form) with the major - components (compiler, kernel, and so on) of the operating system on - which the executable runs, unless that component itself accompanies the - executable. - - If distribution of executable or object code is made by offering access - to copy from a designated place, then offering equivalent access to copy - the source code from the same place counts as distribution of the source - code, even though third parties are not compelled to copy the source - along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt otherwise - to copy, modify, sublicense or distribute the Program is void, and will - automatically terminate your rights under this License. However, parties - who have received copies, or rights, from you under this License will - not have their licenses terminated so long as such parties remain in - full compliance. - - 5. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify or - distribute the Program or its derivative works. These actions are - prohibited by law if you do not accept this License. Therefore, by - modifying or distributing the Program (or any work based on the - Program), you indicate your acceptance of this License to do so, and all - its terms and conditions for copying, distributing or modifying the - Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program subject to - these terms and conditions. You may not impose any further restrictions - on the recipients' exercise of the rights granted herein. You are not - responsible for enforcing compliance by third parties to this License. - - 7. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent issues), - conditions are imposed on you (whether by court order, agreement or - otherwise) that contradict the conditions of this License, they do not - excuse you from the conditions of this License. If you cannot distribute - so as to satisfy simultaneously your obligations under this License and - any other pertinent obligations, then as a consequence you may not - distribute the Program at all. For example, if a patent license would - not permit royalty-free redistribution of the Program by all those who - receive copies directly or indirectly through you, then the only way you - could satisfy both it and this License would be to refrain entirely from - distribution of the Program. - - If any portion of this section is held invalid or unenforceable under - any particular circumstance, the balance of the section is intended to - apply and the section as a whole is intended to apply in other - circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of any - such claims; this section has the sole purpose of protecting the - integrity of the free software distribution system, which is implemented - by public license practices. Many people have made generous - contributions to the wide range of software distributed through that - system in reliance on consistent application of that system; it is up to - the author/donor to decide if he or she is willing to distribute - software through any other system and a licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed to be - a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, the - original copyright holder who places the Program under this License may - add an explicit geographical distribution limitation excluding those - countries, so that distribution is permitted only in or among countries - not thus excluded. In such case, this License incorporates the - limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new - versions of the General Public License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the Program - specifies a version number of this License which applies to it and "any - later version", you have the option of following the terms and - conditions either of that version or of any later version published by - the Free Software Foundation. If the Program does not specify a version - number of this License, you may choose any version ever published by the - Free Software Foundation. - - 10. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the - author to ask for permission. For software which is copyrighted by the - Free Software Foundation, write to the Free Software Foundation; we - sometimes make exceptions for this. Our decision will be guided by the - two goals of preserving the free status of all derivatives of our free - software and of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. - EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR - OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, - EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE - ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH - YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL - NECESSARY SERVICING, REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY - AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR - DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL - DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM - (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED - INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF - THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR - OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest - possible use to the public, the best way to achieve this is to make it - free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest to - attach them to the start of each source file to most effectively convey - the exclusion of warranty; and each file should have at least the - "copyright" line and a pointer to where the full notice is found. - - One line to give the program's name and a brief idea of what it does. - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - - Also add information on how to contact you by electronic and paper mail. - - If the program is interactive, make it output a short notice like this - when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type - `show w'. This is free software, and you are welcome to redistribute - it under certain conditions; type `show c' for details. - - The hypothetical commands `show w' and `show c' should show the - appropriate parts of the General Public License. Of course, the commands - you use may be called something other than `show w' and `show c'; they - could even be mouse-clicks or menu items--whatever suits your program. - - You should also get your employer (if you work as a programmer) or your - school, if any, to sign a "copyright disclaimer" for the program, if - necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - program `Gnomovision' (which makes passes at compilers) written by - James Hacker. - - signature of Ty Coon, 1 April 1989 - Ty Coon, President of Vice - - This General Public License does not permit incorporating your program - into proprietary programs. If your program is a subroutine library, you - may consider it more useful to permit linking proprietary applications - with the library. If this is what you want to do, use the GNU Library - General Public License instead of this License. - Certain source files distributed by Oracle America, Inc. and/or its - affiliates are subject to the following clarification and special - exception to the GPLv2, based on the GNU Project exception for its - Classpath libraries, known as the GNU Classpath Exception, but only - where Oracle has expressly included in the particular source file's - header the words "Oracle designates this particular file as subject to - the "Classpath" exception as provided by Oracle in the LICENSE file - that accompanied this code." - - You should also note that Oracle includes multiple, independent - programs in this software package. Some of those programs are provided - under licenses deemed incompatible with the GPLv2 by the Free Software - Foundation and others. For example, the package includes programs - licensed under the Apache License, Version 2.0. Such programs are - licensed to you under their original licenses. - - Oracle facilitates your further distribution of this package by adding - the Classpath Exception to the necessary parts of its GPLv2 code, which - permits you to use that code in combination with other independent - modules not licensed under the GPLv2. However, note that this would - not permit you to commingle code under an incompatible license with - Oracle's GPLv2 licensed code by, for example, cutting and pasting such - code into a file also containing Oracle's GPLv2 licensed code and then - distributing the result. Additionally, if you were to remove the - Classpath Exception from any of the files to which it applies and - distribute the result, you would likely be required to license some or - all of the other code in that distribution under the GPLv2 as well, and - since the GPLv2 is incompatible with the license terms of some items - included in the distribution by Oracle, removing the Classpath - Exception could therefore effectively compromise your ability to - further distribute the package. - - Proceed with caution and we recommend that you obtain the advice of a - lawyer skilled in open source matters before removing the Classpath - Exception or making modifications to this package which may - subsequently be redistributed and/or involve the use of third party - software. - - CLASSPATH EXCEPTION - Linking this library statically or dynamically with other modules is - making a combined work based on this library. Thus, the terms and - conditions of the GNU General Public License version 2 cover the whole - combination. - - As a special exception, the copyright holders of this library give you - permission to link this library with independent modules to produce an - executable, regardless of the license terms of these independent - modules, and to copy and distribute the resulting executable under - terms of your choice, provided that you also meet, for each linked - independent module, the terms and conditions of the license of that - module. An independent module is a module which is not derived from or - based on this library. If you modify this library, you may extend this - exception to your version of the library, but you are not obligated to - do so. If you do not wish to do so, delete this exception statement - from your version. - - - ------------------------------- - For compatibility with Java > 8 - com.sun.activation:javax.activation - - License: CDDL 1.1, GPL2 w/ CPE - - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1 - - 1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates or - contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), and - the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing Original - Software with files containing Modifications, in each case including - portions thereof. - - 1.4. "Executable" means the Covered Software in any form other than - Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable form - of computer software code that is originally released under this - License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License. For legal entities, "You" includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - - 2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, the Initial Developer - hereby grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Software (or portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling of - Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective on - the date Initial Developer first distributes or otherwise makes the - Original Software available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, or - (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and subject - to third party intellectual property claims, each Contributor hereby - grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as Covered Software - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or in - combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor (or - portions thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions of such - combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - - 3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make available - in Executable form must also be made available in Source Code form - and that Source Code form must be distributed only under the terms - of this License. You must include a copy of this License with every - copy of the Source Code form of the Covered Software You distribute - or otherwise make available. You must inform recipients of any such - Covered Software in Executable form as to how they can obtain such - Covered Software in Source Code form in a reasonable manner on or - through a medium customarily used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or You - have sufficient rights to grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may not - remove or alter any copyright, patent or trademark notices contained - within the Covered Software, or any notices of licensing or any - descriptive text giving attribution to any Contributor or the - Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version of - this License or the recipients' rights hereunder. You may choose to - offer, and to charge a fee for, warranty, support, indemnity or - liability obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on behalf of - the Initial Developer or any Contributor. You must make it - absolutely clear that any such warranty, support, indemnity or - liability obligation is offered by You alone, and You hereby agree - to indemnify the Initial Developer and every Contributor for any - liability incurred by the Initial Developer or such Contributor as a - result of warranty, support, indemnity or liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software under - the terms of this License or under the terms of a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the Covered - Software in Executable form under a different license, You must make - it absolutely clear that any terms which differ from this License - are offered by You alone, not by the Initial Developer or - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and distribute - the Larger Work as a single product. In such a case, You must make - sure the requirements of this License are fulfilled for the Covered - Software. - - 4. Versions of the License. - - 4.1. New Versions. - - Oracle is the initial license steward and may publish revised and/or - new versions of this License from time to time. Each version will be - given a distinguishing version number. Except as provided in Section - 4.3, no one other than the license steward has the right to modify - this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. If - the Initial Developer includes a notice in the Original Software - prohibiting it from being distributed or otherwise made available - under any subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the version - of the License under which You originally received the Covered - Software. Otherwise, You may also choose to use, distribute or - otherwise make the Covered Software available under the terms of any - subsequent version of the License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license and - remove any references to the name of the license steward (except to - note that the license differs from this License); and (b) otherwise - make it clear that the license contains terms which differ from this - License. - - 5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE - IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond the - termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that the - Participant Software (meaning the Contributor Version where the - Participant is a Contributor or the Original Software where the - Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if the - Initial Developer is not the Participant) and all Contributors under - Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice - from Participant terminate prospectively and automatically at the - expiration of such 60 day notice period, unless if within such 60 - day period You withdraw Your claim with respect to the Participant - Software against such Participant either unilaterally or pursuant to - a written agreement with Participant. - - 6.3. If You assert a patent infringement claim against Participant - alleging that the Participant Software directly or indirectly - infringes any patent where such claim is resolved (such as by - license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 6.4. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - - 7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE - TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER - FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR - LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE - POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT - APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH - PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH - LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR - LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION - AND LIMITATION MAY NOT APPLY TO YOU. - - 8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" (as that term is defined at 48 C.F.R. § - 252.227-7014(a)(1)) and "commercial computer software documentation" - as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Software - with only those rights set forth herein. This U.S. Government Rights - clause is in lieu of, and supersedes, any other FAR, DFAR, or other - clause or provision that addresses Government rights in computer - software under this License. - - 9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - the law of the jurisdiction specified in a notice contained within - the Original Software (except to the extent applicable law, if any, - provides otherwise), excluding such jurisdiction's conflict-of-law - provisions. Any litigation relating to this License shall be subject - to the jurisdiction of the courts located in the jurisdiction and - venue specified in a notice contained within the Original Software, - with the losing party responsible for costs, including, without - limitation, court costs and reasonable attorneys' fees and expenses. - The application of the United Nations Convention on Contracts for - the International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall be - construed against the drafter shall not apply to this License. You - agree that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, distribute - or otherwise make available any Covered Software. - - 10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - - ------------------------------------------------------------------------ - - NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION - LICENSE (CDDL) - - The code released under the CDDL shall be governed by the laws of the - State of California (excluding conflict-of-law provisions). Any - litigation relating to this License shall be subject to the jurisdiction - of the Federal Courts of the Northern District of California and the - state courts of the State of California, with venue lying in Santa Clara - County, California. - - - - The GNU General Public License (GPL) Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor - Boston, MA 02110-1335 - USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your freedom to - share and change it. By contrast, the GNU General Public License is - intended to guarantee your freedom to share and change free software--to - make sure the software is free for all its users. This General Public - License applies to most of the Free Software Foundation's software and - to any other program whose authors commit to using it. (Some other Free - Software Foundation software is covered by the GNU Library General - Public License instead.) You can apply it to your programs, too. - - When we speak of free software, we are referring to freedom, not price. - Our General Public Licenses are designed to make sure that you have the - freedom to distribute copies of free software (and charge for this - service if you wish), that you receive source code or can get it if you - want it, that you can change the software or use pieces of it in new - free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid anyone - to deny you these rights or to ask you to surrender the rights. These - restrictions translate to certain responsibilities for you if you - distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether gratis - or for a fee, you must give the recipients all the rights that you have. - You must make sure that they, too, receive or can get the source code. - And you must show them these terms so they know their rights. - - We protect your rights with two steps: (1) copyright the software, and - (2) offer you this license which gives you legal permission to copy, - distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain - that everyone understands that there is no warranty for this free - software. If the software is modified by someone else and passed on, we - want its recipients to know that what they have is not the original, so - that any problems introduced by others will not reflect on the original - authors' reputations. - - Finally, any free program is threatened constantly by software patents. - We wish to avoid the danger that redistributors of a free program will - individually obtain patent licenses, in effect making the program - proprietary. To prevent this, we have made it clear that any patent must - be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and - modification follow. - - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains a - notice placed by the copyright holder saying it may be distributed under - the terms of this General Public License. The "Program", below, refers - to any such program or work, and a "work based on the Program" means - either the Program or any derivative work under copyright law: that is - to say, a work containing the Program or a portion of it, either - verbatim or with modifications and/or translated into another language. - (Hereinafter, translation is included without limitation in the term - "modification".) Each licensee is addressed as "you". - - Activities other than copying, distribution and modification are not - covered by this License; they are outside its scope. The act of running - the Program is not restricted, and the output from the Program is - covered only if its contents constitute a work based on the Program - (independent of having been made by running the Program). Whether that - is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's source - code as you receive it, in any medium, provided that you conspicuously - and appropriately publish on each copy an appropriate copyright notice - and disclaimer of warranty; keep intact all the notices that refer to - this License and to the absence of any warranty; and give any other - recipients of the Program a copy of this License along with the Program. - - You may charge a fee for the physical act of transferring a copy, and - you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion of - it, thus forming a work based on the Program, and copy and distribute - such modifications or work under the terms of Section 1 above, provided - that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any part - thereof, to be licensed as a whole at no charge to all third parties - under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a notice - that there is no warranty (or else, saying that you provide a - warranty) and that users may redistribute the program under these - conditions, and telling the user how to view a copy of this License. - (Exception: if the Program itself is interactive but does not - normally print such an announcement, your work based on the Program - is not required to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the Program, and - can be reasonably considered independent and separate works in - themselves, then this License, and its terms, do not apply to those - sections when you distribute them as separate works. But when you - distribute the same sections as part of a whole which is a work based on - the Program, the distribution of the whole must be on the terms of this - License, whose permissions for other licensees extend to the entire - whole, and thus to each and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or contest - your rights to work written entirely by you; rather, the intent is to - exercise the right to control the distribution of derivative or - collective works based on the Program. - - In addition, mere aggregation of another work not based on the Program - with the Program (or with a work based on the Program) on a volume of a - storage or distribution medium does not bring the other work under the - scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms of - Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections 1 - and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your cost - of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer to - distribute corresponding source code. (This alternative is allowed - only for noncommercial distribution and only if you received the - program in object code or executable form with such an offer, in - accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete source code - means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to control - compilation and installation of the executable. However, as a special - exception, the source code distributed need not include anything that is - normally distributed (in either source or binary form) with the major - components (compiler, kernel, and so on) of the operating system on - which the executable runs, unless that component itself accompanies the - executable. - - If distribution of executable or object code is made by offering access - to copy from a designated place, then offering equivalent access to copy - the source code from the same place counts as distribution of the source - code, even though third parties are not compelled to copy the source - along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt otherwise - to copy, modify, sublicense or distribute the Program is void, and will - automatically terminate your rights under this License. However, parties - who have received copies, or rights, from you under this License will - not have their licenses terminated so long as such parties remain in - full compliance. - - 5. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify or - distribute the Program or its derivative works. These actions are - prohibited by law if you do not accept this License. Therefore, by - modifying or distributing the Program (or any work based on the - Program), you indicate your acceptance of this License to do so, and all - its terms and conditions for copying, distributing or modifying the - Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program subject to - these terms and conditions. You may not impose any further restrictions - on the recipients' exercise of the rights granted herein. You are not - responsible for enforcing compliance by third parties to this License. - - 7. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent issues), - conditions are imposed on you (whether by court order, agreement or - otherwise) that contradict the conditions of this License, they do not - excuse you from the conditions of this License. If you cannot distribute - so as to satisfy simultaneously your obligations under this License and - any other pertinent obligations, then as a consequence you may not - distribute the Program at all. For example, if a patent license would - not permit royalty-free redistribution of the Program by all those who - receive copies directly or indirectly through you, then the only way you - could satisfy both it and this License would be to refrain entirely from - distribution of the Program. - - If any portion of this section is held invalid or unenforceable under - any particular circumstance, the balance of the section is intended to - apply and the section as a whole is intended to apply in other - circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of any - such claims; this section has the sole purpose of protecting the - integrity of the free software distribution system, which is implemented - by public license practices. Many people have made generous - contributions to the wide range of software distributed through that - system in reliance on consistent application of that system; it is up to - the author/donor to decide if he or she is willing to distribute - software through any other system and a licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed to be - a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, the - original copyright holder who places the Program under this License may - add an explicit geographical distribution limitation excluding those - countries, so that distribution is permitted only in or among countries - not thus excluded. In such case, this License incorporates the - limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new - versions of the General Public License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the Program - specifies a version number of this License which applies to it and "any - later version", you have the option of following the terms and - conditions either of that version or of any later version published by - the Free Software Foundation. If the Program does not specify a version - number of this License, you may choose any version ever published by the - Free Software Foundation. - - 10. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the - author to ask for permission. For software which is copyrighted by the - Free Software Foundation, write to the Free Software Foundation; we - sometimes make exceptions for this. Our decision will be guided by the - two goals of preserving the free status of all derivatives of our free - software and of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. - EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR - OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, - EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE - ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH - YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL - NECESSARY SERVICING, REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY - AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR - DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL - DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM - (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED - INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF - THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR - OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest - possible use to the public, the best way to achieve this is to make it - free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest to - attach them to the start of each source file to most effectively convey - the exclusion of warranty; and each file should have at least the - "copyright" line and a pointer to where the full notice is found. - - One line to give the program's name and a brief idea of what it does. - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - - Also add information on how to contact you by electronic and paper mail. - - If the program is interactive, make it output a short notice like this - when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type - `show w'. This is free software, and you are welcome to redistribute - it under certain conditions; type `show c' for details. - - The hypothetical commands `show w' and `show c' should show the - appropriate parts of the General Public License. Of course, the commands - you use may be called something other than `show w' and `show c'; they - could even be mouse-clicks or menu items--whatever suits your program. - - You should also get your employer (if you work as a programmer) or your - school, if any, to sign a "copyright disclaimer" for the program, if - necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - program `Gnomovision' (which makes passes at compilers) written by - James Hacker. - - signature of Ty Coon, 1 April 1989 - Ty Coon, President of Vice - - This General Public License does not permit incorporating your program - into proprietary programs. If your program is a subroutine library, you - may consider it more useful to permit linking proprietary applications - with the library. If this is what you want to do, use the GNU Library - General Public License instead of this License. - - # - - Certain source files distributed by Oracle America, Inc. and/or its - affiliates are subject to the following clarification and special - exception to the GPLv2, based on the GNU Project exception for its - Classpath libraries, known as the GNU Classpath Exception, but only - where Oracle has expressly included in the particular source file's - header the words "Oracle designates this particular file as subject to - the "Classpath" exception as provided by Oracle in the LICENSE file - that accompanied this code." - - You should also note that Oracle includes multiple, independent - programs in this software package. Some of those programs are provided - under licenses deemed incompatible with the GPLv2 by the Free Software - Foundation and others. For example, the package includes programs - licensed under the Apache License, Version 2.0. Such programs are - licensed to you under their original licenses. - - Oracle facilitates your further distribution of this package by adding - the Classpath Exception to the necessary parts of its GPLv2 code, which - permits you to use that code in combination with other independent - modules not licensed under the GPLv2. However, note that this would - not permit you to commingle code under an incompatible license with - Oracle's GPLv2 licensed code by, for example, cutting and pasting such - code into a file also containing Oracle's GPLv2 licensed code and then - distributing the result. Additionally, if you were to remove the - Classpath Exception from any of the files to which it applies and - distribute the result, you would likely be required to license some or - all of the other code in that distribution under the GPLv2 as well, and - since the GPLv2 is incompatible with the license terms of some items - included in the distribution by Oracle, removing the Classpath - Exception could therefore effectively compromise your ability to - further distribute the package. - - Proceed with caution and we recommend that you obtain the advice of a - lawyer skilled in open source matters before removing the Classpath - Exception or making modifications to this package which may - subsequently be redistributed and/or involve the use of third party - software. - - CLASSPATH EXCEPTION - Linking this library statically or dynamically with other modules is - making a combined work based on this library. Thus, the terms and - conditions of the GNU General Public License version 2 cover the whole - combination. - - As a special exception, the copyright holders of this library give you - permission to link this library with independent modules to produce an - executable, regardless of the license terms of these independent - modules, and to copy and distribute the resulting executable under - terms of your choice, provided that you also meet, for each linked - independent module, the terms and conditions of the license of that - module. An independent module is a module which is not derived from or - based on this library. If you modify this library, you may extend this - exception to your version of the library, but you are not obligated to - do so. If you do not wish to do so, delete this exception statement - from your version. - - -------------------- - The Fakeload library - - MIT License - - Copyright (c) 2017 Marten Sigwart - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/build/yarn-scripts.ts b/build/yarn-scripts.ts index 5a3d80938..129d2db87 100644 --- a/build/yarn-scripts.ts +++ b/build/yarn-scripts.ts @@ -70,13 +70,10 @@ const scalaclean = () => .catch((err) => console.log(err)) function watch() { - concurrently( - ['yarn watch:vite-dev', 'yarn watch:svelte', 'yarn watch:tdmlEditorJS'], - { - killOthersOn: ['failure'], - restartTries: 1, - } - ) + concurrently(['yarn watch:vite-dev', 'yarn watch:tdmlEditorJS'], { + killOthersOn: ['failure'], + restartTries: 1, + }) } function package() { @@ -107,206 +104,6 @@ function package() { ) } -function packageNamePath(packageName) { - return path.join(...packageName.split('/')) -} - -function readPackageVersion(packageRoot) { - const packageJsonPath = path.join(packageRoot, 'package.json') - if (!fs.existsSync(packageJsonPath)) return undefined - - try { - return JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')).version - } catch (err) { - console.warn( - `[omega-edit] Unable to read package version for ${packageRoot}: ${String( - err - )}` - ) - return undefined - } -} - -function shouldPatchOmegaEditPackage(packageRoot, expectedVersion, label) { - const version = readPackageVersion(packageRoot) - if (version === expectedVersion) { - return true - } - - const versionLabel = version ?? 'unknown' - console.warn( - `[omega-edit] Skipping ${label} patch for ${packageRoot}; expected ${expectedVersion}, found ${versionLabel}.` - ) - return false -} - -function patchOmegaEditClientLogger( - packageRoot = 'node_modules/@omega-edit/client' -) { - if (!shouldPatchOmegaEditPackage(packageRoot, '2.0.0', 'client logger')) { - return - } - - const loggerTargets = [ - path.join(packageRoot, 'dist/cjs/logger.js'), - path.join(packageRoot, 'dist/esm/logger.js'), - ] - const transportPattern = - /setLogger\(buildLogger\(pino(?:_1\.default)?\.transport\(\{[\s\S]*?\}\)\)\);/ - - loggerTargets.forEach((loggerPath) => { - if (!fs.existsSync(loggerPath)) { - console.warn(`[omega-edit] Client logger not found: ${loggerPath}`) - return - } - - const source = fs.readFileSync(loggerPath, 'utf-8') - const patched = source.replace( - transportPattern, - 'setLogger(buildLogger(process.stderr));' - ) - - if (patched === source) { - if (!source.includes('setLogger(buildLogger(process.stderr));')) { - console.warn( - `[omega-edit] Unable to patch OmegaEdit client logger at ${loggerPath}; leaving upstream source unchanged.` - ) - } - return - } - - fs.writeFileSync(loggerPath, patched, 'utf-8') - }) -} - -function patchOmegaEditServerLocator(searchRoot = 'node_modules') { - const serverTargets = glob.sync('**/@omega-edit/server/out/index.js', { - cwd: searchRoot, - absolute: true, - nodir: true, - }) - const buggyLocator = '.replace("node_modules","")' - const knownFixedLocators = [ - '.slice(0,-"node_modules".length)', - '.slice(0,-12)', - ] - - if (serverTargets.length === 0) { - return - } - - serverTargets.forEach((serverPath) => { - const packageRoot = path.dirname(path.dirname(serverPath)) - if (!shouldPatchOmegaEditPackage(packageRoot, '2.0.0', 'server locator')) { - return - } - - const source = fs.readFileSync(serverPath, 'utf-8') - const patched = source.replaceAll(buggyLocator, knownFixedLocators[0]) - - if (patched === source) { - if (!knownFixedLocators.some((locator) => source.includes(locator))) { - console.warn( - `[omega-edit] Unable to patch OmegaEdit server locator at ${serverPath}; leaving upstream source unchanged.` - ) - } - return - } - - fs.writeFileSync(serverPath, patched, 'utf-8') - }) -} - -function patchOmegaEditRuntime( - packageRoot = 'node_modules/@omega-edit/client', - searchRoot = 'node_modules' -) { - patchOmegaEditClientLogger(packageRoot) - patchOmegaEditServerLocator(searchRoot) -} - -function copyPackageRuntimeTree( - packageName, - sourcePackageDir, - destinationPackageDir, - seen = new Set() -) { - const visitKey = `${sourcePackageDir}|${destinationPackageDir}` - if (seen.has(visitKey)) return - seen.add(visitKey) - - if (!fs.existsSync(sourcePackageDir)) { - throw new Error( - `Package source not found for ${packageName}: ${sourcePackageDir}` - ) - } - - rmFileOrDirectory(destinationPackageDir) - fs.mkdirSync(path.dirname(destinationPackageDir), { recursive: true }) - fs.cpSync(sourcePackageDir, destinationPackageDir, { - recursive: true, - force: true, - }) - - const packageJsonPath = path.join(sourcePackageDir, 'package.json') - const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')) - const dependencies = Object.keys(packageJson.dependencies || {}) - - if (dependencies.length === 0) return - - const destinationNodeModulesDir = path.join( - destinationPackageDir, - 'node_modules' - ) - - dependencies.forEach((dependencyName) => { - const sourceDependencyDirCandidates = [ - path.join( - sourcePackageDir, - 'node_modules', - packageNamePath(dependencyName) - ), - path.join('node_modules', packageNamePath(dependencyName)), - ] - const sourceDependencyDir = sourceDependencyDirCandidates.find( - (candidate) => fs.existsSync(candidate) - ) - - if (!sourceDependencyDir) { - throw new Error( - `Unable to resolve runtime dependency ${dependencyName} for ${packageName}` - ) - } - - copyPackageRuntimeTree( - dependencyName, - sourceDependencyDir, - path.join(destinationNodeModulesDir, packageNamePath(dependencyName)), - seen - ) - }) -} - -function syncOmegaEditClientRuntime() { - const clientPackageName = '@omega-edit/client' - const sourceClientDir = path.join( - 'node_modules', - packageNamePath(clientPackageName) - ) - const destinationClientDir = path.join( - 'dist/package/node_modules', - packageNamePath(clientPackageName) - ) - - patchOmegaEditRuntime(sourceClientDir, 'node_modules') - copyPackageRuntimeTree( - clientPackageName, - sourceClientDir, - destinationClientDir - ) - patchOmegaEditRuntime(destinationClientDir, 'dist/package/node_modules') -} - function packageVsix() { const vsceCommand = process.platform === 'win32' @@ -420,13 +217,20 @@ function updateVersion() { /* START SECTION: LICENSE related methods */ function getLicenseData() { - return JSON.parse( - child_process - .execSync( - `yarn licenses list --json --prod | jq 'select(.type == "table").data.body'` - ) - .toString() - ) + const licenseOutput = child_process + .execSync(`yarn licenses list --json --prod`) + .toString() + + for (const line of licenseOutput.split(/\r?\n/)) { + if (line.trim().length === 0) continue + + const record = JSON.parse(line) + if (record.type === 'table') { + return record.data.body + } + } + + throw new Error('Failed to parse yarn licenses output: no table record found') } function checkMissingLicenseData() { @@ -517,10 +321,6 @@ module.exports = { updateVersion: updateVersion, watch: watch, package: package, - patchOmegaEditClientLogger: patchOmegaEditClientLogger, - patchOmegaEditServerLocator: patchOmegaEditServerLocator, - patchOmegaEditRuntime: patchOmegaEditRuntime, - syncOmegaEditClientRuntime: syncOmegaEditClientRuntime, packageVsix: packageVsix, checkMissingLicenseData: checkMissingLicenseData, checkLicenseCompatibility: checkLicenseCompatibility, diff --git a/package.json b/package.json index bf8fdc67a..0b9315e0f 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,10 @@ "gen-version-ts": "run-func build/yarn-scripts.ts genVersionTS", "nodeclean": "run-func build/yarn-scripts.ts nodeclean", "scalaclean": "run-func build/yarn-scripts.ts scalaclean", - "postinstall": "node -e \"const fs=require('fs'); const cp=require('child_process'); if (fs.existsSync('build/yarn-scripts.ts')) { const cmd=process.platform === 'win32' ? 'yarn.cmd' : 'yarn'; const result=cp.spawnSync(cmd, ['run-func', 'build/yarn-scripts.ts', 'patchOmegaEditRuntime'], { stdio: 'inherit', shell: process.platform === 'win32' }); if (result.error) { console.error(result.error); process.exit(1); } process.exit(result.status === null ? 1 : result.status); }\"", "check-missing-license-data": "run-func build/yarn-scripts.ts checkMissingLicenseData", "check-license-compatibility": "run-func build/yarn-scripts.ts checkLicenseCompatibility", "clean": "yarn nodeclean && yarn scalaclean", - "precompile": "yarn nodeclean && yarn gen-version-ts && yarn svelte:build && yarn compile:tdmlEditorJS", + "precompile": "yarn nodeclean && yarn gen-version-ts && yarn compile:tdmlEditorJS", "compile": "tsc -p ./ && yarn sbt", "predevbuild": "yarn compile", "devbuild": "yarn vite:dev", @@ -37,88 +36,64 @@ "lint:fix": "yarn prettier src -w", "prewatch": "yarn gen-version-ts && yarn sbt", "watch": "run-func build/yarn-scripts.ts watch", - "watch:svelte": "cd src/svelte && vite --config ./vite.config.mjs build --mode development --watch", - "watch:svelte-tests": "mocha -r ts-node/register -w ./src/svelte/tests/**/*.test.ts", "watch:tdmlEditorJS": "esbuild src/tdmlEditor/webview/webview.js --outfile=dist/views/tdmlEditor/webview/webview.js --bundle --platform=node --format=cjs --watch", "compile:tdmlEditorJS": "esbuild src/tdmlEditor/webview/webview.js --outfile=dist/views/tdmlEditor/webview/webview.js --bundle --platform=node --format=cjs", "prepackage": "yarn install && yarn compile && yarn vite:pkg", - "package": "run-func build/yarn-scripts.ts package && yarn --cwd dist/package install --production && run-func build/yarn-scripts.ts syncOmegaEditClientRuntime && run-func build/yarn-scripts.ts packageVsix", + "package": "run-func build/yarn-scripts.ts package && yarn --cwd dist/package install --production && run-func build/yarn-scripts.ts packageVsix", "pretest": "yarn compile && yarn vite:dev", - "test": "sbt test && yarn test:svelte && node ./out/tests/omegaEditServerLifecycle.js && node ./out/tests/runTest.js", - "test:svelte": "mocha --import=tsx ./src/svelte/tests/**/*.test.ts", + "test": "sbt test && node ./out/tests/runTest.js", "sbt": "sbt Universal/stage", - "move-debuggers": "run-func build/yarn-scripts.ts moveDebuggers", - "svelte:check": "svelte-check --tsconfig ./src/svelte/tsconfig.json", - "svelte:build": "cd src/svelte && vite build --config ./vite.config.mjs --mode production --emptyOutDir", "update-version": "run-func build/yarn-scripts.ts updateVersion", "vite:pkg": "yarn vite build --mode production -c ./vite.config.mjs", "vite:dev": "yarn vite build --mode development -c ./vite.config.mjs", "watch:vite-dev": "yarn vite build --mode development -c ./vite.config.mjs --watch" }, "dependencies": { - "@omega-edit/client": "2.0.0", - "@omega-edit/server": "2.0.0", "@viperproject/locate-java-home": "1.1.17", "@vscode/debugadapter": "1.67.0", "@vscode/webview-ui-toolkit": "^1.2.2", "await-notify": "1.0.1", - "hexy": "0.3.5", - "iso-639-1": "^3.1.0", "jsep": "^1.4.0", "jsonc-parser": "3.3.1", "semver": "7.7.3", "unzip-stream": "0.3.4", "wait-port": "1.1.0", - "xdg-app-paths": "8.3.0", "xml-formatter": "^3.7.0", "xml-js": "^1.6.11", "jszip": "^3.10.1" }, "devDependencies": { - "@sveltejs/adapter-static": "3.0.8", - "@sveltejs/kit": "^2.60.1", - "@sveltejs/vite-plugin-svelte": "^5.0.3", - "@tsconfig/svelte": "^5.0.8", "@types/glob": "^8.0.0", "@types/mocha": "^10.0.3", "@types/node": "^24.0.8", "@types/vscode": "^1.90.0", - "@types/vscode-webview": "^1.57.5", "@vscode/debugadapter-testsupport": "1.68.0", "@vscode/test-electron": "2.5.2", "@vscode/vsce": "^3.9.1", "chai": "^6.0.1", "cli-progress": "^3.12.0", "concurrently": "^9.2.1", - "css-loader": "^7.1.2", "esbuild": "^0.25.10", "fast-xml-parser": "^5.7.2", "glob": "13.0.0", "mocha": "11.5.0", "picocolors": "^1.1.1", "prettier": "3.6.2", - "prettier-plugin-svelte": "3.2.6", - "rollup-plugin-strip-code": "^0.2.8", "run-func": "^3.0.0", - "sass": "^1.98.0", - "svelte": "^5.55.7", - "svelte-check": "^4.4.6", - "svelte-loader": "^3.2.4", - "svelte-preprocess": "^6.0.3", - "ts-loader": "9.4.4", "ts-node": "^10.9.1", "tsconfig-paths": "^4.2.0", - "tsx": "^4.21.0", "typescript": "5.2.2", "vite": "^6.4.2", "vscode-extension-tester": "5.9.1" }, "resolutions": { - "@omega-edit/server": "2.0.0", "cookie": ">=0.7.0", "diff": ">=8.0.3", "serialize-javascript": ">=7.0.3" }, + "extensionDependencies": [ + "ctc-oss.omega-edit-data-editor" + ], "main": "./dist/ext/extension.js", "activationEvents": [ "onDebugResolve:dfdl", @@ -667,51 +642,6 @@ }, "default": {} }, - "dataEditor": { - "type": "object", - "description": "Configuration for Data Editor. Settings are port and logging details", - "properties": { - "port": { - "type": "number", - "default": 9000, - "description": "Port number to run the data editor on" - }, - "logging": { - "type": "object", - "description": "Data Editor Logging Configuration", - "properties": { - "file": { - "type": "string", - "description": "Path to file to save logs at. Leave empty to use the OS app-data/XDG path.", - "default": "" - }, - "level": { - "type": "string", - "enum": [ - "debug", - "info", - "warning", - "error", - "critical" - ], - "description": "Data Editor Logging Level", - "default": "info" - } - }, - "default": { - "file": "", - "level": "info" - } - } - }, - "default": { - "port": 9000, - "logging": { - "file": "", - "level": "info" - } - } - }, "dfdlDebugger": { "type": "object", "description": "Configuration for debugger. Settings are daffodilVersion, timeout and logging (level and file)", @@ -793,13 +723,6 @@ "daffodilDebugClasspath": [], "variables": {}, "tunables": {}, - "dataEditor": { - "port": 9000, - "logging": { - "file": "", - "level": "info" - } - }, "dfdlDebugger": { "daffodilVersion": "3.11.0", "timeout": "10s", @@ -841,13 +764,6 @@ "daffodilDebugClasspath": [], "variables": {}, "tunables": {}, - "dataEditor": { - "port": 9000, - "logging": { - "file": "", - "level": "info" - } - }, "dfdlDebugger": { "daffodilVersion": "3.11.0", "timeout": "10s", @@ -958,17 +874,6 @@ }, "default": {} }, - "dataEditor": { - "type": "object", - "description": "Configuration for Data Editor. Settings are port, logFile and logLevel", - "default": { - "port": 9000, - "logging": { - "file": "", - "level": "info" - } - } - }, "dfdlDebugger": { "type": "object", "description": "Configuration for debugger. Settings are daffodilVersion, timeout and logging (level and file)", diff --git a/src/classes/dataEditor.ts b/src/classes/dataEditor.ts deleted file mode 100644 index 8889a9320..000000000 --- a/src/classes/dataEditor.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { LoggingConfig } from './loggingConfig' - -export interface DataEditorConfig { - port: number - logging: LoggingConfig -} diff --git a/src/classes/vscode-launch.ts b/src/classes/vscode-launch.ts index 5f8a1d0f9..54db913d8 100644 --- a/src/classes/vscode-launch.ts +++ b/src/classes/vscode-launch.ts @@ -16,7 +16,6 @@ */ import { TDMLConfig } from './tdmlConfig' -import { DataEditorConfig } from './dataEditor' import { InfosetOutput } from '../daffodilDebugger' import { DFDLDebugger } from './dfdlDebugger' import { SchemaData } from './schemaData' @@ -31,7 +30,6 @@ export interface VSCodeLaunchConfigArgs { infosetFormat: string | null infosetOutput: InfosetOutput | null tdmlConfig: TDMLConfig - dataEditor: DataEditorConfig | null stopOnEntry: boolean useExistingServer: boolean trace: boolean diff --git a/src/dataEditor/config/Config.ts b/src/dataEditor/config/Config.ts deleted file mode 100644 index eea54a6f0..000000000 --- a/src/dataEditor/config/Config.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { - ServerPortKeyword, - WorkspaceKeyword, - configureIf, -} from './ConfigKeyword' -import { addToAppDataPath, rootPath } from './Extract' -import path from 'path' - -const portDefault = 9000 -const logFileDefault = addToAppDataPath('dataEditor-${omegaEditPort}.log') -const logLevelDefault = 'info' -const legacyWorkspaceLogFileTemplate = `${WorkspaceKeyword}/dataEditor-${ServerPortKeyword}.log` - -export function getDefaultLogFilePath(port: number): string { - return addToAppDataPath(`dataEditor-${port}.log`) -} - -export function getDefaultCheckpointPath(port: number): string { - return addToAppDataPath(`.checkpoint-${port}`) -} - -export function isLegacyWorkspaceLogFile( - logFile: string, - port: number -): boolean { - const normalized = path.normalize(logFile) - return ( - normalized === path.normalize(legacyWorkspaceLogFileTemplate) || - normalized === path.normalize(path.join(rootPath, `dataEditor-${port}.log`)) - ) -} - -export function normalizeDataEditorLogFile( - logFile: string, - port: number -): string { - const trimmed = logFile.trim() - if (trimmed.length === 0) { - return getDefaultLogFilePath(port) - } - - const resolved = configureIf(trimmed, [ - { keyword: WorkspaceKeyword, replacement: rootPath }, - { keyword: ServerPortKeyword, replacement: port.toString() }, - ]) - const normalized = path.normalize(resolved) - - if ( - isLegacyWorkspaceLogFile(trimmed, port) || - isLegacyWorkspaceLogFile(normalized, port) - ) { - return getDefaultLogFilePath(port) - } - - return path.isAbsolute(normalized) ? normalized : addToAppDataPath(normalized) -} - -export type ConfigJSON = { - port: number - logging: { - file: string - level: string - } -} -export interface IConfig { - readonly port: number - readonly logFile: string - readonly logLevel: string - readonly checkpointPath: string -} - -export class Config implements IConfig { - readonly port: number - readonly logFile: string - readonly logLevel: string - readonly checkpointPath: string - public static readonly Default: Config = new Config({ - port: portDefault, - logFile: logFileDefault, - logLevel: logLevelDefault, - checkpointPath: getDefaultCheckpointPath(portDefault), - }) - private constructor(configuration: Required) { - const { port, logFile, logLevel, checkpointPath } = configuration - this.port = port - this.logFile = normalizeDataEditorLogFile(logFile, port) - this.logLevel = logLevel - this.checkpointPath = checkpointPath - } - static fromConfigJSON(json: ConfigJSON): IConfig { - return new Config({ - port: json.port, - logFile: json.logging.file, - logLevel: json.logging.level, - checkpointPath: getDefaultCheckpointPath(json.port), - }) - } -} diff --git a/src/dataEditor/config/ConfigKeyword.ts b/src/dataEditor/config/ConfigKeyword.ts deleted file mode 100644 index f7a465b53..000000000 --- a/src/dataEditor/config/ConfigKeyword.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export type ConfigureIfPredicate = ( - configVar: string, - keyword: string -) => boolean - -const ConfigureIfIncludes: ConfigureIfPredicate = (cfg, k) => { - return cfg.includes(k) -} - -export const WorkspaceKeyword = '${workspaceFolder}' -export const ServerPortKeyword = '${omegaEditPort}' - -export type ConfigKeyReplace = { - keyword: string - replacement: string -} -export function configureIf( - configVar: string, - keyReplace: ConfigKeyReplace[], - predicate: ConfigureIfPredicate = ConfigureIfIncludes -): string { - let ret = configVar - for (let i = 0; i < keyReplace.length; i++) { - let { keyword, replacement } = keyReplace[i] - if (predicate(ret, keyword)) ret = ret.replace(keyword, replacement) - } - return ret -} - -export default { configureIf } diff --git a/src/dataEditor/config/Extract.ts b/src/dataEditor/config/Extract.ts deleted file mode 100644 index dbfa372d9..000000000 --- a/src/dataEditor/config/Extract.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Uri, workspace } from 'vscode' -import { - Config, - ConfigJSON, - IConfig, - getDefaultCheckpointPath, - getDefaultLogFilePath, -} from './Config' -import XDGAppPaths from 'xdg-app-paths' -import path from 'path' -import { substituteVSCodeEnvVariables } from '../../utils' -import { ServerPortKeyword } from './ConfigKeyword' - -export const APP_DATA_PATH: string = XDGAppPaths({ name: 'omega_edit' }).data() -export function addToAppDataPath(filename: string): string { - return path.join(APP_DATA_PATH, filename) -} -export const rootPath: string = workspace.workspaceFolders - ? workspace.workspaceFolders[0].uri.fsPath - : Uri.parse('').fsPath - -function queryConfigurationsArray(): Array | undefined { - return workspace - .getConfiguration('launch') - .get>('configurations') -} - -function extractDataEditorConfigFromQuery( - configurationsQuery: Array -): ConfigJSON { - return configurationsQuery[0]['dataEditor'] as ConfigJSON -} - -export function extractConfigurationVariables(): IConfig { - const configObjArray = queryConfigurationsArray() - const workspaceConfig = workspace.getConfiguration() - const port = workspaceConfig.dataEditor?.port || Config.Default.port - - const noLaunchJSONConfig: Config = { - ...Config.Default, // Populate settings w/ default configs - // override defaults if they exist in global user's settings.json below - port: port, // Get dataEdtior port from settings.json if it exists - logLevel: - workspaceConfig.dataEditor?.logging?.level || Config.Default.logLevel, // Get logging level from settings.json if exists - logFile: workspaceConfig.dataEditor?.logging?.file - ? path.normalize( - substituteVSCodeEnvVariables( - workspaceConfig.dataEditor?.logging?.file, - APP_DATA_PATH - ).replaceAll(ServerPortKeyword, port.toString()) - ) - : getDefaultLogFilePath(port), // Get logging file path from settings.json if exists - checkpointPath: getDefaultCheckpointPath(port), - } - - if (configObjArray === undefined || configObjArray.length === 0) - return noLaunchJSONConfig // No launch specified for DFDL - - return configObjArray[0]['dataEditor'] === undefined - ? noLaunchJSONConfig // There is a launch option specified for daffodil-vscode, but somehow missing "dataEditor" part - : Config.fromConfigJSON(extractDataEditorConfigFromQuery(configObjArray)) // Use dataEditor section in launch.json -} - -export default { addToAppDataPath, rootPath, extractConfigurationVariables } diff --git a/src/dataEditor/config/index.ts b/src/dataEditor/config/index.ts deleted file mode 100644 index 54051bc9d..000000000 --- a/src/dataEditor/config/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export * from './Config' -export * from './Extract' -export { - WorkspaceKeyword, - ServerPortKeyword, - ConfigureIfPredicate, - ConfigKeyReplace, -} from './ConfigKeyword' diff --git a/src/dataEditor/dataEditorClient.ts b/src/dataEditor/dataEditorClient.ts deleted file mode 100644 index 3d66829ce..000000000 --- a/src/dataEditor/dataEditorClient.ts +++ /dev/null @@ -1,1660 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - ALL_EVENTS, - clear, - countCharacters, - CountKind, - createSession, - createSimpleFileLogger, - createViewport, - del, - edit, - getByteOrderMark, - getClient, - getClientVersion, - getComputedFileSize, - getContentType, - getCounts, - getLanguage, - getLogger, - resetClient, - getServerInfo, - getViewportData, - IOFlags, - modifyViewport, - numAscii, - profileSession, - redo, - replaceOneSession, - runSessionTransaction, - saveSession, - SaveStatus, - searchSession, - setLogger, - startServer, - stopProcessUsingPID, - subscribeViewportEvents, - undo, - ViewportDataResponse, - ViewportEventKind, -} from '@omega-edit/client' -import assert from 'assert' -import fs from 'fs' -import net from 'net' -import os from 'os' -import path from 'path' -import * as vscode from 'vscode' -import XDGAppPaths from 'xdg-app-paths' -import { extractDaffodilEvent } from '../daffodilDebugger/daffodil' -import { - EditByteModes, - VIEWPORT_CAPACITY_MAX, -} from '../svelte/src/stores/configuration' -import { - EditorMessage, - MessageCommand, - MessageLevel, -} from '../svelte/src/utilities/message' -import * as editor_config from './config' -import { configureOmegaEditPort, ServerInfo } from './include/server/ServerInfo' -import { SvelteWebviewInitializer } from './svelteWebviewInitializer' -import { - addActiveSession, - removeActiveSession, -} from './include/server/Sessions' -import { writeLogbackConfigFile } from './include/server/LogbackConfig' -import { getCurrentHeartbeatInfo } from './include/server/heartbeat' -import * as child_process from 'child_process' -import { osCheck } from '../utils' - -// ***************************************************************************** -// global constants -// ***************************************************************************** - -export const DATA_EDITOR_COMMAND: string = 'extension.data.edit' -export const OMEGA_EDIT_HOST: string = '127.0.0.1' -export const SERVER_START_TIMEOUT: number = 15 // in seconds -export const APP_DATA_PATH: string = XDGAppPaths({ name: 'omega_edit' }).data() - -// ***************************************************************************** -// file-scoped constants -// ***************************************************************************** - -const HEARTBEAT_INTERVAL_MS: number = 1000 // 1 second (1000 ms) -const SERVER_SESSION_TIMEOUT_MS: number = 60 * 1000 -const SERVER_CLEANUP_INTERVAL_MS: number = 15 * 1000 -const MAX_LOG_FILES: number = 5 // Maximum number of log files to keep TODO: make this configurable -const OPEN_EDITORS = new Map() - -// ***************************************************************************** -// file-scoped variables -// ***************************************************************************** -let serverInfo: ServerInfo = new ServerInfo() -let checkpointPath: string = '' -let omegaEditPort: number = 0 -let configuredClientLogger: - | { - logFile: string - logLevel: string - } - | undefined - -function toMessageBytes(data: Uint8Array): number[] { - return Array.from(data) -} - -function fromMessageBytes(data: unknown): Uint8Array { - if (data instanceof Uint8Array) { - return data - } - if (Array.isArray(data)) { - return Uint8Array.from(data) - } - if ( - data && - typeof data === 'object' && - 'data' in data && - Array.isArray((data as { data?: unknown }).data) - ) { - return Uint8Array.from((data as { data: number[] }).data) - } - if (data && typeof data === 'object') { - const values = Object.entries(data as Record) - .filter( - (entry): entry is [string, number] => - /^\d+$/.test(entry[0]) && typeof entry[1] === 'number' - ) - .sort((a, b) => Number(a[0]) - Number(b[0])) - .map(([, value]) => value) - if (values.length > 0) { - return Uint8Array.from(values) - } - } - return new Uint8Array(0) -} - -// ***************************************************************************** -// exported functions -// ***************************************************************************** - -export function activate(ctx: vscode.ExtensionContext): void { - ctx.subscriptions.push( - vscode.commands.registerCommand( - DATA_EDITOR_COMMAND, - async (fileToEdit: string = '') => { - let configVars = editor_config.extractConfigurationVariables() - return await createDataEditorWebviewPanel(ctx, configVars, fileToEdit) - } - ) - ) -} - -// ***************************************************************************** -// exported class -// ***************************************************************************** - -export class DataEditorClient implements vscode.Disposable { - public panel: vscode.WebviewPanel - private svelteWebviewInitializer: SvelteWebviewInitializer - private displayState: DisplayState - private currentViewportId: string - private fileToEdit: string = '' - private fileInfoData: Record | undefined = undefined - private hasReceivedWebviewReady = false - private omegaSessionId = '' - private sendHeartbeatIntervalId: NodeJS.Timeout | number | undefined = - undefined - private viewportSubscription: - | { - cancel(): void - } - | undefined = undefined - private disposables: vscode.Disposable[] = [] - private readonly disposeCleanupComplete: Promise - private resolveDisposeCleanup: (() => void) | undefined = undefined - - constructor( - protected context: vscode.ExtensionContext, - private view: string, - title: string, - private configVars: editor_config.IConfig, - fileToEdit: string = '', - panel: vscode.WebviewPanel - ) { - this.panel = panel - this.disposeCleanupComplete = new Promise((resolve) => { - this.resolveDisposeCleanup = resolve - }) - this.panel.webview.onDidReceiveMessage(this.messageReceiver, this) - - this.disposables = [ - this.panel, - vscode.debug.onDidReceiveDebugSessionCustomEvent(async (e) => { - const eventAsEditorMessage = extractDaffodilEvent(e) - if (eventAsEditorMessage === undefined) return - const forwardAs = eventAsEditorMessage.asObject() - await this.panel.webview.postMessage(forwardAs) - }), - ] - - this.context.subscriptions.push(this) - - this.svelteWebviewInitializer = new SvelteWebviewInitializer(context) - this.svelteWebviewInitializer.initialize(this.view, this.panel.webview) - - this.currentViewportId = '' - this.fileToEdit = fileToEdit - this.displayState = new DisplayState(this.panel) - } - addDisposable(dispoable: vscode.Disposable) { - this.disposables.push(dispoable) - } - async dispose(): Promise { - if (this.sendHeartbeatIntervalId) { - clearInterval(this.sendHeartbeatIntervalId) - this.sendHeartbeatIntervalId = undefined - } - this.viewportSubscription?.cancel() - this.viewportSubscription = undefined - - for (let i = 0; i < this.disposables.length; i++) - this.disposables[i].dispose() - } - - show(): void { - this.panel.reveal() - } - - async waitForDisposeCleanup(): Promise { - await this.disposeCleanupComplete - } - - public static async open( - context: vscode.ExtensionContext, - view: string, - configVars: editor_config.IConfig, - fileToEdit: string = '' - ): Promise { - const title = !fileToEdit ? 'Data Editor' : path.basename(fileToEdit) - - const column = - fileToEdit !== '' ? vscode.ViewColumn.Two : vscode.ViewColumn.Active - - const panel = vscode.window.createWebviewPanel(view, title, column, { - enableScripts: true, - retainContextWhenHidden: true, - }) - - const editor = new DataEditorClient( - context, - view, - title, - configVars, - fileToEdit, - panel - ) - - panel.onDidDispose(() => { - const pathKey = path.resolve(editor.fileToEdit).toLowerCase() - OPEN_EDITORS.delete(pathKey) - - void (async () => { - try { - await editor.dispose() - await removeActiveSession(editor.sessionId()) - } finally { - editor.resolveDisposeCleanup?.() - } - })().catch((err) => { - getLogger().warn({ - fn: 'DataEditorClient::onDidDispose', - err: { - msg: `Failed to dispose data editor: ${String(err)}`, - stack: err instanceof Error ? err.stack : undefined, - }, - }) - }) - }) - - const initialized = await editor.initialize() - if (!initialized) { - return undefined - } - - return editor - } - - public async initialize(): Promise { - checkpointPath = this.configVars.checkpointPath - let initialized = false - - if (this.fileToEdit !== '') { - // Case: file passed in directly — check for duplicates now - const realFilePath = path.resolve(this.fileToEdit).toLowerCase() - - if (OPEN_EDITORS.has(realFilePath)) { - vscode.window.showInformationMessage( - `Data editor already open for: ${this.fileToEdit}` - ) - OPEN_EDITORS.get(realFilePath)?.reveal() - this.panel.dispose() - return false - } - - initialized = await this.setupDataEditor() - if (!initialized) { - this.panel.dispose() - return false - } - OPEN_EDITORS.set(realFilePath, this.panel) - } else { - // Case: no file passed in — prompt user - const fileUri = await vscode.window.showOpenDialog({ - canSelectMany: false, - openLabel: 'Select', - canSelectFiles: true, - canSelectFolders: false, - title: 'Select Data File', - }) - - if (fileUri && fileUri[0]) { - this.fileToEdit = fileUri[0].fsPath - const realFilePath = path.resolve(this.fileToEdit).toLowerCase() - - if (OPEN_EDITORS.has(realFilePath)) { - vscode.window.showInformationMessage( - `Data editor already open for: ${this.fileToEdit}` - ) - OPEN_EDITORS.get(realFilePath)?.reveal() - this.panel.dispose() - return false - } - - initialized = await this.setupDataEditor() - if (!initialized) { - this.panel.dispose() - return false - } - OPEN_EDITORS.set(realFilePath, this.panel) - } else { - // User cancelled the dialog - this.panel.dispose() - return false - } - } - // send and initial heartbeat, then send the heartbeat to the webview at regular intervals - if (initialized) { - try { - await this.resyncWebview() - } catch (err) { - getLogger().warn({ - fn: 'DataEditorClient::initialize', - err: { - msg: `Initial webview sync failed: ${String(err)}`, - stack: err instanceof Error ? err.stack : undefined, - }, - }) - } - this.sendHeartbeatIntervalId = setInterval(() => { - void ( - this.hasReceivedWebviewReady - ? this.sendHeartbeat() - : this.resyncWebview() - ).catch((err) => { - getLogger().warn({ - fn: 'DataEditorClient::heartbeatInterval', - err: { - msg: `Webview sync failed: ${String(err)}`, - stack: err instanceof Error ? err.stack : undefined, - }, - }) - }) - }, HEARTBEAT_INTERVAL_MS) - } - return initialized - } - - sessionId(): string { - return this.omegaSessionId - } - - private async setupDataEditor(): Promise { - assert( - checkpointPath && checkpointPath.length > 0, - 'checkpointPath is not set' - ) - getLogger().info( - { fn: 'DataEditorClient::setupDataEditor', fileToEdit: this.fileToEdit }, - 'Starting data editor session setup' - ) - - let data = { - byteOrderMark: '', - changeCount: 0, - computedFileSize: 0, - diskFileSize: 0, - fileName: this.fileToEdit, - language: '', - type: '', - undoCount: 0, - } - - // create a session and capture the session id, content type, and file size - try { - const createSessionResponse = await createSession( - this.fileToEdit, - undefined, - checkpointPath - ) - this.omegaSessionId = createSessionResponse.getSessionId() - assert(this.omegaSessionId.length > 0, 'omegaSessionId is not set') - addActiveSession(this.omegaSessionId) - - data.diskFileSize = data.computedFileSize = - createSessionResponse.hasFileSize() - ? (createSessionResponse.getFileSize() as number) - : 0 - getLogger().info( - { - fn: 'DataEditorClient::setupDataEditor', - sessionId: this.omegaSessionId, - fileSize: data.computedFileSize, - }, - 'Created data editor session' - ) - - const contentTypeResponse = await getContentType( - this.omegaSessionId, - 0, - Math.min(1024, data.computedFileSize) - ) - data.type = contentTypeResponse.getContentType() - assert(data.type.length > 0, 'contentType is not set') - - const byteOrderMarkResponse = await getByteOrderMark( - this.omegaSessionId, - 0 - ) - data.byteOrderMark = byteOrderMarkResponse.getByteOrderMark() - assert(data.byteOrderMark.length > 0, 'byteOrderMark is not set') - - const languageResponse = await getLanguage( - this.omegaSessionId, - 0, - Math.min(1024, data.computedFileSize), - data.byteOrderMark - ) - data.language = languageResponse.getLanguage() - assert(data.language.length > 0, 'language is not set') - - data.diskFileSize = data.computedFileSize = - createSessionResponse.hasFileSize() - ? (createSessionResponse.getFileSize() as number) - : 0 - } catch (err) { - // Error message obtained from https://github.com/ctc-oss/omega-edit/commit/b85ecc4579a77469bf29181a2e6ab7f839ee8a52#diff-59917b7537d1a13d123e6c53315fd9f8eebb9a037c8e92142b8caefa64c5e1cbR84 - const isEmojiWindowsError = - err == - 'createSession error: 13 INTERNAL: Emojis in filenames is not supported on Windows' - - const msg = isEmojiWindowsError - ? `Unable to open ${this.fileToEdit}! Data editor doesn't support Emojis in filename on Windows.` - : `Failed to create session for ${this.fileToEdit}: ${String(err)}` - - getLogger().error({ - err: { - msg: msg, - stack: new Error().stack, - }, - }) - vscode.window.showErrorMessage(msg) - - // fine to return early here and not remove session b/c addActiveSession - // doesn't get called when createSession() errors out. - return false - } - - // create the viewport - try { - const viewportDataResponse = await createViewport( - undefined, - this.omegaSessionId, - 0, - VIEWPORT_CAPACITY_MAX, - false - ) - this.currentViewportId = viewportDataResponse.getViewportId() - assert(this.currentViewportId.length > 0, 'currentViewportId is not set') - this.viewportSubscription = await viewportSubscribe( - this.panel, - this.currentViewportId - ) - await sendViewportRefresh(this.panel, viewportDataResponse) - getLogger().info( - { - fn: 'DataEditorClient::setupDataEditor', - viewportId: this.currentViewportId, - }, - 'Created initial viewport' - ) - } catch (err) { - const msg = `Failed to create viewport for ${this.fileToEdit}: ${String( - err - )}` - getLogger().error({ - err: { - msg: msg, - stack: new Error().stack, - }, - }) - vscode.window.showErrorMessage(msg) - return false - } - - // send the initial file info to the webview - this.fileInfoData = data - await this.panel.webview.postMessage({ - command: MessageCommand.fileInfo, - data: data, - }) - getLogger().info( - { - fn: 'DataEditorClient::setupDataEditor', - sessionId: this.omegaSessionId, - viewportId: this.currentViewportId, - }, - 'Posted initial file info to webview' - ) - return true - } - - private async sendHeartbeat() { - const heartbeatInfo = getCurrentHeartbeatInfo() - - const delivered = await this.panel.webview.postMessage({ - command: MessageCommand.heartbeat, - data: { - latency: heartbeatInfo.latency, - omegaEditPort: this.configVars.port, - serverCpuCount: heartbeatInfo.serverCpuCount, - serverCpuLoadAverage: heartbeatInfo.serverCpuLoadAverage, - serverTimestamp: heartbeatInfo.serverTimestamp, - serverUptime: heartbeatInfo.serverUptime, - serverResidentMemoryBytes: heartbeatInfo.serverResidentMemoryBytes, - serverVirtualMemoryBytes: heartbeatInfo.serverVirtualMemoryBytes, - serverPeakResidentMemoryBytes: - heartbeatInfo.serverPeakResidentMemoryBytes, - sessionCount: heartbeatInfo.sessionCount, - serverInfo: { - omegaEditPort: this.configVars.port, - serverVersion: serverInfo.serverVersion, - serverHostname: serverInfo.serverHostname, - serverProcessId: serverInfo.serverProcessId, - runtimeKind: serverInfo.runtimeKind, - runtimeName: serverInfo.runtimeName, - platform: serverInfo.platform, - availableProcessors: serverInfo.availableProcessors, - compiler: serverInfo.compiler, - buildType: serverInfo.buildType, - cppStandard: serverInfo.cppStandard, - }, - }, - }) - getLogger().debug({ - fn: 'DataEditorClient::sendHeartbeat', - delivered, - hasReceivedWebviewReady: this.hasReceivedWebviewReady, - serverTimestamp: heartbeatInfo.serverTimestamp, - sessionCount: heartbeatInfo.sessionCount, - }) - } - - private async sendChangesInfo() { - // get the counts from the server - const counts = await getCounts(this.omegaSessionId, [ - CountKind.COMPUTED_FILE_SIZE, - CountKind.CHANGE_TRANSACTIONS, - CountKind.UNDO_TRANSACTIONS, - ]) - - // accumulate the counts into a single object - let data = { - fileName: this.fileToEdit, - computedFileSize: 0, - changeCount: 0, - undoCount: 0, - } - counts.forEach((count) => { - switch (count.getKind()) { - case CountKind.COMPUTED_FILE_SIZE: - data.computedFileSize = count.getCount() - break - case CountKind.CHANGE_TRANSACTIONS: - data.changeCount = count.getCount() - break - case CountKind.UNDO_TRANSACTIONS: - data.undoCount = count.getCount() - break - } - }) - - this.fileInfoData = { - ...this.fileInfoData, - ...data, - } - - // send the accumulated counts to the webview - await this.panel.webview.postMessage({ - command: MessageCommand.fileInfo, - data: data, - }) - } - - // handle messages from the webview - private async messageReceiver(message: EditorMessage) { - switch (message.command) { - case MessageCommand.showMessage: - switch (message.data.messageLevel as MessageLevel) { - case MessageLevel.Error: - vscode.window.showErrorMessage(message.data.message) - break - case MessageLevel.Info: - vscode.window.showInformationMessage(message.data.message) - break - case MessageLevel.Warn: - vscode.window.showWarningMessage(message.data.message) - break - } - break - - case MessageCommand.webviewReady: - this.hasReceivedWebviewReady = true - getLogger().info( - { - fn: 'DataEditorClient::messageReceiver', - sessionId: this.omegaSessionId, - viewportId: this.currentViewportId, - }, - 'Received webviewReady from data editor' - ) - await this.resyncWebview() - break - - case MessageCommand.scrollViewport: - await this.scrollViewport( - this.panel, - this.currentViewportId, - message.data.scrollOffset, - message.data.bytesPerRow - ) - break - - case MessageCommand.editorOnChange: - { - this.displayState.editorEncoding = message.data.encoding - const encodeDataAs = - message.data.editMode === EditByteModes.Single - ? 'hex' - : this.displayState.editorEncoding - - if ( - message.data.selectionData && - message.data.selectionData.length > 0 - ) { - await this.panel.webview.postMessage({ - command: MessageCommand.editorOnChange, - display: dataToEncodedStr( - Buffer.from(message.data.selectionData), - encodeDataAs - ), - }) - } - } - break - - case MessageCommand.applyChanges: - await edit( - this.omegaSessionId, - message.data.offset, - fromMessageBytes(message.data.originalSegment), - fromMessageBytes(message.data.editedSegment) - ) - await this.sendChangesInfo() - break - - case MessageCommand.undoChange: - await undo(this.omegaSessionId) - await this.sendChangesInfo() - this.panel.webview.postMessage({ - command: MessageCommand.clearChanges, - }) - break - - case MessageCommand.redoChange: - await redo(this.omegaSessionId) - await this.sendChangesInfo() - this.panel.webview.postMessage({ - command: MessageCommand.clearChanges, - }) - break - - case MessageCommand.profile: - { - const startOffset: number = message.data.startOffset - const length: number = message.data.length - const byteProfile: number[] = await profileSession( - this.omegaSessionId, - startOffset, - length - ) - const characterCount = await countCharacters( - this.omegaSessionId, - startOffset, - length - ) - const contentTypeResponse = await getContentType( - this.omegaSessionId, - startOffset, - length - ) - const languageResponse = await getLanguage( - this.omegaSessionId, - startOffset, - length, - characterCount.getByteOrderMark() - ) - await this.panel.webview.postMessage({ - command: MessageCommand.profile, - data: { - startOffset: startOffset, - length: length, - byteProfile: byteProfile, - numAscii: numAscii(byteProfile), - language: languageResponse.getLanguage(), - contentType: contentTypeResponse.getContentType(), - characterCount: { - byteOrderMark: characterCount.getByteOrderMark(), - byteOrderMarkBytes: characterCount.getByteOrderMarkBytes(), - singleByteCount: characterCount.getSingleByteChars(), - doubleByteCount: characterCount.getDoubleByteChars(), - tripleByteCount: characterCount.getTripleByteChars(), - quadByteCount: characterCount.getQuadByteChars(), - invalidBytes: characterCount.getInvalidBytes(), - }, - }, - }) - } - break - - case MessageCommand.clearChanges: - if ( - (await vscode.window.showInformationMessage( - 'Are you sure you want to revert all changes?', - { modal: true }, - 'Yes', - 'No' - )) === 'Yes' - ) { - await clear(this.omegaSessionId) - await this.sendChangesInfo() - this.panel.webview.postMessage({ - command: MessageCommand.clearChanges, - }) - } - break - - case MessageCommand.save: - await this.saveFile(this.fileToEdit) - break - - case MessageCommand.saveAs: - { - const uri = await vscode.window.showSaveDialog({ - title: 'Save Session', - saveLabel: 'Save', - }) - if (uri && uri.fsPath) { - await this.saveFile(uri.fsPath) - } - } - break - - case MessageCommand.saveSegment: - { - const uri = await vscode.window.showSaveDialog({ - title: 'Save Segment', - saveLabel: 'Save', - }) - if (uri && uri.fsPath) { - await this.saveFileSegment( - uri.fsPath, - message.data.offset, - message.data.length - ) - } - } - break - - case MessageCommand.requestEditedData: - { - const [selectionData, selectionDisplay] = fillRequestData(message) - - await this.panel.webview.postMessage({ - command: MessageCommand.requestEditedData, - data: { - data: toMessageBytes(Uint8Array.from(selectionData)), - dataDisplay: selectionDisplay, - }, - }) - } - break - - case MessageCommand.replace: - { - const searchDataBytes = encodedStrToData( - message.data.searchData, - message.data.encoding - ) - const replaceDataBytes = encodedStrToData( - message.data.replaceData, - message.data.encoding - ) - const nextOffset = await replaceOneSession( - this.omegaSessionId, - searchDataBytes, - replaceDataBytes, - message.data.caseInsensitive, - message.data.isReverse, - message.data.searchOffset, - message.data.searchLength, - message.data.overwriteOnly - ) - if (nextOffset === -1) { - vscode.window.showErrorMessage('No replacement took place') - } else { - await this.sendChangesInfo() - } - await this.panel.webview.postMessage({ - command: MessageCommand.replaceResults, - data: { - replacementsCount: nextOffset === -1 ? 0 : 1, - nextOffset: nextOffset, - searchDataBytesLength: searchDataBytes.length, - replaceDataBytesLength: replaceDataBytes.length, - }, - }) - } - break - - case MessageCommand.search: - { - const searchDataBytes = encodedStrToData( - message.data.searchData, - message.data.encoding - ) - const searchResults = await searchSession( - this.omegaSessionId, - searchDataBytes, - message.data.caseInsensitive, - message.data.isReverse, - message.data.searchOffset, - message.data.searchLength, - message.data.limit + 1 - ) - if (searchResults.length === 0) { - vscode.window.showInformationMessage( - `No more matches found for '${message.data.searchData}'` - ) - } - let overflow = false - if (searchResults.length > message.data.limit) { - overflow = true - searchResults.pop() - } - await this.panel.webview.postMessage({ - command: MessageCommand.searchResults, - data: { - searchResults: searchResults, - searchDataBytesLength: searchDataBytes.length, - overflow: overflow, - }, - }) - } - break - } - } - - private async resyncWebview() { - getLogger().info({ - fn: 'DataEditorClient::resyncWebview', - sessionId: this.omegaSessionId, - viewportId: this.currentViewportId, - hasReceivedWebviewReady: this.hasReceivedWebviewReady, - hasFileInfo: this.fileInfoData !== undefined, - }) - await this.displayState.sendUIThemeUpdate() - - if (this.fileInfoData) { - const delivered = await this.panel.webview.postMessage({ - command: MessageCommand.fileInfo, - data: this.fileInfoData, - }) - getLogger().debug({ - fn: 'DataEditorClient::resyncWebview', - message: 'fileInfo', - delivered, - }) - } - - if (this.currentViewportId) { - await sendViewportRefresh( - this.panel, - await getViewportData(this.currentViewportId) - ) - } - - await this.sendHeartbeat() - } - - private async saveFileSegment( - fileToSave: string, - offset: number, - length: number - ) { - // if the file to save is the same as the file being edited then we can save the file with a single transaction to - // trim the file to contain only the desired segment, preserving session state - if (this.fileToEdit === fileToSave) { - const computedFileSize = await getComputedFileSize(this.omegaSessionId) - if (offset === 0) { - if (offset + length !== computedFileSize) { - // delete from length to the end of the file - await del(this.omegaSessionId, length, computedFileSize - length) - await this.sendChangesInfo() - } - } else if (offset + length === computedFileSize) { - // delete from 0 to offset - await del(this.omegaSessionId, 0, offset) - await this.sendChangesInfo() - } else { - // Trim both sides atomically so undo/redo treats the segment save as one edit. - await runSessionTransaction(this.omegaSessionId, async () => { - await del( - this.omegaSessionId, - offset + length, - computedFileSize - offset - length - ) - await del(this.omegaSessionId, 0, offset) - }) - await this.sendChangesInfo() - } - // save the segment to the file using the typical save method - await this.saveFile(fileToSave) - } else { - let saved = false - let cancelled = false - - // try to save the file with overwrite - const saveResponse = await saveSession( - this.omegaSessionId, - fileToSave, - IOFlags.OVERWRITE, - offset, - length - ) - if (saveResponse.getSaveStatus() === SaveStatus.MODIFIED) { - // the file was modified since the session was created, query user to overwrite the modified file - if ( - (await vscode.window.showInformationMessage( - 'File has been modified since being opened overwrite the file anyway?', - { modal: true }, - 'Yes', - 'No' - )) === 'Yes' - ) { - // the user decided to overwrite the file, try to save again with force overwrite - const saveResponse2 = await saveSession( - this.omegaSessionId, - fileToSave, - IOFlags.FORCE_OVERWRITE, - offset, - length - ) - saved = saveResponse2.getSaveStatus() === SaveStatus.SUCCESS - } else { - cancelled = true - } - } else { - saved = saveResponse.getSaveStatus() === SaveStatus.SUCCESS - } - - if (saved) { - vscode.window.showInformationMessage(`Saved: ${fileToSave}`) - } else if (cancelled) { - vscode.window.showInformationMessage(`Cancelled save: ${fileToSave}`) - } else { - vscode.window.showErrorMessage(`Failed to save: ${fileToSave}`) - } - } - } - - private async saveFile(fileToSave: string) { - let saved = false - let cancelled = false - - // try to save the file with overwrite - const saveResponse = await saveSession( - this.omegaSessionId, - fileToSave, - IOFlags.OVERWRITE - ) - if (saveResponse.getSaveStatus() === SaveStatus.MODIFIED) { - // the file was modified since the session was created, query user to overwrite the modified file - if ( - (await vscode.window.showInformationMessage( - 'File has been modified since being opened overwrite the file anyway?', - { modal: true }, - 'Yes', - 'No' - )) === 'Yes' - ) { - // the user decided to overwrite the file, try to save again with force overwrite - const saveResponse2 = await saveSession( - this.omegaSessionId, - fileToSave, - IOFlags.FORCE_OVERWRITE - ) - saved = saveResponse2.getSaveStatus() === SaveStatus.SUCCESS - } else { - cancelled = true - } - } else { - saved = saveResponse.getSaveStatus() === SaveStatus.SUCCESS - } - - if (saved) { - this.fileToEdit = fileToSave - const fileSize = await getComputedFileSize(this.omegaSessionId) - await this.panel.webview.postMessage({ - command: MessageCommand.fileInfo, - data: { - computedFileSize: fileSize, - diskFileSize: fileSize, - fileName: fileToSave, - }, - }) - vscode.window.showInformationMessage(`Saved: ${fileToSave}`) - } else if (cancelled) { - vscode.window.showInformationMessage(`Cancelled save: ${fileToSave}`) - } else { - vscode.window.showErrorMessage(`Failed to save: ${fileToSave}`) - } - } - - private async scrollViewport( - panel: vscode.WebviewPanel, - viewportId: string, - offset: number, - bytesPerRow: number - ) { - // start of the row containing the offset, making sure the offset is never negative - const startOffset = Math.max(0, offset - (offset % bytesPerRow)) - try { - await sendViewportRefresh( - panel, - await modifyViewport(viewportId, startOffset, VIEWPORT_CAPACITY_MAX) - ) - } catch { - const msg = `Failed to scroll viewport ${viewportId} to offset ${startOffset}` - getLogger().error({ - err: { - msg: msg, - stack: new Error().stack, - }, - }) - vscode.window.showErrorMessage(msg) - } - } -} - -// ***************************************************************************** -// file-scoped functions -// ***************************************************************************** - -async function createDataEditorWebviewPanel( - ctx: vscode.ExtensionContext, - launchConfigVars: editor_config.IConfig, - fileToEdit: string -): Promise { - //prompt file prompt first. - if (!fileToEdit) { - const fileUri = await vscode.window.showOpenDialog({ - canSelectMany: false, - openLabel: 'Select', - canSelectFiles: true, - canSelectFolders: false, - title: 'Select Data File', - }) - - // If user cancels file prompt, display info message - if (!fileUri || !fileUri[0]) { - vscode.window.showInformationMessage( - 'Data Editor file opening cancelled.' - ) - return - } - - // file was selected by user, note file path to selected file - fileToEdit = fileUri[0].fsPath - } - - // Ensure the app data path exists - fs.mkdirSync(APP_DATA_PATH, { recursive: true }) - assert(fs.existsSync(APP_DATA_PATH), 'app data path does not exist') - - // Make sure the omega edit port is configured - configureOmegaEditPort(launchConfigVars) - omegaEditPort = launchConfigVars.port - checkpointPath = launchConfigVars.checkpointPath - await setupLogging(launchConfigVars) - - // Start the server if it's not already running - const serverListening = await checkServerListening( - omegaEditPort, - OMEGA_EDIT_HOST - ) - if (!serverListening) { - resetOmegaEditConnectionState() - clearStoppedServerArtifacts() - await serverStart() - } - await getClient(omegaEditPort, OMEGA_EDIT_HOST) - assert( - await checkServerListening(omegaEditPort, OMEGA_EDIT_HOST), - 'server not listening' - ) - serverInfo = await getServerInfo() - - // Normalize workspace keyword if needed - fileToEdit = fileToEdit.replace( - editor_config.WorkspaceKeyword, - editor_config.rootPath - ) - - // Use the new duplicate-safe open method - return await DataEditorClient.open( - ctx, - 'dataEditor', - launchConfigVars, - fileToEdit - ) -} - -function rotateLogFiles(logFile: string): void { - interface LogFile { - path: string - ctime: Date - } - - function isRotatedLogFileName(fileName: string): boolean { - const parsed = path.parse(logFile) - const currentFileName = parsed.base - const legacyPrefix = `${currentFileName}.` - - if (fileName === currentFileName) { - return false - } - - if (fileName.startsWith(legacyPrefix)) { - return true - } - - if (parsed.ext.length === 0) { - return false - } - - return ( - fileName.startsWith(`${parsed.name}.`) && fileName.endsWith(parsed.ext) - ) - } - - function getRotatedLogFileName(timestamp: string): string { - const parsed = path.parse(logFile) - return parsed.ext.length > 0 - ? `${parsed.name}.${timestamp}${parsed.ext}` - : `${parsed.base}.${timestamp}` - } - - assert( - MAX_LOG_FILES > 0, - 'Maximum number of log files must be greater than 0' - ) - - if (fs.existsSync(logFile)) { - const logDir = path.dirname(logFile) - - // Get list of existing log files - const logFiles: LogFile[] = fs - .readdirSync(logDir) - .filter((file) => isRotatedLogFileName(file)) - .map((file) => ({ - path: path.join(logDir, file), - ctime: fs.statSync(path.join(logDir, file)).ctime, - })) - .sort((a, b) => b.ctime.getTime() - a.ctime.getTime()) - - // Delete oldest log files if maximum number of log files is exceeded - while (logFiles.length >= MAX_LOG_FILES) { - const fileToDelete = logFiles.pop() as LogFile - fs.unlinkSync(fileToDelete.path) - } - - // Rename current log file with timestamp and create a new empty file - const timestamp = new Date().toISOString().replace(/:/g, '-') - fs.renameSync(logFile, path.join(logDir, getRotatedLogFileName(timestamp))) - } -} - -function getPidFile(serverPort: number): string { - return path.join(APP_DATA_PATH, `serv-${serverPort}.pid`) -} - -async function setupLogging(configVars: editor_config.Config): Promise { - const logFile = configVars.logFile - const logLevel = - process.env.OMEGA_EDIT_CLIENT_LOG_LEVEL || - process.env.OMEGA_EDIT_LOG_LEVEL || - configVars.logLevel - if ( - configuredClientLogger?.logFile === logFile && - configuredClientLogger.logLevel === logLevel - ) { - return - } - rotateLogFiles(logFile) - setLogger(createSimpleFileLogger(logFile, logLevel)) - configuredClientLogger = { logFile, logLevel } - vscode.window.showInformationMessage(`Logging (${logLevel}) to '${logFile}'`) -} - -async function sendViewportRefresh( - panel: vscode.WebviewPanel, - viewportDataResponse: ViewportDataResponse -): Promise { - const delivered = await panel.webview.postMessage({ - command: MessageCommand.viewportRefresh, - data: { - viewportId: viewportDataResponse.getViewportId(), - fileOffset: viewportDataResponse.getOffset(), - length: viewportDataResponse.getLength(), - bytesLeft: viewportDataResponse.getFollowingByteCount(), - data: toMessageBytes(viewportDataResponse.getData_asU8()), - capacity: VIEWPORT_CAPACITY_MAX, - }, - }) - getLogger().debug({ - fn: 'sendViewportRefresh', - delivered, - viewportId: viewportDataResponse.getViewportId(), - offset: viewportDataResponse.getOffset(), - length: viewportDataResponse.getLength(), - bytesLeft: viewportDataResponse.getFollowingByteCount(), - }) -} - -/** - * Subscribe to all events for a given viewport so the editor gets refreshed when changes to the viewport occur - * @param panel webview panel to send updates to - * @param viewportId id of the viewport to subscribe to - */ -async function viewportSubscribe( - panel: vscode.WebviewPanel, - viewportId: string -) { - return await subscribeViewportEvents({ - viewportId, - interest: ALL_EVENTS & ~ViewportEventKind.MODIFY, - onEvent: async (event) => { - getLogger().debug({ - viewportId: event.getViewportId(), - event: event.getViewportEventKind(), - }) - await sendViewportRefresh(panel, await getViewportData(viewportId)) - }, - }) -} - -class DisplayState { - public editorEncoding: BufferEncoding - public colorThemeKind: vscode.ColorThemeKind - private panel: vscode.WebviewPanel - - constructor(editorPanel: vscode.WebviewPanel) { - this.editorEncoding = 'hex' - this.colorThemeKind = vscode.window.activeColorTheme.kind - this.panel = editorPanel - - vscode.window.onDidChangeActiveColorTheme(async (event) => { - this.colorThemeKind = event.kind - await this.sendUIThemeUpdate() - }, this) - this.sendUIThemeUpdate() - } - - public sendUIThemeUpdate() { - return this.panel.webview.postMessage({ - command: MessageCommand.setUITheme, - theme: this.colorThemeKind, - }) - } -} - -function fillRequestData(message: EditorMessage): [Buffer, string] { - let selectionByteData: Buffer - let selectionByteDisplay: string - if (message.data.editMode === EditByteModes.Multiple) { - selectionByteData = encodedStrToData( - message.data.editedContent, - message.data.encoding - ) - selectionByteDisplay = dataToEncodedStr( - selectionByteData, - message.data.encoding - ) - } else { - selectionByteData = - message.data.viewport === 'logical' - ? encodedStrToData(message.data.editedContent, 'latin1') - : Buffer.from([ - parseInt(message.data.editedContent, message.data.radix), - ]) - - selectionByteDisplay = - message.data.viewport === 'logical' - ? message.data.editedContent - : dataToRadixStr(selectionByteData, message.data.radix) - } - - return [selectionByteData, selectionByteDisplay] -} - -function encodedStrToData( - selectionEdits: string, - selectionEncoding?: BufferEncoding -): Buffer { - let selectionByteData: Buffer - switch (selectionEncoding) { - case 'hex': - selectionByteData = Buffer.alloc(selectionEdits.length / 2) - for (let i = 0; i < selectionEdits.length; i += 2) { - selectionByteData[i / 2] = parseInt(selectionEdits.slice(i, i + 2), 16) - } - return selectionByteData - case 'binary': - selectionByteData = Buffer.alloc(selectionEdits.length / 8) - for (let i = 0; i < selectionEdits.length; i += 8) { - selectionByteData[i / 8] = parseInt(selectionEdits.slice(i, i + 8), 2) - } - return selectionByteData - default: - return Buffer.from(selectionEdits, selectionEncoding) - } -} - -function dataToEncodedStr(buffer: Buffer, encoding: BufferEncoding): string { - return encoding === 'binary' - ? dataToRadixStr(buffer, 2) - : buffer.toString(encoding) -} - -function dataToRadixStr(buffer: Buffer, radix: number): string { - const padLen = radixBytePad(radix) - let ret = '' - for (let i = 0; i < buffer.byteLength; i++) { - ret += buffer[i].toString(radix).padStart(padLen, '0') - } - return ret -} - -function radixBytePad(radix: number): number { - switch (radix) { - case 2: - return 8 - case 8: - return 3 - case 10: - return 3 - case 16: - return 2 - } - return 0 -} - -/** - * Checks if a server is listening on a given port and host - * @param port port to check - * @param host host to check - * @returns true if a server is listening on the given port and host, false otherwise - */ -function checkServerListening(port: number, host: string): Promise { - return new Promise((resolve) => { - const socket: net.Socket = new net.Socket() - socket.setTimeout(2000) // set a 2-second timeout for the connection attempt - socket.on('connect', () => { - socket.destroy() // close the connection once connected - resolve(true) // server is listening - }) - socket.on('timeout', () => { - socket.destroy() // close the connection on timeout - resolve(false) // server is not listening - }) - socket.on('error', () => { - resolve(false) // server is not listening or an error occurred - }) - socket.connect(port, host) - }) -} - -/** - * Removes a directory and all of its contents - * @param dirPath path to directory to remove - */ -function removeDirectory(dirPath: string): void { - if (fs.existsSync(dirPath)) { - fs.readdirSync(dirPath).forEach((file) => { - const curPath = `${dirPath}/${file}` - if (fs.lstatSync(curPath).isDirectory()) { - // Recursively remove subdirectories - removeDirectory(curPath) - } else { - // Delete file - fs.unlinkSync(curPath) - } - }) - - // Remove empty directory - fs.rmdirSync(dirPath) - } -} - -function resetOmegaEditConnectionState(): void { - resetClient() -} - -function clearStoppedServerArtifacts(): void { - const serverPidFile = getPidFile(omegaEditPort) - if (fs.existsSync(serverPidFile)) { - fs.unlinkSync(serverPidFile) - } - if (checkpointPath.length > 0) { - removeDirectory(checkpointPath) - } -} - -export async function serverStop() { - resetOmegaEditConnectionState() - const serverPidFile = getPidFile(omegaEditPort) - if (!fs.existsSync(serverPidFile)) { - if (!(await checkServerListening(omegaEditPort, OMEGA_EDIT_HOST))) { - clearStoppedServerArtifacts() - } - return - } - - const pid = parseInt(fs.readFileSync(serverPidFile).toString()) - if (Number.isNaN(pid)) { - clearStoppedServerArtifacts() - return - } - - let stopped = await stopProcessUsingPID(pid) - if (!stopped) { - await new Promise((resolve) => setTimeout(resolve, 500)) - stopped = await stopProcessUsingPID(pid) - } - - const serverListening = await checkServerListening( - omegaEditPort, - OMEGA_EDIT_HOST - ) - - if (stopped || !serverListening) { - vscode.window.setStatusBarMessage( - `Ωedit server stopped on port ${omegaEditPort} with PID ${pid}`, - new Promise((resolve) => { - setTimeout(() => { - resolve(true) - }, 4000) - }) - ) - clearStoppedServerArtifacts() - return - } - - vscode.window.showErrorMessage( - `Ωedit server on port ${omegaEditPort} with PID ${pid} failed to stop` - ) -} - -function generateLogbackConfigFile( - logFile: string, - logLevel: string = 'INFO' -): string { - const logbackConfigFile = path.join( - APP_DATA_PATH, - `serv-${omegaEditPort}.logconf.xml` - ) - rotateLogFiles(logFile) - return writeLogbackConfigFile(logbackConfigFile, logFile, logLevel) -} - -function getProcessCommandLine(pid: number): string { - return child_process - .execSync( - osCheck( - `powershell -NoProfile -Command "(Get-CimInstance Win32_Process -Filter \\\"ProcessId = ${pid}\\\").CommandLine"`, - `ps -p ${pid} -o command=` - ) - ) - .toString('utf8') - .trim() -} - -async function serverStart() { - // Check for stale PID file - const serverPidFile = getPidFile(omegaEditPort) - if (fs.existsSync(serverPidFile)) { - const pid = parseInt(fs.readFileSync(serverPidFile).toString()) - if (!isNaN(pid)) { - // Ensure PID isn't assigned to a different process before stopping process - try { - if (getProcessCommandLine(pid).toLowerCase().includes('omega-edit')) { - await serverStop() - } else { - fs.unlinkSync(serverPidFile) - } - } catch (error) { - // if process doesn't exist, ps returns 1 resulting in command failed error - fs.unlinkSync(serverPidFile) - } - } else { - fs.unlinkSync(serverPidFile) - } - } - const serverStartingText = `Ωedit server starting on port ${omegaEditPort}` - const statusBarItem = vscode.window.createStatusBarItem( - vscode.StatusBarAlignment.Left - ) - statusBarItem.text = serverStartingText - statusBarItem.show() - - let animationFrame = 0 - const animationInterval = 400 // ms per frame - const animationFrames = ['', '.', '..', '...'] - const animationIntervalId = setInterval(() => { - statusBarItem.text = `${serverStartingText} ${ - animationFrames[++animationFrame % animationFrames.length] - }` - }, animationInterval) - const config = vscode.workspace.getConfiguration('dataEditor') - const logLevel = - process.env.OMEGA_EDIT_SERVER_LOG_LEVEL || - process.env.OMEGA_EDIT_LOG_LEVEL || - config.get('logLevel', 'info') - const logConfigFile = generateLogbackConfigFile( - path.join(APP_DATA_PATH, `serv-${omegaEditPort}.log`), - logLevel - ) - if (!fs.existsSync(logConfigFile)) { - clearInterval(animationIntervalId) - statusBarItem.dispose() - throw new Error(`Log config file '${logConfigFile}' not found`) - } - - // Start the server and wait up to 10 seconds for it to start - const serverPid = (await Promise.race([ - startServer(omegaEditPort, OMEGA_EDIT_HOST, getPidFile(omegaEditPort), { - sessionTimeoutMs: SERVER_SESSION_TIMEOUT_MS, - cleanupIntervalMs: SERVER_CLEANUP_INTERVAL_MS, - shutdownWhenNoSessions: true, - logConfigFile, - }), - new Promise((_resolve, reject) => { - setTimeout(() => { - reject((): Error => { - return new Error( - `Server startup timed out after ${SERVER_START_TIMEOUT} seconds` - ) - }) - }, SERVER_START_TIMEOUT * 1000) - }), - ])) as number | undefined - clearInterval(animationIntervalId) - if (serverPid === undefined || serverPid <= 0) { - statusBarItem.dispose() - throw new Error('Server failed to start or PID is invalid') - } - // this makes sure the server if fully online and ready to take requests - statusBarItem.text = `Initializing Ωedit server on port ${omegaEditPort}` - for (let i = 1; i <= 60; ++i) { - try { - await getServerInfo() - break - } catch (err) { - statusBarItem.text = `Initializing Ωedit server on port ${omegaEditPort} (${i}/60)` - } - // wait 1 second before trying again - await new Promise((resolve) => { - setTimeout(() => { - resolve(true) - }, 1000) - }) - } - try { - serverInfo = await getServerInfo() - } catch (err) { - statusBarItem.dispose() - await serverStop() - throw new Error('Server failed to initialize') - } - statusBarItem.text = `Ωedit server on port ${omegaEditPort} initialized` - const serverVersion = serverInfo.serverVersion - // if the OS is not Windows, check that the server PID matches the one started - // NOTE: serverPid is the PID of the server wrapper script on Windows - if ( - !os.platform().toLowerCase().startsWith('win') && - serverInfo.serverProcessId !== serverPid - ) { - statusBarItem.dispose() - throw new Error( - `server PID mismatch ${serverInfo.serverProcessId} != ${serverPid}` - ) - } - const clientVersion = getClientVersion() - if (serverVersion !== clientVersion) { - statusBarItem.dispose() - throw new Error( - `Server version ${serverVersion} and client version ${clientVersion} must match` - ) - } - - statusBarItem.text = `Ωedit server v${serverVersion} ready on port ${omegaEditPort} with PID ${serverInfo.serverProcessId}` - setTimeout(() => { - statusBarItem.dispose() - }, 5000) -} diff --git a/src/dataEditor/demos/demo-highlight_overlays.html b/src/dataEditor/demos/demo-highlight_overlays.html deleted file mode 100644 index b981aed56..000000000 --- a/src/dataEditor/demos/demo-highlight_overlays.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - Demo - Highlight Overlays - - - -
- - -
-

- This is some text that we're using as a - demonstration. You - can see that the - highlighting scrolls with the text. - Here is an overlap. - And here is some more text to fill out - the div and make sure that the scroll bars appear. It - just - needs to be - long enough to - overflow - the div. That should do it. -

-

- This is some text that we're using as a - demonstration. You - can see that the - highlighting scrolls with the text. - Here is an overlap. - And here is some more text to fill out - the div and make sure that the scroll bars appear. It - just - needs to be - long enough to - overflow - the div. That should do it. -

-
-
Click On The Overlays
- - - diff --git a/src/dataEditor/demos/demo-infinite_scrolling.html b/src/dataEditor/demos/demo-infinite_scrolling.html deleted file mode 100644 index 76dc4cde6..000000000 --- a/src/dataEditor/demos/demo-infinite_scrolling.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - Demo - Infinite Scrolling - - -
-
-
Offset
-
-
-
Physical
-
-
-
Logical
-
-
-
- - - - - - -
-
-
-
-
-
-
- - - - diff --git a/src/dataEditor/include/server/LogbackConfig.ts b/src/dataEditor/include/server/LogbackConfig.ts deleted file mode 100644 index 282ab4b96..000000000 --- a/src/dataEditor/include/server/LogbackConfig.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as fs from 'fs' -import path from 'path' - -function ensureParentDirectory(filePath: string): void { - const dirname = path.dirname(filePath) - if (!fs.existsSync(dirname)) { - fs.mkdirSync(dirname, { recursive: true }) - } -} - -function buildLogbackConfig(logFile: string, logLevel: string): string { - return `\n - - - ${logFile} - - [%date{ISO8601}] [%level] [%logger] [%marker] [%thread] - %msg MDC: {%mdc}%n - - - - - - -` -} - -export function writeLogbackConfigFile( - logbackConfigFile: string, - logFile: string, - logLevel: string = 'INFO' -): string { - ensureParentDirectory(logFile) - ensureParentDirectory(logbackConfigFile) - fs.writeFileSync(logbackConfigFile, buildLogbackConfig(logFile, logLevel)) - return logbackConfigFile -} diff --git a/src/dataEditor/include/server/ServerInfo.ts b/src/dataEditor/include/server/ServerInfo.ts deleted file mode 100644 index 4fcc89be8..000000000 --- a/src/dataEditor/include/server/ServerInfo.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as editor_config from '../../config' -import * as fs from 'fs' -import assert from 'assert' -import { IServerInfo } from '@omega-edit/client' - -export class ServerInfo implements IServerInfo { - serverHostname: string = 'unknown' - serverProcessId: number = 0 - serverVersion: string = 'unknown' - runtimeKind: string = 'unknown' - runtimeName: string = 'unknown' - platform: string = 'unknown' - availableProcessors: number = 0 - compiler: string = 'unknown' - buildType: string = 'unknown' - cppStandard: string = 'unknown' -} - -const OMEGA_EDIT_MAX_PORT: number = 65535 -const OMEGA_EDIT_MIN_PORT: number = 1024 - -export function configureOmegaEditPort(configVars: editor_config.Config): void { - const omegaEditPort = configVars.port - if ( - omegaEditPort <= OMEGA_EDIT_MIN_PORT || - omegaEditPort > OMEGA_EDIT_MAX_PORT - ) { - throw new Error( - `Invalid port ${omegaEditPort} for Ωedit. Use a port between ${OMEGA_EDIT_MIN_PORT} and ${OMEGA_EDIT_MAX_PORT}` - ) - } - - if (!fs.existsSync(configVars.checkpointPath)) { - fs.mkdirSync(configVars.checkpointPath, { recursive: true }) - } - assert( - fs.existsSync(configVars.checkpointPath), - 'checkpoint path does not exist' - ) -} - -export type ServerStopPredicate = (context?: any) => boolean diff --git a/src/dataEditor/include/server/Sessions.ts b/src/dataEditor/include/server/Sessions.ts deleted file mode 100644 index 911635733..000000000 --- a/src/dataEditor/include/server/Sessions.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { destroySession, getLogger, resetClient } from '@omega-edit/client' -import { updateHeartbeatInterval } from './heartbeat' - -let activeSessions: string[] = [] - -function isServerUnavailableError(err: unknown): boolean { - if (!(err instanceof Error)) { - return false - } - - const message = err.message.toLowerCase() - return ( - message.includes('unavailable') || - message.includes('econnrefused') || - message.includes('connection refused') || - message.includes('channel closed') || - message.includes('socket closed') - ) -} - -export function addActiveSession(sessionId: string): void { - if (!activeSessions.includes(sessionId)) { - activeSessions.push(sessionId) - // scale the heartbeat interval based on the number of active sessions to reduce load on the server - updateHeartbeatInterval(activeSessions) - } -} -export async function removeActiveSession(sessionId: string) { - if (!sessionId) { - return - } - - const index = activeSessions.indexOf(sessionId) - if (index === -1) { - return - } - - activeSessions.splice(index, 1) - updateHeartbeatInterval(activeSessions) - - try { - await destroySession(sessionId) - if (activeSessions.length === 0) { - resetClient() - } - } catch (err) { - if (isServerUnavailableError(err)) { - resetClient() - getLogger().info( - { fn: 'DataEditorClient::removeActiveSession', sessionId }, - 'Omega Edit server was already stopped during session cleanup' - ) - return - } - throw err - } -} diff --git a/src/dataEditor/include/server/heartbeat/HeartBeatInfo.ts b/src/dataEditor/include/server/heartbeat/HeartBeatInfo.ts deleted file mode 100644 index e3a80925e..000000000 --- a/src/dataEditor/include/server/heartbeat/HeartBeatInfo.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { IServerHeartbeat } from '@omega-edit/client' - -export class HeartbeatInfo implements IServerHeartbeat { - latency: number = 0 // latency in ms - serverCpuCount: number = 0 // cpu count - serverCpuLoadAverage?: number = 0 // cpu load average - serverPeakResidentMemoryBytes?: number = 0 // peak resident memory in bytes - serverResidentMemoryBytes?: number = 0 // resident memory in bytes - serverTimestamp: number = 0 // timestamp in ms - serverUptime: number = 0 // uptime in ms - serverVirtualMemoryBytes?: number = 0 // virtual memory in bytes - sessionCount: number = 0 // session count -} diff --git a/src/dataEditor/include/server/heartbeat/index.ts b/src/dataEditor/include/server/heartbeat/index.ts deleted file mode 100644 index 83786156b..000000000 --- a/src/dataEditor/include/server/heartbeat/index.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { - IServerHeartbeat, - type ServerHeartbeatLoop, - startServerHeartbeatLoop, -} from '@omega-edit/client' -import { HeartbeatInfo } from './HeartBeatInfo' - -const HEARTBEAT_INTERVAL_MS: number = 1000 // 1 second (1000 ms) -let heartbeatInfo: IServerHeartbeat = new HeartbeatInfo() -let heartbeatLoop: ServerHeartbeatLoop | undefined = undefined - -export function updateHeartbeatInterval(activeSessions: string[]) { - heartbeatLoop?.stop() - heartbeatLoop = undefined - - if (activeSessions.length === 0) { - heartbeatInfo = new HeartbeatInfo() - return - } - - heartbeatLoop = startServerHeartbeatLoop({ - intervalMs: HEARTBEAT_INTERVAL_MS * activeSessions.length, - getSessionIds: () => [...activeSessions], - onHeartbeat: (nextHeartbeatInfo) => { - heartbeatInfo = nextHeartbeatInfo - }, - onError: () => { - heartbeatInfo = new HeartbeatInfo() - }, - }) -} - -export function getCurrentHeartbeatInfo() { - return heartbeatInfo -} diff --git a/src/dataEditor/include/utils.ts b/src/dataEditor/include/utils.ts deleted file mode 100644 index c85aa71f2..000000000 --- a/src/dataEditor/include/utils.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { debug } from 'vscode' - -export function isDFDLDebugSessionActive(): boolean { - return ( - debug.activeDebugSession !== undefined && - debug.activeDebugSession.type === 'dfdl' - ) -} diff --git a/src/dataEditor/index.ts b/src/dataEditor/index.ts index ee9772713..e99f79c76 100644 --- a/src/dataEditor/index.ts +++ b/src/dataEditor/index.ts @@ -14,4 +14,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './dataEditorClient' +export * from './omegaEditDataEditor' diff --git a/src/dataEditor/omegaEditDataEditor.ts b/src/dataEditor/omegaEditDataEditor.ts new file mode 100644 index 000000000..ce7a8789a --- /dev/null +++ b/src/dataEditor/omegaEditDataEditor.ts @@ -0,0 +1,358 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as path from 'path' +import * as vscode from 'vscode' +import { + DaffodilData, + dataEvent, + extractDaffodilEvent, +} from '../daffodilDebugger/daffodil' +import { substituteVSCodeEnvVariables } from '../utils' + +export const DATA_EDITOR_COMMAND = 'extension.data.edit' +export const OMEGA_EDIT_EXTENSION_ID = 'ctc-oss.omega-edit-data-editor' +export const OMEGA_EDIT_EXTENSION_API_VERSION = 2 +export const DAFFODIL_CURRENT_DATA_HIGHLIGHT_ID = + 'apache-daffodil.current-data-byte' +const DFDL_DEBUG_TYPE = 'dfdl' + +export type OmegaEditExternalHighlightKind = + | 'current' + | 'parsed' + | 'error' + | 'warning' + | 'breakpoint' + | 'secondary' + +export interface OmegaEditExternalHighlight { + id: string + offset: number + length: number + kind: OmegaEditExternalHighlightKind + label: string + source?: string +} + +export interface OmegaEditEditorState { + uri: string + filePath: string + fileSize: number + externalHighlights: OmegaEditExternalHighlight[] +} + +export interface OmegaEditEditorSelector { + uri?: vscode.Uri | string +} + +export interface OmegaEditOpenOptions { + offset?: number +} + +export interface OmegaEditExternalHighlightRequest + extends OmegaEditEditorSelector { + highlights: OmegaEditExternalHighlight[] + reveal?: boolean +} + +export interface OmegaEditExtensionApi { + readonly extensionId: typeof OMEGA_EDIT_EXTENSION_ID + readonly version: typeof OMEGA_EDIT_EXTENSION_API_VERSION + readonly onDidChangeEditorState: vscode.Event + open( + uri: vscode.Uri, + options?: OmegaEditOpenOptions + ): Promise + getEditorState( + options?: vscode.Uri | string | OmegaEditEditorSelector + ): OmegaEditEditorState | undefined + setExternalHighlights( + request: OmegaEditExternalHighlightRequest + ): Promise + clearExternalHighlights( + options?: vscode.Uri | string | OmegaEditEditorSelector + ): OmegaEditEditorState | undefined +} + +const openDataEditorUris = new Map() +let omegaEditApiPromise: Promise | undefined + +export function activate(ctx: vscode.ExtensionContext): void { + ctx.subscriptions.push( + vscode.commands.registerCommand( + DATA_EDITOR_COMMAND, + async (fileToEdit: string | vscode.Uri = '') => + await openDataEditor(fileToEdit) + ), + vscode.debug.onDidReceiveDebugSessionCustomEvent((event) => { + void handleDaffodilDebugEvent(event) + }), + vscode.debug.onDidTerminateDebugSession((session) => { + if (session.type === DFDL_DEBUG_TYPE) { + void clearDaffodilDataHighlights() + } + }) + ) +} + +export async function openDataEditor( + fileToEdit: string | vscode.Uri = '' +): Promise { + const dataUri = await resolveDataFileUri(fileToEdit) + if (!dataUri) return undefined + + const api = await getOmegaEditApiForUserAction() + if (!api) return undefined + + const state = await api.open(dataUri) + if (state) { + openDataEditorUris.set(dataUri.toString(), dataUri) + } + return state +} + +export async function resolveDataFileUri( + fileToEdit: string | vscode.Uri = '' +): Promise { + if (fileToEdit instanceof vscode.Uri) { + return fileToEdit + } + + const dataPath = fileToEdit.trim() + if (dataPath.length === 0) { + const fileUri = await vscode.window.showOpenDialog({ + canSelectMany: false, + openLabel: 'Select', + canSelectFiles: true, + canSelectFolders: false, + title: 'Select Data File', + }) + + if (!fileUri || !fileUri[0]) { + vscode.window.showInformationMessage( + 'Data Editor file opening cancelled.' + ) + return undefined + } + + return fileUri[0] + } + + const uri = dataPathLooksLikeUri(dataPath) + ? vscode.Uri.parse(dataPath) + : vscode.Uri.file(resolveDataPath(dataPath)) + + try { + const stat = await vscode.workspace.fs.stat(uri) + if ((stat.type & vscode.FileType.File) === 0) { + vscode.window.showErrorMessage( + `Data Editor can only open files: ${uri.fsPath || uri.toString()}` + ) + return undefined + } + } catch { + vscode.window.showErrorMessage( + `Data Editor file does not exist: ${uri.fsPath || uri.toString()}` + ) + return undefined + } + + return uri +} + +export function buildDaffodilDataHighlight( + bytePos1b: number, + fileSize: number +): OmegaEditExternalHighlight | undefined { + if ( + !Number.isFinite(bytePos1b) || + !Number.isInteger(bytePos1b) || + bytePos1b < 1 || + !Number.isFinite(fileSize) || + fileSize < 1 + ) { + return undefined + } + + const offset = Math.min(bytePos1b - 1, fileSize - 1) + return { + id: DAFFODIL_CURRENT_DATA_HIGHLIGHT_ID, + offset, + length: 1, + kind: 'current', + label: `Daffodil parser byte ${bytePos1b}`, + source: 'Apache Daffodil', + } +} + +async function handleDaffodilDebugEvent( + event: vscode.DebugSessionCustomEvent +): Promise { + if (event.session.type !== DFDL_DEBUG_TYPE) return + if (openDataEditorUris.size === 0) return + + const daffodilEvent = extractDaffodilEvent(event) + if (daffodilEvent?.event !== dataEvent) return + + const body = daffodilEvent.body as DaffodilData + let api: OmegaEditExtensionApi + try { + api = await getOmegaEditApi() + } catch { + return + } + + for (const [key, uri] of openDataEditorUris) { + try { + const editorState = api.getEditorState(uri) + if (!editorState) { + openDataEditorUris.delete(key) + continue + } + + const highlight = buildDaffodilDataHighlight( + body.bytePos1b, + editorState.fileSize + ) + if (!highlight) continue + + const updatedState = await api.setExternalHighlights({ + uri, + highlights: [highlight], + reveal: true, + }) + if (!updatedState) { + openDataEditorUris.delete(key) + } + } catch { + openDataEditorUris.delete(key) + } + } +} + +async function clearDaffodilDataHighlights(): Promise { + const apiPromise = omegaEditApiPromise + if (!apiPromise) return + + let api: OmegaEditExtensionApi + try { + api = await apiPromise + } catch { + if (omegaEditApiPromise === apiPromise) { + omegaEditApiPromise = undefined + } + return + } + + for (const [key, uri] of openDataEditorUris) { + try { + if (!api.getEditorState(uri)) { + openDataEditorUris.delete(key) + continue + } + + api.clearExternalHighlights(uri) + } catch { + openDataEditorUris.delete(key) + } + } +} + +async function getOmegaEditApiForUserAction(): Promise< + OmegaEditExtensionApi | undefined +> { + try { + return await getOmegaEditApi() + } catch (err) { + const message = err instanceof Error ? err.message : String(err) + vscode.window.showErrorMessage(message) + return undefined + } +} + +async function getOmegaEditApi(): Promise { + if (!omegaEditApiPromise) { + omegaEditApiPromise = activateOmegaEditApi() + } + + const apiPromise = omegaEditApiPromise + try { + return await apiPromise + } catch (err) { + if (omegaEditApiPromise === apiPromise) { + omegaEditApiPromise = undefined + } + throw err + } +} + +async function activateOmegaEditApi(): Promise { + const extension = vscode.extensions.getExtension( + OMEGA_EDIT_EXTENSION_ID + ) + + if (!extension) { + throw new Error( + `Required VS Code extension '${OMEGA_EDIT_EXTENSION_ID}' is not installed.` + ) + } + + const api = await extension.activate() + if (!isOmegaEditExtensionApi(api)) { + throw new Error( + `VS Code extension '${OMEGA_EDIT_EXTENSION_ID}' did not return a compatible Data Editor API.` + ) + } + + return api +} + +function isOmegaEditExtensionApi( + value: unknown +): value is OmegaEditExtensionApi { + if (!value || typeof value !== 'object') return false + + const api = value as Partial + return ( + api.extensionId === OMEGA_EDIT_EXTENSION_ID && + api.version === OMEGA_EDIT_EXTENSION_API_VERSION && + typeof api.open === 'function' && + typeof api.getEditorState === 'function' && + typeof api.setExternalHighlights === 'function' && + typeof api.clearExternalHighlights === 'function' + ) +} + +function dataPathLooksLikeUri(dataPath: string): boolean { + if (/^[a-z]:[\\/]/i.test(dataPath)) return false + + return /^file:/i.test(dataPath) || /^[a-z][a-z0-9+.-]*:\/\//i.test(dataPath) +} + +function resolveDataPath(dataPath: string): string { + const substitutedPath = substituteVSCodeEnvVariables(dataPath) + if (path.isAbsolute(substitutedPath)) { + return path.normalize(substitutedPath) + } + + const workspaceFolder = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath + return path.normalize( + workspaceFolder + ? path.join(workspaceFolder, substitutedPath) + : path.resolve(substitutedPath) + ) +} diff --git a/src/dataEditor/svelteWebviewInitializer.ts b/src/dataEditor/svelteWebviewInitializer.ts deleted file mode 100644 index 1e04a6bab..000000000 --- a/src/dataEditor/svelteWebviewInitializer.ts +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as vscode from 'vscode' -import * as fs from 'fs' -export class SvelteWebviewInitializer { - constructor(private context: vscode.ExtensionContext) {} - - initialize(view: string, webView: vscode.Webview): void { - webView.options = this.getWebViewOptions(this.context, view) - webView.html = this.getHtmlContent(this.context, view, webView) - } - - // get the HTML content for the webview - private getHtmlContent( - context: vscode.ExtensionContext, - view: string, - webView: vscode.Webview - ): string { - const nonce = this.getNonce() - - const scriptUri = this.getResourceUri('js', context, (uri) => { - return webView.asWebviewUri(uri) - }) - const stylesUri = this.getResourceUri('css', context, (uri) => { - return webView.asWebviewUri(uri) - }) - const indexPath = this.getResourceUri('index', context) - let indexHTML = fs - .readFileSync(indexPath!.fsPath, 'utf-8') - .replace(/src="\.\/index.js"/, `src="${scriptUri.toString()}"`) - .replace(/href="\.\/style.css"/, `href="${stylesUri.toString()}"`) - .replaceAll(/nonce="__nonce__"/g, `nonce="${nonce}"`) - indexHTML = this.injectNonce(indexHTML, webView, nonce, scriptUri)! - return indexHTML - } - private injectNonce( - html: string, - webView: vscode.Webview, - nonce: string, - scriptsUri: vscode.Uri - ) { - let ret = html.replaceAll( - '', - `` - ) - return ret - } - // get a nonce for use in a content security policy - private getNonce(): string { - let text = '' - const possible = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' - for (let i = 0; i < 32; i++) { - text += possible.charAt(Math.floor(Math.random() * possible.length)) - } - return text - } - - // get the webview options - private getWebViewOptions( - context: vscode.ExtensionContext, - view: string - ): vscode.WebviewPanelOptions & vscode.WebviewOptions { - return { - enableScripts: true, - localResourceRoots: [ - this.getSvelteAppDistributionFolderUri(context), - this.getSvelteAppDistributionViewFolderUri(context, view), - ], - } - } - - // get the svelte app distribution folder uri - private getSvelteAppDistributionFolderUri( - context: vscode.ExtensionContext - ): vscode.Uri { - return vscode.Uri.joinPath(context.extensionUri, 'dist') - } - - // get the svelte app distribution view folder uri - private getSvelteAppDistributionViewFolderUri( - context: vscode.ExtensionContext, - view: string - ): vscode.Uri { - return vscode.Uri.joinPath(context.extensionUri, 'dist', 'views', view) - } - - private getResourceUri( - item: 'index' | 'css' | 'js', - context: vscode.ExtensionContext, - uriDecorator?: (uriPath: vscode.Uri) => any - ): vscode.Uri - - private getResourceUri( - item: 'index' | 'css' | 'js', - context: vscode.ExtensionContext, - uriDecorator: (uriPath: vscode.Uri) => R - ): R - private getResourceUri( - item: 'index' | 'css' | 'js', - context: vscode.ExtensionContext, - uriDecorator?: (uriPath: vscode.Uri) => R - ): vscode.Uri | R { - let resourceFile = '' - switch (item) { - case 'index': - resourceFile = item + '.html' - break - case 'css': - resourceFile = 'style.css' - break - case 'js': - resourceFile = 'index.js' - break - } - let ret = vscode.Uri.joinPath( - context.extensionUri, - 'dist', - 'views', - 'dataEditor', - resourceFile - ) - return uriDecorator ? uriDecorator(ret) : ret - } -} diff --git a/src/launchWizard/launchWizard.ts b/src/launchWizard/launchWizard.ts index c130a8fe4..70823bdad 100644 --- a/src/launchWizard/launchWizard.ts +++ b/src/launchWizard/launchWizard.ts @@ -20,7 +20,6 @@ import * as vscode from 'vscode' import { getConfig, osCheck } from '../utils' import { DFDLDebugger } from '../classes/dfdlDebugger' import { VSCodeLaunchConfigArgs } from '../classes/vscode-launch' -import { DataEditorConfig } from '../classes/dataEditor' import { parse as jsoncParse } from 'jsonc-parser' let launchWizard: LaunchWizard | undefined @@ -547,19 +546,6 @@ class LaunchWizard { } }) - let dataEditor: DataEditorConfig = defaultValues.dataEditor - let dataEditorLogLevelSelect = '' - let dataEditorLogLevelTypes = getAllowedLogLevels(true) - let dataEditorLogLevel = dataEditor.logging.level - - dataEditorLogLevelTypes.forEach((type) => { - if (type === dataEditorLogLevel) { - dataEditorLogLevelSelect += `` - } else { - dataEditorLogLevelSelect += `` - } - }) - return ` @@ -798,20 +784,6 @@ class LaunchWizard { + Add Variable -
-

Data Editor Settings:

- -

omega-edit Port:

- - -

Log File:

- - -

Log Level:

- -

diff --git a/src/launchWizard/script.js b/src/launchWizard/script.js index 63811c55d..ae4a45817 100644 --- a/src/launchWizard/script.js +++ b/src/launchWizard/script.js @@ -69,11 +69,6 @@ function getConfigValues() { const stopOnEntry = document.getElementById('stopOnEntry').checked const trace = document.getElementById('trace').checked const useExistingServer = document.getElementById('useExistingServer').checked - const dataEditorPort = parseInt( - document.getElementById('dataEditorPort').value - ) - const dataEditorLogFile = document.getElementById('dataEditorLogFile').value - const dataEditorLogLevel = document.getElementById('dataEditorLogLevel').value const dfdlDaffodilVersion = document.getElementById( 'dfdlDaffodilVersion' ).value @@ -114,9 +109,6 @@ function getConfigValues() { stopOnEntry, trace, useExistingServer, - dataEditorPort, - dataEditorLogFile, - dataEditorLogLevel, dfdlDaffodilVersion, dfdlDebuggerTimeout, dfdlDebuggerLogFile, @@ -314,13 +306,6 @@ function save() { openInfosetView: configValues.openInfosetView, openInfosetDiffView: configValues.openInfosetDiffView, daffodilDebugClasspath: configValues.daffodilDebugClasspath, - dataEditor: { - port: configValues.dataEditorPort, - logging: { - file: configValues.dataEditorLogFile, - level: configValues.dataEditorLogLevel, - }, - }, dfdlDebugger: { daffodilVersion: configValues.dfdlDaffodilVersion, timeout: configValues.dfdlDebuggerTimeout, @@ -501,13 +486,6 @@ function copyConfig() { openInfosetView: configValues.openInfosetView, openInfosetDiffView: configValues.openInfosetDiffView, daffodilDebugClasspath: configValues.daffodilDebugClasspath, - dataEditor: { - port: configValues.dataEditorPort, - logging: { - file: configValues.dataEditorLogFile, - level: configValues.dataEditorLogLevel, - }, - }, dfdlDebugger: { daffodilVersion: configValues.dfdlDaffodilVersion, timeout: configValues.dfdlDebuggerTimeout, @@ -567,14 +545,6 @@ async function updateConfigValues(config) { document.getElementById('trace').checked = config.trace document.getElementById('useExistingServer').checked = config.useExistingServer - document.getElementById('dataEditorPort').value = parseInt( - config.dataEditor.port - ) - document.getElementById('dataEditorLogFile').value = - config.dataEditor.logging.file - document.getElementById('dataEditorLogLevel').value = - config.dataEditor.logging.level - document.getElementById('dfdlDaffodilVersion').value = config.dfdlDebugger.daffodilVersion document.getElementById('dfdlDebuggerTimeout').value = diff --git a/src/svelte/global.d.ts b/src/svelte/global.d.ts deleted file mode 100644 index aea50a224..000000000 --- a/src/svelte/global.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/// diff --git a/src/svelte/index.html b/src/svelte/index.html deleted file mode 100644 index 5db32efaa..000000000 --- a/src/svelte/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - Vite + Svelte + TS - - -
- - - diff --git a/src/svelte/package.json b/src/svelte/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/src/svelte/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/src/svelte/resources/fonts/RedHatMono-Regular.woff2 b/src/svelte/resources/fonts/RedHatMono-Regular.woff2 deleted file mode 100644 index 585e76361..000000000 Binary files a/src/svelte/resources/fonts/RedHatMono-Regular.woff2 and /dev/null differ diff --git a/src/svelte/resources/fonts/SpaceGrotesk-Variable.woff2 b/src/svelte/resources/fonts/SpaceGrotesk-Variable.woff2 deleted file mode 100644 index 0c4d65824..000000000 Binary files a/src/svelte/resources/fonts/SpaceGrotesk-Variable.woff2 and /dev/null differ diff --git a/src/svelte/resources/icons/material-icons.woff2 b/src/svelte/resources/icons/material-icons.woff2 deleted file mode 100644 index 484cffc0f..000000000 Binary files a/src/svelte/resources/icons/material-icons.woff2 and /dev/null differ diff --git a/src/svelte/src/App.debug.svelte b/src/svelte/src/App.debug.svelte deleted file mode 100644 index 3ab192f11..000000000 --- a/src/svelte/src/App.debug.svelte +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - diff --git a/src/svelte/src/App.svelte b/src/svelte/src/App.svelte deleted file mode 100644 index 3b430c848..000000000 --- a/src/svelte/src/App.svelte +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - -
- -
- - -
- - - - - - diff --git a/src/svelte/src/Main.svelte b/src/svelte/src/Main.svelte deleted file mode 100644 index b69f06e01..000000000 --- a/src/svelte/src/Main.svelte +++ /dev/null @@ -1,52 +0,0 @@ - - - -
-
- - -
-
- -
-
- - diff --git a/src/svelte/src/app.css b/src/svelte/src/app.css deleted file mode 100644 index 922d02450..000000000 --- a/src/svelte/src/app.css +++ /dev/null @@ -1,516 +0,0 @@ -/* Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You under the Apache License, Version 2.0 -(the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ - -/* fallback */ -@font-face { - font-family: 'Material Symbols Outlined'; - font-style: normal; - font-weight: normal bold; - src: url(../resources/icons/material-icons.woff2) format('woff2'); -} -@font-face { - font-family: 'Red Hat Mono'; - font-style: normal; - font-weight: normal bold; - src: url(../resources/fonts/RedHatMono-Regular.woff2) format('woff2'); -} -@font-face { - font-family: 'Space Grotesk'; - font-style: normal; - font-weight: normal bold; - src: url(../resources/fonts/SpaceGrotesk-Variable.woff2) format('woff2'); -} - -html { - --monospace-font: 'Red Hat Mono'; - --sans-serif-font: 'Space Grotesk'; - --container-width: 100%; - --container-height: auto; - --color-primary-darkest: #02060b; - --color-primary-dark: #101821; - --color-primary-dark-hover: #303644ff; - --color-primary-mid: #2f3e4f; - --color-primary-light: #687483; - --color-primary-lightest: #e1e3e5; - --color-primary-light-hover: #cacaca; - --color-secondary-darkest: #110b02; - --color-secondary-dark: #322716; - --color-secondary-mid: #796444; - --color-secondary-light: #c8b69b; - --color-secondary-lightest: #fffdfa; - --color-tertiary-lightest: #d0dcd4; - --color-tertiary-light: #adc2b4; - --color-tertiary-mid: #95b19f; - --color-tertiary-dark: #5f816b; - --color-tertiary-darkest: #232f27; - --color-alternate-grey: #bbb5bd; - --color-search-result: #69a0a7; - --color-replace-result: #5f816b; -} -.material-symbols-outlined { - font-family: 'Material Symbols Outlined'; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} - -a:hover { - color: #535bf2; -} - -/* Global LEGEND Styles */ -legend { - font-weight: bold; -} - -/* Global BUTTON Styles */ -button { - display: inline-block; - border-radius: 4pt; - cursor: pointer; - border-width: 1pt; - border-style: solid; - width: 80pt; - margin: 1pt 2pt 1pt 2px; - padding: 2px; -} - -button:not(:disabled):hover { - font-weight: bold; -} - -button:disabled { - opacity: 0.3; - cursor: not-allowed; -} - -/* Global HEADER Styles */ -header { - display: flex; - justify-content: center; - width: 100%; - min-height: 100pt; - max-height: 120pt; - flex: 0 1 auto; - transition: all 0.5s; -} - -/* Global FIELDSET Styles */ -fieldset { - width: 100%; -} - -fieldset label { - font-weight: bold; -} - -/* Global INPUT / SELECT Styles */ -input, -select { - width: 100%; - height: 100%; - padding-top: 1px; - padding-bottom: 1px; - font-weight: bold; - border-width: 1pt; - border-style: solid; - /*noinspection CssUnresolvedCustomProperty*/ -} - -input::placeholder { - font-style: italic; -} - -/* Global HR Styles */ -hr { - width: 100%; - opacity: 0.7; -} - -/* Global TEXTAREA Styles */ -textarea { - /*noinspection CssUnresolvedCustomProperty*/ - font-family: 'Red Hat Mono'; - font-size: small; - resize: none; - position: relative; - overflow-y: scroll; - transition: all 0.25s; -} - -textarea::-webkit-scrollbar { - background-color: transparent; - width: 10pt; -} - -textarea::-webkit-scrollbar-thumb { - background-color: var(--color-secondary-light); - border-radius: 4px; -} - -/* Global Styled Elements */ -body { - font-family: var(--sans-serif-font); -} - -body.light { - color: var(--color-primary-darkest); -} - -body.dark { - color: var(--color-primary-lightest); -} - -div.light, -span.light { - background-color: var(--color-primary-light); -} - -div.dark, -span.dark { - background-color: var(--color-primary-dark); -} - -label { - white-space: nowrap; - overflow-wrap: break-word; - display: flex; - align-items: center; - gap: 6px; - padding-right: 6px; -} - -form { - padding: 0; - margin: 0; -} - -span.nowrap { - white-space: nowrap; - overflow-x: auto; - display: inline-block; -} - -span.editable { - white-space: nowrap; - overflow-x: auto; - display: inline-block; - text-decoration: underline; - text-decoration-style: dotted; - text-decoration-color: steelblue; - cursor: pointer; -} - -span.editable:hover { - font-weight: bolder; -} - -input.dark, -select.dark { - background-color: #101821; - color: #e1e3e5; - border-color: #687483; -} - -input.light, -select.light { - background-color: #e1e3e5; - color: #02060b; - border-color: #2f3e4f; -} - -button.dark { - background-color: #322716; - color: #fffdfa; - border-color: #c8b69b; -} - -button.light { - background-color: #c8b69b; - color: #322716; - border-color: #322716; -} - -span.btn-icon { - font-size: large; - font-weight: 700; -} - -span.errMsg { - color: red; -} - -span.mirror { - transform: scaleX(-1); - display: inline-block; -} - -span.input-actions button { - height: 100%; - margin: 0; - padding: 0; - border-width: 0; - border-radius: 0; - border-style: solid; - min-width: 14pt; - /*noinspection CssUnresolvedCustomProperty*/ - font-family: 'Red Hat Mono'; -} - -span.input-actions button.dark { - background-color: var(--color-primary-dark); - border-color: #687483; -} - -span.input-actions button.light { - background-color: var(--color-primary-lightest); - border-color: #2f3e4f; -} - -span.input-actions button.dark:hover { - background-color: var(--color-primary-dark-hover); - font-weight: bolder; -} - -span.input-actions button.light:hover { - background-color: var(--color-primary-light-hover); - font-weight: bolder; -} - -span.input-actions button.active { - outline-style: inset; - outline-offset: -1px; - outline-width: 2px; -} - -span.input-actions button.active.dark { - background-color: var(--color-primary-dark-hover); - outline-color: var(--color-primary-lightest); -} - -span.input-actions button.active.light { - background-color: var(--color-primary-light-hover); - outline-color: var(--color-primary-mid); -} -/* Hide scrollbar by default on webkit-based browsers */ -div.hide-scrollbar::-webkit-scrollbar { - display: none; -} - -/* Global Style Classes */ -.dataEditor { - display: flex; - font-family: 'Red Hat Mono'; -} -.dataEditor.binary { - grid-template-columns: max-content max-content 10em auto; -} -.dataEditor div { - resize: none; -} -.dataEditor div.byte.dark { - background-color: var(--color-primary-dark); - border-color: var(--color-primary-dark); -} -.dataEditor div.byte.light { - background-color: var(--color-primary-lightest); - border-color: var(--color-primary-lightest); -} - -.dataEditor div.hd { - text-align: center; - font-weight: bold; - color: #fffdfa; - height: 25px; - align-content: center; - display: flex; - justify-content: center; - align-items: center; -} -.dataEditor div.hd.dark { - background-color: #2f3e4f; -} -.dataEditor div.hd.light { - background-color: #687483; -} -.dataEditor div.measure { - display: flex; - font-family: 'Red Hat Mono'; - height: 25pt; -} -.dataEditor div.measure.dark { - display: flex; - background-color: #101821; - color: #e1e3e5; - border-color: var(--color-primary-light); -} -.dataEditor div.measure.light { - display: flex; - background-color: #e1e3e5; - color: #02060b; - border-color: var(--color-primary-dark); -} -.dataEditor div.measure.selection { - flex-direction: row; - overflow: scroll; -} -.dataEditor div.measure.selection sub { - opacity: 0.6; -} -.dataEditor div.measure span { - align-self: flex-end; -} -.dataEditor div.measure div, -.dataEditor div.measure sub { - display: flex; - flex-direction: column; - justify-content: center; -} -.dataEditor div.measure div.clear-selection { - width: 20pt; - font-size: 11pt; - text-align: center; - cursor: pointer; - transition: all 0.25s; -} -.dataEditor div.measure div.clear-selection:hover { - color: red; - font-size: 14pt; - font-weight: bolder; -} -.dataEditor div.contentControls .grid-container-two-columns { - display: flex; -} -.dataEditor - div.contentControls - .grid-container-two-columns - div.grid-container-column { - width: 50%; - padding: 5px; -} -.dataEditor div.content-select-column { - width: 50%; -} -.dataEditor div.content-select-container { - display: flex; - align-items: center; - margin-bottom: 5px; -} -.dataEditor div.content-select-container label { - width: 100%; -} -.dataEditor textarea.address_vw { - text-align: right; - direction: rtl; - user-select: none; - max-width: 100px; - padding-right: 10pt; - font-weight: 700; - font-family: 'Red Hat Mono'; - line-height: 24px; -} -.dataEditor textarea.address_vw:focus { - outline: none; -} -.dataEditor select.address_type { - height: 100%; - border: 2px solid var(--color-primary-lightest); -} -.dataEditor textarea.dark { - background-color: #101821; - color: #fffdfa; -} -.dataEditor textarea.light { - background-color: #e1e3e5; - color: #02060b; -} -.dataEditor div.editView { - display: flex; - flex-direction: column; - justify-content: flex-end; - height: 100%; - margin-left: 4px; -} -.dataEditor div.editView textarea { - width: auto; - height: 100%; -} -.dataEditor textarea.selectedContent { - background: #2c2c2c; -} -.dataEditor textarea.selectedContent:disabled { - background: #252526; -} -.dataEditor select.content-select { - float: right; - max-width: 110px; -} -div.viewport-hdr-content { - height: 35px; -} - -.tooltip { - position: relative; - display: inline-block; - cursor: pointer; -} - -.tooltip .tooltip-text { - visibility: hidden; - background-color: rgba(0, 0, 0, 75%); - color: #bbb; - text-align: center; - padding: 4px 8px; - border-radius: 4px; - - /* Position the tooltip */ - position: absolute; - z-index: 1; - bottom: 115%; - - /* Prevent text from breaking or wrapping */ - white-space: nowrap; - - /* Fade in tooltip */ - opacity: 0; - transition: opacity 0.4s; -} - -.tooltip:hover .tooltip-text { - visibility: visible; - font-size: 8pt; - opacity: 1; -} - -.icon-container { - position: relative; - display: inline-block; -} -.icon-badge { - position: absolute; - top: -10px; /* Adjust these values as needed. */ - left: -12px; - background-color: var(--color-secondary-mid); - color: var(--color-primary-lightest); - padding: 2px 4px; - font-size: 0.8em; - border-radius: 50%; - min-width: 10px; - text-align: center; - white-space: nowrap; -} diff --git a/src/svelte/src/components/DataDisplays/CustomByteDisplay/BinaryData.ts b/src/svelte/src/components/DataDisplays/CustomByteDisplay/BinaryData.ts deleted file mode 100644 index 6d75cd6f2..000000000 --- a/src/svelte/src/components/DataDisplays/CustomByteDisplay/BinaryData.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { SimpleWritable } from '../../../stores/localStore' -import { - type BytesPerRow, - type RadixValues, -} from '../../../stores/configuration' -import { - radixBytePad, - viewport_offset_to_line_num, -} from '../../../utilities/display' -import { dataDislayLineAmount } from '../../../stores' -import { get } from 'svelte/store' - -export const BYTE_ACTION_DIV_OFFSET: number = 24 - -export type EditAction = - | 'insert-before' - | 'insert-after' - | 'insert-replace' - | 'delete' - | 'byte-input' - -export type ByteValue = { - offset: number - text: string | undefined - value: number -} - -export const null_byte = () => { - return { - offset: -1, - text: '', - value: -1, - } as ByteValue -} - -export interface EditEvent { - action: EditAction -} - -export interface EditByteEvent extends EditEvent { - targetByte: ByteValue -} - -export const byte_value_string = (value: number, radix: RadixValues) => { - if (value > 255) - throw `Value {${value}} is larger than an unsigned int (255).` - let str = value.toString(radix) - let validLen = radixBytePad(radix) - return str.length < validLen ? str.padStart(validLen, '0') : str -} - -export type ViewportDataType = 'physical' | 'logical' - -export type ByteSelectionEvent = { - targetElement: HTMLDivElement - targetByte: ByteValue - fromViewport: ViewportDataType -} - -export const RADIX_REGEX_MATCH_STR = { - 16: /[0-9a-fA-F]{2}/g, - 10: /[0-9]{3}/g, - 8: /[0-8]{3}/g, - 2: /[0-1]{8}/g, -} - -export class ViewportData_t { - data = new Uint8Array(0) - fileOffset = -1 - length = -1 - bytesLeft = -1 - capacity = this.data.length -} - -export class ViewportDataStore_t extends SimpleWritable { - private _offsetMax: number = -1 - - protected init(): ViewportData_t { - return new ViewportData_t() - } - - public get offsetMax(): number { - return this._offsetMax - } - - public set(value: ViewportData_t): void { - this.store.set(value) - this._offsetMax = value.fileOffset + value.bytesLeft + value.length - } - - public lowerFetchBoundary(): number { - return this.storeData().fileOffset - } - - public upperFetchBoundary(bytesPerRow: BytesPerRow): number { - const store = this.storeData() - const displayByteCount = get(dataDislayLineAmount) * bytesPerRow - const boundary = - store.length >= displayByteCount - ? store.fileOffset + store.length - displayByteCount - : store.length - return boundary - } - - public lineTopMax(bytesPerRow: BytesPerRow): number { - const vpMaxOffset = Math.max( - 0, - this.storeData().length - get(dataDislayLineAmount) * bytesPerRow - ) - const vpLineTopMax = viewport_offset_to_line_num( - vpMaxOffset + this.storeData().fileOffset, - this.storeData().fileOffset, - bytesPerRow - ) - - return vpLineTopMax + 1 - } - - public physical_byte_values( - radix: RadixValues, - bytesPerRow: 16 | 8 - ): ByteValue[] { - const byteValues = - this.physical_display(radix, bytesPerRow).match( - RADIX_REGEX_MATCH_STR[radix] - ) || [] - - return byteValues.map((byteStr, index) => { - return { - text: byteStr, - offset: index, - value: parseInt(byteStr, radix), - } - }) - } - - public subarray(from: number, to: number): Uint8Array { - return this.storeData().data.subarray(from, to) - } - - public slice(from: number, to: number): Uint8Array { - return this.storeData().data.slice(from, to) - } - - private physical_display(radix: RadixValues, bytesPerRow: 16 | 8): string { - let result = '' - let arr = this.storeData().data - if (arr.byteLength > 0) { - const pad = radixBytePad(radix) - let i = 0 - while (true) { - for (let col = 0; i < arr.byteLength && col < bytesPerRow; ++col) { - result += arr[i++].toString(radix).padStart(pad, '0') + ' ' - } - result = result.slice(0, result.length - 1) - if (i === arr.byteLength) { - break - } - result += '\n' - } - } - return result - } -} - -export function latin1Undefined(charCode: number): boolean { - return charCode < 32 || (charCode > 126 && charCode < 160) -} diff --git a/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataLineFeed.svelte b/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataLineFeed.svelte deleted file mode 100644 index 34871445d..000000000 --- a/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataLineFeed.svelte +++ /dev/null @@ -1,847 +0,0 @@ - - - - - - -
- {#if $selectionDataStore.active && $editMode == EditByteModes.Single} - {#key $selectedByte || selectedByteElement || dataRadix || $editorActionsAllowed == EditActionRestrictions.None} - - {/key} - {/if} - {#each viewportLines as viewportLine, i} -
-
- {viewportLine.offset} -
- - {#if $visableViewports === 'physical' || $visableViewports === 'all'} -
- {#each viewportLine.bytes as byte} - - {/each} -
- {/if} - {#if $visableViewports === 'logical' || $visableViewports === 'all'} -
- {#each viewportLine.bytes as byte} - - {/each} -
- {/if} -
- {/each} - - - - - - - - - - - - - - - -
- - diff --git a/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataValue.svelte b/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataValue.svelte deleted file mode 100644 index f2ca5005d..000000000 --- a/src/svelte/src/components/DataDisplays/CustomByteDisplay/DataValue.svelte +++ /dev/null @@ -1,115 +0,0 @@ - - - - -{#if disabled} -
-{:else if id === 'physical'} - -
- {byte.text} -
-{:else} - -
- {latin1Undefined(byte.value) ? '' : String.fromCharCode(byte.value)} -
-{/if} - - diff --git a/src/svelte/src/components/DataDisplays/CustomByteDisplay/FileTraversalIndicator.svelte b/src/svelte/src/components/DataDisplays/CustomByteDisplay/FileTraversalIndicator.svelte deleted file mode 100644 index bbef78bf7..000000000 --- a/src/svelte/src/components/DataDisplays/CustomByteDisplay/FileTraversalIndicator.svelte +++ /dev/null @@ -1,94 +0,0 @@ - - - -
-
-
- - diff --git a/src/svelte/src/components/DataDisplays/CustomByteDisplay/SelectedByteEdit.svelte b/src/svelte/src/components/DataDisplays/CustomByteDisplay/SelectedByteEdit.svelte deleted file mode 100644 index 35f945d82..000000000 --- a/src/svelte/src/components/DataDisplays/CustomByteDisplay/SelectedByteEdit.svelte +++ /dev/null @@ -1,475 +0,0 @@ - - - -{#if $editorActionsAllowed === EditActionRestrictions.None} - - - - - -
- - ✖ - -
-
- - - - {#if actionElements['insert-before'].render} -
- - ⇤ - -
- {/if} - - - {#if actionElements['insert-after'].render} -
- - ⇥ - -
- {/if} -{:else} - - - -{/if} - - diff --git a/src/svelte/src/components/DataDisplays/DataViewports.svelte b/src/svelte/src/components/DataDisplays/DataViewports.svelte deleted file mode 100644 index 99f4d253a..000000000 --- a/src/svelte/src/components/DataDisplays/DataViewports.svelte +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - diff --git a/src/svelte/src/components/DataDisplays/Fieldsets/ContentControls.svelte b/src/svelte/src/components/DataDisplays/Fieldsets/ContentControls.svelte deleted file mode 100644 index 2f18f9d0d..000000000 --- a/src/svelte/src/components/DataDisplays/Fieldsets/ContentControls.svelte +++ /dev/null @@ -1,56 +0,0 @@ - - - -
- Content Controls - {#if !$applicable && $editMode === EditByteModes.Multiple} - {$applyErrMsg} - {/if} - - {#if $editMode === EditByteModes.Multiple} - - - - {/if} -
diff --git a/src/svelte/src/components/DataDisplays/Fieldsets/DataView.svelte b/src/svelte/src/components/DataDisplays/Fieldsets/DataView.svelte deleted file mode 100644 index f648f205d..000000000 --- a/src/svelte/src/components/DataDisplays/Fieldsets/DataView.svelte +++ /dev/null @@ -1,440 +0,0 @@ - - - -
- Data {#if $dvOffset}@ {$dvOffset}{/if} - {#if errorMessage} - message: {errorMessage}
- {/if} -
- -
- {#if $selectionDataStore.active && $dvInt8} - {#if isEditing === 'latin1'} -
- - -
- {:else} -
{ - isEditing = 'latin1' - }} - on:keydown={() => {}} - > - - {$dvLatin1} -
- {/if} - {#if isEditing === 'int8'} -
- - -
- {:else} -
{ - isEditing = 'int8' - }} - on:keydown={() => {}} - > - - {$dvInt8} -
- {/if} - {#if isEditing === 'uint8'} -
- - -
- {:else} -
{ - isEditing = 'uint8' - }} - on:keydown={() => {}} - > - - {$dvUint8} -
- {/if} - {#if $dvInt16} - {#if isEditing === 'int16'} -
- - -
- {:else} -
{ - isEditing = 'int16' - }} - on:keydown={() => {}} - > - - {$dvInt16} -
- {/if} - {#if isEditing === 'uint16'} -
- - -
- {:else} -
{ - isEditing = 'uint16' - }} - on:keydown={() => {}} - > - - {$dvUint16} -
- {/if} - {/if} - {#if $dvInt32} - {#if isEditing === 'int32'} -
- - -
- {:else} -
{ - isEditing = 'int32' - }} - on:keydown={() => {}} - > - - {$dvInt32} -
- {/if} - {#if isEditing === 'uint32'} -
- - -
- {:else} -
{ - isEditing = 'uint32' - }} - on:keydown={() => {}} - > - - {$dvUint32} -
- {/if} - {/if} - {#if $dvInt64} - {#if isEditing === 'int64'} -
- - -
- {:else} -
{ - isEditing = 'int64' - }} - on:keydown={() => {}} - > - - {$dvInt64} -
- {/if} - {#if isEditing === 'uint64'} -
- - -
- {:else} -
{ - isEditing = 'uint64' - }} - on:keydown={() => {}} - > - - {$dvUint64} -
- {/if} - {/if} - {/if} -
- - diff --git a/src/svelte/src/components/DataDisplays/Header/DisplayHeader.svelte b/src/svelte/src/components/DataDisplays/Header/DisplayHeader.svelte deleted file mode 100644 index 8d4258b75..000000000 --- a/src/svelte/src/components/DataDisplays/Header/DisplayHeader.svelte +++ /dev/null @@ -1,204 +0,0 @@ - - - -
-
-
Address
- -
- {#if $visableViewports === 'physical' || $visableViewports === 'all'} -
-
Physical
-
- {#if $displayRadix === RADIX_OPTIONS.Binary} - {#each offsetLine as offset} -
-
{offset}
-
{bitIndexStr}
-
- {/each} - {:else} - {#each offsetLine as offset} -
- {offset} -
- {/each} - {/if} -
-
- {/if} - {#if $visableViewports === 'logical' || $visableViewports === 'all'} -
-
Logical
-
- {#each offsetLine as offset} -
- {offset} -
- {/each} -
-
- {/if} -
- - diff --git a/src/svelte/src/components/DataMetrics/DataMetrics.svelte b/src/svelte/src/components/DataMetrics/DataMetrics.svelte deleted file mode 100644 index acccab3bf..000000000 --- a/src/svelte/src/components/DataMetrics/DataMetrics.svelte +++ /dev/null @@ -1,746 +0,0 @@ - - - -
- {#if title.length > 0} -
-

{title}

-
- {/if} -
- {#if asciiOverlay} -
-
ctrl
-
-
-
printable
-
-
- {/if} - {#each scaledData as value, i (i)} -
(currentTooltip = { index: i, value })} - on:mouseleave={() => (currentTooltip = null)} - /> - {/each} - {#if currentTooltip} -
- Byte: {currentTooltip.index} Frequency: {byteProfile[ - currentTooltip.index - ]} - {#if currentTooltip.index >= 32 && currentTooltip.index <= 126} - ASCII: '{String.fromCharCode(currentTooltip.index)}' - {/if} -
- {/if} -
-
-
-
- -
-
- -
- {#if fieldBeingEdited === 'startOffset'} -
- -
- {:else} - -
{ - fieldBeingEdited = 'startOffset' - }} - > - -
- {/if} - {#if fieldBeingEdited === 'endOffset'} -
- -
- {:else} - -
{ - fieldBeingEdited = 'endOffset' - }} - > - -
- {/if} - {#if fieldBeingEdited === 'length'} -
- -
- {:else} - -
{ - fieldBeingEdited = 'length' - }} - > - -
- {/if} -
-
-
- - - - - - - - - - - - - -
-
-
- - - - - - - -
-
- - -
- {#if statusMessage.length > 0} -
 {statusMessage} 
- {/if} - {#if warningMessage.length > 0} -
 {warningMessage} 
- {/if} - {#if errorMessage.length > 0} -
 {errorMessage} 
- {/if} -
- - diff --git a/src/svelte/src/components/Debug/Debug.svelte b/src/svelte/src/components/Debug/Debug.svelte deleted file mode 100644 index 6c8cd1c27..000000000 --- a/src/svelte/src/components/Debug/Debug.svelte +++ /dev/null @@ -1,98 +0,0 @@ - - - -{@render children()} - -
(displayDebug = displayDebug ? false : true)} -> - pest_control -
-{#snippet printVar(dvar: DebugVariable)} -
- {dvar.id}: - {dvar.valueStr()} -
-{/snippet} -{#if displayDebug} -
- {#each get() as dvar} - { - remove(dvar) - }} - /> - {/each} -
-{/if} - - diff --git a/src/svelte/src/components/Debug/Debug.svelte.ts b/src/svelte/src/components/Debug/Debug.svelte.ts deleted file mode 100644 index ecfca4dad..000000000 --- a/src/svelte/src/components/Debug/Debug.svelte.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { getContext, setContext } from 'svelte' - -export interface DebugVariable { - id: string - valueStr: () => string -} - -let debugVars = $state([]) -export const addVarToDebug = (...vars: DebugVariable[]) => { - debugVars.push(...vars) -} - -export function setDebugVarContext() { - setContext('debug-vars', { - add: addVarToDebug, - get: () => debugVars, - remove: (dvar: DebugVariable) => { - debugVars = debugVars.filter((item) => { - const matched = item.id === dvar.id - if (!matched) return dvar - console.log('Removing dvar: ', dvar.id) - }) - }, - }) - return getDebugVarContext() -} -export type DebugVarsContextType = { - add: typeof addVarToDebug - get: () => typeof debugVars - remove: (dvar: DebugVariable) => void -} -export function getDebugVarContext() { - return getContext('debug-vars') as DebugVarsContextType -} diff --git a/src/svelte/src/components/Debug/DebugOutput.svelte b/src/svelte/src/components/Debug/DebugOutput.svelte deleted file mode 100644 index c45b98e20..000000000 --- a/src/svelte/src/components/Debug/DebugOutput.svelte +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - {@render renderVar({ id, valueStr })} - - - diff --git a/src/svelte/src/components/Debug/index.ts b/src/svelte/src/components/Debug/index.ts deleted file mode 100644 index 5ec046fd8..000000000 --- a/src/svelte/src/components/Debug/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export * from './Debug.svelte.ts' diff --git a/src/svelte/src/components/Editors/DataEditor.svelte b/src/svelte/src/components/Editors/DataEditor.svelte deleted file mode 100644 index 5905a4cb2..000000000 --- a/src/svelte/src/components/Editors/DataEditor.svelte +++ /dev/null @@ -1,153 +0,0 @@ - - - -
-
-
- Editor -
-
- {#if $selectionDataStore.active && $editMode !== EditByteModes.Single} - -
- ✖ -
-
- {selectionOffsetText} -
- {/if} -
-
- {#if displayTextEditorArea} -