diff --git a/README.md b/README.md index ecd1ea0..e242333 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ An open source license scanning and display library for HarmonyOS. - **End-to-end** — scans your dependencies at build time and displays the license list in your app. No manual JSON editing, no drift. - **Prebuilt UI pages** — drop-in list and detail pages built on ArkUI & UI Design Kit components. -- **Custom UI, no problem** — use the core package alone to read `osslibraries.json` and render the license list in any UI you build. +- **Custom UI, no problem** — use the core package alone to load and parse the license data and render it in any UI you build. - **Always up to date** — the Hvigor plugin scans `oh_modules/` on every build. The license list always matches what you ship. - **AI-assisted integration** — ships an Agent Skill so an AI can wire the library into your project for you. @@ -141,20 +141,15 @@ You can skip the predefined OSSLibraries UI pages and use the `core` module dire ohpm install osslibraries ``` -Then read `osslibraries.json` in your custom page as follows: +The core package handles data loading and parsing. In your custom page, call `LibsLoader.fromRawfile(context)` to get a sorted `Libs` instance: ```ets -import { util } from '@kit.ArkTS'; import { common } from '@kit.AbilityKit'; -import { Libs, LibsHolder } from 'osslibraries'; +import { Libs, LibsHolder, LibsLoader } from 'osslibraries'; -// Read osslibraries.json const context: common.Context = this.getUIContext().getHostContext() as common.Context; -const content: Uint8Array = await context.resourceManager.getRawFileContent('osslibraries.json'); -const json: string = util.TextDecoder.create('utf-8').decode(content); -// Parse JSON -const libs: Libs = Libs.fromJson(json); +const libs: Libs = await LibsLoader.fromRawfile(context); // Find a library const lib = libs.findLibrary('@ohos/hypium'); diff --git a/README_zh.md b/README_zh.md index 473e2d4..a3776e6 100644 --- a/README_zh.md +++ b/README_zh.md @@ -13,7 +13,7 @@ - **端到端** — 从构建时扫描依赖到应用内展示 License 列表,一条链路走通,无需手动维护 JSON。 - **预定义 UI 页面** — 提供开箱即用的列表页与详情页,基于 ArkUI 和 UI Design Kit 组件。 -- **自定义 UI 亦可** — 可单独使用 Core 包读取 `osslibraries.json`,License 列表的渲染方式完全由你决定。 +- **自定义 UI 亦可** — 可单独使用 Core 包加载并解析许可证数据,License 列表的渲染方式完全由你决定。 - **始终同步** — Hvigor 插件在每次构建时扫描 `oh_modules/`,License 列表永远跟随实际发布的依赖。 - **AI 辅助集成** — 提供 Agent Skill,可由 AI 代为完成项目接入。 @@ -141,20 +141,15 @@ this.getUIContext().getRouter().pushNamedRoute({ ohpm install osslibraries ``` -然后,在自定义页面中按以下方法读取 `osslibraries.json`: +`osslibraries` 包负责数据加载与解析。在自定义页面中调用 `LibsLoader.fromRawfile(context)` 即可拿到排好序的 `Libs` 实例: ```ets -import { util } from '@kit.ArkTS'; import { common } from '@kit.AbilityKit'; -import { Libs, LibsHolder } from 'osslibraries'; +import { Libs, LibsHolder, LibsLoader } from 'osslibraries'; -// 读 osslibraries.json const context: common.Context = this.getUIContext().getHostContext() as common.Context; -const content: Uint8Array = await context.resourceManager.getRawFileContent('osslibraries.json'); -const json: string = util.TextDecoder.create('utf-8').decode(content); -// 解析 JSON -const libs: Libs = Libs.fromJson(json); +const libs: Libs = await LibsLoader.fromRawfile(context); // 查找某个库 const lib = libs.findLibrary('@ohos/hypium'); diff --git a/entry/hvigorfile.ts b/entry/hvigorfile.ts index 7dd22c5..e533646 100644 --- a/entry/hvigorfile.ts +++ b/entry/hvigorfile.ts @@ -1,7 +1,9 @@ import { hapTasks } from "@ohos/hvigor-ohos-plugin"; -import { ossScanPlugin } from "osslibraries-hvigor-plugin"; +import { ossScanPlugin, OutputFormat } from "osslibraries-hvigor-plugin"; export default { system: hapTasks /* Built-in plugin of Hvigor. It cannot be modified. */, - plugins: [ossScanPlugin()] /* Scan OHPM deps and generate osslibraries.json at build time. */, + plugins: [ + ossScanPlugin({ format: OutputFormat.MessagePack }), + ] /* Scan OHPM deps and generate osslibraries.msgpack at build time. */, }; diff --git a/entry/oh-package-lock.json5 b/entry/oh-package-lock.json5 index 8cba0e9..f269438 100644 --- a/entry/oh-package-lock.json5 +++ b/entry/oh-package-lock.json5 @@ -6,24 +6,35 @@ "lockfileVersion": 3, "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "specifiers": { - "osslibraries@^0.0.3": "osslibraries@0.0.3", + "@ohos/msgpack@1.0.2": "@ohos/msgpack@1.0.2", + "osslibraries@^0.0.4": "osslibraries@0.0.4", "osslibraries_ui@../osslibraries_ui": "osslibraries_ui@../osslibraries_ui" }, "packages": { - "osslibraries@0.0.3": { - "name": "osslibraries", - "version": "0.0.3", - "integrity": "sha512-vZZ/vVLbUepiLBG22i/FHmML6VGIDAr4cElyOHaqVfRDQjCHRE5auln0sZmJv98BHqz/qNhYSN4rYB6DYmvxkA==", - "resolved": "https://ohpm.openharmony.cn/ohpm/osslibraries/-/osslibraries-0.0.3.har", + "@ohos/msgpack@1.0.2": { + "name": "@ohos/msgpack", + "version": "1.0.2", + "integrity": "sha512-oWYunyTZzkQSqHptn4OPuiN8KTPP/2Z2PCCoRxIFX2tKX13cfKvI7a775gCR/1IpyMfn2CgX/8gUcJIxspOp4g==", + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/msgpack/-/msgpack-1.0.2.har", "registryType": "ohpm" }, + "osslibraries@0.0.4": { + "name": "osslibraries", + "version": "0.0.4", + "integrity": "sha512-uYjT40tdLrLBxkqgqkFcZXIsJVgXDd90tm79QltCsFsZLNRy/Pv1XcOt9WeUr/vPdpDRvHPfIQsmHW1wNOGErw==", + "resolved": "https://ohpm.openharmony.cn/ohpm/osslibraries/-/osslibraries-0.0.4.har", + "registryType": "ohpm", + "dependencies": { + "@ohos/msgpack": "1.0.2" + } + }, "osslibraries_ui@../osslibraries_ui": { "name": "osslibraries_ui", - "version": "0.0.6", + "version": "0.0.7", "resolved": "../osslibraries_ui", "registryType": "local", "dependencies": { - "osslibraries": "^0.0.3" + "osslibraries": "^0.0.4" } } } diff --git a/entry/src/main/resources/rawfile/osslibraries.json b/entry/src/main/resources/rawfile/osslibraries.json deleted file mode 100644 index ca8687b..0000000 --- a/entry/src/main/resources/rawfile/osslibraries.json +++ /dev/null @@ -1 +0,0 @@ -{"libraries":[{"uniqueId":"@ohos/hamock","artifactVersion":"1.0.0","name":"@ohos/hamock","description":"A mock framework for OpenHarmony application.","website":"","developers":[{"name":"huawei","organisationUrl":""}],"scm":null,"organization":null,"funding":[],"tag":[],"licenses":["9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef"]},{"uniqueId":"@ohos/hypium","artifactVersion":"1.0.28","name":"@ohos/hypium","description":"A unit test framework for OpenHarmony application","website":"https://gitee.com/openharmony/testfwk_arkxtest","developers":[{"name":"huawei","organisationUrl":""}],"scm":{"connection":"","developerConnection":"","url":"https://gitee.com/openharmony/testfwk_arkxtest"},"organization":null,"funding":[],"tag":["测试框架","except","mock"],"licenses":["0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9"]},{"uniqueId":"osslibraries","artifactVersion":"0.0.3","name":"osslibraries","description":"适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的 Core 部分。","website":"https://github.com/composable-tu/osslibraries","developers":[{"name":"composable-tu","organisationUrl":"https://github.com/composable-tu"}],"scm":{"connection":"","developerConnection":"","url":"https://github.com/composable-tu/osslibraries"},"organization":null,"funding":[],"tag":["osslibraries","license","licenses","open-source","oss"],"licenses":["533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2"]},{"uniqueId":"osslibraries_ui","artifactVersion":"0.0.6","name":"osslibraries_ui","description":"适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。","website":"https://github.com/composable-tu/osslibraries","developers":[{"name":"composable-tu","organisationUrl":"https://github.com/composable-tu"}],"scm":{"connection":"","developerConnection":"","url":"https://github.com/composable-tu/osslibraries"},"organization":null,"funding":[],"tag":["osslibraries","license","licenses","open-source","oss"],"licenses":["533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2"]},{"uniqueId":"osslibraries_ui_wear","artifactVersion":"0.0.2","name":"osslibraries_ui_wear","description":"一个适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI(Wearable)部分。","website":"https://github.com/composable-tu/osslibraries","developers":[{"name":"composable-tu","organisationUrl":"https://github.com/composable-tu"}],"scm":{"connection":"","developerConnection":"","url":"https://github.com/composable-tu/osslibraries"},"organization":null,"funding":[],"tag":["osslibraries","license","licenses","open-source","oss","wearable","wear"],"licenses":["533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2"]}],"licenses":{"533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2":{"hash":"533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2","name":"Mulan Permissive Software License, Version 2","url":"https://license.coscl.org.cn/MulanPSL2","spdxId":"MulanPSL-2.0","content":" 木兰宽松许可证, 第2版\n\n木兰宽松许可证, 第2版\n2020年1月 http://license.coscl.org.cn/MulanPSL2\n\n您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束:\n\n0. 定义\n\n“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。\n\n“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。\n\n“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。\n\n“法人实体” 是指提交贡献的机构及其“关联实体”。\n\n“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。\n\n1. 授予版权许可\n\n每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。\n\n2. 授予专利许可\n\n每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。\n\n3. 无商标许可\n\n“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。\n\n4. 分发限制\n\n您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。\n\n5. 免责声明与责任限制\n\n“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。\n\n6. 语言\n\n“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。\n\n条款结束\n\n如何将木兰宽松许可证,第2版,应用到您的软件\n\n如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步:\n\n1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;\n\n2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中;\n\n3, 请将如下声明文本放入每个源文件的头部注释中。\n\nCopyright (c) [Year] [name of copyright holder]\n[Software Name] is licensed under Mulan PSL v2.\nYou can use this software according to the terms and conditions of the Mulan PSL v2.\nYou may obtain a copy of Mulan PSL v2 at:\n http://license.coscl.org.cn/MulanPSL2\nTHIS SOFTWARE IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OF ANY KIND,\nEITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,\nMERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.\nSee the Mulan PSL v2 for more details.\n\n\n Mulan Permissive Software License,Version 2\n\nMulan Permissive Software License,Version 2 (Mulan PSL v2)\nJanuary 2020 http://license.coscl.org.cn/MulanPSL2\n\nYour reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:\n\n0. Definition\n\nSoftware means the program and related documents which are licensed under this License and comprise all Contribution(s).\n\nContribution means the copyrightable work licensed by a particular Contributor under this License.\n\nContributor means the Individual or Legal Entity who licenses its copyrightable work under this License.\n\nLegal Entity means the entity making a Contribution and all its Affiliates.\n\nAffiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.\n\n1. Grant of Copyright License\n\nSubject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.\n\n2. Grant of Patent License\n\nSubject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.\n\n3. No Trademark License\n\nNo trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4.\n\n4. Distribution Restriction\n\nYou may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.\n\n5. Disclaimer of Warranty and Limitation of Liability\n\nTHE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n6. Language\n\nTHIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.\n\nEND OF THE TERMS AND CONDITIONS\n\nHow to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software\n\nTo apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps:\n\nFill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner;\nCreate a file named \"LICENSE\" which contains the whole context of this License in the first directory of your software package;\nAttach the statement to the appropriate annotated syntax at the beginning of each source file.\n\nCopyright (c) [Year] [name of copyright holder]\n[Software Name] is licensed under Mulan PSL v2.\nYou can use this software according to the terms and conditions of the Mulan PSL v2.\nYou may obtain a copy of Mulan PSL v2 at:\n http://license.coscl.org.cn/MulanPSL2\nTHIS SOFTWARE IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OF ANY KIND,\nEITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,\nMERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.\nSee the Mulan PSL v2 for more details.\n"},"9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef":{"hash":"9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef","name":"Apache License 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0","spdxId":"Apache-2.0","content":"\r\n Apache License\r\n Version 2.0, January 2004\r\n http://www.apache.org/licenses/\r\n\r\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r\n\r\n 1. Definitions.\r\n\r\n \"License\" shall mean the terms and conditions for use, reproduction,\r\n and distribution as defined by Sections 1 through 9 of this document.\r\n\r\n \"Licensor\" shall mean the copyright owner or entity authorized by\r\n the copyright owner that is granting the License.\r\n\r\n \"Legal Entity\" shall mean the union of the acting entity and all\r\n other entities that control, are controlled by, or are under common\r\n control with that entity. For the purposes of this definition,\r\n \"control\" means (i) the power, direct or indirect, to cause the\r\n direction or management of such entity, whether by contract or\r\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\r\n outstanding shares, or (iii) beneficial ownership of such entity.\r\n\r\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\r\n exercising permissions granted by this License.\r\n\r\n \"Source\" form shall mean the preferred form for making modifications,\r\n including but not limited to software source code, documentation\r\n source, and configuration files.\r\n\r\n \"Object\" form shall mean any form resulting from mechanical\r\n transformation or translation of a Source form, including but\r\n not limited to compiled object code, generated documentation,\r\n and conversions to other media types.\r\n\r\n \"Work\" shall mean the work of authorship, whether in Source or\r\n Object form, made available under the License, as indicated by a\r\n copyright notice that is included in or attached to the work\r\n (an example is provided in the Appendix below).\r\n\r\n \"Derivative Works\" shall mean any work, whether in Source or Object\r\n form, that is based on (or derived from) the Work and for which the\r\n editorial revisions, annotations, elaborations, or other modifications\r\n represent, as a whole, an original work of authorship. For the purposes\r\n of this License, Derivative Works shall not include works that remain\r\n separable from, or merely link (or bind by name) to the interfaces of,\r\n the Work and Derivative Works thereof.\r\n\r\n \"Contribution\" shall mean any work of authorship, including\r\n the original version of the Work and any modifications or additions\r\n to that Work or Derivative Works thereof, that is intentionally\r\n submitted to Licensor for inclusion in the Work by the copyright owner\r\n or by an individual or Legal Entity authorized to submit on behalf of\r\n the copyright owner. For the purposes of this definition, \"submitted\"\r\n means any form of electronic, verbal, or written communication sent\r\n to the Licensor or its representatives, including but not limited to\r\n communication on electronic mailing lists, source code control systems,\r\n and issue tracking systems that are managed by, or on behalf of, the\r\n Licensor for the purpose of discussing and improving the Work, but\r\n excluding communication that is conspicuously marked or otherwise\r\n designated in writing by the copyright owner as \"Not a Contribution.\"\r\n\r\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\r\n on behalf of whom a Contribution has been received by Licensor and\r\n subsequently incorporated within the Work.\r\n\r\n 2. Grant of Copyright License. Subject to the terms and conditions of\r\n this License, each Contributor hereby grants to You a perpetual,\r\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r\n copyright license to reproduce, prepare Derivative Works of,\r\n publicly display, publicly perform, sublicense, and distribute the\r\n Work and such Derivative Works in Source or Object form.\r\n\r\n 3. Grant of Patent License. Subject to the terms and conditions of\r\n this License, each Contributor hereby grants to You a perpetual,\r\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r\n (except as stated in this section) patent license to make, have made,\r\n use, offer to sell, sell, import, and otherwise transfer the Work,\r\n where such license applies only to those patent claims licensable\r\n by such Contributor that are necessarily infringed by their\r\n Contribution(s) alone or by combination of their Contribution(s)\r\n with the Work to which such Contribution(s) was submitted. If You\r\n institute patent litigation against any entity (including a\r\n cross-claim or counterclaim in a lawsuit) alleging that the Work\r\n or a Contribution incorporated within the Work constitutes direct\r\n or contributory patent infringement, then any patent licenses\r\n granted to You under this License for that Work shall terminate\r\n as of the date such litigation is filed.\r\n\r\n 4. Redistribution. You may reproduce and distribute copies of the\r\n Work or Derivative Works thereof in any medium, with or without\r\n modifications, and in Source or Object form, provided that You\r\n meet the following conditions:\r\n\r\n (a) You must give any other recipients of the Work or\r\n Derivative Works a copy of this License; and\r\n\r\n (b) You must cause any modified files to carry prominent notices\r\n stating that You changed the files; and\r\n\r\n (c) You must retain, in the Source form of any Derivative Works\r\n that You distribute, all copyright, patent, trademark, and\r\n attribution notices from the Source form of the Work,\r\n excluding those notices that do not pertain to any part of\r\n the Derivative Works; and\r\n\r\n (d) If the Work includes a \"NOTICE\" text file as part of its\r\n distribution, then any Derivative Works that You distribute must\r\n include a readable copy of the attribution notices contained\r\n within such NOTICE file, excluding those notices that do not\r\n pertain to any part of the Derivative Works, in at least one\r\n of the following places: within a NOTICE text file distributed\r\n as part of the Derivative Works; within the Source form or\r\n documentation, if provided along with the Derivative Works; or,\r\n within a display generated by the Derivative Works, if and\r\n wherever such third-party notices normally appear. The contents\r\n of the NOTICE file are for informational purposes only and\r\n do not modify the License. You may add Your own attribution\r\n notices within Derivative Works that You distribute, alongside\r\n or as an addendum to the NOTICE text from the Work, provided\r\n that such additional attribution notices cannot be construed\r\n as modifying the License.\r\n\r\n You may add Your own copyright statement to Your modifications and\r\n may provide additional or different license terms and conditions\r\n for use, reproduction, or distribution of Your modifications, or\r\n for any such Derivative Works as a whole, provided Your use,\r\n reproduction, and distribution of the Work otherwise complies with\r\n the conditions stated in this License.\r\n\r\n 5. Submission of Contributions. Unless You explicitly state otherwise,\r\n any Contribution intentionally submitted for inclusion in the Work\r\n by You to the Licensor shall be under the terms and conditions of\r\n this License, without any additional terms or conditions.\r\n Notwithstanding the above, nothing herein shall supersede or modify\r\n the terms of any separate license agreement you may have executed\r\n with Licensor regarding such Contributions.\r\n\r\n 6. Trademarks. This License does not grant permission to use the trade\r\n names, trademarks, service marks, or product names of the Licensor,\r\n except as required for reasonable and customary use in describing the\r\n origin of the Work and reproducing the content of the NOTICE file.\r\n\r\n 7. Disclaimer of Warranty. Unless required by applicable law or\r\n agreed to in writing, Licensor provides the Work (and each\r\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r\n implied, including, without limitation, any warranties or conditions\r\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r\n PARTICULAR PURPOSE. You are solely responsible for determining the\r\n appropriateness of using or redistributing the Work and assume any\r\n risks associated with Your exercise of permissions under this License.\r\n\r\n 8. Limitation of Liability. In no event and under no legal theory,\r\n whether in tort (including negligence), contract, or otherwise,\r\n unless required by applicable law (such as deliberate and grossly\r\n negligent acts) or agreed to in writing, shall any Contributor be\r\n liable to You for damages, including any direct, indirect, special,\r\n incidental, or consequential damages of any character arising as a\r\n result of this License or out of the use or inability to use the\r\n Work (including but not limited to damages for loss of goodwill,\r\n work stoppage, computer failure or malfunction, or any and all\r\n other commercial damages or losses), even if such Contributor\r\n has been advised of the possibility of such damages.\r\n\r\n 9. Accepting Warranty or Additional Liability. While redistributing\r\n the Work or Derivative Works thereof, You may choose to offer,\r\n and charge a fee for, acceptance of support, warranty, indemnity,\r\n or other liability obligations and/or rights consistent with this\r\n License. However, in accepting such obligations, You may act only\r\n on Your own behalf and on Your sole responsibility, not on behalf\r\n of any other Contributor, and only if You agree to indemnify,\r\n defend, and hold each Contributor harmless for any liability\r\n incurred by, or claims asserted against, such Contributor by reason\r\n of your accepting any such warranty or additional liability.\r\n\r\n END OF TERMS AND CONDITIONS"},"0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9":{"hash":"0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9","name":"Apache License 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0","spdxId":"Apache-2.0","content":"\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS"}}} \ No newline at end of file diff --git a/entry/src/main/resources/rawfile/osslibraries.msgpack b/entry/src/main/resources/rawfile/osslibraries.msgpack new file mode 100644 index 0000000..312ee3c --- /dev/null +++ b/entry/src/main/resources/rawfile/osslibraries.msgpack @@ -0,0 +1,485 @@ +‚©libraries–‹¨uniqueId¬@ohos/hamock¯artifactVersion¥1.0.0¤name¬@ohos/hamock«descriptionÙ-A mock framework for OpenHarmony application.§website ªdevelopers‘‚¤name¦huawei¯organisationUrl £scmÀ¬organizationÀ§funding�£tag�¨licenses‘Ù@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef‹¨uniqueId¬@ohos/hypium¯artifactVersion¦1.0.28¤name¬@ohos/hypium«descriptionÙ1A unit test framework for OpenHarmony application§websiteÙ.https://gitee.com/openharmony/testfwk_arkxtestªdevelopers‘‚¤name¦huawei¯organisationUrl £scmƒªconnection ³developerConnection £urlÙ.https://gitee.com/openharmony/testfwk_arkxtest¬organizationÀ§funding�£tag“¬测试框架¦except¤mock¨licenses‘Ù@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9‹¨uniqueId­@ohos/msgpack¯artifactVersion¥1.0.2¤name­@ohos/msgpack«descriptionَThis library is an implementation of MessagePack for TypeScript and JavaScript, providing a compact and efficient binary serialization format.§website ªdevelopers‘‚¤name¨ohos_tpc¯organisationUrl £scmƒªconnection ³developerConnection £urlÙThttps://gitcode.com/openharmony-tpc/openharmony_tpc_samples/tree/master/ohos_msgpack¬organizationÀ§funding�£tag“§msgpack©HarmonyOS«OpenHarmony¨licenses‘Ù@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca‹¨uniqueId¬osslibraries¯artifactVersion¥0.0.4¤name¬osslibraries«descriptionÙo适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的 Core 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding�£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId¯osslibraries_ui¯artifactVersion¥0.0.7¤name¯osslibraries_ui«descriptionÙv适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding�£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId´osslibraries_ui_wear¯artifactVersion¥0.0.3¤name´osslibraries_ui_wear«descriptionى一个适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI(Wearable)部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding�£tag—¬osslibraries§license¨licenses«open-source£oss¨wearable¤wear¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¨licenses„Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2…¤hashÙ@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¤nameÙ,Mulan Permissive Software License, Version 2£urlÙ&https://license.coscl.org.cn/MulanPSL2¦spdxId¬MulanPSL-2.0§contentÚ$! 木兰宽松许可证, 第2版 + +木兰宽松许可证, 第2版 +2020年1月 http://license.coscl.org.cn/MulanPSL2 + +您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束: + +0. 定义 + +“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 + +“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 + +“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 + +“法人实体” 是指提交贡献的机构及其“关联实体”。 + +“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 + +1. 授予版权许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 + +2. 授予专利许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 + +3. 无商标许可 + +“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 + +4. 分发限制 + +您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 + +5. 免责声明与责任限制 + +“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 + +6. 语言 + +“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 + +条款结束 + +如何将木兰宽松许可证,第2版,应用到您的软件 + +如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步: + +1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; + +2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; + +3, 请将如下声明文本放入每个源文件的头部注释中。 + +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. + + + Mulan Permissive Software License,Version 2 + +Mulan Permissive Software License,Version 2 (Mulan PSL v2) +January 2020 http://license.coscl.org.cn/MulanPSL2 + +Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions: + +0. Definition + +Software means the program and related documents which are licensed under this License and comprise all Contribution(s). + +Contribution means the copyrightable work licensed by a particular Contributor under this License. + +Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. + +Legal Entity means the entity making a Contribution and all its Affiliates. + +Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. + +1. Grant of Copyright License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. + +2. Grant of Patent License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. + +3. No Trademark License + +No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4. + +4. Distribution Restriction + +You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. + +5. Disclaimer of Warranty and Limitation of Liability + +THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +6. Language + +THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. + +END OF THE TERMS AND CONDITIONS + +How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software + +To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps: + +Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; +Create a file named "LICENSE" which contains the whole context of this License in the first directory of your software package; +Attach the statement to the appropriate annotated syntax at the beginning of each source file. + +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. +Ù@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef…¤hashÙ@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef¤name²Apache License 2.0£urlÙ+https://www.apache.org/licenses/LICENSE-2.0¦spdxIdªApache-2.0§contentÚ(m + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONSÙ@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9…¤hashÙ@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9¤name²Apache License 2.0£urlÙ+https://www.apache.org/licenses/LICENSE-2.0¦spdxIdªApache-2.0§contentÚ'½ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONSÙ@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca…¤hashÙ@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca¤name«ISC License£url ¦spdxId §contentÚéCopyright 2019 The MessagePack Community. + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +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. diff --git a/entry_wear/hvigorfile.ts b/entry_wear/hvigorfile.ts index 7dd22c5..e533646 100644 --- a/entry_wear/hvigorfile.ts +++ b/entry_wear/hvigorfile.ts @@ -1,7 +1,9 @@ import { hapTasks } from "@ohos/hvigor-ohos-plugin"; -import { ossScanPlugin } from "osslibraries-hvigor-plugin"; +import { ossScanPlugin, OutputFormat } from "osslibraries-hvigor-plugin"; export default { system: hapTasks /* Built-in plugin of Hvigor. It cannot be modified. */, - plugins: [ossScanPlugin()] /* Scan OHPM deps and generate osslibraries.json at build time. */, + plugins: [ + ossScanPlugin({ format: OutputFormat.MessagePack }), + ] /* Scan OHPM deps and generate osslibraries.msgpack at build time. */, }; diff --git a/entry_wear/oh-package-lock.json5 b/entry_wear/oh-package-lock.json5 index 8699643..518e356 100644 --- a/entry_wear/oh-package-lock.json5 +++ b/entry_wear/oh-package-lock.json5 @@ -6,24 +6,35 @@ "lockfileVersion": 3, "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "specifiers": { - "osslibraries@^0.0.3": "osslibraries@0.0.3", + "@ohos/msgpack@1.0.2": "@ohos/msgpack@1.0.2", + "osslibraries@^0.0.4": "osslibraries@0.0.4", "osslibraries_ui_wear@../osslibraries_ui_wear": "osslibraries_ui_wear@../osslibraries_ui_wear" }, "packages": { - "osslibraries@0.0.3": { - "name": "osslibraries", - "version": "0.0.3", - "integrity": "sha512-vZZ/vVLbUepiLBG22i/FHmML6VGIDAr4cElyOHaqVfRDQjCHRE5auln0sZmJv98BHqz/qNhYSN4rYB6DYmvxkA==", - "resolved": "https://ohpm.openharmony.cn/ohpm/osslibraries/-/osslibraries-0.0.3.har", + "@ohos/msgpack@1.0.2": { + "name": "@ohos/msgpack", + "version": "1.0.2", + "integrity": "sha512-oWYunyTZzkQSqHptn4OPuiN8KTPP/2Z2PCCoRxIFX2tKX13cfKvI7a775gCR/1IpyMfn2CgX/8gUcJIxspOp4g==", + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/msgpack/-/msgpack-1.0.2.har", "registryType": "ohpm" }, + "osslibraries@0.0.4": { + "name": "osslibraries", + "version": "0.0.4", + "integrity": "sha512-uYjT40tdLrLBxkqgqkFcZXIsJVgXDd90tm79QltCsFsZLNRy/Pv1XcOt9WeUr/vPdpDRvHPfIQsmHW1wNOGErw==", + "resolved": "https://ohpm.openharmony.cn/ohpm/osslibraries/-/osslibraries-0.0.4.har", + "registryType": "ohpm", + "dependencies": { + "@ohos/msgpack": "1.0.2" + } + }, "osslibraries_ui_wear@../osslibraries_ui_wear": { "name": "osslibraries_ui_wear", - "version": "0.0.2", + "version": "0.0.3", "resolved": "../osslibraries_ui_wear", "registryType": "local", "dependencies": { - "osslibraries": "^0.0.3" + "osslibraries": "^0.0.4" } } } diff --git a/entry_wear/src/main/resources/rawfile/osslibraries.json b/entry_wear/src/main/resources/rawfile/osslibraries.json deleted file mode 100644 index ca8687b..0000000 --- a/entry_wear/src/main/resources/rawfile/osslibraries.json +++ /dev/null @@ -1 +0,0 @@ -{"libraries":[{"uniqueId":"@ohos/hamock","artifactVersion":"1.0.0","name":"@ohos/hamock","description":"A mock framework for OpenHarmony application.","website":"","developers":[{"name":"huawei","organisationUrl":""}],"scm":null,"organization":null,"funding":[],"tag":[],"licenses":["9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef"]},{"uniqueId":"@ohos/hypium","artifactVersion":"1.0.28","name":"@ohos/hypium","description":"A unit test framework for OpenHarmony application","website":"https://gitee.com/openharmony/testfwk_arkxtest","developers":[{"name":"huawei","organisationUrl":""}],"scm":{"connection":"","developerConnection":"","url":"https://gitee.com/openharmony/testfwk_arkxtest"},"organization":null,"funding":[],"tag":["测试框架","except","mock"],"licenses":["0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9"]},{"uniqueId":"osslibraries","artifactVersion":"0.0.3","name":"osslibraries","description":"适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的 Core 部分。","website":"https://github.com/composable-tu/osslibraries","developers":[{"name":"composable-tu","organisationUrl":"https://github.com/composable-tu"}],"scm":{"connection":"","developerConnection":"","url":"https://github.com/composable-tu/osslibraries"},"organization":null,"funding":[],"tag":["osslibraries","license","licenses","open-source","oss"],"licenses":["533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2"]},{"uniqueId":"osslibraries_ui","artifactVersion":"0.0.6","name":"osslibraries_ui","description":"适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。","website":"https://github.com/composable-tu/osslibraries","developers":[{"name":"composable-tu","organisationUrl":"https://github.com/composable-tu"}],"scm":{"connection":"","developerConnection":"","url":"https://github.com/composable-tu/osslibraries"},"organization":null,"funding":[],"tag":["osslibraries","license","licenses","open-source","oss"],"licenses":["533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2"]},{"uniqueId":"osslibraries_ui_wear","artifactVersion":"0.0.2","name":"osslibraries_ui_wear","description":"一个适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI(Wearable)部分。","website":"https://github.com/composable-tu/osslibraries","developers":[{"name":"composable-tu","organisationUrl":"https://github.com/composable-tu"}],"scm":{"connection":"","developerConnection":"","url":"https://github.com/composable-tu/osslibraries"},"organization":null,"funding":[],"tag":["osslibraries","license","licenses","open-source","oss","wearable","wear"],"licenses":["533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2"]}],"licenses":{"533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2":{"hash":"533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2","name":"Mulan Permissive Software License, Version 2","url":"https://license.coscl.org.cn/MulanPSL2","spdxId":"MulanPSL-2.0","content":" 木兰宽松许可证, 第2版\n\n木兰宽松许可证, 第2版\n2020年1月 http://license.coscl.org.cn/MulanPSL2\n\n您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束:\n\n0. 定义\n\n“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。\n\n“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。\n\n“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。\n\n“法人实体” 是指提交贡献的机构及其“关联实体”。\n\n“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。\n\n1. 授予版权许可\n\n每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。\n\n2. 授予专利许可\n\n每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。\n\n3. 无商标许可\n\n“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。\n\n4. 分发限制\n\n您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。\n\n5. 免责声明与责任限制\n\n“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。\n\n6. 语言\n\n“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。\n\n条款结束\n\n如何将木兰宽松许可证,第2版,应用到您的软件\n\n如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步:\n\n1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;\n\n2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中;\n\n3, 请将如下声明文本放入每个源文件的头部注释中。\n\nCopyright (c) [Year] [name of copyright holder]\n[Software Name] is licensed under Mulan PSL v2.\nYou can use this software according to the terms and conditions of the Mulan PSL v2.\nYou may obtain a copy of Mulan PSL v2 at:\n http://license.coscl.org.cn/MulanPSL2\nTHIS SOFTWARE IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OF ANY KIND,\nEITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,\nMERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.\nSee the Mulan PSL v2 for more details.\n\n\n Mulan Permissive Software License,Version 2\n\nMulan Permissive Software License,Version 2 (Mulan PSL v2)\nJanuary 2020 http://license.coscl.org.cn/MulanPSL2\n\nYour reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:\n\n0. Definition\n\nSoftware means the program and related documents which are licensed under this License and comprise all Contribution(s).\n\nContribution means the copyrightable work licensed by a particular Contributor under this License.\n\nContributor means the Individual or Legal Entity who licenses its copyrightable work under this License.\n\nLegal Entity means the entity making a Contribution and all its Affiliates.\n\nAffiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.\n\n1. Grant of Copyright License\n\nSubject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.\n\n2. Grant of Patent License\n\nSubject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.\n\n3. No Trademark License\n\nNo trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4.\n\n4. Distribution Restriction\n\nYou may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.\n\n5. Disclaimer of Warranty and Limitation of Liability\n\nTHE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n6. Language\n\nTHIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.\n\nEND OF THE TERMS AND CONDITIONS\n\nHow to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software\n\nTo apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps:\n\nFill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner;\nCreate a file named \"LICENSE\" which contains the whole context of this License in the first directory of your software package;\nAttach the statement to the appropriate annotated syntax at the beginning of each source file.\n\nCopyright (c) [Year] [name of copyright holder]\n[Software Name] is licensed under Mulan PSL v2.\nYou can use this software according to the terms and conditions of the Mulan PSL v2.\nYou may obtain a copy of Mulan PSL v2 at:\n http://license.coscl.org.cn/MulanPSL2\nTHIS SOFTWARE IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OF ANY KIND,\nEITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,\nMERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.\nSee the Mulan PSL v2 for more details.\n"},"9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef":{"hash":"9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef","name":"Apache License 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0","spdxId":"Apache-2.0","content":"\r\n Apache License\r\n Version 2.0, January 2004\r\n http://www.apache.org/licenses/\r\n\r\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r\n\r\n 1. Definitions.\r\n\r\n \"License\" shall mean the terms and conditions for use, reproduction,\r\n and distribution as defined by Sections 1 through 9 of this document.\r\n\r\n \"Licensor\" shall mean the copyright owner or entity authorized by\r\n the copyright owner that is granting the License.\r\n\r\n \"Legal Entity\" shall mean the union of the acting entity and all\r\n other entities that control, are controlled by, or are under common\r\n control with that entity. For the purposes of this definition,\r\n \"control\" means (i) the power, direct or indirect, to cause the\r\n direction or management of such entity, whether by contract or\r\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\r\n outstanding shares, or (iii) beneficial ownership of such entity.\r\n\r\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\r\n exercising permissions granted by this License.\r\n\r\n \"Source\" form shall mean the preferred form for making modifications,\r\n including but not limited to software source code, documentation\r\n source, and configuration files.\r\n\r\n \"Object\" form shall mean any form resulting from mechanical\r\n transformation or translation of a Source form, including but\r\n not limited to compiled object code, generated documentation,\r\n and conversions to other media types.\r\n\r\n \"Work\" shall mean the work of authorship, whether in Source or\r\n Object form, made available under the License, as indicated by a\r\n copyright notice that is included in or attached to the work\r\n (an example is provided in the Appendix below).\r\n\r\n \"Derivative Works\" shall mean any work, whether in Source or Object\r\n form, that is based on (or derived from) the Work and for which the\r\n editorial revisions, annotations, elaborations, or other modifications\r\n represent, as a whole, an original work of authorship. For the purposes\r\n of this License, Derivative Works shall not include works that remain\r\n separable from, or merely link (or bind by name) to the interfaces of,\r\n the Work and Derivative Works thereof.\r\n\r\n \"Contribution\" shall mean any work of authorship, including\r\n the original version of the Work and any modifications or additions\r\n to that Work or Derivative Works thereof, that is intentionally\r\n submitted to Licensor for inclusion in the Work by the copyright owner\r\n or by an individual or Legal Entity authorized to submit on behalf of\r\n the copyright owner. For the purposes of this definition, \"submitted\"\r\n means any form of electronic, verbal, or written communication sent\r\n to the Licensor or its representatives, including but not limited to\r\n communication on electronic mailing lists, source code control systems,\r\n and issue tracking systems that are managed by, or on behalf of, the\r\n Licensor for the purpose of discussing and improving the Work, but\r\n excluding communication that is conspicuously marked or otherwise\r\n designated in writing by the copyright owner as \"Not a Contribution.\"\r\n\r\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\r\n on behalf of whom a Contribution has been received by Licensor and\r\n subsequently incorporated within the Work.\r\n\r\n 2. Grant of Copyright License. Subject to the terms and conditions of\r\n this License, each Contributor hereby grants to You a perpetual,\r\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r\n copyright license to reproduce, prepare Derivative Works of,\r\n publicly display, publicly perform, sublicense, and distribute the\r\n Work and such Derivative Works in Source or Object form.\r\n\r\n 3. Grant of Patent License. Subject to the terms and conditions of\r\n this License, each Contributor hereby grants to You a perpetual,\r\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r\n (except as stated in this section) patent license to make, have made,\r\n use, offer to sell, sell, import, and otherwise transfer the Work,\r\n where such license applies only to those patent claims licensable\r\n by such Contributor that are necessarily infringed by their\r\n Contribution(s) alone or by combination of their Contribution(s)\r\n with the Work to which such Contribution(s) was submitted. If You\r\n institute patent litigation against any entity (including a\r\n cross-claim or counterclaim in a lawsuit) alleging that the Work\r\n or a Contribution incorporated within the Work constitutes direct\r\n or contributory patent infringement, then any patent licenses\r\n granted to You under this License for that Work shall terminate\r\n as of the date such litigation is filed.\r\n\r\n 4. Redistribution. You may reproduce and distribute copies of the\r\n Work or Derivative Works thereof in any medium, with or without\r\n modifications, and in Source or Object form, provided that You\r\n meet the following conditions:\r\n\r\n (a) You must give any other recipients of the Work or\r\n Derivative Works a copy of this License; and\r\n\r\n (b) You must cause any modified files to carry prominent notices\r\n stating that You changed the files; and\r\n\r\n (c) You must retain, in the Source form of any Derivative Works\r\n that You distribute, all copyright, patent, trademark, and\r\n attribution notices from the Source form of the Work,\r\n excluding those notices that do not pertain to any part of\r\n the Derivative Works; and\r\n\r\n (d) If the Work includes a \"NOTICE\" text file as part of its\r\n distribution, then any Derivative Works that You distribute must\r\n include a readable copy of the attribution notices contained\r\n within such NOTICE file, excluding those notices that do not\r\n pertain to any part of the Derivative Works, in at least one\r\n of the following places: within a NOTICE text file distributed\r\n as part of the Derivative Works; within the Source form or\r\n documentation, if provided along with the Derivative Works; or,\r\n within a display generated by the Derivative Works, if and\r\n wherever such third-party notices normally appear. The contents\r\n of the NOTICE file are for informational purposes only and\r\n do not modify the License. You may add Your own attribution\r\n notices within Derivative Works that You distribute, alongside\r\n or as an addendum to the NOTICE text from the Work, provided\r\n that such additional attribution notices cannot be construed\r\n as modifying the License.\r\n\r\n You may add Your own copyright statement to Your modifications and\r\n may provide additional or different license terms and conditions\r\n for use, reproduction, or distribution of Your modifications, or\r\n for any such Derivative Works as a whole, provided Your use,\r\n reproduction, and distribution of the Work otherwise complies with\r\n the conditions stated in this License.\r\n\r\n 5. Submission of Contributions. Unless You explicitly state otherwise,\r\n any Contribution intentionally submitted for inclusion in the Work\r\n by You to the Licensor shall be under the terms and conditions of\r\n this License, without any additional terms or conditions.\r\n Notwithstanding the above, nothing herein shall supersede or modify\r\n the terms of any separate license agreement you may have executed\r\n with Licensor regarding such Contributions.\r\n\r\n 6. Trademarks. This License does not grant permission to use the trade\r\n names, trademarks, service marks, or product names of the Licensor,\r\n except as required for reasonable and customary use in describing the\r\n origin of the Work and reproducing the content of the NOTICE file.\r\n\r\n 7. Disclaimer of Warranty. Unless required by applicable law or\r\n agreed to in writing, Licensor provides the Work (and each\r\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r\n implied, including, without limitation, any warranties or conditions\r\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r\n PARTICULAR PURPOSE. You are solely responsible for determining the\r\n appropriateness of using or redistributing the Work and assume any\r\n risks associated with Your exercise of permissions under this License.\r\n\r\n 8. Limitation of Liability. In no event and under no legal theory,\r\n whether in tort (including negligence), contract, or otherwise,\r\n unless required by applicable law (such as deliberate and grossly\r\n negligent acts) or agreed to in writing, shall any Contributor be\r\n liable to You for damages, including any direct, indirect, special,\r\n incidental, or consequential damages of any character arising as a\r\n result of this License or out of the use or inability to use the\r\n Work (including but not limited to damages for loss of goodwill,\r\n work stoppage, computer failure or malfunction, or any and all\r\n other commercial damages or losses), even if such Contributor\r\n has been advised of the possibility of such damages.\r\n\r\n 9. Accepting Warranty or Additional Liability. While redistributing\r\n the Work or Derivative Works thereof, You may choose to offer,\r\n and charge a fee for, acceptance of support, warranty, indemnity,\r\n or other liability obligations and/or rights consistent with this\r\n License. However, in accepting such obligations, You may act only\r\n on Your own behalf and on Your sole responsibility, not on behalf\r\n of any other Contributor, and only if You agree to indemnify,\r\n defend, and hold each Contributor harmless for any liability\r\n incurred by, or claims asserted against, such Contributor by reason\r\n of your accepting any such warranty or additional liability.\r\n\r\n END OF TERMS AND CONDITIONS"},"0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9":{"hash":"0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9","name":"Apache License 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0","spdxId":"Apache-2.0","content":"\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS"}}} \ No newline at end of file diff --git a/entry_wear/src/main/resources/rawfile/osslibraries.msgpack b/entry_wear/src/main/resources/rawfile/osslibraries.msgpack new file mode 100644 index 0000000..312ee3c --- /dev/null +++ b/entry_wear/src/main/resources/rawfile/osslibraries.msgpack @@ -0,0 +1,485 @@ +‚©libraries–‹¨uniqueId¬@ohos/hamock¯artifactVersion¥1.0.0¤name¬@ohos/hamock«descriptionÙ-A mock framework for OpenHarmony application.§website ªdevelopers‘‚¤name¦huawei¯organisationUrl £scmÀ¬organizationÀ§funding�£tag�¨licenses‘Ù@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef‹¨uniqueId¬@ohos/hypium¯artifactVersion¦1.0.28¤name¬@ohos/hypium«descriptionÙ1A unit test framework for OpenHarmony application§websiteÙ.https://gitee.com/openharmony/testfwk_arkxtestªdevelopers‘‚¤name¦huawei¯organisationUrl £scmƒªconnection ³developerConnection £urlÙ.https://gitee.com/openharmony/testfwk_arkxtest¬organizationÀ§funding�£tag“¬测试框架¦except¤mock¨licenses‘Ù@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9‹¨uniqueId­@ohos/msgpack¯artifactVersion¥1.0.2¤name­@ohos/msgpack«descriptionَThis library is an implementation of MessagePack for TypeScript and JavaScript, providing a compact and efficient binary serialization format.§website ªdevelopers‘‚¤name¨ohos_tpc¯organisationUrl £scmƒªconnection ³developerConnection £urlÙThttps://gitcode.com/openharmony-tpc/openharmony_tpc_samples/tree/master/ohos_msgpack¬organizationÀ§funding�£tag“§msgpack©HarmonyOS«OpenHarmony¨licenses‘Ù@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca‹¨uniqueId¬osslibraries¯artifactVersion¥0.0.4¤name¬osslibraries«descriptionÙo适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的 Core 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding�£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId¯osslibraries_ui¯artifactVersion¥0.0.7¤name¯osslibraries_ui«descriptionÙv适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding�£tag•¬osslibraries§license¨licenses«open-source£oss¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2‹¨uniqueId´osslibraries_ui_wear¯artifactVersion¥0.0.3¤name´osslibraries_ui_wear«descriptionى一个适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI(Wearable)部分。§websiteÙ-https://github.com/composable-tu/osslibrariesªdevelopers‘‚¤name­composable-tu¯organisationUrlÙ https://github.com/composable-tu£scmƒªconnection ³developerConnection £urlÙ-https://github.com/composable-tu/osslibraries¬organizationÀ§funding�£tag—¬osslibraries§license¨licenses«open-source£oss¨wearable¤wear¨licenses‘Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¨licenses„Ù@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2…¤hashÙ@533c62b51f490ec5ba0118d19bb2caef961c3b630bf4355eb1e360026db6fda2¤nameÙ,Mulan Permissive Software License, Version 2£urlÙ&https://license.coscl.org.cn/MulanPSL2¦spdxId¬MulanPSL-2.0§contentÚ$! 木兰宽松许可证, 第2版 + +木兰宽松许可证, 第2版 +2020年1月 http://license.coscl.org.cn/MulanPSL2 + +您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束: + +0. 定义 + +“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 + +“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 + +“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 + +“法人实体” 是指提交贡献的机构及其“关联实体”。 + +“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 + +1. 授予版权许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 + +2. 授予专利许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 + +3. 无商标许可 + +“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 + +4. 分发限制 + +您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 + +5. 免责声明与责任限制 + +“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 + +6. 语言 + +“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 + +条款结束 + +如何将木兰宽松许可证,第2版,应用到您的软件 + +如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步: + +1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; + +2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; + +3, 请将如下声明文本放入每个源文件的头部注释中。 + +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. + + + Mulan Permissive Software License,Version 2 + +Mulan Permissive Software License,Version 2 (Mulan PSL v2) +January 2020 http://license.coscl.org.cn/MulanPSL2 + +Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions: + +0. Definition + +Software means the program and related documents which are licensed under this License and comprise all Contribution(s). + +Contribution means the copyrightable work licensed by a particular Contributor under this License. + +Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. + +Legal Entity means the entity making a Contribution and all its Affiliates. + +Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. + +1. Grant of Copyright License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. + +2. Grant of Patent License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. + +3. No Trademark License + +No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4. + +4. Distribution Restriction + +You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. + +5. Disclaimer of Warranty and Limitation of Liability + +THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +6. Language + +THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. + +END OF THE TERMS AND CONDITIONS + +How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software + +To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps: + +Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; +Create a file named "LICENSE" which contains the whole context of this License in the first directory of your software package; +Attach the statement to the appropriate annotated syntax at the beginning of each source file. + +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. +Ù@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef…¤hashÙ@9264a6b3c134511ccfcae48ed3808320688ae6933ec4fc547476a005095fc1ef¤name²Apache License 2.0£urlÙ+https://www.apache.org/licenses/LICENSE-2.0¦spdxIdªApache-2.0§contentÚ(m + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONSÙ@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9…¤hashÙ@0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9¤name²Apache License 2.0£urlÙ+https://www.apache.org/licenses/LICENSE-2.0¦spdxIdªApache-2.0§contentÚ'½ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONSÙ@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca…¤hashÙ@a0ecad9e3fd75dcac83c89ffe78180c784d47a37db94b87e18bd1a43e0f247ca¤name«ISC License£url ¦spdxId §contentÚéCopyright 2019 The MessagePack Community. + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +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. diff --git a/oh-package.json5 b/oh-package.json5 index 165badb..5466c12 100644 --- a/oh-package.json5 +++ b/oh-package.json5 @@ -1,10 +1,10 @@ { - "modelVersion": "6.1.1", - "description": "Please describe the basic information.", - "dependencies": {}, - "devDependencies": { + modelVersion: "6.1.1", + description: "Please describe the basic information.", + dependencies: {}, + devDependencies: { "@ohos/hypium": "1.0.28", - "@ohos/hamock": "1.0.0" + "@ohos/hamock": "1.0.0", }, - "dynamicDependencies": {} -} \ No newline at end of file + dynamicDependencies: {}, +} diff --git a/osslibraries/BuildProfile.ets b/osslibraries/BuildProfile.ets index e7c35ca..dc2b129 100644 --- a/osslibraries/BuildProfile.ets +++ b/osslibraries/BuildProfile.ets @@ -1,7 +1,7 @@ /** * Use these variables when you tailor your ArkTS code. They must be of the const type. */ -export const HAR_VERSION = '0.0.3'; +export const HAR_VERSION = '0.0.4'; export const BUILD_MODE_NAME = 'debug'; export const DEBUG = true; export const TARGET_NAME = 'default'; diff --git a/osslibraries/Index.ets b/osslibraries/Index.ets index f991611..28f8cd4 100644 --- a/osslibraries/Index.ets +++ b/osslibraries/Index.ets @@ -21,4 +21,5 @@ export { Funding } from './src/main/ets/entity/Funding'; export { Libs } from './src/main/ets/Libs'; export { Parser, ParseResult } from './src/main/ets/util/Parser'; export { LibsHolder } from './src/main/ets/util/LibsHolder'; +export { LibsLoader } from './src/main/ets/util/LibsLoader'; export { SortUtil } from './src/main/ets/util/SortUtil'; diff --git a/osslibraries/README.md b/osslibraries/README.md index 0d393bb..245be1c 100644 --- a/osslibraries/README.md +++ b/osslibraries/README.md @@ -69,20 +69,15 @@ export default { ### 使用 -然后,在自定义页面中按以下方法读取 `osslibraries.json`: +`osslibraries` 包负责加载与解析数据,UI 层调用 `LibsLoader.fromRawfile(context)` 即可拿到 `Libs` 实例: ```ets -import { util } from '@kit.ArkTS'; import { common } from '@kit.AbilityKit'; -import { Libs, LibsHolder } from 'osslibraries'; +import { Libs, LibsHolder, LibsLoader } from 'osslibraries'; -// 读 osslibraries.json const context: common.Context = this.getUIContext().getHostContext() as common.Context; -const content: Uint8Array = await context.resourceManager.getRawFileContent('osslibraries.json'); -const json: string = util.TextDecoder.create('utf-8').decode(content); -// 解析 JSON -const libs: Libs = Libs.fromJson(json); +const libs: Libs = await LibsLoader.fromRawfile(context); // 查找某个库 const lib = libs.findLibrary('@ohos/hypium'); diff --git a/osslibraries/changelog.md b/osslibraries/changelog.md index 88f91f0..454c62a 100644 --- a/osslibraries/changelog.md +++ b/osslibraries/changelog.md @@ -1,5 +1,10 @@ # Changelog +## v0.0.4 + +- 新增:MessagePack(`osslibraries.msgpack`)解析能力。 +- 新增:`LibsLoader.fromRawfile(context)` 能力,确保 UI 层调用即获取数据。 + ## v0.0.3 - 同步 `osslibraries-hvigor-plugin` 上游更改,将 `tag` 字段从 `string` 类型修改为 `string[]` 类型。 diff --git a/osslibraries/consumer-rules.txt b/osslibraries/consumer-rules.txt index e69de29..95f2ac6 100644 --- a/osslibraries/consumer-rules.txt +++ b/osslibraries/consumer-rules.txt @@ -0,0 +1,4 @@ +# 消费者混淆规则:使用本库的宿主应用开启混淆时自动应用。 +# 保留 @ohos/msgpack,避免混淆导致 MessagePack 编解码失效。 +-keep +./oh_modules/@ohos/msgpack diff --git a/osslibraries/obfuscation-rules.txt b/osslibraries/obfuscation-rules.txt index 1e7e54e..2350e42 100644 --- a/osslibraries/obfuscation-rules.txt +++ b/osslibraries/obfuscation-rules.txt @@ -20,4 +20,8 @@ -enable-property-obfuscation -enable-toplevel-obfuscation -enable-filename-obfuscation --enable-export-obfuscation \ No newline at end of file +-enable-export-obfuscation + +# 保留 @ohos/msgpack,避免混淆导致 MessagePack 编解码失效 +-keep +./oh_modules/@ohos/msgpack \ No newline at end of file diff --git a/osslibraries/oh-package-lock.json5 b/osslibraries/oh-package-lock.json5 new file mode 100644 index 0000000..5a3fbe0 --- /dev/null +++ b/osslibraries/oh-package-lock.json5 @@ -0,0 +1,20 @@ +{ + "meta": { + "stableOrder": true, + "enableUnifiedLockfile": false + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/msgpack@1.0.2": "@ohos/msgpack@1.0.2" + }, + "packages": { + "@ohos/msgpack@1.0.2": { + "name": "@ohos/msgpack", + "version": "1.0.2", + "integrity": "sha512-oWYunyTZzkQSqHptn4OPuiN8KTPP/2Z2PCCoRxIFX2tKX13cfKvI7a775gCR/1IpyMfn2CgX/8gUcJIxspOp4g==", + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/msgpack/-/msgpack-1.0.2.har", + "registryType": "ohpm" + } + } +} \ No newline at end of file diff --git a/osslibraries/oh-package.json5 b/osslibraries/oh-package.json5 index 6dbdb48..984072f 100644 --- a/osslibraries/oh-package.json5 +++ b/osslibraries/oh-package.json5 @@ -1,6 +1,6 @@ { name: "osslibraries", - version: "0.0.3", + version: "0.0.4", description: "适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的 Core 部分。", main: "Index.ets", author: { @@ -11,5 +11,7 @@ homepage: "https://github.com/composable-tu/osslibraries", repository: "https://github.com/composable-tu/osslibraries", keywords: ["osslibraries", "license", "licenses", "open-source", "oss"], - dependencies: {}, + dependencies: { + "@ohos/msgpack": "1.0.2", + }, } diff --git a/osslibraries/src/main/ets/Libs.ets b/osslibraries/src/main/ets/Libs.ets index 7099453..4e0ff2b 100644 --- a/osslibraries/src/main/ets/Libs.ets +++ b/osslibraries/src/main/ets/Libs.ets @@ -63,4 +63,14 @@ export class Libs { const sorted: Library[] = result.libraries.sort(SortUtil.compareLibraryByName); return new Libs(sorted, result.licenses); } + + /** + * Build a `Libs` instance from MessagePack binary data in OSSLibraries format. + * Libraries are sorted by name (case-insensitive). + */ + static fromMsgpack(bytes: Uint8Array): Libs { + const result: ParseResult = Parser.parseMsgpack(bytes); + const sorted: Library[] = result.libraries.sort(SortUtil.compareLibraryByName); + return new Libs(sorted, result.licenses); + } } diff --git a/osslibraries/src/main/ets/util/LibsLoader.ets b/osslibraries/src/main/ets/util/LibsLoader.ets new file mode 100644 index 0000000..a9d7d95 --- /dev/null +++ b/osslibraries/src/main/ets/util/LibsLoader.ets @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2026 composable-tu + * OSSLibraries is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + +import { util } from '@kit.ArkTS'; +import { common } from '@kit.AbilityKit'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { Libs } from '../Libs'; + +const LOG_DOMAIN: number = 0x0001; +const LOG_TAG: string = 'OSSLibraries.LibsLoader'; + +const MSGPACK_FILE: string = 'osslibraries.msgpack'; +const JSON_FILE: string = 'osslibraries.json'; + +/** + * 从 rawfile 加载 OSSLibraries 数据的助手。 + * + * 解析策略:优先查找并解析 `osslibraries.msgpack`(MessagePack 二进制,更小更快), + * 查找不到或解析失败时回退到 `osslibraries.json`。 + */ +export class LibsLoader { + /** + * 从指定模块上下文的 rawfile 中加载并解析许可证数据。 + * + * @param context 宿主模块上下文(通常通过 `getUIContext().getHostContext()` 获取)。 + * @returns 解析并按名称排序后的 `Libs` 实例。 + * @throws 当 msgpack 与 json 均不可用时,抛出最后一次(json)的加载异常。 + */ + static async fromRawfile(context: common.Context): Promise { + // --- 1. 优先尝试 MessagePack --- + try { + const bytes: Uint8Array = await context.resourceManager.getRawFileContent(MSGPACK_FILE); + if (bytes.length > 0) { + const libs: Libs = Libs.fromMsgpack(bytes); + hilog.info(LOG_DOMAIN, LOG_TAG, `loaded ${libs.libraries.length} libraries from ${MSGPACK_FILE}`); + return libs; + } + } catch (e) { + // msgpack 不存在或解析失败,记录底层错误后回退到 JSON,便于排查区分「文件缺失」与「解码错误」。 + const err: BusinessError = e as BusinessError; + hilog.warn(LOG_DOMAIN, LOG_TAG, + `${MSGPACK_FILE} unavailable (code=${err.code}, msg=${err.message}), falling back to ${JSON_FILE}`); + } + + // --- 2. 回退到 JSON --- + const content: Uint8Array = await context.resourceManager.getRawFileContent(JSON_FILE); + const decoder: util.TextDecoder = util.TextDecoder.create('utf-8'); + const json: string = decoder.decode(content); + const libs: Libs = Libs.fromJson(json); + hilog.info(LOG_DOMAIN, LOG_TAG, `loaded ${libs.libraries.length} libraries from ${JSON_FILE}`); + return libs; + } +} diff --git a/osslibraries/src/main/ets/util/Parser.ets b/osslibraries/src/main/ets/util/Parser.ets index a780a1b..ca5937f 100644 --- a/osslibraries/src/main/ets/util/Parser.ets +++ b/osslibraries/src/main/ets/util/Parser.ets @@ -16,6 +16,7 @@ import { Developer } from '../entity/Developer'; import { Organization } from '../entity/Organization'; import { Scm } from '../entity/Scm'; import { Funding } from '../entity/Funding'; +import { decode } from '@ohos/msgpack'; import { hilog } from '@kit.PerformanceAnalysisKit'; /** @@ -80,9 +81,9 @@ const LOG_DOMAIN: number = 0x0001; const LOG_TAG: string = 'OSSLibraries.Parser'; /** - * 将 OSSLibraries JSON 解析为 Library / License 对象。 + * 将 OSSLibraries JSON / MessagePack 解析为 Library / License 对象。 * - * JSON 结构: + * 数据结构(JSON 与 MessagePack 一致): * ``` * { * "libraries": [ { ..., "licenses": ["hash1", "hash2"] } ], @@ -99,6 +100,21 @@ export class Parser { */ static parse(json: string): ParseResult { const root: JsonRoot = JSON.parse(json) as JsonRoot; + return Parser.parseRoot(root); + } + + /** + * 解析 OSSLibraries 格式的 MessagePack 二进制数据。 + * + * MessagePack 解码后的结构与 JSON 一致(map 解码为对象、array 解码为数组), + * 因此可复用同一套解析逻辑。 + */ + static parseMsgpack(bytes: Uint8Array): ParseResult { + const root: JsonRoot = decode(bytes) as JsonRoot; + return Parser.parseRoot(root); + } + + private static parseRoot(root: JsonRoot): ParseResult { const result: ParseResult = new ParseResult(); // --- 先解析 licenses 映射,后续库条目可据此解析引用 --- diff --git a/osslibraries_ui/BuildProfile.ets b/osslibraries_ui/BuildProfile.ets index cc66d3c..2cdec8f 100644 --- a/osslibraries_ui/BuildProfile.ets +++ b/osslibraries_ui/BuildProfile.ets @@ -1,7 +1,7 @@ /** * Use these variables when you tailor your ArkTS code. They must be of the const type. */ -export const HAR_VERSION = '0.0.6'; +export const HAR_VERSION = '0.0.7'; export const BUILD_MODE_NAME = 'debug'; export const DEBUG = true; export const TARGET_NAME = 'default'; diff --git a/osslibraries_ui/README.md b/osslibraries_ui/README.md index ee9679e..7ee6d26 100644 --- a/osslibraries_ui/README.md +++ b/osslibraries_ui/README.md @@ -90,20 +90,15 @@ this.getUIContext().getRouter().pushNamedRoute({ ohpm install osslibraries ``` -然后,在自定义页面中按以下方法读取 `osslibraries.json`: +`osslibraries` 包负责数据加载与解析。在自定义页面中调用 `LibsLoader.fromRawfile(context)` 即可拿到排好序的 `Libs` 实例: ```ets -import { util } from '@kit.ArkTS'; import { common } from '@kit.AbilityKit'; -import { Libs, LibsHolder } from 'osslibraries'; +import { Libs, LibsHolder, LibsLoader } from 'osslibraries'; -// 读 osslibraries.json const context: common.Context = this.getUIContext().getHostContext() as common.Context; -const content: Uint8Array = await context.resourceManager.getRawFileContent('osslibraries.json'); -const json: string = util.TextDecoder.create('utf-8').decode(content); -// 解析 JSON -const libs: Libs = Libs.fromJson(json); +const libs: Libs = await LibsLoader.fromRawfile(context); // 查找某个库 const lib = libs.findLibrary('@ohos/hypium'); diff --git a/osslibraries_ui/changelog.md b/osslibraries_ui/changelog.md index f347677..2076861 100644 --- a/osslibraries_ui/changelog.md +++ b/osslibraries_ui/changelog.md @@ -1,5 +1,10 @@ # Changelog +## v0.0.7 + +- 列表页改用 `osslibraries` 的 `LibsLoader.fromRawfile` 加载数据。 +- 更新 `osslibraries` 上游依赖版本至 0.0.4。 + ## v0.0.6 - 修复:详情页 `openUrl` 中 `startAbility` 的 Promise reject 未捕获(静默失败)问题。 diff --git a/osslibraries_ui/oh-package-lock.json5 b/osslibraries_ui/oh-package-lock.json5 index ae41b2a..7ca9482 100644 --- a/osslibraries_ui/oh-package-lock.json5 +++ b/osslibraries_ui/oh-package-lock.json5 @@ -6,15 +6,26 @@ "lockfileVersion": 3, "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "specifiers": { - "osslibraries@^0.0.3": "osslibraries@0.0.3" + "@ohos/msgpack@1.0.2": "@ohos/msgpack@1.0.2", + "osslibraries@^0.0.4": "osslibraries@0.0.4" }, "packages": { - "osslibraries@0.0.3": { - "name": "osslibraries", - "version": "0.0.3", - "integrity": "sha512-vZZ/vVLbUepiLBG22i/FHmML6VGIDAr4cElyOHaqVfRDQjCHRE5auln0sZmJv98BHqz/qNhYSN4rYB6DYmvxkA==", - "resolved": "https://ohpm.openharmony.cn/ohpm/osslibraries/-/osslibraries-0.0.3.har", + "@ohos/msgpack@1.0.2": { + "name": "@ohos/msgpack", + "version": "1.0.2", + "integrity": "sha512-oWYunyTZzkQSqHptn4OPuiN8KTPP/2Z2PCCoRxIFX2tKX13cfKvI7a775gCR/1IpyMfn2CgX/8gUcJIxspOp4g==", + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/msgpack/-/msgpack-1.0.2.har", "registryType": "ohpm" + }, + "osslibraries@0.0.4": { + "name": "osslibraries", + "version": "0.0.4", + "integrity": "sha512-uYjT40tdLrLBxkqgqkFcZXIsJVgXDd90tm79QltCsFsZLNRy/Pv1XcOt9WeUr/vPdpDRvHPfIQsmHW1wNOGErw==", + "resolved": "https://ohpm.openharmony.cn/ohpm/osslibraries/-/osslibraries-0.0.4.har", + "registryType": "ohpm", + "dependencies": { + "@ohos/msgpack": "1.0.2" + } } } } \ No newline at end of file diff --git a/osslibraries_ui/oh-package.json5 b/osslibraries_ui/oh-package.json5 index cfdd414..d41048d 100644 --- a/osslibraries_ui/oh-package.json5 +++ b/osslibraries_ui/oh-package.json5 @@ -1,6 +1,6 @@ { name: "osslibraries_ui", - version: "0.0.6", + version: "0.0.7", description: "适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI 部分。", main: "Index.ets", author: { @@ -12,6 +12,6 @@ repository: "https://github.com/composable-tu/osslibraries", keywords: ["osslibraries", "license", "licenses", "open-source", "oss"], dependencies: { - osslibraries: "^0.0.3", + osslibraries: "^0.0.4", }, } diff --git a/osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseListPage.ets b/osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseListPage.ets index bc41dcd..0bd2abd 100644 --- a/osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseListPage.ets +++ b/osslibraries_ui/src/main/ets/pages/OSSLibrariesLicenseListPage.ets @@ -10,11 +10,10 @@ * See the Mulan PSL v2 for more details. */ -import { util } from '@kit.ArkTS'; import { common } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; -import { Libs, LibsHolder, Library } from 'osslibraries'; +import { Libs, LibsHolder, LibsLoader, Library } from 'osslibraries'; import { LicenseItem } from '../components/LicenseItem'; import { LicenseDetailParams } from '../model/RouteParams'; import { buildTitleBarOpts, getMaterialLevel } from '../components/TitleBarBuilder'; @@ -24,7 +23,8 @@ import { hdsMaterial, HdsNavigation, HdsNavigationTitleMode } from '@kit.UIDesig /** * 开源许可证列表页 * - * 数据从 rawfile/osslibraries.json 加载,通过 LibsHolder 跨页面共享。 + * 数据通过 core 的 LibsLoader 加载(优先 osslibraries.msgpack,回退 osslibraries.json), + * 通过 LibsHolder 跨页面共享。 */ @Entry({ routeName: 'OSSLibrariesLicenseListPage' }) @Component @@ -42,10 +42,7 @@ export struct OSSLibrariesLicenseListPage { async loadData(): Promise { try { const context: common.Context = this.getUIContext().getHostContext() as common.Context; - const content: Uint8Array = await context.resourceManager.getRawFileContent('osslibraries.json'); - const decoder: util.TextDecoder = util.TextDecoder.create('utf-8'); - const json: string = decoder.decode(content); - this.libs = Libs.fromJson(json); + this.libs = await LibsLoader.fromRawfile(context); LibsHolder.set(this.libs); this.isLoaded = true; } catch (e) { diff --git a/osslibraries_ui_wear/BuildProfile.ets b/osslibraries_ui_wear/BuildProfile.ets index a5b2694..e7c35ca 100644 --- a/osslibraries_ui_wear/BuildProfile.ets +++ b/osslibraries_ui_wear/BuildProfile.ets @@ -1,7 +1,7 @@ /** * Use these variables when you tailor your ArkTS code. They must be of the const type. */ -export const HAR_VERSION = '0.0.2'; +export const HAR_VERSION = '0.0.3'; export const BUILD_MODE_NAME = 'debug'; export const DEBUG = true; export const TARGET_NAME = 'default'; diff --git a/osslibraries_ui_wear/README.md b/osslibraries_ui_wear/README.md index 9422576..ebf81e9 100644 --- a/osslibraries_ui_wear/README.md +++ b/osslibraries_ui_wear/README.md @@ -90,20 +90,15 @@ this.getUIContext().getRouter().pushNamedRoute({ ohpm install osslibraries ``` -然后,在自定义页面中按以下方法读取 `osslibraries.json`: +`osslibraries` 包负责数据加载与解析。在自定义页面中调用 `LibsLoader.fromRawfile(context)` 即可拿到排好序的 `Libs` 实例: ```ets -import { util } from '@kit.ArkTS'; import { common } from '@kit.AbilityKit'; -import { Libs, LibsHolder } from 'osslibraries'; +import { Libs, LibsHolder, LibsLoader } from 'osslibraries'; -// 读 osslibraries.json const context: common.Context = this.getUIContext().getHostContext() as common.Context; -const content: Uint8Array = await context.resourceManager.getRawFileContent('osslibraries.json'); -const json: string = util.TextDecoder.create('utf-8').decode(content); -// 解析 JSON -const libs: Libs = Libs.fromJson(json); +const libs: Libs = await LibsLoader.fromRawfile(context); // 查找某个库 const lib = libs.findLibrary('@ohos/hypium'); diff --git a/osslibraries_ui_wear/changelog.md b/osslibraries_ui_wear/changelog.md index 75cbe4f..c0a5cfd 100644 --- a/osslibraries_ui_wear/changelog.md +++ b/osslibraries_ui_wear/changelog.md @@ -1,5 +1,10 @@ # Changelog +## v0.0.3 + +- 列表页改用 `osslibraries` 的 `LibsLoader.fromRawfile` 加载数据。 +- 更新 `osslibraries` 上游依赖版本至 0.0.4。 + ## v0.0.2 - 新增:方形表盘屏幕适配。OSSLibraries UI(Wearable)现在会根据穿戴设备屏幕形态自适应选择显示 ArcList 还是普通 List。 diff --git a/osslibraries_ui_wear/oh-package-lock.json5 b/osslibraries_ui_wear/oh-package-lock.json5 index ae41b2a..7ca9482 100644 --- a/osslibraries_ui_wear/oh-package-lock.json5 +++ b/osslibraries_ui_wear/oh-package-lock.json5 @@ -6,15 +6,26 @@ "lockfileVersion": 3, "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "specifiers": { - "osslibraries@^0.0.3": "osslibraries@0.0.3" + "@ohos/msgpack@1.0.2": "@ohos/msgpack@1.0.2", + "osslibraries@^0.0.4": "osslibraries@0.0.4" }, "packages": { - "osslibraries@0.0.3": { - "name": "osslibraries", - "version": "0.0.3", - "integrity": "sha512-vZZ/vVLbUepiLBG22i/FHmML6VGIDAr4cElyOHaqVfRDQjCHRE5auln0sZmJv98BHqz/qNhYSN4rYB6DYmvxkA==", - "resolved": "https://ohpm.openharmony.cn/ohpm/osslibraries/-/osslibraries-0.0.3.har", + "@ohos/msgpack@1.0.2": { + "name": "@ohos/msgpack", + "version": "1.0.2", + "integrity": "sha512-oWYunyTZzkQSqHptn4OPuiN8KTPP/2Z2PCCoRxIFX2tKX13cfKvI7a775gCR/1IpyMfn2CgX/8gUcJIxspOp4g==", + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/msgpack/-/msgpack-1.0.2.har", "registryType": "ohpm" + }, + "osslibraries@0.0.4": { + "name": "osslibraries", + "version": "0.0.4", + "integrity": "sha512-uYjT40tdLrLBxkqgqkFcZXIsJVgXDd90tm79QltCsFsZLNRy/Pv1XcOt9WeUr/vPdpDRvHPfIQsmHW1wNOGErw==", + "resolved": "https://ohpm.openharmony.cn/ohpm/osslibraries/-/osslibraries-0.0.4.har", + "registryType": "ohpm", + "dependencies": { + "@ohos/msgpack": "1.0.2" + } } } } \ No newline at end of file diff --git a/osslibraries_ui_wear/oh-package.json5 b/osslibraries_ui_wear/oh-package.json5 index db51dcf..9a243f9 100644 --- a/osslibraries_ui_wear/oh-package.json5 +++ b/osslibraries_ui_wear/oh-package.json5 @@ -1,6 +1,6 @@ { name: "osslibraries_ui_wear", - version: "0.0.2", + version: "0.0.3", description: "一个适用于 HarmonyOS 的开放源代码许可扫描与展示库 —— 该包是 OSSLibraries 的预定义 UI(Wearable)部分。", main: "Index.ets", author: { @@ -10,16 +10,8 @@ license: "MulanPSL-2.0", homepage: "https://github.com/composable-tu/osslibraries", repository: "https://github.com/composable-tu/osslibraries", - keywords: [ - "osslibraries", - "license", - "licenses", - "open-source", - "oss", - "wearable", - "wear" - ], + keywords: ["osslibraries", "license", "licenses", "open-source", "oss", "wearable", "wear"], dependencies: { - osslibraries: "^0.0.3", + osslibraries: "^0.0.4", }, } diff --git a/osslibraries_ui_wear/src/main/ets/pages/OSSLibrariesLicenseListPageWear.ets b/osslibraries_ui_wear/src/main/ets/pages/OSSLibrariesLicenseListPageWear.ets index 42c8753..ea3a395 100644 --- a/osslibraries_ui_wear/src/main/ets/pages/OSSLibrariesLicenseListPageWear.ets +++ b/osslibraries_ui_wear/src/main/ets/pages/OSSLibrariesLicenseListPageWear.ets @@ -11,10 +11,9 @@ */ import { common } from '@kit.AbilityKit'; -import { util } from '@kit.ArkTS'; import { BusinessError } from '@kit.BasicServicesKit'; import { ArcList, ArcListItem, ArcListAttribute, ArcListItemAttribute, ComponentContent, LengthMetrics } from '@kit.ArkUI'; -import { Libs, Library, LibsHolder } from 'osslibraries'; +import { Libs, Library, LibsHolder, LibsLoader } from 'osslibraries'; import { WearLicenseListItem } from '../components/WearLicenseListItem'; import { LicenseDetailParams } from '../model/RouteParams'; import { WEAR_ARC_LIST_SIZE, WEAR_ARC_LIST_RADIUS, WEAR_ARC_ITEM_WIDTH, WEAR_ARC_ITEM_RADIUS } from '../constants/WearLayoutConstants'; @@ -55,10 +54,7 @@ export struct OSSLibrariesLicenseListPageWear { async loadData(): Promise { try { const context: common.Context = this.getUIContext().getHostContext() as common.Context; - const content: Uint8Array = await context.resourceManager.getRawFileContent('osslibraries.json'); - const decoder: util.TextDecoder = util.TextDecoder.create('utf-8'); - const json: string = decoder.decode(content); - this.libs = Libs.fromJson(json); + this.libs = await LibsLoader.fromRawfile(context); LibsHolder.set(this.libs); this.isLoaded = true; } catch (e) { diff --git a/package.json b/package.json index af81d46..ed3cc8c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "type": "module", "devDependencies": { "@deveco/deveco-cli": "^1.2.2", - "osslibraries-hvigor-plugin": "^0.0.6", + "osslibraries-hvigor-plugin": "^0.0.7", "vite": "catalog:", "vite-plus": "catalog:" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 86f5d26..a282cc9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -220,8 +220,8 @@ importers: specifier: ^1.2.2 version: 1.2.2(debug@4.4.3) osslibraries-hvigor-plugin: - specifier: ^0.0.6 - version: 0.0.6 + specifier: ^0.0.7 + version: 0.0.7 vite: specifier: npm:@voidzero-dev/vite-plus-core@0.2.8 version: '@voidzero-dev/vite-plus-core@0.2.8' @@ -270,6 +270,10 @@ packages: '@cfworker/json-schema': optional: true + '@msgpack/msgpack@3.1.3': + resolution: {integrity: sha512-47XIizs9XZXvuJgoaJUIE2lFoID8ugvc0jzSHP+Ptfk8nTbnR8g788wv48N03Kx0UkAv559HWRQ3yzOgzlRNUA==} + engines: {node: '>= 18'} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1676,8 +1680,8 @@ packages: resolution: {integrity: sha512-6VlU9MLXbjVQD04AZCMX28hVtA5bUoadvUqO76MUCVA0ilwJbMiHsITRPfyVm6p/BC0Av/BXMujx39WCe1LEqw==} engines: {node: '>=20'} - osslibraries-hvigor-plugin@0.0.6: - resolution: {integrity: sha512-0WCy7S3P3TG+dlVc7lBHeOE420NonqRVjxEihHhr9mmvutH2iDJajW6NzJsDlSXw8u1opy5QHuwWsAIFeg9b3w==} + osslibraries-hvigor-plugin@0.0.7: + resolution: {integrity: sha512-tkqajvL2uQ5Y2I43zOoW0z5RqqF6XFnW+bhVIia4zIjdmAXjm3aeUQRBAj+fExWpCmQEOtQb3tMy82Vz3v7Brg==} oxfmt@0.61.0: resolution: {integrity: sha512-DxdHBEMYpcEnHoUHjjOigUqV2TYKsvxLwUPXnVYBjgFdqrcQ/91OtwubtZ2PUodCs3sStI8R5Qw3fKNGK4e8wQ==} @@ -2238,6 +2242,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@msgpack/msgpack@3.1.3': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3529,8 +3535,9 @@ snapshots: stdin-discarder: 0.3.2 string-width: 8.2.2 - osslibraries-hvigor-plugin@0.0.6: + osslibraries-hvigor-plugin@0.0.7: dependencies: + '@msgpack/msgpack': 3.1.3 fast-glob: 3.3.3 json5: 2.2.3 semver: 7.8.5 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 13eb749..daf8e6e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,5 @@ minimumReleaseAgeExclude: - - osslibraries-hvigor-plugin@0.0.1 || 0.0.2 || 0.0.3 || 0.0.4 || 0.0.5 || 0.0.6 + - osslibraries-hvigor-plugin@0.0.1 || 0.0.2 || 0.0.3 || 0.0.4 || 0.0.5 || 0.0.6 || 0.0.7 - "@voidzero-dev/vite-plus-core@0.2.8" - "@voidzero-dev/vite-plus-darwin-arm64@0.2.8" - "@voidzero-dev/vite-plus-darwin-x64@0.2.8" diff --git a/skills/osslibraries-usage/SKILL.md b/skills/osslibraries-usage/SKILL.md index 914ced1..1d71c45 100644 --- a/skills/osslibraries-usage/SKILL.md +++ b/skills/osslibraries-usage/SKILL.md @@ -1,6 +1,6 @@ --- name: "osslibraries-usage" -description: "Guide for integrating OSSLibraries license scanning & display library in HarmonyOS. Invoke when adding the license list page (phone or wearable UI), configuring the hvigor scan plugin, customizing UI, or troubleshooting osslibraries.json." +description: "Guide for integrating OSSLibraries license scanning & display library in HarmonyOS. Invoke when adding the license list page (phone or wearable UI), configuring the hvigor scan plugin, customizing UI, or troubleshooting osslibraries.json / osslibraries.msgpack." license: "MulanPSL-2.0" --- @@ -8,11 +8,11 @@ license: "MulanPSL-2.0" OSSLibraries is an open-source license scanning and display library for HarmonyOS, distributed as OHPM packages: -- **`osslibraries`** (core): data models, JSON parser, and cross-page holder. Used for custom UI. +- **`osslibraries`** (core): data models, data loader, JSON / MessagePack parser, and cross-page holder. Used for custom UI. - **`osslibraries_ui`**: predefined list page, detail page, and `LicenseItem` component for phone/tablet. Ready out of the box. - **`osslibraries_ui_wear`**: predefined list page, detail page, and `WearLicenseListItem` component for wearable devices. Adapts to screen shape via `display.screenShape`: round faces use ArkUI `ArcList` (digital-crown scroll, chain animation), square faces fall back to a regular `List`. -License data is generated at compile time by a standalone Hvigor plugin **`osslibraries-hvigor-plugin`** (npm package) that scans `oh_modules/` and produces `entry/src/main/resources/rawfile/osslibraries.json`. +License data is generated at compile time by a standalone Hvigor plugin **`osslibraries-hvigor-plugin`** (npm package) that scans `oh_modules/` and produces `entry/src/main/resources/rawfile/osslibraries.json`. The core package's `LibsLoader` prefers `osslibraries.msgpack` (MessagePack binary) when present and falls back to `osslibraries.json`. ## Cangjie HarmonyOS Support @@ -30,7 +30,7 @@ Two independent blockers apply to this library: - The user wants to display an "Open Source Licenses" page in a HarmonyOS app - The user wants to integrate the predefined phone UI (`osslibraries_ui`) or wearable UI (`osslibraries_ui_wear`), or build a custom UI (`osslibraries` core) - The user wants to configure / troubleshoot the `osslibraries-hvigor-plugin` scan plugin -- The user wants to read or parse `osslibraries.json` +- The user wants to read or parse `osslibraries.json` / `osslibraries.msgpack` - The user wants to filter self-owned modules out of the license list - **Not applicable**: Cangjie HarmonyOS apps are not supported @@ -43,7 +43,7 @@ Confirm the user's intended path before integrating: | Predefined pages (phone/tablet) | `osslibraries_ui` | Yes | Yes (register named routes) | | Predefined pages (wearable) | `osslibraries_ui_wear` | Yes | Yes (register named routes) | | Fully custom UI | `osslibraries` | Yes | No | -| Only read an already-generated JSON | `osslibraries` | No (JSON already exists) | No | +| Only read an already-generated data file | `osslibraries` | No (data file already exists) | No | > `osslibraries_ui` and `osslibraries_ui_wear` already depend on `osslibraries`; do not install core separately. @@ -111,23 +111,21 @@ The list page already implements: load JSON → `LibsHolder.set(libs)` → tap a ```zsh ohpm install osslibraries -# The hvigor plugin is still required to generate the JSON (repeat steps 1–2 of Path A) +# The hvigor plugin is still required to generate the data file (repeat steps 1–2 of Path A) ``` -### 2. Read and parse osslibraries.json +### 2. Load and parse the license data + +The core package handles rawfile reading and parsing. Call `LibsLoader.fromRawfile(context)` — it prefers `osslibraries.msgpack` (MessagePack binary, smaller and faster) and falls back to `osslibraries.json` if not found: ```ets -import { util } from '@kit.ArkTS'; import { common } from '@kit.AbilityKit'; -import { Libs, LibsHolder } from 'osslibraries'; +import { Libs, LibsHolder, LibsLoader } from 'osslibraries'; -// Read rawfile const context: common.Context = this.getUIContext().getHostContext() as common.Context; -const content: Uint8Array = await context.resourceManager.getRawFileContent('osslibraries.json'); -const json: string = util.TextDecoder.create('utf-8').decode(content); -// Parse (libraries are sorted by name) -const libs: Libs = Libs.fromJson(json); +// Prefers osslibraries.msgpack, falls back to osslibraries.json (libraries sorted by name) +const libs: Libs = await LibsLoader.fromRawfile(context); // Look up a library const lib = libs.findLibrary('@ohos/hypium'); @@ -136,6 +134,8 @@ const lib = libs.findLibrary('@ohos/hypium'); LibsHolder.set(libs); ``` +Lower-level APIs (use as needed): `Libs.fromJson(json)` / `Parser.parse(json)` for JSON strings, `Libs.fromMsgpack(bytes)` / `Parser.parseMsgpack(bytes)` for MessagePack binary. + ### 3. Reuse predefined components (optional) `osslibraries_ui` also exports standalone components and helpers: @@ -222,10 +222,12 @@ this.getUIContext().getRouter().pushNamedRoute({ | ------------------------------------------------ | ------------- | ------------------------------------------------------------------------ | | `Libs` | class | Main entry point. Holds `libraries: Library[]` and `licenses: License[]` | | `Libs.fromJson(json)` | static method | Builds from a JSON string; libraries sorted by name | +| `Libs.fromMsgpack(bytes)` | static method | Builds from MessagePack binary; libraries sorted by name | | `libs.findLibrary(uniqueId)` | method | Finds a library by uniqueId; returns `undefined` if not found | | `libs.findLicense(hash)` | method | Finds a license by hash | +| `LibsLoader.fromRawfile(context)` | static method | Loads from rawfile: prefers `osslibraries.msgpack`, falls back to `osslibraries.json` | | `LibsHolder` | class | Static holder; `set(libs)` / `get()` to share across pages | -| `Parser` / `ParseResult` | class | Low-level parser; `Libs.fromJson` is usually enough | +| `Parser` / `ParseResult` | class | Low-level parser; `Parser.parse(json)` / `Parser.parseMsgpack(bytes)` | | `SortUtil.compareLibraryByName` | method | Case-insensitive library name comparator | | `Library` | class | Full metadata of a single dependency | | `License` | class | License info; `hash` is the unique key | @@ -275,7 +277,9 @@ Route names are centralized in `RouteNames.ets` (`UI_LIST_PAGE_ROUTE` / `UI_DETA | `WearLicenseListItem` | Wearable list item component, accepts `@Prop lib: Library` | | `LicenseDetailParams` | Detail page route params interface, field `uniqueId: string` (same shape as `osslibraries_ui`) | -### osslibraries.json structure +### osslibraries.json / osslibraries.msgpack structure + +The JSON and MessagePack files share the same structure (`osslibraries.msgpack` is the MessagePack-encoded form of `osslibraries.json`): ```json { @@ -312,8 +316,10 @@ Route names are centralized in `RouteNames.ets` (`UI_LIST_PAGE_ROUTE` / `UI_DETA ### List page is blank / shows "load failed" +The predefined list pages load data via `LibsLoader.fromRawfile(context)`, which prefers `osslibraries.msgpack` and falls back to `osslibraries.json`. If both are missing, the page shows "load failed". + 1. Verify `osslibraries-hvigor-plugin` is registered in the target module's `hvigorfile.ts`. -2. Verify a build has been run and `entry/src/main/resources/rawfile/osslibraries.json` exists and is non-empty. +2. Verify a build has been run and `entry/src/main/resources/rawfile/osslibraries.json` (or `osslibraries.msgpack`) exists and is non-empty. 3. Verify `osslibraries_ui` was installed via OHPM (not linked as a local workspace module). ### Named route navigation fails with "route does not exist"