@velarscript/cli 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +117 -0
- package/dist/application-package-host.d.ts +5 -0
- package/dist/application-package-host.d.ts.map +1 -0
- package/dist/application-package-host.js +67 -0
- package/dist/application-package-host.js.map +1 -0
- package/dist/bounded-text.d.ts +2 -0
- package/dist/bounded-text.d.ts.map +1 -0
- package/dist/bounded-text.js +13 -0
- package/dist/bounded-text.js.map +1 -0
- package/dist/browser-process-owner.d.ts +15 -0
- package/dist/browser-process-owner.d.ts.map +1 -0
- package/dist/browser-process-owner.js +151 -0
- package/dist/browser-process-owner.js.map +1 -0
- package/dist/browser-test-runner.d.ts +11 -0
- package/dist/browser-test-runner.d.ts.map +1 -0
- package/dist/browser-test-runner.js +1022 -0
- package/dist/browser-test-runner.js.map +1 -0
- package/dist/build-engine-tool.d.ts +3 -0
- package/dist/build-engine-tool.d.ts.map +1 -0
- package/dist/build-engine-tool.js +34 -0
- package/dist/build-engine-tool.js.map +1 -0
- package/dist/build-staging.d.ts +3 -0
- package/dist/build-staging.d.ts.map +1 -0
- package/dist/build-staging.js +3 -0
- package/dist/build-staging.js.map +1 -0
- package/dist/bundled-application-package-host-registry.d.ts +10 -0
- package/dist/bundled-application-package-host-registry.d.ts.map +1 -0
- package/dist/bundled-application-package-host-registry.js +16 -0
- package/dist/bundled-application-package-host-registry.js.map +1 -0
- package/dist/bundled-extension-registry.d.ts +22 -0
- package/dist/bundled-extension-registry.d.ts.map +1 -0
- package/dist/bundled-extension-registry.js +10 -0
- package/dist/bundled-extension-registry.js.map +1 -0
- package/dist/canonical-path.d.ts +3 -0
- package/dist/canonical-path.d.ts.map +1 -0
- package/dist/canonical-path.js +30 -0
- package/dist/canonical-path.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1274 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +26 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +403 -0
- package/dist/config.js.map +1 -0
- package/dist/deployment-verifier.d.ts +34 -0
- package/dist/deployment-verifier.d.ts.map +1 -0
- package/dist/deployment-verifier.js +260 -0
- package/dist/deployment-verifier.js.map +1 -0
- package/dist/dev-server.d.ts +3 -0
- package/dist/dev-server.d.ts.map +1 -0
- package/dist/dev-server.js +464 -0
- package/dist/dev-server.js.map +1 -0
- package/dist/embedded-modules.d.ts +17 -0
- package/dist/embedded-modules.d.ts.map +1 -0
- package/dist/embedded-modules.js +33 -0
- package/dist/embedded-modules.js.map +1 -0
- package/dist/extension-metadata.d.ts +23 -0
- package/dist/extension-metadata.d.ts.map +1 -0
- package/dist/extension-metadata.js +254 -0
- package/dist/extension-metadata.js.map +1 -0
- package/dist/file-integrity.d.ts +7 -0
- package/dist/file-integrity.d.ts.map +1 -0
- package/dist/file-integrity.js +14 -0
- package/dist/file-integrity.js.map +1 -0
- package/dist/framework-host.d.ts +12 -0
- package/dist/framework-host.d.ts.map +1 -0
- package/dist/framework-host.js +46 -0
- package/dist/framework-host.js.map +1 -0
- package/dist/host-error.d.ts +6 -0
- package/dist/host-error.d.ts.map +1 -0
- package/dist/host-error.js +54 -0
- package/dist/host-error.js.map +1 -0
- package/dist/installed-package.d.ts +9 -0
- package/dist/installed-package.d.ts.map +1 -0
- package/dist/installed-package.js +23 -0
- package/dist/installed-package.js.map +1 -0
- package/dist/language-server-bundle-entry.d.ts +2 -0
- package/dist/language-server-bundle-entry.d.ts.map +1 -0
- package/dist/language-server-bundle-entry.js +7 -0
- package/dist/language-server-bundle-entry.js.map +1 -0
- package/dist/language-server-tool.d.ts +3 -0
- package/dist/language-server-tool.d.ts.map +1 -0
- package/dist/language-server-tool.js +30 -0
- package/dist/language-server-tool.js.map +1 -0
- package/dist/language-server.d.ts +9 -0
- package/dist/language-server.d.ts.map +1 -0
- package/dist/language-server.js +1733 -0
- package/dist/language-server.js.map +1 -0
- package/dist/mechanical-fixer.d.ts +30 -0
- package/dist/mechanical-fixer.d.ts.map +1 -0
- package/dist/mechanical-fixer.js +103 -0
- package/dist/mechanical-fixer.js.map +1 -0
- package/dist/module-assets.d.ts +11 -0
- package/dist/module-assets.d.ts.map +1 -0
- package/dist/module-assets.js +90 -0
- package/dist/module-assets.js.map +1 -0
- package/dist/npm.d.ts +23 -0
- package/dist/npm.d.ts.map +1 -0
- package/dist/npm.js +456 -0
- package/dist/npm.js.map +1 -0
- package/dist/official-language-server-extensions.d.ts +2 -0
- package/dist/official-language-server-extensions.d.ts.map +1 -0
- package/dist/official-language-server-extensions.js +38 -0
- package/dist/official-language-server-extensions.js.map +1 -0
- package/dist/official-script-language-service.d.ts +2 -0
- package/dist/official-script-language-service.d.ts.map +1 -0
- package/dist/official-script-language-service.js +10 -0
- package/dist/official-script-language-service.js.map +1 -0
- package/dist/official-tool-assets.d.ts +3 -0
- package/dist/official-tool-assets.d.ts.map +1 -0
- package/dist/official-tool-assets.js +41 -0
- package/dist/official-tool-assets.js.map +1 -0
- package/dist/ownership-graph.d.ts +46 -0
- package/dist/ownership-graph.d.ts.map +1 -0
- package/dist/ownership-graph.js +255 -0
- package/dist/ownership-graph.js.map +1 -0
- package/dist/package-manager.d.ts +20 -0
- package/dist/package-manager.d.ts.map +1 -0
- package/dist/package-manager.js +345 -0
- package/dist/package-manager.js.map +1 -0
- package/dist/packaged-official-tool.d.ts +8 -0
- package/dist/packaged-official-tool.d.ts.map +1 -0
- package/dist/packaged-official-tool.js +32 -0
- package/dist/packaged-official-tool.js.map +1 -0
- package/dist/preview-server.d.ts +11 -0
- package/dist/preview-server.d.ts.map +1 -0
- package/dist/preview-server.js +163 -0
- package/dist/preview-server.js.map +1 -0
- package/dist/production-build.d.ts +57 -0
- package/dist/production-build.d.ts.map +1 -0
- package/dist/production-build.js +332 -0
- package/dist/production-build.js.map +1 -0
- package/dist/production-verifier.d.ts +9 -0
- package/dist/production-verifier.d.ts.map +1 -0
- package/dist/production-verifier.js +268 -0
- package/dist/production-verifier.js.map +1 -0
- package/dist/program-runner.d.ts +7 -0
- package/dist/program-runner.d.ts.map +1 -0
- package/dist/program-runner.js +98 -0
- package/dist/program-runner.js.map +1 -0
- package/dist/project-check.d.ts +31 -0
- package/dist/project-check.d.ts.map +1 -0
- package/dist/project-check.js +95 -0
- package/dist/project-check.js.map +1 -0
- package/dist/project-format.d.ts +6 -0
- package/dist/project-format.d.ts.map +1 -0
- package/dist/project-format.js +21 -0
- package/dist/project-format.js.map +1 -0
- package/dist/project-semantic.d.ts +62 -0
- package/dist/project-semantic.d.ts.map +1 -0
- package/dist/project-semantic.js +1079 -0
- package/dist/project-semantic.js.map +1 -0
- package/dist/project-session.d.ts +36 -0
- package/dist/project-session.d.ts.map +1 -0
- package/dist/project-session.js +339 -0
- package/dist/project-session.js.map +1 -0
- package/dist/project-task-bundle-entry.d.ts +2 -0
- package/dist/project-task-bundle-entry.d.ts.map +1 -0
- package/dist/project-task-bundle-entry.js +18 -0
- package/dist/project-task-bundle-entry.js.map +1 -0
- package/dist/project-task-invocation.d.ts +16 -0
- package/dist/project-task-invocation.d.ts.map +1 -0
- package/dist/project-task-invocation.js +72 -0
- package/dist/project-task-invocation.js.map +1 -0
- package/dist/project-task-tool.d.ts +3 -0
- package/dist/project-task-tool.d.ts.map +1 -0
- package/dist/project-task-tool.js +61 -0
- package/dist/project-task-tool.js.map +1 -0
- package/dist/project.d.ts +71 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +1750 -0
- package/dist/project.js.map +1 -0
- package/dist/reproduction.d.ts +50 -0
- package/dist/reproduction.d.ts.map +1 -0
- package/dist/reproduction.js +321 -0
- package/dist/reproduction.js.map +1 -0
- package/dist/script-language-service.d.ts +82 -0
- package/dist/script-language-service.d.ts.map +1 -0
- package/dist/script-language-service.js +18 -0
- package/dist/script-language-service.js.map +1 -0
- package/dist/source-limits.d.ts +5 -0
- package/dist/source-limits.d.ts.map +1 -0
- package/dist/source-limits.js +19 -0
- package/dist/source-limits.js.map +1 -0
- package/dist/standalone-build.d.ts +15 -0
- package/dist/standalone-build.d.ts.map +1 -0
- package/dist/standalone-build.js +76 -0
- package/dist/standalone-build.js.map +1 -0
- package/dist/standard-modules.d.ts +22 -0
- package/dist/standard-modules.d.ts.map +1 -0
- package/dist/standard-modules.js +3066 -0
- package/dist/standard-modules.js.map +1 -0
- package/dist/static-deployment.d.ts +48 -0
- package/dist/static-deployment.d.ts.map +1 -0
- package/dist/static-deployment.js +142 -0
- package/dist/static-deployment.js.map +1 -0
- package/dist/test-output.d.ts +20 -0
- package/dist/test-output.d.ts.map +1 -0
- package/dist/test-output.js +119 -0
- package/dist/test-output.js.map +1 -0
- package/dist/test-runner.d.ts +13 -0
- package/dist/test-runner.d.ts.map +1 -0
- package/dist/test-runner.js +226 -0
- package/dist/test-runner.js.map +1 -0
- package/dist/typescript-declarations.d.ts +20 -0
- package/dist/typescript-declarations.d.ts.map +1 -0
- package/dist/typescript-declarations.js +1609 -0
- package/dist/typescript-declarations.js.map +1 -0
- package/dist/uncaught-program-error.d.ts +24 -0
- package/dist/uncaught-program-error.d.ts.map +1 -0
- package/dist/uncaught-program-error.js +105 -0
- package/dist/uncaught-program-error.js.map +1 -0
- package/dist/unowned-errors.d.ts +56 -0
- package/dist/unowned-errors.d.ts.map +1 -0
- package/dist/unowned-errors.js +82 -0
- package/dist/unowned-errors.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/dist/workspace-index.d.ts +78 -0
- package/dist/workspace-index.d.ts.map +1 -0
- package/dist/workspace-index.js +493 -0
- package/dist/workspace-index.js.map +1 -0
- package/package.json +45 -0
- package/skill/ai-skill.md +749 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# @velarscript/cli
|
|
2
|
+
|
|
3
|
+
Command-line compiler, project tooling, development/verified-production
|
|
4
|
+
servers, Core/browser test runners, production artifact verifier, and language
|
|
5
|
+
server for VelarScript. The language server and project graph are compiler-owned;
|
|
6
|
+
editors, including the injected VelarOS Workbench contribution, consume them as
|
|
7
|
+
independent clients. Requires Node.js 24 or later.
|
|
8
|
+
|
|
9
|
+
The same server routes JavaScript and TypeScript documents to the pure
|
|
10
|
+
VelarScript `@velarscript/script-analysis` package through an internal bundled
|
|
11
|
+
tool edge. That package publishes bounded lexical
|
|
12
|
+
and local structural diagnostics, symbols, hover, definition, references,
|
|
13
|
+
rename, completion, and semantic tokens with incremental lexical updates. It is
|
|
14
|
+
not the TypeScript compiler: cross-file/package type checking and JavaScript/
|
|
15
|
+
TypeScript formatting remain unsupported and are never synthesized by the CLI.
|
|
16
|
+
|
|
17
|
+
Application framework behavior is injected. For each project extension the CLI
|
|
18
|
+
loads its compiler entry and optional host entry, validates the versioned host
|
|
19
|
+
protocol, then supplies generic filesystem, bundling, development transport,
|
|
20
|
+
preview, and browser-driver services. The CLI distribution includes exact
|
|
21
|
+
official Node capability plus Web and Desktop application targets so a zero-`node_modules` project can
|
|
22
|
+
consume that toolchain generation, but it owns none of their syntax, HTML,
|
|
23
|
+
CSP, lifecycle, runtime, or native packaging behavior. Project-local targets
|
|
24
|
+
take precedence and third-party extensions never use this fallback.
|
|
25
|
+
The distribution also pins and bundles the implementation dependencies behind
|
|
26
|
+
the official `velar/msgpack`, `velar/compression`, and `velar/noise` adapters;
|
|
27
|
+
applications import those Velar modules, not `msgpackr`, `fflate`, or
|
|
28
|
+
`simplex-noise` directly.
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
npx @velarscript/cli create my-app
|
|
32
|
+
npx @velarscript/cli create api --template node
|
|
33
|
+
npx @velarscript/cli create desktop-app --template desktop
|
|
34
|
+
npx @velarscript/cli create product-docs --template docs
|
|
35
|
+
npx @velarscript/cli create design-kit --template component
|
|
36
|
+
cd my-app
|
|
37
|
+
npm install
|
|
38
|
+
npm exec velar -- format --check
|
|
39
|
+
npm exec velar -- test
|
|
40
|
+
npm exec velar -- dev
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Project creation delegates to the exact matching `create-velar` package, the
|
|
44
|
+
same implementation used by `npm create velar@latest`. First-class application
|
|
45
|
+
templates are `web`, `node`, and `desktop`; `docs`, `library`, and `component`
|
|
46
|
+
remain available for specialized projects. Creation never installs or initializes Git.
|
|
47
|
+
|
|
48
|
+
VelarScript deliberately uses npm as its package registry, resolver, installer, and
|
|
49
|
+
lockfile authority. After the initial `npm install`, the project-aware commands
|
|
50
|
+
provide a smaller everyday surface:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
npm exec velar -- install
|
|
54
|
+
npm exec velar -- add chart-library
|
|
55
|
+
npm exec velar -- add test-helper --dev
|
|
56
|
+
npm exec velar -- remove chart-library
|
|
57
|
+
npm exec velar -- update
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`add` accepts npm registry names and versions, not paths, Git URLs, aliases, or
|
|
61
|
+
raw npm flags. Packages that publish `velar.extension` metadata are also added
|
|
62
|
+
to `velar.json`; removal deletes that declaration and its owned manifest field.
|
|
63
|
+
The npm operation remains authoritative for `package.json`, `package-lock.json`,
|
|
64
|
+
and `node_modules`, while VelarScript atomically owns only its project manifest.
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
npm exec velar -- test --browser
|
|
68
|
+
npm exec velar -- build
|
|
69
|
+
npm exec velar -- package
|
|
70
|
+
npm exec velar -- verify
|
|
71
|
+
npm exec velar -- preview
|
|
72
|
+
npm exec velar -- verify-deployment --url https://preview.example.com
|
|
73
|
+
npm exec velar -- verify-deployment --url https://preview.example.com --json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Browser tests run in a dedicated supervised process, not in the long-lived CLI
|
|
77
|
+
owner. Each test has a 120-second deadline, the complete run has a 20-minute
|
|
78
|
+
deadline, and browser/context cleanup has a 10-second deadline. The supervisor
|
|
79
|
+
owns a private process group on POSIX hosts, forwards SIGHUP/SIGINT/SIGTERM,
|
|
80
|
+
escalates to SIGKILL, and reaps any remaining BrowserServer or renderer process
|
|
81
|
+
before it returns. The worker also observes parent IPC disconnect, so terminating
|
|
82
|
+
or force-killing the invoking CLI cannot leave a browser test running. Signals
|
|
83
|
+
retain conventional exit codes 129, 130, and 143.
|
|
84
|
+
|
|
85
|
+
`verify-deployment` compares the verified local output to the served HTTPS
|
|
86
|
+
origin. CI may provide the same target with `VELAR_DEPLOYMENT_URL`.
|
|
87
|
+
`--json` emits the versioned verification report used as external-preview
|
|
88
|
+
evidence.
|
|
89
|
+
|
|
90
|
+
`velar repro` is for the case where the compiler itself looks wrong. It writes
|
|
91
|
+
a self-contained minimal reproduction — the source the diagnostic touches,
|
|
92
|
+
`velar.json`, the verbatim output, and the toolchain, Node, and platform
|
|
93
|
+
versions — into `.velar/repro`, then prints the path. Its `README.md` arrives
|
|
94
|
+
laid out in the three sections a defect report carries, with *What the compiler
|
|
95
|
+
said* already filled in. Nothing is uploaded, nothing about the machine is
|
|
96
|
+
collected, and every absolute path is rewritten to a project-relative one. The
|
|
97
|
+
bundle is extracted to a temporary directory and re-checked before the command
|
|
98
|
+
returns; a copy that stops reproducing is reported as such rather than handed
|
|
99
|
+
over as a clean report. A failing `velar check` ends with the one line naming
|
|
100
|
+
the command.
|
|
101
|
+
|
|
102
|
+
The distribution also carries the VelarScript AI skill brief
|
|
103
|
+
(`skill/ai-skill.md`, kept byte-identical to the repository's
|
|
104
|
+
`docs/ai-skill.md` by a permanent gate). `velar skill` prints it verbatim to
|
|
105
|
+
stdout, so any coding agent can load the language brief with one offline
|
|
106
|
+
command.
|
|
107
|
+
|
|
108
|
+
Use `velar help <command>` or `velar <command> --help` for command-specific
|
|
109
|
+
usage and defaults. Project creation is transactional, manifests reject unknown
|
|
110
|
+
fields, and production/release verification fails closed rather than serving or
|
|
111
|
+
accepting undeclared output.
|
|
112
|
+
|
|
113
|
+
`velar format path/to/file.vel` resolves the file's nearest project before
|
|
114
|
+
formatting and uses that project's official compiler extensions. A Web or
|
|
115
|
+
Desktop file therefore keeps its extension-owned angle syntax even when the
|
|
116
|
+
caller names one file instead of the project root; a malformed project is not
|
|
117
|
+
silently retried as standalone Core source.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ApplicationPackageHost, type ApplicationPackageResult } from "@velarscript/compiler/application-package-host";
|
|
2
|
+
import type { VelarProjectConfig } from "./config.ts";
|
|
3
|
+
export declare function loadApplicationPackageHost(project: VelarProjectConfig): Promise<ApplicationPackageHost>;
|
|
4
|
+
export declare function validateApplicationPackageResult(value: unknown, projectRoot: string): ApplicationPackageResult;
|
|
5
|
+
//# sourceMappingURL=application-package-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-package-host.d.ts","sourceRoot":"","sources":["../src/application-package-host.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC9B,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAuB7G;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,wBAAwB,CAa9G"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
9
|
+
import { createRequire } from "node:module";
|
|
10
|
+
import { isAbsolute, relative, resolve } from "node:path";
|
|
11
|
+
import { pathToFileURL } from "node:url";
|
|
12
|
+
import { VELAR_APPLICATION_PACKAGE_HOST_PROTOCOL_VERSION, } from "@velarscript/compiler/application-package-host";
|
|
13
|
+
import { bundledApplicationPackageHost } from "./bundled-application-package-host-registry.js";
|
|
14
|
+
import { hostErrorCode, hostErrorMessage } from "./host-error.js";
|
|
15
|
+
export async function loadApplicationPackageHost(project) {
|
|
16
|
+
const framework = project.framework;
|
|
17
|
+
if (!framework)
|
|
18
|
+
throw new Error("this project does not enable an application target");
|
|
19
|
+
const package_ = project.extensionGraph.find((item) => item.name === framework.host.id);
|
|
20
|
+
if (!package_)
|
|
21
|
+
throw new Error(`application target '${framework.host.id}' is absent from the resolved extension graph`);
|
|
22
|
+
const bundled = bundledApplicationPackageHost(package_.name);
|
|
23
|
+
if (bundled)
|
|
24
|
+
return validateApplicationPackageHost(bundled, package_.name, framework.host.apiVersion);
|
|
25
|
+
const require = createRequire(package_.manifestPath);
|
|
26
|
+
const specifier = `${package_.name}/package-host`;
|
|
27
|
+
let entry;
|
|
28
|
+
try {
|
|
29
|
+
entry = require.resolve(specifier);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
const code = hostErrorCode(error);
|
|
33
|
+
const message = hostErrorMessage(error);
|
|
34
|
+
if (code === "ERR_PACKAGE_PATH_NOT_EXPORTED"
|
|
35
|
+
|| (code === "MODULE_NOT_FOUND" && message.includes(`'${specifier}'`))) {
|
|
36
|
+
throw new Error(`application target '${package_.name}' does not provide native packaging`);
|
|
37
|
+
}
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
const namespace = await import(__rewriteRelativeImportExtension(pathToFileURL(entry).href));
|
|
41
|
+
return validateApplicationPackageHost(namespace.velarApplicationPackageHost, package_.name, framework.host.apiVersion);
|
|
42
|
+
}
|
|
43
|
+
export function validateApplicationPackageResult(value, projectRoot) {
|
|
44
|
+
const result = value;
|
|
45
|
+
if (!result || typeof result !== "object" || typeof result.artifactPath !== "string" || !isAbsolute(result.artifactPath)
|
|
46
|
+
|| !Array.isArray(result.details) || result.details.length > 16
|
|
47
|
+
|| result.details.some((item) => typeof item !== "string" || item.length > 1024 || /[\0\r\n]/u.test(item))) {
|
|
48
|
+
throw new Error("application package host returned an invalid result");
|
|
49
|
+
}
|
|
50
|
+
const artifactPath = resolve(result.artifactPath);
|
|
51
|
+
const fromRoot = relative(projectRoot, artifactPath);
|
|
52
|
+
if (fromRoot === "" || fromRoot === ".." || fromRoot.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`) || isAbsolute(fromRoot)) {
|
|
53
|
+
throw new Error("application package host returned an artifact path outside the project root");
|
|
54
|
+
}
|
|
55
|
+
return Object.freeze({ artifactPath, details: Object.freeze([...result.details]) });
|
|
56
|
+
}
|
|
57
|
+
function validateApplicationPackageHost(value, name, apiVersion) {
|
|
58
|
+
const host = value;
|
|
59
|
+
if (!host || typeof host !== "object"
|
|
60
|
+
|| host.protocolVersion !== VELAR_APPLICATION_PACKAGE_HOST_PROTOCOL_VERSION
|
|
61
|
+
|| host.id !== name || host.apiVersion !== apiVersion
|
|
62
|
+
|| typeof host.packageApplication !== "function") {
|
|
63
|
+
throw new Error(`'${name}/package-host' exports an invalid application package host`);
|
|
64
|
+
}
|
|
65
|
+
return Object.freeze(host);
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=application-package-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-package-host.js","sourceRoot":"","sources":["../src/application-package-host.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,+CAA+C,GAGhD,MAAM,gDAAgD,CAAC;AAExD,OAAO,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAElE,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,OAA2B;IAC1E,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IACpC,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACtF,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxF,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,SAAS,CAAC,IAAI,CAAC,EAAE,+CAA+C,CAAC,CAAC;IACxH,MAAM,OAAO,GAAG,6BAA6B,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,OAAO;QAAE,OAAO,8BAA8B,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtG,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IACrD,MAAM,SAAS,GAAG,GAAG,QAAQ,CAAC,IAAI,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ourceRoot":"","sources":["../src/bounded-text.ts"],"names":[],"mappings":"AAEA,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAOxG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { readFile, stat } from "node:fs/promises";
|
|
2
|
+
export async function readBoundedText(path, maximumBytes, label) {
|
|
3
|
+
const metadata = await stat(path);
|
|
4
|
+
if (!metadata.isFile())
|
|
5
|
+
throw new Error(`${label} is not a regular file`);
|
|
6
|
+
if (metadata.size > maximumBytes)
|
|
7
|
+
throw new RangeError(`${label} exceeds ${maximumBytes} bytes`);
|
|
8
|
+
const source = await readFile(path, "utf8");
|
|
9
|
+
if (Buffer.byteLength(source, "utf8") > maximumBytes)
|
|
10
|
+
throw new RangeError(`${label} exceeds ${maximumBytes} bytes`);
|
|
11
|
+
return source;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=bounded-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounded-text.js","sourceRoot":"","sources":["../src/bounded-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAY,EAAE,YAAoB,EAAE,KAAa;IACrF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,wBAAwB,CAAC,CAAC;IAC1E,IAAI,QAAQ,CAAC,IAAI,GAAG,YAAY;QAAE,MAAM,IAAI,UAAU,CAAC,GAAG,KAAK,YAAY,YAAY,QAAQ,CAAC,CAAC;IACjG,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5C,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,YAAY;QAAE,MAAM,IAAI,UAAU,CAAC,GAAG,KAAK,YAAY,YAAY,QAAQ,CAAC,CAAC;IACrH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Browser, BrowserServer } from "playwright";
|
|
2
|
+
export interface BrowserWorkerProcessOptions {
|
|
3
|
+
readonly executable: string;
|
|
4
|
+
readonly arguments: readonly string[];
|
|
5
|
+
readonly cwd: string;
|
|
6
|
+
readonly environment: NodeJS.ProcessEnv;
|
|
7
|
+
readonly deadlineMs: number;
|
|
8
|
+
readonly cleanupTimeoutMs: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function superviseBrowserWorker(options: BrowserWorkerProcessOptions): Promise<number>;
|
|
11
|
+
export declare function observeBrowserWorkerParent(): () => void;
|
|
12
|
+
export declare function exitBrowserWorker(code: number): Promise<never>;
|
|
13
|
+
export declare function terminateBrowserServer(browser: Browser | null, server: BrowserServer, timeoutMs: number): Promise<void>;
|
|
14
|
+
export declare function boundedBrowserOperation<T>(operation: Promise<T>, timeoutMs: number, label: string, cancellation?: Promise<never> | null): Promise<T>;
|
|
15
|
+
//# sourceMappingURL=browser-process-owner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-process-owner.d.ts","sourceRoot":"","sources":["../src/browser-process-owner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGzD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AAED,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,CAwDlG;AAqBD,wBAAgB,0BAA0B,IAAI,MAAM,IAAI,CAIvD;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAKpE;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED,wBAAsB,uBAAuB,CAAC,CAAC,EAC7C,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EACrB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IAAW,GACzC,OAAO,CAAC,CAAC,CAAC,CAUZ"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { hostErrorStack } from "./host-error.js";
|
|
3
|
+
export async function superviseBrowserWorker(options) {
|
|
4
|
+
const ownsProcessGroup = process.platform !== "win32";
|
|
5
|
+
const child = spawn(options.executable, options.arguments, {
|
|
6
|
+
cwd: options.cwd,
|
|
7
|
+
detached: ownsProcessGroup,
|
|
8
|
+
env: options.environment,
|
|
9
|
+
stdio: ["ignore", "inherit", "inherit", "ipc"],
|
|
10
|
+
});
|
|
11
|
+
return new Promise((resolveExit, reject) => {
|
|
12
|
+
let settled = false;
|
|
13
|
+
let forwarded = null;
|
|
14
|
+
let forcedTimer = null;
|
|
15
|
+
const cleanup = () => {
|
|
16
|
+
process.off("SIGHUP", onHangup);
|
|
17
|
+
process.off("SIGINT", onInterrupt);
|
|
18
|
+
process.off("SIGTERM", onTerminate);
|
|
19
|
+
clearTimeout(deadlineTimer);
|
|
20
|
+
if (forcedTimer !== null)
|
|
21
|
+
clearTimeout(forcedTimer);
|
|
22
|
+
};
|
|
23
|
+
const finish = (value) => {
|
|
24
|
+
if (settled)
|
|
25
|
+
return;
|
|
26
|
+
settled = true;
|
|
27
|
+
signalOwnedWorker(child, "SIGKILL", ownsProcessGroup, true);
|
|
28
|
+
cleanup();
|
|
29
|
+
resolveExit(value);
|
|
30
|
+
};
|
|
31
|
+
const forward = (signal) => {
|
|
32
|
+
if (forwarded !== null)
|
|
33
|
+
return;
|
|
34
|
+
forwarded = signal;
|
|
35
|
+
signalOwnedWorker(child, signal, ownsProcessGroup, false);
|
|
36
|
+
forcedTimer = setTimeout(() => {
|
|
37
|
+
signalOwnedWorker(child, "SIGKILL", ownsProcessGroup, true);
|
|
38
|
+
}, options.cleanupTimeoutMs + 5_000);
|
|
39
|
+
};
|
|
40
|
+
const onHangup = () => forward("SIGHUP");
|
|
41
|
+
const onInterrupt = () => forward("SIGINT");
|
|
42
|
+
const onTerminate = () => forward("SIGTERM");
|
|
43
|
+
process.once("SIGHUP", onHangup);
|
|
44
|
+
process.once("SIGINT", onInterrupt);
|
|
45
|
+
process.once("SIGTERM", onTerminate);
|
|
46
|
+
const deadlineTimer = setTimeout(() => forward("SIGTERM"), options.deadlineMs);
|
|
47
|
+
child.once("error", (error) => {
|
|
48
|
+
if (settled)
|
|
49
|
+
return;
|
|
50
|
+
settled = true;
|
|
51
|
+
signalOwnedWorker(child, "SIGKILL", ownsProcessGroup, true);
|
|
52
|
+
cleanup();
|
|
53
|
+
reject(error);
|
|
54
|
+
});
|
|
55
|
+
child.once("exit", (code, signal) => {
|
|
56
|
+
if (code !== null)
|
|
57
|
+
finish(code);
|
|
58
|
+
else if (forwarded === "SIGHUP")
|
|
59
|
+
finish(129);
|
|
60
|
+
else if (forwarded === "SIGINT")
|
|
61
|
+
finish(130);
|
|
62
|
+
else if (forwarded === "SIGTERM")
|
|
63
|
+
finish(143);
|
|
64
|
+
else
|
|
65
|
+
finish(signal === null ? 1 : 128);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function signalOwnedWorker(child, signal, ownsProcessGroup, includeExitedGroup) {
|
|
70
|
+
if (ownsProcessGroup && child.pid !== undefined
|
|
71
|
+
&& (includeExitedGroup || (child.exitCode === null && child.signalCode === null))) {
|
|
72
|
+
try {
|
|
73
|
+
process.kill(-child.pid, signal);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
catch { }
|
|
77
|
+
}
|
|
78
|
+
if (child.exitCode === null && child.signalCode === null) {
|
|
79
|
+
try {
|
|
80
|
+
child.kill(signal);
|
|
81
|
+
}
|
|
82
|
+
catch { }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export function observeBrowserWorkerParent() {
|
|
86
|
+
const parentDisconnected = () => { process.kill(process.pid, "SIGTERM"); };
|
|
87
|
+
process.once("disconnect", parentDisconnected);
|
|
88
|
+
return () => process.off("disconnect", parentDisconnected);
|
|
89
|
+
}
|
|
90
|
+
export async function exitBrowserWorker(code) {
|
|
91
|
+
await flushWritable(process.stdout);
|
|
92
|
+
await flushWritable(process.stderr);
|
|
93
|
+
if (process.connected && typeof process.disconnect === "function")
|
|
94
|
+
process.disconnect();
|
|
95
|
+
process.exit(code);
|
|
96
|
+
}
|
|
97
|
+
export async function terminateBrowserServer(browser, server, timeoutMs) {
|
|
98
|
+
const child = server.process();
|
|
99
|
+
if (browser !== null && browser.isConnected()) {
|
|
100
|
+
try {
|
|
101
|
+
await boundedBrowserOperation(browser.close(), timeoutMs, "Browser connection cleanup");
|
|
102
|
+
}
|
|
103
|
+
catch { }
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
await boundedBrowserOperation(server.close(), timeoutMs, "Browser graceful cleanup");
|
|
107
|
+
await boundedBrowserOperation(waitForChildExit(child), timeoutMs, "Browser process exit");
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
catch (gracefulError) {
|
|
111
|
+
try {
|
|
112
|
+
await boundedBrowserOperation(server.kill(), timeoutMs, "Browser forced cleanup");
|
|
113
|
+
await boundedBrowserOperation(waitForChildExit(child), timeoutMs, "Forced browser process exit");
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
catch (forcedError) {
|
|
117
|
+
if (child.exitCode === null && child.signalCode === null)
|
|
118
|
+
child.kill("SIGKILL");
|
|
119
|
+
try {
|
|
120
|
+
await boundedBrowserOperation(waitForChildExit(child), timeoutMs, "Emergency browser process exit");
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
throw new Error(`Browser cleanup failed after graceful and forced termination: ${hostErrorStack(gracefulError)}\n${hostErrorStack(forcedError)}`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export async function boundedBrowserOperation(operation, timeoutMs, label, cancellation = null) {
|
|
129
|
+
let timer = null;
|
|
130
|
+
const timeout = new Promise((_resolve, reject) => {
|
|
131
|
+
timer = setTimeout(() => reject(new Error(`${label} did not settle within ${timeoutMs} milliseconds`)), timeoutMs);
|
|
132
|
+
});
|
|
133
|
+
try {
|
|
134
|
+
return await Promise.race(cancellation === null ? [operation, timeout] : [operation, timeout, cancellation]);
|
|
135
|
+
}
|
|
136
|
+
finally {
|
|
137
|
+
if (timer !== null)
|
|
138
|
+
clearTimeout(timer);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function waitForChildExit(child) {
|
|
142
|
+
if (child.exitCode !== null || child.signalCode !== null)
|
|
143
|
+
return Promise.resolve();
|
|
144
|
+
return new Promise((resolveExit) => child.once("exit", () => resolveExit()));
|
|
145
|
+
}
|
|
146
|
+
async function flushWritable(stream) {
|
|
147
|
+
await new Promise((resolveFlush, reject) => {
|
|
148
|
+
stream.write("", (error) => error ? reject(error) : resolveFlush());
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=browser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AK,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;IAC/G,CAAC;YAAS,CAAC;QACT,IAAI,KAAK,KAAK,IAAI;YAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAmB;IAC3C,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACnF,OAAO,IAAI,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,MAA6B;IACxD,MAAM,IAAI,OAAO,CAAO,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE;QAC/C,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { VelarProjectConfig } from "./config.ts";
|
|
2
|
+
export type BrowserEngine = "chromium" | "firefox" | "webkit";
|
|
3
|
+
export type BrowserEngineSelection = BrowserEngine | "all";
|
|
4
|
+
export interface BrowserTestRunnerOptions {
|
|
5
|
+
readonly testTimeoutMs?: number;
|
|
6
|
+
readonly runTimeoutMs?: number;
|
|
7
|
+
readonly cleanupTimeoutMs?: number;
|
|
8
|
+
readonly executable?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function runBrowserTests(config: VelarProjectConfig, explicitInput: string | null, selection: BrowserEngineSelection, options?: BrowserTestRunnerOptions): Promise<number>;
|
|
11
|
+
//# sourceMappingURL=browser-test-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-test-runner.d.ts","sourceRoot":"","sources":["../src/browser-test-runner.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AA8BtD,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC9D,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,KAAK,CAAC;AAiO3D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAwCD,wBAAsB,eAAe,CACnC,MAAM,EAAE,kBAAkB,EAC1B,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,SAAS,EAAE,sBAAsB,EACjC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
|