@trackunit/iris-app-sdk-vite 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/LICENSE.txt +191 -0
- package/README.md +213 -0
- package/executors.json +16 -0
- package/package.json +22 -0
- package/src/executors/build/executor.js +102 -0
- package/src/executors/build/executor.js.map +1 -0
- package/src/executors/build/schema.json +25 -0
- package/src/executors/serve/executor.js +93 -0
- package/src/executors/serve/executor.js.map +1 -0
- package/src/executors/serve/schema.json +30 -0
- package/src/executors/utils/defaultViteConfig.js +110 -0
- package/src/executors/utils/defaultViteConfig.js.map +1 -0
- package/src/executors/utils/index.js +4 -0
- package/src/executors/utils/index.js.map +1 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -0
package/CHANGELOG.md
ADDED
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Copyright 2023 Trackunit.
|
|
2
|
+
|
|
3
|
+
TrackunitÂź Software Development Kit (âTrackunit SDKâ)
|
|
4
|
+
License Agreement
|
|
5
|
+
|
|
6
|
+
THIS IS A LICENSE AGREEMENT BETWEEN YOU AND TRACKUNIT APS (âTRACKUNITâ). BEFORE YOU USE THE TRACKUNIT SDK, PLEASE READ ALL OF THE TERMS AND CONDITIONS SET OUT IN THIS LICENSE AGREEMENT (THIS âAGREEMENTâ) CAREFULLY. YOUR USE OF THE TRACKUNIT SDK IS SUBJECT TO THE TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT. BY CLICKING THE âI AGREEâ BUTTON OR BY USING ANY PART OF THE TRACKUNIT SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT OR CANNOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, YOU MUST NOT DOWNLOAD OR USE THE TRACKUNIT SDK.
|
|
7
|
+
|
|
8
|
+
1. License Granted: Trackunit hereby grants to You a non-exclusive, non-transferable, revocable, royalty-free worldwide license to use the Trackunit SDK in accordance with the terms and conditions of this Agreement.
|
|
9
|
+
|
|
10
|
+
2. Use Rights: Subject to the restrictions below, you may use the Trackunit SDK for the purpose of creating software that communicates with Trackunit Products (âDeveloper Softwareâ). You are permitted to re-distribute, modify, or create derivative works as part of your Developer Software for non-commercial or commercial use. Open source software components provided with the Trackunit SDK are licensed to you under the terms of the applicable license agreements included with such open source software components. The applicable open source software licenses are listed in Appendix A.
|
|
11
|
+
|
|
12
|
+
3. Restrictions: You agree that you will not (1) use the Trackunit SDK to create, design or develop anything other than Developer Software; (2) make any more copies of the Trackunit SDK than are reasonably necessary for the authorized use and backup and archival purposes; (3) modify, create derivative works of, reverse engineer, reverse compile, or disassemble the Trackunit SDK except as expressly permitted in Section 2; or (4) distribute, sell, lease, rent, or lend any part of the Trackunit SDK to any third party except as expressly permitted in Section 2.
|
|
13
|
+
|
|
14
|
+
4. Title and Interest: Trackunit retains ownership of the Trackunit SDK and all intellectual property rights embodied in the Trackunit SDK, including without limitation all copyrights, trade secrets and patents. You may not remove, delete or modify any of Trackunitâs copyright statements in the Trackunit SDK. ALL RIGHTS NOT EXPRESSLY GRANTED HEREUNDER ARE RESERVED TO TRACKUNIT.
|
|
15
|
+
|
|
16
|
+
5. Trademarks: You may not use Trackunitâs name, trademarks or service marks in connection with your Developer Software in a way that suggests your Developer Software is certified or endorsed by Trackunit.
|
|
17
|
+
|
|
18
|
+
6. Term and Termination: This Agreement shall continue as long as you are in compliance with the terms of this Agreement or until otherwise terminated. Either party may terminate this Agreement for any reason at any time. You agree, upon termination, to destroy all copies of the Trackunit SDK within your possession or control.
|
|
19
|
+
|
|
20
|
+
7. Confidential Information: âConfidential Informationâ means any information disclosed by Trackunit to you pursuant to this Agreement that is marked âConfidential,â âProprietary,â or in some similar manner and any information which you knew or reasonably should have known to be confidential. You shall treat as confidential all Confidential Information and shall not use such Confidential Information except to exercise your rights or perform your obligations under this Agreement. You will protect Confidential Information from unauthorized use, access, or disclosure in the same manner as you protect your own confidential or proprietary information of a similar nature but with no less than reasonable care. You shall not disclose such Confidential Information to any third party during or after the term of this Agreement. This paragraph will not apply to any Confidential Information that: (a) was rightfully in your possession prior to receipt of such Confidential Information from Trackunit; (b) is or becomes a matter of public knowledge through no fault of you; (c) is rightfully received from a third party without a duty of confidentiality; (d) is independently developed by you without breach of any confidentiality obligations; (e) is disclosed by you with Trackunitâs prior written approval; or (f) you are required to disclose by applicable law or court order, provided that you notify Trackunit of such required disclosure promptly in writing and cooperate with Trackunit in any lawful action to contest or limit the scope of such required disclosure. You acknowledge that breach of this Section 7 will cause irreparable damage to Trackunit for which monetary damages will be an inadequate remedy. Accordingly, Trackunit will be entitled to seek and obtain injunctive and any other relief (legal or equitable) to restrain any breach or anticipated breach of this Section 7.
|
|
21
|
+
|
|
22
|
+
8. Warranty and Limitation of Liability: THE TRACKUNIT SDK IS PROVIDED âAS ISâ WITHOUT WARRANTY OF ANY KIND. TRACKUNIT DOES NOT WARRANT THAT THE USE OF THE TRACKUNIT SDK WILL NOT INFRINGE ANY THIRD PARTYâS INTELLECTUAL PROPERTY RIGHTS. TRACKUNIT DOES NOT WARRANT THAT THE TRACKUNIT SDK IS ERROR FREE AND MAKES NO WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO THE TRACKUNIT SDK, INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
23
|
+
|
|
24
|
+
TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL TRACKUNIT BE LIABLE FOR PERSONAL INJURY OR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES WHATSOEVER, OR FOR LOSS OF PROFITS, LOSS OF DATA, BUSINESS INTERRUPTION, OR FOR ANY PECUNIARY DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO YOUR GRANT OF LICENSE HEREIN OR OTHERWISE ARISING OUT OF THE USE OF THE TRACKUNIT SDK, OR IN CONNECTION WITH ANY PROVISION OF THIS AGREEMENT, HOWEVER CAUSED, REGARDLESS OF THE THEORY OF LIABILITY (CONTRACT, TORT OR OTHERWISE) AND EVEN IF TRACKUNIT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
25
|
+
|
|
26
|
+
9. Indemnification: You agree to defend, indemnify and hold harmless Trackunit, and any of its directors, officers, employees, affiliates and agents, from and against any and all claims, losses, damages, liabilities and other expenses (including reasonable attorneysâ fees), arising from the distribution or use of the Developer Software by you or anyone else, or your breach of this Agreement.
|
|
27
|
+
|
|
28
|
+
10. Data Privacy: You shall at all times uphold applicable legislation, any violation of applicable legislation relating to Data Privacy, shall be regarded as a breach of this Agreement, and any license given under this Agreement shall be deemed as revoked.
|
|
29
|
+
|
|
30
|
+
11. General Terms: These terms are governed by the laws of Denmark without regard to conflict of laws principles. The United Nations Convention for the International Sale of Goods shall not apply. You may not assign this Agreement in whole or in part. Any attempted assignment by You shall be void. This Agreement constitutes the entire agreement between You and Trackunit with respect to the subject matter hereof and supersedes all prior written or oral communications, understandings and agreements. Any waiver of these terms must be in writing and signed by the waiving party to be effective. If any provision of these terms is found to be invalid or unenforceable, the remaining terms will continue to be valid and enforceable to the fullest extent permitted by law.â
|
|
31
|
+
|
|
32
|
+
APPENDIX A
|
|
33
|
+
Open Source Software Licenses
|
|
34
|
+
|
|
35
|
+
IMPORTANT READ CAREFULLY
|
|
36
|
+
The applicable open source licenses are identified below. You agree to comply with all such licenses. If you do not agree to such terms and conditions, you may not install, download, or otherwise use the Trackunit SDK.
|
|
37
|
+
|
|
38
|
+
Apache License
|
|
39
|
+
Version 2.0, January 2004
|
|
40
|
+
|
|
41
|
+
http://www.apache.org/licenses/
|
|
42
|
+
|
|
43
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
44
|
+
âą 1. Definitions.
|
|
45
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
46
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
47
|
+
"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.
|
|
48
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
49
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
50
|
+
"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.
|
|
51
|
+
"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).
|
|
52
|
+
"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.
|
|
53
|
+
"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."
|
|
54
|
+
"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.
|
|
55
|
+
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.
|
|
56
|
+
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.
|
|
57
|
+
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:
|
|
58
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
59
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
60
|
+
(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
|
|
61
|
+
(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.
|
|
62
|
+
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.
|
|
63
|
+
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.
|
|
64
|
+
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.
|
|
65
|
+
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.
|
|
66
|
+
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.
|
|
67
|
+
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.
|
|
68
|
+
END OF TERMS AND CONDITIONSâ
|
|
69
|
+
|
|
70
|
+
MIT License
|
|
71
|
+
https://opensource.org/licenses/MIT
|
|
72
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
73
|
+
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
|
74
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
ISC License
|
|
78
|
+
https://www.isc.org/licenses/
|
|
79
|
+
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.
|
|
80
|
+
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.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
The Unlicense
|
|
84
|
+
|
|
85
|
+
https://unlicense.org/
|
|
86
|
+
|
|
87
|
+
This is free and unencumbered software released into the public domain.
|
|
88
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
|
|
89
|
+
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
|
|
90
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
BSD-3-Clause
|
|
94
|
+
https://opensource.org/licenses/BSD-3-Clause
|
|
95
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
96
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
97
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
98
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
99
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
BSD-2-Clause
|
|
103
|
+
|
|
104
|
+
https://opensource.org/licenses/BSD-2-Clause
|
|
105
|
+
|
|
106
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
107
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
108
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
109
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
Creative Commons Zero v1.0 Universal
|
|
113
|
+
https://creativecommons.org/publicdomain/zero/1.0/legalcode
|
|
114
|
+
Creative Commons Legal Code
|
|
115
|
+
CC0 1.0 Universal
|
|
116
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
|
|
117
|
+
Statement of Purpose
|
|
118
|
+
The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
|
|
119
|
+
Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
|
|
120
|
+
For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
|
|
121
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
|
|
122
|
+
i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
|
|
123
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
124
|
+
iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
|
|
125
|
+
iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
|
|
126
|
+
v. rights protecting the extraction, dissemination, use and reuse of data in a Work;
|
|
127
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
|
|
128
|
+
vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
|
|
129
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
|
|
130
|
+
3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
|
|
131
|
+
|
|
132
|
+
4. Limitations and Disclaimers.
|
|
133
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
|
|
134
|
+
b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
|
|
135
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
|
|
136
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
Creative Commons Attribution 3.0 Unported
|
|
140
|
+
https://creativecommons.org/licenses/by/3.0/legalcode
|
|
141
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
|
|
142
|
+
License
|
|
143
|
+
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
|
144
|
+
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
|
|
145
|
+
1. Definitions
|
|
146
|
+
a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
|
|
147
|
+
b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
|
|
148
|
+
c. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
|
|
149
|
+
d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
|
|
150
|
+
e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
|
|
151
|
+
f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
|
|
152
|
+
g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
|
|
153
|
+
h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
|
|
154
|
+
i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
|
|
155
|
+
2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
|
|
156
|
+
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
|
|
157
|
+
a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;
|
|
158
|
+
b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";
|
|
159
|
+
c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
|
|
160
|
+
d. to Distribute and Publicly Perform Adaptations.
|
|
161
|
+
e. For the avoidance of doubt:
|
|
162
|
+
i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
|
|
163
|
+
ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,
|
|
164
|
+
iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.
|
|
165
|
+
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
|
|
166
|
+
4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
|
|
167
|
+
a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested.
|
|
168
|
+
b. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv), consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
|
|
169
|
+
c. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.â
|
|
170
|
+
5. Representations, Warranties and Disclaimer
|
|
171
|
+
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
|
|
172
|
+
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
173
|
+
7. Termination
|
|
174
|
+
a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
|
|
175
|
+
b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
|
|
176
|
+
8. Miscellaneous
|
|
177
|
+
a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
|
|
178
|
+
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
|
|
179
|
+
c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
|
|
180
|
+
d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You.
|
|
181
|
+
e. This License may not be modified without the mutual written agreement of the Licensor and You.
|
|
182
|
+
f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.
|
|
183
|
+
Creative Commons Notice
|
|
184
|
+
Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.
|
|
185
|
+
Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License.
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
BSD Zero Clause License
|
|
189
|
+
https://opensource.org/licenses/0BSD
|
|
190
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
|
|
191
|
+
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# @trackunit/iris-app-sdk-vite
|
|
2
|
+
|
|
3
|
+
Custom NX executors for building and serving Iris Apps using Vite.
|
|
4
|
+
|
|
5
|
+
Trackunit Iris App SDK are used by developers to integrate custom functionality into [the Trackunit Manager platform](https://www.trackunit.com/services/manager/).
|
|
6
|
+
|
|
7
|
+
For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/).
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
This package is included as part of the Iris App SDK. Run through the getting started guide here: [Getting Started](https://developers.trackunit.com/docs/getting-started)
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Serve Executor
|
|
16
|
+
|
|
17
|
+
Start the Vite dev server for your Iris App:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
nx run your-app:serve
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Add to your `project.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"targets": {
|
|
28
|
+
"serve": {
|
|
29
|
+
"executor": "@trackunit/iris-app-sdk-vite:serve",
|
|
30
|
+
"options": {}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Build Executor
|
|
37
|
+
|
|
38
|
+
Build your Iris App for production:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
nx run your-app:build
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Add to your `project.json`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"targets": {
|
|
49
|
+
"build": {
|
|
50
|
+
"executor": "@trackunit/iris-app-sdk-vite:build",
|
|
51
|
+
"options": {
|
|
52
|
+
"outputPath": "dist/apps/your-app"
|
|
53
|
+
},
|
|
54
|
+
"outputs": ["{options.outputPath}"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Configuration Options
|
|
61
|
+
|
|
62
|
+
### Serve Options
|
|
63
|
+
|
|
64
|
+
| Option | Type | Required | Description |
|
|
65
|
+
| ------------ | ------ | -------- | ------------------------------------------------------- |
|
|
66
|
+
| `port` | number | No | Dev server port (default: auto-select from 22220-22229) |
|
|
67
|
+
| `host` | string | No | Dev server host (default: "localhost") |
|
|
68
|
+
| `viteConfig` | string | No | Path to optional custom vite config file for overrides |
|
|
69
|
+
|
|
70
|
+
### Build Options
|
|
71
|
+
|
|
72
|
+
| Option | Type | Required | Description |
|
|
73
|
+
| ------------ | ------ | -------- | ------------------------------------------------------ |
|
|
74
|
+
| `outputPath` | string | Yes | Output directory for the build |
|
|
75
|
+
| `viteConfig` | string | No | Path to optional custom vite config file for overrides |
|
|
76
|
+
|
|
77
|
+
## Custom Vite Configuration
|
|
78
|
+
|
|
79
|
+
By default, no `vite.config.ts` file is required - the executor automatically handles everything based on your `iris-app-manifest.ts`.
|
|
80
|
+
|
|
81
|
+
If you need to customize the Vite config, create a `vite.config.ts` file in your app directory:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import type { UserConfig } from "vite";
|
|
85
|
+
|
|
86
|
+
export default async (defaultConfig: UserConfig): Promise<UserConfig> => {
|
|
87
|
+
return {
|
|
88
|
+
...defaultConfig,
|
|
89
|
+
// Your customizations here
|
|
90
|
+
// Example: Add custom plugins
|
|
91
|
+
plugins: [...(defaultConfig.plugins ?? []), myCustomPlugin()],
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Then reference it in your `project.json`:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"targets": {
|
|
101
|
+
"build": {
|
|
102
|
+
"executor": "@trackunit/iris-app-sdk-vite:build",
|
|
103
|
+
"options": {
|
|
104
|
+
"outputPath": "dist/apps/your-app",
|
|
105
|
+
"viteConfig": "apps/your-app/vite.config.ts"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"serve": {
|
|
109
|
+
"executor": "@trackunit/iris-app-sdk-vite:serve",
|
|
110
|
+
"options": {
|
|
111
|
+
"viteConfig": "apps/your-app/vite.config.ts"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Note:** Your custom config function receives the default config with all Iris App plugins already applied. You should spread the default config to preserve the required functionality.
|
|
119
|
+
|
|
120
|
+
## Migration from @nx/vite
|
|
121
|
+
|
|
122
|
+
If you were using `@nx/vite` executors directly, update your `project.json` to use these executors instead:
|
|
123
|
+
|
|
124
|
+
**Before:**
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"targets": {
|
|
129
|
+
"build": {
|
|
130
|
+
"executor": "@nx/vite:build",
|
|
131
|
+
"options": {
|
|
132
|
+
"outputPath": "dist/apps/your-app"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"serve": {
|
|
136
|
+
"executor": "@nx/vite:dev-server",
|
|
137
|
+
"options": {}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**After:**
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{
|
|
147
|
+
"targets": {
|
|
148
|
+
"build": {
|
|
149
|
+
"executor": "@trackunit/iris-app-sdk-vite:build",
|
|
150
|
+
"options": {
|
|
151
|
+
"outputPath": "dist/apps/your-app"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"serve": {
|
|
155
|
+
"executor": "@trackunit/iris-app-sdk-vite:serve",
|
|
156
|
+
"options": {}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Key Differences
|
|
163
|
+
|
|
164
|
+
These executors solve the tsconfig paths resolution problem that occurs when using Vite directly:
|
|
165
|
+
|
|
166
|
+
1. **Automatic tsconfig paths registration** - Registers tsconfig paths before loading any modules
|
|
167
|
+
2. **Automatic manifest loading** - Loads your `iris-app-manifest.ts` automatically
|
|
168
|
+
3. **Pre-configured plugins** - Applies all required Iris App Vite plugins automatically
|
|
169
|
+
4. **No config file required** - The executor handles everything based on your manifest
|
|
170
|
+
|
|
171
|
+
## Debugging
|
|
172
|
+
|
|
173
|
+
### Verbose Mode
|
|
174
|
+
|
|
175
|
+
Run with the `--verbose` flag to see detailed configuration information:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
nx run your-app:serve --verbose
|
|
179
|
+
nx run your-app:build --verbose
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
This will output the Vite plugins configuration being used.
|
|
183
|
+
|
|
184
|
+
### React DevTools
|
|
185
|
+
|
|
186
|
+
Run a global install of [react-devtools](https://www.npmjs.com/package/react-devtools).
|
|
187
|
+
|
|
188
|
+
With volta:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
volta install react-devtools
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Run react-devtools from the terminal to launch the standalone DevTools app:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
react-devtools
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
React-devtools will automatically connect to whichever Iris App is running in your browser.
|
|
201
|
+
|
|
202
|
+
### Common Issues
|
|
203
|
+
|
|
204
|
+
**"Failed to resolve dependency" warnings**
|
|
205
|
+
|
|
206
|
+
These warnings during development are typically harmless and occur during Vite's dependency pre-bundling. If your app loads correctly, they can be ignored.
|
|
207
|
+
|
|
208
|
+
## Trackunit
|
|
209
|
+
|
|
210
|
+
This package was developed by Trackunit ApS.
|
|
211
|
+
Trackunit is the leading SaaS-based IoT solution for the construction industry, offering an ecosystem of hardware, fleet management software & telematics.
|
|
212
|
+
|
|
213
|
+

|
package/executors.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"executors": {
|
|
4
|
+
"serve": {
|
|
5
|
+
"implementation": "./src/executors/serve/executor",
|
|
6
|
+
"schema": "./src/executors/serve/schema.json",
|
|
7
|
+
"description": "Serve Iris App using Vite dev server"
|
|
8
|
+
},
|
|
9
|
+
"build": {
|
|
10
|
+
"implementation": "./src/executors/build/executor",
|
|
11
|
+
"schema": "./src/executors/build/schema.json",
|
|
12
|
+
"description": "Build Iris App using Vite"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trackunit/iris-app-sdk-vite",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
+
"repository": "https://github.com/Trackunit/manager",
|
|
6
|
+
"executors": "./executors.json",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=24.x"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@nx/devkit": "22.0.4",
|
|
12
|
+
"rxjs": "7.8.1",
|
|
13
|
+
"win-ca": "^3.5.1",
|
|
14
|
+
"@trackunit/iris-app-build-utilities": "1.12.41",
|
|
15
|
+
"@trackunit/iris-app-api": "1.14.38",
|
|
16
|
+
"tslib": "^2.6.2",
|
|
17
|
+
"vite": "7.3.1"
|
|
18
|
+
},
|
|
19
|
+
"types": "./src/index.d.ts",
|
|
20
|
+
"main": "./src/index.js",
|
|
21
|
+
"type": "commonjs"
|
|
22
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = buildExecutor;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
|
|
6
|
+
const iris_app_build_utilities_1 = require("@trackunit/iris-app-build-utilities");
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const rxjs_1 = require("rxjs");
|
|
10
|
+
const op = tslib_1.__importStar(require("rxjs/operators"));
|
|
11
|
+
require("win-ca");
|
|
12
|
+
const defaultViteConfig_1 = require("../utils/defaultViteConfig");
|
|
13
|
+
const deleteOutputDir = (root, outputPath) => {
|
|
14
|
+
const resolvedOutputPath = (0, path_1.resolve)(root, outputPath);
|
|
15
|
+
if (resolvedOutputPath === root) {
|
|
16
|
+
throw new Error("Output path MUST not be project root directory!");
|
|
17
|
+
}
|
|
18
|
+
(0, fs_1.rmSync)(resolvedOutputPath, { recursive: true, force: true });
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Build executor for building Iris Apps with Vite.
|
|
22
|
+
*
|
|
23
|
+
* @param {BuildExecutorSchema} options build executor options for this nx executor
|
|
24
|
+
* @param {ExecutorContext} context build executor context for this nx executor
|
|
25
|
+
* @yields {NodeBuildEvent} the build event
|
|
26
|
+
*/
|
|
27
|
+
async function* buildExecutor(options, context) {
|
|
28
|
+
await (0, iris_app_build_utilities_1.checkPackageVersion)(false);
|
|
29
|
+
// eslint-disable-next-line local-rules/no-typescript-assertion, @typescript-eslint/no-non-null-assertion
|
|
30
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
31
|
+
const projectRootDir = (0, path_1.join)(context.root, projectRoot);
|
|
32
|
+
const manifestPath = (0, path_1.join)(context.root, projectRoot, "iris-app-manifest.ts");
|
|
33
|
+
// â
CRITICAL: Register tsconfig paths BEFORE any @trackunit/* imports
|
|
34
|
+
(0, iris_app_build_utilities_1.enableTsConfigPath)({
|
|
35
|
+
projectRootDir,
|
|
36
|
+
});
|
|
37
|
+
// Now we can safely import the manifest (it uses @trackunit/* imports)
|
|
38
|
+
const IrisAppManifest = (await Promise.resolve(`${manifestPath}`).then(s => tslib_1.__importStar(require(s)))).default;
|
|
39
|
+
// Get default config (internally imports @trackunit/iris-app-vite-plugin)
|
|
40
|
+
const defaultConfig = await (0, defaultViteConfig_1.getDefaultViteConfig)("production", context.root, projectRootDir, IrisAppManifest, context);
|
|
41
|
+
// Load optional custom config
|
|
42
|
+
let finalConfig = defaultConfig;
|
|
43
|
+
if (options.viteConfig || (0, fs_1.existsSync)((0, path_1.join)(projectRootDir, "vite.config.ts"))) {
|
|
44
|
+
const customConfigFile = await Promise.resolve(`${options.viteConfig ?? (0, path_1.join)(projectRootDir, "vite.config.ts")}`).then(s => tslib_1.__importStar(require(s)));
|
|
45
|
+
let customConfig = customConfigFile.default(defaultConfig);
|
|
46
|
+
const isPromise = customConfig instanceof Promise;
|
|
47
|
+
if (isPromise) {
|
|
48
|
+
customConfig = await customConfig;
|
|
49
|
+
}
|
|
50
|
+
finalConfig = customConfig;
|
|
51
|
+
}
|
|
52
|
+
// Set output path
|
|
53
|
+
finalConfig.build = {
|
|
54
|
+
...finalConfig.build,
|
|
55
|
+
outDir: (0, path_1.resolve)(context.root, options.outputPath),
|
|
56
|
+
emptyOutDir: true,
|
|
57
|
+
};
|
|
58
|
+
// Delete existing output
|
|
59
|
+
deleteOutputDir(context.root, options.outputPath);
|
|
60
|
+
if (context.isVerbose) {
|
|
61
|
+
// eslint-disable-next-line no-console
|
|
62
|
+
console.log("Using Vite config", JSON.stringify(finalConfig.plugins, null, 2));
|
|
63
|
+
}
|
|
64
|
+
const observable = new rxjs_1.Observable(subscriber => {
|
|
65
|
+
void (async () => {
|
|
66
|
+
try {
|
|
67
|
+
const { build } = await Promise.resolve().then(() => tslib_1.__importStar(require("vite")));
|
|
68
|
+
const buildResult = await build(finalConfig);
|
|
69
|
+
// Log build stats if available
|
|
70
|
+
if (context.isVerbose) {
|
|
71
|
+
// eslint-disable-next-line no-console
|
|
72
|
+
console.log("Build completed:", buildResult);
|
|
73
|
+
}
|
|
74
|
+
subscriber.next({
|
|
75
|
+
success: true,
|
|
76
|
+
outfile: (0, path_1.resolve)(context.root, options.outputPath),
|
|
77
|
+
});
|
|
78
|
+
subscriber.complete();
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
// eslint-disable-next-line no-console
|
|
82
|
+
console.error("Vite build error:", error);
|
|
83
|
+
subscriber.next({
|
|
84
|
+
success: false,
|
|
85
|
+
outfile: (0, path_1.resolve)(context.root, options.outputPath),
|
|
86
|
+
});
|
|
87
|
+
subscriber.complete();
|
|
88
|
+
}
|
|
89
|
+
})();
|
|
90
|
+
}).pipe(op.tap(({ success, outfile }) => {
|
|
91
|
+
if (success) {
|
|
92
|
+
// eslint-disable-next-line no-console
|
|
93
|
+
console.info(`\n â
Iris App build completed: ${outfile}\n`);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
// eslint-disable-next-line no-console
|
|
97
|
+
console.error(`\n â Iris App build failed\n`);
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
return yield* (0, rxjs_for_await_1.eachValueFrom)(observable);
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/vite/src/executors/build/executor.ts"],"names":[],"mappings":"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","sourcesContent":["import { ExecutorContext } from \"@nx/devkit\";\nimport { eachValueFrom } from \"@nx/devkit/src/utils/rxjs-for-await\";\nimport { checkPackageVersion, enableTsConfigPath } from \"@trackunit/iris-app-build-utilities\";\nimport { existsSync, rmSync } from \"fs\";\nimport { join, resolve } from \"path\";\nimport { Observable } from \"rxjs\";\nimport * as op from \"rxjs/operators\";\nimport \"win-ca\";\nimport { getDefaultViteConfig } from \"../utils/defaultViteConfig\";\nimport { BuildExecutorSchema } from \"./schema\";\n\nexport type NodeBuildEvent = {\n outfile: string;\n success: boolean;\n};\n\nconst deleteOutputDir = (root: string, outputPath: string) => {\n const resolvedOutputPath = resolve(root, outputPath);\n if (resolvedOutputPath === root) {\n throw new Error(\"Output path MUST not be project root directory!\");\n }\n rmSync(resolvedOutputPath, { recursive: true, force: true });\n};\n\n/**\n * Build executor for building Iris Apps with Vite.\n *\n * @param {BuildExecutorSchema} options build executor options for this nx executor\n * @param {ExecutorContext} context build executor context for this nx executor\n * @yields {NodeBuildEvent} the build event\n */\nexport default async function* buildExecutor(\n options: BuildExecutorSchema,\n context: ExecutorContext\n): AsyncGenerator<NodeBuildEvent> {\n await checkPackageVersion(false);\n\n // eslint-disable-next-line local-rules/no-typescript-assertion, @typescript-eslint/no-non-null-assertion\n const projectRoot = context.projectsConfigurations.projects[context.projectName!]!.root;\n const projectRootDir = join(context.root, projectRoot);\n const manifestPath = join(context.root, projectRoot, \"iris-app-manifest.ts\");\n\n // â
CRITICAL: Register tsconfig paths BEFORE any @trackunit/* imports\n enableTsConfigPath({\n projectRootDir,\n });\n\n // Now we can safely import the manifest (it uses @trackunit/* imports)\n const IrisAppManifest = (await import(manifestPath)).default;\n\n // Get default config (internally imports @trackunit/iris-app-vite-plugin)\n const defaultConfig = await getDefaultViteConfig(\n \"production\",\n context.root,\n projectRootDir,\n IrisAppManifest,\n context\n );\n\n // Load optional custom config\n let finalConfig = defaultConfig;\n if (options.viteConfig || existsSync(join(projectRootDir, \"vite.config.ts\"))) {\n const customConfigFile = await import(options.viteConfig ?? join(projectRootDir, \"vite.config.ts\"));\n let customConfig = customConfigFile.default(defaultConfig);\n const isPromise = customConfig instanceof Promise;\n if (isPromise) {\n customConfig = await customConfig;\n }\n finalConfig = customConfig;\n }\n\n // Set output path\n finalConfig.build = {\n ...finalConfig.build,\n outDir: resolve(context.root, options.outputPath),\n emptyOutDir: true,\n };\n\n // Delete existing output\n deleteOutputDir(context.root, options.outputPath);\n\n if (context.isVerbose) {\n // eslint-disable-next-line no-console\n console.log(\"Using Vite config\", JSON.stringify(finalConfig.plugins, null, 2));\n }\n\n const observable = new Observable<NodeBuildEvent>(subscriber => {\n void (async () => {\n try {\n const { build } = await import(\"vite\");\n\n const buildResult = await build(finalConfig);\n\n // Log build stats if available\n if (context.isVerbose) {\n // eslint-disable-next-line no-console\n console.log(\"Build completed:\", buildResult);\n }\n\n subscriber.next({\n success: true,\n outfile: resolve(context.root, options.outputPath),\n });\n subscriber.complete();\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Vite build error:\", error);\n subscriber.next({\n success: false,\n outfile: resolve(context.root, options.outputPath),\n });\n subscriber.complete();\n }\n })();\n }).pipe(\n op.tap(({ success, outfile }) => {\n if (success) {\n // eslint-disable-next-line no-console\n console.info(`\\n â
Iris App build completed: ${outfile}\\n`);\n } else {\n // eslint-disable-next-line no-console\n console.error(`\\n â Iris App build failed\\n`);\n }\n })\n );\n\n return yield* eachValueFrom(observable);\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "direct-nodejs",
|
|
4
|
+
"$schema": "http://json-schema.org/schema",
|
|
5
|
+
"title": "Build executor for Iris Apps using Vite",
|
|
6
|
+
"description": "Builds an Iris App using Vite",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"viteConfig": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Path to optional custom vite config file for overrides",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What is the path for the vite config for this app? (optional)"
|
|
17
|
+
},
|
|
18
|
+
"outputPath": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Output directory for the build"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": ["outputPath"]
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = serveExecutor;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
|
|
6
|
+
const iris_app_build_utilities_1 = require("@trackunit/iris-app-build-utilities");
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const rxjs_1 = require("rxjs");
|
|
10
|
+
const op = tslib_1.__importStar(require("rxjs/operators"));
|
|
11
|
+
require("win-ca");
|
|
12
|
+
const defaultViteConfig_1 = require("../utils/defaultViteConfig");
|
|
13
|
+
/**
|
|
14
|
+
* Serve executor for serving Iris Apps with Vite.
|
|
15
|
+
*
|
|
16
|
+
* @param {ServeExecutorSchema} options serve executor options for this nx executor
|
|
17
|
+
* @param {ExecutorContext} context serve executor context for this nx executor
|
|
18
|
+
* @yields {ServeResult} the serve result
|
|
19
|
+
*/
|
|
20
|
+
async function* serveExecutor(options, context) {
|
|
21
|
+
await (0, iris_app_build_utilities_1.checkPackageVersion)(false);
|
|
22
|
+
// eslint-disable-next-line local-rules/no-typescript-assertion, @typescript-eslint/no-non-null-assertion
|
|
23
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
24
|
+
const projectRootDir = (0, path_1.join)(context.root, projectRoot);
|
|
25
|
+
const manifestPath = (0, path_1.join)(context.root, projectRoot, "iris-app-manifest.ts");
|
|
26
|
+
// â
CRITICAL: Register tsconfig paths BEFORE any @trackunit/* imports
|
|
27
|
+
(0, iris_app_build_utilities_1.enableTsConfigPath)({
|
|
28
|
+
projectRootDir,
|
|
29
|
+
});
|
|
30
|
+
// Now we can safely import the manifest (it uses @trackunit/* imports)
|
|
31
|
+
const IrisAppManifest = (await Promise.resolve(`${manifestPath}`).then(s => tslib_1.__importStar(require(s)))).default;
|
|
32
|
+
// Get default config (internally imports @trackunit/iris-app-vite-plugin)
|
|
33
|
+
const defaultConfig = await (0, defaultViteConfig_1.getDefaultViteConfig)("development", context.root, projectRootDir, IrisAppManifest, context);
|
|
34
|
+
// Load optional custom config
|
|
35
|
+
let finalConfig = defaultConfig;
|
|
36
|
+
if (options.viteConfig || (0, fs_1.existsSync)((0, path_1.join)(projectRootDir, "vite.config.ts"))) {
|
|
37
|
+
const customConfigFile = await Promise.resolve(`${options.viteConfig ?? (0, path_1.join)(projectRootDir, "vite.config.ts")}`).then(s => tslib_1.__importStar(require(s)));
|
|
38
|
+
let customConfig = customConfigFile.default(defaultConfig);
|
|
39
|
+
const isPromise = customConfig instanceof Promise;
|
|
40
|
+
if (isPromise) {
|
|
41
|
+
customConfig = await customConfig;
|
|
42
|
+
}
|
|
43
|
+
finalConfig = customConfig;
|
|
44
|
+
}
|
|
45
|
+
// Apply port override if specified
|
|
46
|
+
if (options.port !== undefined) {
|
|
47
|
+
finalConfig.server = { ...finalConfig.server, port: options.port };
|
|
48
|
+
}
|
|
49
|
+
if (options.host) {
|
|
50
|
+
finalConfig.server = { ...finalConfig.server, host: options.host };
|
|
51
|
+
}
|
|
52
|
+
if (context.isVerbose) {
|
|
53
|
+
// eslint-disable-next-line no-console
|
|
54
|
+
console.log("Using Vite config", JSON.stringify(finalConfig.plugins, null, 2));
|
|
55
|
+
}
|
|
56
|
+
// Create and start Vite dev server
|
|
57
|
+
const observable = new rxjs_1.Observable(subscriber => {
|
|
58
|
+
void (async () => {
|
|
59
|
+
try {
|
|
60
|
+
// Dynamic import vite to avoid issues
|
|
61
|
+
const { createServer } = await Promise.resolve().then(() => tslib_1.__importStar(require("vite")));
|
|
62
|
+
const server = await createServer(finalConfig);
|
|
63
|
+
await server.listen();
|
|
64
|
+
const address = server.httpServer?.address();
|
|
65
|
+
const port = typeof address === "object" && address !== null ? address.port : (options.port ?? 22220);
|
|
66
|
+
const host = options.host ?? "localhost";
|
|
67
|
+
const baseUrl = `http://${host}:${port}`;
|
|
68
|
+
server.printUrls();
|
|
69
|
+
subscriber.next({
|
|
70
|
+
baseUrl,
|
|
71
|
+
success: true,
|
|
72
|
+
});
|
|
73
|
+
// Keep alive - server continues running until interrupted
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
// eslint-disable-next-line no-console
|
|
77
|
+
console.error("Vite server error:", error);
|
|
78
|
+
subscriber.error(error);
|
|
79
|
+
}
|
|
80
|
+
})();
|
|
81
|
+
return () => {
|
|
82
|
+
// Cleanup on unsubscribe - handled by Vite's signal handling
|
|
83
|
+
};
|
|
84
|
+
}).pipe(op.tap(({ baseUrl }) => {
|
|
85
|
+
// eslint-disable-next-line no-console
|
|
86
|
+
console.info(`\n đ Iris App dev server running at: ${baseUrl}\n`);
|
|
87
|
+
}), op.map(({ baseUrl, success }) => ({
|
|
88
|
+
baseUrl,
|
|
89
|
+
success,
|
|
90
|
+
})));
|
|
91
|
+
return yield* (0, rxjs_for_await_1.eachValueFrom)(observable);
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/vite/src/executors/serve/executor.ts"],"names":[],"mappings":"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","sourcesContent":["import { ExecutorContext } from \"@nx/devkit\";\nimport { eachValueFrom } from \"@nx/devkit/src/utils/rxjs-for-await\";\nimport { checkPackageVersion, enableTsConfigPath } from \"@trackunit/iris-app-build-utilities\";\nimport { existsSync } from \"fs\";\nimport { join } from \"path\";\nimport { Observable } from \"rxjs\";\nimport * as op from \"rxjs/operators\";\nimport \"win-ca\";\nimport { getDefaultViteConfig } from \"../utils/defaultViteConfig\";\nimport { ServeExecutorSchema } from \"./schema\";\n\ntype ServeResult = { baseUrl: string; success: boolean };\n\n/**\n * Serve executor for serving Iris Apps with Vite.\n *\n * @param {ServeExecutorSchema} options serve executor options for this nx executor\n * @param {ExecutorContext} context serve executor context for this nx executor\n * @yields {ServeResult} the serve result\n */\nexport default async function* serveExecutor(\n options: ServeExecutorSchema,\n context: ExecutorContext\n): AsyncGenerator<ServeResult> {\n await checkPackageVersion(false);\n\n // eslint-disable-next-line local-rules/no-typescript-assertion, @typescript-eslint/no-non-null-assertion\n const projectRoot = context.projectsConfigurations.projects[context.projectName!]!.root;\n const projectRootDir = join(context.root, projectRoot);\n const manifestPath = join(context.root, projectRoot, \"iris-app-manifest.ts\");\n\n // â
CRITICAL: Register tsconfig paths BEFORE any @trackunit/* imports\n enableTsConfigPath({\n projectRootDir,\n });\n\n // Now we can safely import the manifest (it uses @trackunit/* imports)\n const IrisAppManifest = (await import(manifestPath)).default;\n\n // Get default config (internally imports @trackunit/iris-app-vite-plugin)\n const defaultConfig = await getDefaultViteConfig(\n \"development\",\n context.root,\n projectRootDir,\n IrisAppManifest,\n context\n );\n\n // Load optional custom config\n let finalConfig = defaultConfig;\n if (options.viteConfig || existsSync(join(projectRootDir, \"vite.config.ts\"))) {\n const customConfigFile = await import(options.viteConfig ?? join(projectRootDir, \"vite.config.ts\"));\n let customConfig = customConfigFile.default(defaultConfig);\n const isPromise = customConfig instanceof Promise;\n if (isPromise) {\n customConfig = await customConfig;\n }\n finalConfig = customConfig;\n }\n\n // Apply port override if specified\n if (options.port !== undefined) {\n finalConfig.server = { ...finalConfig.server, port: options.port };\n }\n if (options.host) {\n finalConfig.server = { ...finalConfig.server, host: options.host };\n }\n\n if (context.isVerbose) {\n // eslint-disable-next-line no-console\n console.log(\"Using Vite config\", JSON.stringify(finalConfig.plugins, null, 2));\n }\n\n // Create and start Vite dev server\n const observable = new Observable<{ baseUrl: string; success: boolean }>(subscriber => {\n void (async () => {\n try {\n // Dynamic import vite to avoid issues\n const { createServer } = await import(\"vite\");\n\n const server = await createServer(finalConfig);\n await server.listen();\n\n const address = server.httpServer?.address();\n const port = typeof address === \"object\" && address !== null ? address.port : (options.port ?? 22220);\n const host = options.host ?? \"localhost\";\n const baseUrl = `http://${host}:${port}`;\n\n server.printUrls();\n\n subscriber.next({\n baseUrl,\n success: true,\n });\n\n // Keep alive - server continues running until interrupted\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Vite server error:\", error);\n subscriber.error(error);\n }\n })();\n\n return () => {\n // Cleanup on unsubscribe - handled by Vite's signal handling\n };\n }).pipe(\n op.tap(({ baseUrl }) => {\n // eslint-disable-next-line no-console\n console.info(`\\n đ Iris App dev server running at: ${baseUrl}\\n`);\n }),\n op.map(({ baseUrl, success }) => ({\n baseUrl,\n success,\n }))\n );\n\n return yield* eachValueFrom(observable);\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "direct-nodejs",
|
|
4
|
+
"$schema": "http://json-schema.org/schema",
|
|
5
|
+
"title": "Serve executor for Iris Apps using Vite",
|
|
6
|
+
"description": "Starts the Vite dev server for an Iris App",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"viteConfig": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Path to optional custom vite config file for overrides",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What is the path for the vite config for this app? (optional)"
|
|
17
|
+
},
|
|
18
|
+
"port": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"description": "Dev server port (default: auto-select from 22220-22229)"
|
|
21
|
+
},
|
|
22
|
+
"host": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Dev server host",
|
|
25
|
+
"default": "localhost"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": []
|
|
29
|
+
}
|
|
30
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getDefaultViteConfig = void 0;
|
|
37
|
+
const path_1 = require("path");
|
|
38
|
+
// Package name stored in variable to prevent TypeScript from statically analyzing
|
|
39
|
+
// the import path during build. At runtime, enableTsConfigPath() must be called
|
|
40
|
+
// first to register the path mapping.
|
|
41
|
+
const VITE_PLUGIN_PACKAGE = "@trackunit/iris-app-vite-plugin";
|
|
42
|
+
/**
|
|
43
|
+
* Gets the default Vite config for Iris Apps.
|
|
44
|
+
*
|
|
45
|
+
* IMPORTANT: This function MUST be called AFTER enableTsConfigPath() has been called,
|
|
46
|
+
* because it dynamically imports @trackunit/iris-app-vite-plugin which uses tsconfig paths.
|
|
47
|
+
*
|
|
48
|
+
* @param mode - "production" or "development"
|
|
49
|
+
* @param nxRootDir - the root of the nx workspace
|
|
50
|
+
* @param appDir - the app directory
|
|
51
|
+
* @param _irisAppManifest - the iris app manifest (used for logging/validation)
|
|
52
|
+
* @param context - NX executor context
|
|
53
|
+
* @returns {Promise<UserConfig>} the default Vite config
|
|
54
|
+
*/
|
|
55
|
+
const getDefaultViteConfig = async (mode, nxRootDir, appDir, _irisAppManifest, context) => {
|
|
56
|
+
// Dynamic import - safe after enableTsConfigPath() is called
|
|
57
|
+
const { getTrackunitIrisAppVitePlugins } = await Promise.resolve(`${VITE_PLUGIN_PACKAGE}`).then(s => __importStar(require(s)));
|
|
58
|
+
const irisAppPlugins = await getTrackunitIrisAppVitePlugins({
|
|
59
|
+
appDir,
|
|
60
|
+
workspaceRoot: nxRootDir,
|
|
61
|
+
config: { mode },
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
root: appDir,
|
|
65
|
+
mode,
|
|
66
|
+
plugins: [...irisAppPlugins],
|
|
67
|
+
// Optimize dependency pre-bundling
|
|
68
|
+
optimizeDeps: {
|
|
69
|
+
// Force include common dependencies to speed up dev server startup
|
|
70
|
+
include: ["react", "react-dom", "react/jsx-runtime"],
|
|
71
|
+
// Use esbuild for faster dependency scanning
|
|
72
|
+
esbuildOptions: {
|
|
73
|
+
target: "esnext",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
build: {
|
|
77
|
+
outDir: `dist/apps/${context.projectName}`,
|
|
78
|
+
emptyOutDir: true,
|
|
79
|
+
// Target modern browsers - faster builds, no legacy transforms
|
|
80
|
+
target: "esnext",
|
|
81
|
+
// Use esbuild for minification (MUCH faster than terser)
|
|
82
|
+
minify: "esbuild",
|
|
83
|
+
// Disable source maps in production for faster builds
|
|
84
|
+
sourcemap: false,
|
|
85
|
+
// Increase chunk size warning limit
|
|
86
|
+
chunkSizeWarningLimit: 1000,
|
|
87
|
+
// Put remoteEntry.js at root (not in assets/) to match rspack
|
|
88
|
+
assetsDir: "",
|
|
89
|
+
// Use JavaScript entry instead of index.html for Module Federation remotes
|
|
90
|
+
// The MF plugin generates remoteEntry.js as the actual bundle entry
|
|
91
|
+
rollupOptions: {
|
|
92
|
+
// this is just a dummy input to make the build pass - as Iris apps are module federation apps
|
|
93
|
+
input: (0, path_1.join)(__dirname, "index.ts"),
|
|
94
|
+
// Preserve the entry file name for Module Federation compatibility
|
|
95
|
+
output: {
|
|
96
|
+
// ESM format for Module Federation
|
|
97
|
+
format: "esm",
|
|
98
|
+
// Entry files at root level (same as rspack)
|
|
99
|
+
entryFileNames: "[name].js",
|
|
100
|
+
// Chunks with hash
|
|
101
|
+
chunkFileNames: "[name]-[hash].js",
|
|
102
|
+
// Static assets
|
|
103
|
+
assetFileNames: "static/[name]-[hash][extname]",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
exports.getDefaultViteConfig = getDefaultViteConfig;
|
|
110
|
+
//# sourceMappingURL=defaultViteConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultViteConfig.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/vite/src/executors/utils/defaultViteConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+BAA4B;AAG5B,kFAAkF;AAClF,gFAAgF;AAChF,sCAAsC;AACtC,MAAM,mBAAmB,GAAG,iCAAiC,CAAC;AAE9D;;;;;;;;;;;;GAYG;AACI,MAAM,oBAAoB,GAAG,KAAK,EACvC,IAAkC,EAClC,SAAiB,EACjB,MAAc,EACd,gBAAiC,EACjC,OAAwB,EACH,EAAE;IACvB,6DAA6D;IAC7D,MAAM,EAAE,8BAA8B,EAAE,GAAG,yBAAa,mBAAmB,uCAAC,CAAC;IAE7E,MAAM,cAAc,GAAG,MAAM,8BAA8B,CAAC;QAC1D,MAAM;QACN,aAAa,EAAE,SAAS;QACxB,MAAM,EAAE,EAAE,IAAI,EAAE;KACjB,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,IAAI;QACJ,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;QAC5B,mCAAmC;QACnC,YAAY,EAAE;YACZ,mEAAmE;YACnE,OAAO,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,mBAAmB,CAAC;YACpD,6CAA6C;YAC7C,cAAc,EAAE;gBACd,MAAM,EAAE,QAAQ;aACjB;SACF;QACD,KAAK,EAAE;YACL,MAAM,EAAE,aAAa,OAAO,CAAC,WAAW,EAAE;YAC1C,WAAW,EAAE,IAAI;YACjB,+DAA+D;YAC/D,MAAM,EAAE,QAAQ;YAChB,yDAAyD;YACzD,MAAM,EAAE,SAAS;YACjB,sDAAsD;YACtD,SAAS,EAAE,KAAK;YAChB,oCAAoC;YACpC,qBAAqB,EAAE,IAAI;YAC3B,8DAA8D;YAC9D,SAAS,EAAE,EAAE;YACb,2EAA2E;YAC3E,oEAAoE;YACpE,aAAa,EAAE;gBACb,8FAA8F;gBAC9F,KAAK,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,UAAU,CAAC;gBAClC,mEAAmE;gBACnE,MAAM,EAAE;oBACN,mCAAmC;oBACnC,MAAM,EAAE,KAAK;oBACb,6CAA6C;oBAC7C,cAAc,EAAE,WAAW;oBAC3B,mBAAmB;oBACnB,cAAc,EAAE,kBAAkB;oBAClC,gBAAgB;oBAChB,cAAc,EAAE,+BAA+B;iBAChD;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA7DW,QAAA,oBAAoB,wBA6D/B","sourcesContent":["import { ExecutorContext } from \"@nx/devkit\";\nimport type { IrisAppManifest } from \"@trackunit/iris-app-api\";\nimport { join } from \"path\";\nimport type { UserConfig } from \"vite\";\n\n// Package name stored in variable to prevent TypeScript from statically analyzing\n// the import path during build. At runtime, enableTsConfigPath() must be called\n// first to register the path mapping.\nconst VITE_PLUGIN_PACKAGE = \"@trackunit/iris-app-vite-plugin\";\n\n/**\n * Gets the default Vite config for Iris Apps.\n *\n * IMPORTANT: This function MUST be called AFTER enableTsConfigPath() has been called,\n * because it dynamically imports @trackunit/iris-app-vite-plugin which uses tsconfig paths.\n *\n * @param mode - \"production\" or \"development\"\n * @param nxRootDir - the root of the nx workspace\n * @param appDir - the app directory\n * @param _irisAppManifest - the iris app manifest (used for logging/validation)\n * @param context - NX executor context\n * @returns {Promise<UserConfig>} the default Vite config\n */\nexport const getDefaultViteConfig = async (\n mode: \"production\" | \"development\",\n nxRootDir: string,\n appDir: string,\n _irisAppManifest: IrisAppManifest,\n context: ExecutorContext\n): Promise<UserConfig> => {\n // Dynamic import - safe after enableTsConfigPath() is called\n const { getTrackunitIrisAppVitePlugins } = await import(VITE_PLUGIN_PACKAGE);\n\n const irisAppPlugins = await getTrackunitIrisAppVitePlugins({\n appDir,\n workspaceRoot: nxRootDir,\n config: { mode },\n });\n\n return {\n root: appDir,\n mode,\n plugins: [...irisAppPlugins],\n // Optimize dependency pre-bundling\n optimizeDeps: {\n // Force include common dependencies to speed up dev server startup\n include: [\"react\", \"react-dom\", \"react/jsx-runtime\"],\n // Use esbuild for faster dependency scanning\n esbuildOptions: {\n target: \"esnext\",\n },\n },\n build: {\n outDir: `dist/apps/${context.projectName}`,\n emptyOutDir: true,\n // Target modern browsers - faster builds, no legacy transforms\n target: \"esnext\",\n // Use esbuild for minification (MUCH faster than terser)\n minify: \"esbuild\",\n // Disable source maps in production for faster builds\n sourcemap: false,\n // Increase chunk size warning limit\n chunkSizeWarningLimit: 1000,\n // Put remoteEntry.js at root (not in assets/) to match rspack\n assetsDir: \"\",\n // Use JavaScript entry instead of index.html for Module Federation remotes\n // The MF plugin generates remoteEntry.js as the actual bundle entry\n rollupOptions: {\n // this is just a dummy input to make the build pass - as Iris apps are module federation apps\n input: join(__dirname, \"index.ts\"),\n // Preserve the entry file name for Module Federation compatibility\n output: {\n // ESM format for Module Federation\n format: \"esm\",\n // Entry files at root level (same as rspack)\n entryFileNames: \"[name].js\",\n // Chunks with hash\n chunkFileNames: \"[name]-[hash].js\",\n // Static assets\n assetFileNames: \"static/[name]-[hash][extname]\",\n },\n },\n },\n };\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/iris-app-sdk/vite/src/executors/utils/index.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,iEAAiE","sourcesContent":["// eslint-disable-next-line local-rules/no-internal-barrel-files\n// dummy file to build - as Iris apps are module federation apps."]}
|
package/src/index.js
ADDED
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/vite/src/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|