Compare commits
No commits in common. "neo_26_1_2" and "master" have entirely different histories.
neo_26_1_2
...
master
12
.gitattributes
vendored
Normal file
12
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#
|
||||||
|
# https://help.github.com/articles/dealing-with-line-endings/
|
||||||
|
#
|
||||||
|
# Linux start script should use lf
|
||||||
|
/gradlew text eol=lf
|
||||||
|
|
||||||
|
# These are Windows script files and should use crlf
|
||||||
|
*.bat text eol=crlf
|
||||||
|
|
||||||
|
# Binary files should be left untouched
|
||||||
|
*.jar binary
|
||||||
|
|
||||||
62
.gitignore
vendored
62
.gitignore
vendored
|
|
@ -1,21 +1,51 @@
|
||||||
# MacOS DS_Store files
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# Gradle cache folder
|
|
||||||
.gradle
|
.gradle
|
||||||
|
|
||||||
# Gradle build folder
|
|
||||||
build
|
|
||||||
|
|
||||||
# IntelliJ
|
|
||||||
out/
|
|
||||||
.idea
|
.idea
|
||||||
|
.run
|
||||||
|
build/
|
||||||
|
!gradle/wrapper/gradle-wrapper.jar
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
/run/
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea/modules.xml
|
||||||
|
.idea/jarRepositories.xml
|
||||||
|
.idea/compiler.xml
|
||||||
|
.idea/libraries/
|
||||||
|
*.iws
|
||||||
*.iml
|
*.iml
|
||||||
# mpeltonen/sbt-idea plugin
|
*.ipr
|
||||||
.idea_modules/
|
out/
|
||||||
|
!**/src/main/**/out/
|
||||||
|
!**/src/test/**/out/
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
### Eclipse ###
|
||||||
hs_err_pid*
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
bin/
|
||||||
|
!**/src/main/**/bin/
|
||||||
|
!**/src/test/**/bin/
|
||||||
|
|
||||||
# Common working directory
|
### NetBeans ###
|
||||||
run
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Mac OS ###
|
||||||
|
.DS_Store
|
||||||
|
# Ignore Gradle build output directory
|
||||||
|
build
|
||||||
|
/RenderDoc_1.40_64/
|
||||||
|
/.run/
|
||||||
|
/.idea/
|
||||||
|
/mcmodsrepo/
|
||||||
|
|
|
||||||
674
LICENSE.GPL3
Normal file
674
LICENSE.GPL3
Normal file
|
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
164
README.MD
Normal file
164
README.MD
Normal file
|
|
@ -0,0 +1,164 @@
|
||||||
|
# 🪢 Super Lead Rope / 超级拴绳
|
||||||
|
|
||||||
|
## ⚠️ 注意 / Warning
|
||||||
|
**提示:目前属于早期测试版,如在服务器上使用不保证后续版本兼容,请慎重考虑。**
|
||||||
|
**Notice:** This is an **early test release**. So, **compatibility with future versions on servers is not guaranteed — use with caution.**
|
||||||
|
建议在正式服务器部署前先在备份或测试服中验证。
|
||||||
|
We recommend testing on backups or a development server before deploying to production.
|
||||||
|
|
||||||
|
---
|
||||||
|
**Super Lead Rope** 是一个对原版拴绳进行增强的模组,让玩家能够更灵活地管理和牵引生物。
|
||||||
|
相比原版,它不仅更强大,还具备跨维度与跨服的拓展特性。
|
||||||
|
|
||||||
|
**Super Lead Rope** is a mod that enhances the vanilla lead, allowing players to manage and leash entities more flexibly.
|
||||||
|
Compared to the original, it is not only more powerful but also supports cross-dimension and even cross-server features.
|
||||||
|
|
||||||
|
|
||||||
|
Super Lead Rope Commands 超级拴绳指令:
|
||||||
|
|
||||||
|
[Leash Data Command](./doc/LeashDataCommandUsage_EN.MD) | [超级拴绳数据指令](./doc/LeashDataCommandUsage_CN.MD)
|
||||||
|
---
|
||||||
|
|
||||||
|
## ✨ 功能特色 / Features
|
||||||
|
|
||||||
|
### 🔗 多实体拴绳 / Multi-Entity Leash
|
||||||
|
- 一根绳子可以同时拴多个实体。
|
||||||
|
- 一个实体也可以被多根绳子拴住,支持复杂连接。
|
||||||
|
|
||||||
|
- A single rope can leash multiple entities at the same time.
|
||||||
|
- One entity can also be leashed by multiple ropes, supporting complex connections.
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
---
|
||||||
|
|
||||||
|
### 📏 远距离牵引 / Long-Distance Tethering
|
||||||
|
- 原版拴绳在一定距离会断裂。
|
||||||
|
- 超级拴绳支持更远距离(待做)。
|
||||||
|
- 像橡皮筋一样拉回目标。在Y轴会有一定的弹性阻尼,保证在生物在Y轴下被牵引不会异常的频繁上下蹦极。
|
||||||
|
|
||||||
|
- Vanilla leads break after a certain distance.
|
||||||
|
- Super Lead Rope supports extended leash distance (WIP).
|
||||||
|
- Pulls entities back like a rubber band. There is a certain amount of damping on the Y axis to ensure that leashed entities do not bounce up and down excessively when being pulled vertically.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 💾 持久拴绑 / Persistent Leash
|
||||||
|
- 支持保存拴绳状态,退出/重进游戏不会断开。
|
||||||
|
- 即使 **holder**(拴绳端点)暂时消失,回来时也能恢复连接。
|
||||||
|
|
||||||
|
- Leash states are persistent and won’t break after rejoining the game.
|
||||||
|
- Even if the **holder** (anchor point) disappears temporarily, connections will be restored when it comes back.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🌌 跨维度 / 传送 / Cross-Dimension & Teleport
|
||||||
|
- 目前支持 **传送跟随**:当拴绳实体或玩家通过传送(如下界传送门、指令)时,拴绳目标会一同跟随。
|
||||||
|
|
||||||
|
- Currently, supports **teleport-follow**: when a leashed entity or player teleports (e.g. Nether portal, commands), the tethered entities follow along.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🎨 可视化与材质 / Visuals & Materials
|
||||||
|
- 比原版拴绳更粗壮,或具有特殊颜色。
|
||||||
|
- 未来可能支持多种材质(铁链、魔法绳、能量链等)。
|
||||||
|
|
||||||
|
- Thicker or colored ropes compared to vanilla leads.
|
||||||
|
- Future plans include multiple leash materials (iron chains, magical ropes, energy cords, etc.).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 💻 开发 / Develop
|
||||||
|
|
||||||
|
### Maven 仓库配置 / Maven Repository Configuration
|
||||||
|
|
||||||
|
在您的 `build.gradle` 中添加以下仓库配置:
|
||||||
|
|
||||||
|
Add the following repository configuration in your build.gradle:
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "LTD Maven"
|
||||||
|
url = "https://nexus.bot.leisuretimedock.top/repository/maven-public/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 依赖导入 / Dependency Import
|
||||||
|
|
||||||
|
在 `dependencies` 区块中添加 Super Lead Rope 依赖:
|
||||||
|
|
||||||
|
Add Super Lead Rope dependency in the dependencies block:
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
dependencies {
|
||||||
|
compileOnly 'top.r3944realms.superleadrope:superleadrope:版本号:api@jar'
|
||||||
|
runtimeOnly 'top.r3944realms.superleadrope:superleadrope:版本号'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 版本号示例 / Version Example
|
||||||
|
```groovy
|
||||||
|
compileOnly 'top.r3944realms.superleadrope:superleadrope:1.20.1-0.0.0.7:api@jar'
|
||||||
|
runtimeOnly 'top.r3944realms.superleadrope:superleadrope:1.20.1-0.0.0.7'
|
||||||
|
```
|
||||||
|
### 快速开始 / Quick Start
|
||||||
|
```groovy
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "LTD Maven"
|
||||||
|
url = "https://nexus.bot.leisuretimedock.top/repository/maven-public/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly 'top.r3944realms.superleadrope:superleadrope:1.20.1-0.0.0.7:api@jar'
|
||||||
|
runtimeOnly 'top.r3944realms.superleadrope:superleadrope:1.20.1-0.0.0.7'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
# 📜 License / 许可证
|
||||||
|
|
||||||
|
This project is licensed under the **GNU GPL v3** open source license.
|
||||||
|
本项目采用 **GNU GPL v3** 开源协议。
|
||||||
|
|
||||||
|
## You are free to: / 您可以自由地:
|
||||||
|
|
||||||
|
- **Use** - Use the mod in personal or commercial projects
|
||||||
|
**使用** - 在个人或商业项目中使用本模组
|
||||||
|
- **Learn** - Study and learn from the source code
|
||||||
|
**学习** - 研究和学习模组的源代码
|
||||||
|
- **Modify** - Modify the code to suit your needs
|
||||||
|
**修改** - 修改模组代码以满足您的需求
|
||||||
|
- **Distribute** - Distribute original or modified versions
|
||||||
|
**分发** - 分发原始或修改后的版本
|
||||||
|
|
||||||
|
## Under the following conditions: / 在遵循以下条件的前提下:
|
||||||
|
|
||||||
|
1. **Open Source Requirement** - If you distribute modified versions, you must open source them under the same GPL v3 license
|
||||||
|
**开源要求** - 如果您分发修改后的版本,必须同样使用GPL v3协议开源
|
||||||
|
2. **Copyright Notice** - Preserve original copyright and license notices
|
||||||
|
**版权声明** - 保留原始的版权和许可证声明
|
||||||
|
3. **Source Code Availability** - Provide access to the modified source code
|
||||||
|
**源代码可用** - 提供修改后的源代码访问方式
|
||||||
|
4. **Same License** - Use the same GPL v3 license
|
||||||
|
**相同许可证** - 使用相同的GPL v3协议
|
||||||
|
|
||||||
|
**Full Terms:** [View LICENSE file](LICENSE.GPL3) | [GPL v3 Details](https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
**完整条款:** [查看LICENSE文件](LICENSE.GPL3) | [GPL v3详情](https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
# 🎵 Audio Resources / 音效资源声明
|
||||||
|
|
||||||
|
This mod includes supplemental audio assets from **Minecraft (by Mojang Studios / Microsoft)**,
|
||||||
|
which are **not** covered by the GPL license of this project.
|
||||||
|
本模组中包含部分来自 **Minecraft(Mojang Studios / Microsoft)** 的补充音效资源,
|
||||||
|
这些资源 **不属于** 本项目 GPL 协议授权的范围。
|
||||||
|
|
||||||
|
- Copyright of these audio files belongs to **Mojang Studios / Microsoft**.
|
||||||
|
这些音效文件的版权归 **Mojang Studios / Microsoft** 所有。
|
||||||
|
- They are provided here solely for compatibility and gameplay purposes.
|
||||||
|
这些音效仅为兼容性和游戏功能提供。
|
||||||
|
- The **GPL v3 license applies only to the original code and assets of this mod**,
|
||||||
|
and does **not** apply to the bundled Minecraft audio files.
|
||||||
|
**GPL v3 协议仅适用于本模组的原创代码与资源**,不适用于其中包含的 Minecraft 音效文件。
|
||||||
563
build.gradle
563
build.gradle
|
|
@ -1,174 +1,513 @@
|
||||||
plugins {
|
//noinspection GroovyAssignabilityCheck
|
||||||
id 'java-library'
|
//file:noinspection GroovyAssignabilityCheck
|
||||||
id 'maven-publish'
|
import proguard.gradle.ProGuardTask
|
||||||
id 'idea'
|
|
||||||
id 'net.neoforged.moddev' version '2.0.141'
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.guardsquare:proguard-gradle:7.7.0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
version = mod_version
|
plugins {
|
||||||
group = mod_group_id
|
id 'java'
|
||||||
|
id 'idea'
|
||||||
|
id 'java-library'
|
||||||
|
id 'maven-publish'
|
||||||
|
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
||||||
|
id 'net.neoforged.moddev.legacyforge' version '2.0.103'
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
// ===================== 基础配置 =====================
|
||||||
mavenLocal()
|
def enableProguard = project.hasProperty("enableProguard") && project.enableProguard.toBoolean()
|
||||||
|
|
||||||
|
tasks.named('wrapper', Wrapper).configure {
|
||||||
|
distributionType = Wrapper.DistributionType.BIN
|
||||||
|
}
|
||||||
|
|
||||||
|
group = mod_group_id
|
||||||
|
version = "${minecraft_version}-${mod_version}"
|
||||||
|
|
||||||
|
java {
|
||||||
|
toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||||
}
|
}
|
||||||
|
|
||||||
base {
|
base {
|
||||||
archivesName = mod_id
|
archivesName = mod_id
|
||||||
}
|
}
|
||||||
|
|
||||||
java.toolchain.languageVersion = JavaLanguageVersion.of(25)
|
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
|
||||||
|
|
||||||
neoForge {
|
// ===================== 仓库配置 =====================
|
||||||
// Specify the version of NeoForge to use.
|
repositories {
|
||||||
version = project.neo_version
|
mavenCentral()
|
||||||
|
maven { url = "https://libraries.minecraft.net/" }
|
||||||
|
maven { url = "https://neoforged.forgecdn.net/releases" }
|
||||||
|
maven { url = "https://neoforged.forgecdn.net/mojang-meta" }
|
||||||
|
|
||||||
|
maven {
|
||||||
|
url "https://cursemaven.com"
|
||||||
|
content { includeGroup "curse.maven" }
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "Progwml6"
|
||||||
|
url = "https://dvs1.progwml6.com/files/maven/"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "BlameJared"
|
||||||
|
url = "https://maven.blamejared.com/"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "ModMaven"
|
||||||
|
url = "https://modmaven.dev"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "Lucko"
|
||||||
|
url = "https://repo.lucko.me/"
|
||||||
|
content { includeModule 'me.lucko', 'spark-api' }
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "KosmX"
|
||||||
|
url = "https://maven.kosmx.dev/"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "Curios"
|
||||||
|
url = "https://maven.theillusivec4.top/"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "Luck perms"
|
||||||
|
url = "https://repo1.maven.org/maven2/net/luckperms/api/"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "GeckoLib"
|
||||||
|
url = "https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/"
|
||||||
|
content {
|
||||||
|
includeGroupByRegex("software\\.bernie.*")
|
||||||
|
includeGroup("com.eliotlash.mclib")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "LTD Maven"
|
||||||
|
url = "https://nexus.bot.leisuretimedock.top/repository/maven-public/"
|
||||||
|
}
|
||||||
|
flatDir { dir "libs" }
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===================== Forge 配置 =====================
|
||||||
|
legacyForge {
|
||||||
|
version = "${minecraft_version}-${forge_version}"
|
||||||
|
accessTransformers = files("src/main/templates/META-INF/accesstransformer.cfg")
|
||||||
|
|
||||||
parchment {
|
parchment {
|
||||||
mappingsVersion = project.parchment_mappings_version
|
minecraftVersion = minecraft_version
|
||||||
minecraftVersion = project.parchment_minecraft_version
|
mappingsVersion = mapping_lasting_version
|
||||||
}
|
}
|
||||||
|
|
||||||
// This line is optional. Access Transformers are automatically detected
|
|
||||||
// accessTransformers.add('src/main/resources/META-INF/accesstransformer.cfg')
|
|
||||||
|
|
||||||
// Default run configurations.
|
|
||||||
// These can be tweaked, removed, or duplicated as needed.
|
|
||||||
runs {
|
runs {
|
||||||
|
configureEach {
|
||||||
|
systemProperty 'forge.logging.console.level', 'debug'
|
||||||
|
systemProperty 'forge.logging.markers', 'REGISTRIES'
|
||||||
|
logLevel = org.slf4j.event.Level.DEBUG
|
||||||
|
}
|
||||||
client {
|
client {
|
||||||
client()
|
client()
|
||||||
|
systemProperty 'forge.enabledGameTestNamespaces', mod_id
|
||||||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
|
||||||
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clientAuth {
|
clientAuth {
|
||||||
client()
|
|
||||||
devLogin = true
|
devLogin = true
|
||||||
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
client()
|
||||||
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
systemProperty 'forge.enabledGameTestNamespaces', mod_id
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
server()
|
server()
|
||||||
programArgument '--nogui'
|
|
||||||
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
|
||||||
}
|
}
|
||||||
|
testServer {
|
||||||
// This run config launches GameTestServer and runs all registered gametests, then exits.
|
server()
|
||||||
// By default, the server will crash when no gametests are provided.
|
// 设置服务器运行目录
|
||||||
// The gametest system is also enabled by default for other run configs under the /test command.
|
gameDirectory = file('run/server')
|
||||||
gameTestServer {
|
|
||||||
type = "gameTestServer"
|
|
||||||
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data {
|
data {
|
||||||
clientData()
|
data()
|
||||||
|
programArguments.addAll '--mod', mod_id, '--all',
|
||||||
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
|
'--output', file('src/generated/resources/').absolutePath,
|
||||||
// gameDirectory = project.file('run-data')
|
'--existing', file('src/main/resources/').absolutePath
|
||||||
|
|
||||||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
|
||||||
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
|
|
||||||
}
|
|
||||||
|
|
||||||
// applies to all the run configs above
|
|
||||||
configureEach {
|
|
||||||
// Recommended logging data for a userdev environment
|
|
||||||
// The markers can be added/remove as needed separated by commas.
|
|
||||||
// "SCAN": For mods scan.
|
|
||||||
// "REGISTRIES": For firing of registry events.
|
|
||||||
// "REGISTRYDUMP": For getting the contents of all registries.
|
|
||||||
systemProperty 'forge.logging.markers', 'REGISTRIES'
|
|
||||||
|
|
||||||
// Recommended logging level for the console
|
|
||||||
// You can set various levels here.
|
|
||||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
|
||||||
logLevel = org.slf4j.event.Level.DEBUG
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mods {
|
mods {
|
||||||
// define mod <-> source bindings
|
|
||||||
// these are used to tell the game which sources are for which mod
|
|
||||||
// mostly optional in a single mod project
|
|
||||||
// but multi mod projects should define one per mod
|
|
||||||
"${mod_id}" {
|
"${mod_id}" {
|
||||||
sourceSet(sourceSets.main)
|
sourceSet sourceSets.main
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include resources generated by data generators.
|
// ===================== 源码与资源 =====================
|
||||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
sourceSets.main.resources {
|
||||||
|
srcDir 'src/generated/resources'
|
||||||
|
srcDir 'src/main/resources'
|
||||||
dependencies {
|
|
||||||
// Example mod dependency with JEI
|
|
||||||
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
|
|
||||||
// compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
|
|
||||||
// compileOnly "mezz.jei:jei-${mc_version}-forge-api:${jei_version}"
|
|
||||||
// runtimeOnly "mezz.jei:jei-${mc_version}-forge:${jei_version}"
|
|
||||||
|
|
||||||
// Example mod dependency using a mod jar from ./libs with a flat dir repository
|
|
||||||
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
|
|
||||||
// The group id is ignored when searching -- in this case, it is "blank"
|
|
||||||
// implementation "blank:coolmod-${mc_version}:${coolmod_version}"
|
|
||||||
|
|
||||||
// Example mod dependency using a file as dependency
|
|
||||||
// implementation files("libs/coolmod-${mc_version}-${coolmod_version}.jar")
|
|
||||||
|
|
||||||
// Example project dependency using a sister or child project:
|
|
||||||
// implementation project(":myproject")
|
|
||||||
|
|
||||||
// For more info:
|
|
||||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
|
||||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This block of code expands all declared replace properties in the specified resource targets.
|
// ===================== 编译配置 =====================
|
||||||
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
|
tasks.withType(JavaCompile).configureEach {
|
||||||
|
options.encoding = 'UTF-8'
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===================== 依赖 =====================
|
||||||
|
configurations {
|
||||||
|
runtimeClasspath.extendsFrom localRuntime
|
||||||
|
proguardLibs {
|
||||||
|
canBeResolved = true
|
||||||
|
canBeConsumed = false
|
||||||
|
extendsFrom modCompileOnly
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
annotationProcessor ('org.spongepowered:mixin:0.8.5:processor')
|
||||||
|
modRuntimeOnly("curse.maven:debug-utils-forge-783008:5337491")
|
||||||
|
modImplementation("blank:curtain-1.20.1:1.3.2")
|
||||||
|
modImplementation("dev.kosmx.player-anim:player-animation-lib-forge:${player_anim_version}")
|
||||||
|
modImplementation("curse.maven:bendy-lib-623373:4550371")
|
||||||
|
modImplementation("curse.maven:waystones-245755:6856603")
|
||||||
|
modImplementation("curse.maven:balm-531761:7087245")
|
||||||
|
// modImplementation("curse.maven:kaleidoscope-doll-1233277:7201584")
|
||||||
|
// modRuntimeOnly("curse.maven:luckperms-431733:4738950")
|
||||||
|
modImplementation("software.bernie.geckolib:geckolib-forge-${minecraft_version}:${geckolib_version}")
|
||||||
|
implementation("com.eliotlash.mclib:mclib:20")
|
||||||
|
modCompileOnly("top.theillusivec4.curios:curios-forge:${curios_version}:api")
|
||||||
|
modCompileOnly("top.theillusivec4.curios:curios-forge:${curios_version}")
|
||||||
|
modRuntimeOnly("top.theillusivec4.curios:curios-forge:${curios_version}")
|
||||||
|
modCompileOnly("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}")
|
||||||
|
modCompileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
|
||||||
|
modRuntimeOnly("mezz.jei:jei-${minecraft_version}-forge:${jei_version}")
|
||||||
|
modRuntimeOnly("curse.maven:spark-361579:4738952")
|
||||||
|
compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.1"))
|
||||||
|
modImplementation("io.github.llamalad7:mixinextras-forge:0.4.1")
|
||||||
|
compileOnly("net.luckperms:api:5.4")
|
||||||
|
compileOnly ('me.lucko:spark-api:0.1-SNAPSHOT')
|
||||||
|
implementation 'org.ow2.asm:asm:9.6'
|
||||||
|
implementation 'org.ow2.asm:asm-tree:9.6'
|
||||||
|
implementation 'org.ow2.asm:asm-commons:9.6'
|
||||||
|
implementation 'org.ow2.asm:asm-util:9.6'
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===================== 修复 Javadoc 任务 =====================
|
||||||
|
tasks.named('javadoc', Javadoc).configure {
|
||||||
|
group = 'documentation'
|
||||||
|
description = 'Generates full Javadoc for the mod.'
|
||||||
|
destinationDir = file("$buildDir/docs/javadoc")
|
||||||
|
|
||||||
|
// 明确指定源与类路径
|
||||||
|
source = sourceSets.main.allJava
|
||||||
|
classpath = sourceSets.main.compileClasspath
|
||||||
|
|
||||||
|
options.encoding = 'UTF-8'
|
||||||
|
options.charSet = 'UTF-8'
|
||||||
|
options.links("https://docs.oracle.com/en/java/javase/17/docs/api/")
|
||||||
|
options.memberLevel = JavadocMemberLevel.PUBLIC
|
||||||
|
options.addBooleanOption('Xdoclint:none', true)
|
||||||
|
options.addStringOption('doctitle', "${mod_id} ${minecraft_version} ${mod_version} Javadoc")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register('sourceJar', Jar) {
|
||||||
|
from(sourceSets.main.allSource) // java
|
||||||
|
archiveFileName = "${mod_id}-${minecraft_version}-${mod_version}-sources.jar"
|
||||||
|
archiveClassifier.set("sources")
|
||||||
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
|
manifest {
|
||||||
|
attributes([
|
||||||
|
'Specification-Title' : mod_id,
|
||||||
|
'Specification-Vendor' : mod_authors,
|
||||||
|
'Specification-Version' : '1',
|
||||||
|
'Implementation-Title' : project.name,
|
||||||
|
'Implementation-Version' : archiveVersion,
|
||||||
|
'Implementation-Vendor' : mod_authors,
|
||||||
|
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||||
|
])
|
||||||
|
}
|
||||||
|
dependsOn classes
|
||||||
|
}
|
||||||
|
// ===================== 普通 Javadoc =====================
|
||||||
|
tasks.register('javadocJar', Jar) {
|
||||||
|
archiveFileName = "${mod_id}-${minecraft_version}-${mod_version}-javadoc.jar"
|
||||||
|
archiveClassifier.set("javadoc")
|
||||||
|
from tasks.javadoc
|
||||||
|
dependsOn tasks.javadoc
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===================== API Jar(class / java) =====================
|
||||||
|
tasks.register('apiJar', Jar) {
|
||||||
|
archiveFileName = "${mod_id}-${minecraft_version}-${mod_version}-api.jar"
|
||||||
|
archiveClassifier.set("api")
|
||||||
|
manifest {
|
||||||
|
attributes 'FMLModType': 'GAMELIBRARY'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打包 class 和 java
|
||||||
|
from(sourceSets.main.output) { // class
|
||||||
|
exclude 'assets/**', 'data/**'
|
||||||
|
}
|
||||||
|
|
||||||
|
include "top/r3944realms/superleadrope/api/**/*"
|
||||||
|
include "top/r3944realms/superleadrope/SuperLeadRopeAPI.*"
|
||||||
|
|
||||||
|
dependsOn classes
|
||||||
|
}
|
||||||
|
tasks.register('apiSourceJar', Jar) {
|
||||||
|
archiveFileName = "${mod_id}-${minecraft_version}-${mod_version}-api-sources.jar"
|
||||||
|
archiveClassifier.set("api-sources")
|
||||||
|
manifest {
|
||||||
|
attributes 'FMLModType': 'GAMELIBRARY'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打包 class 和 java
|
||||||
|
from(sourceSets.main.allSource) { // java
|
||||||
|
exclude 'assets/**', 'data/**'
|
||||||
|
}
|
||||||
|
|
||||||
|
include "top/r3944realms/superleadrope/api/**/*"
|
||||||
|
include "top/r3944realms/superleadrope/SuperLeadRopeAPI.*"
|
||||||
|
|
||||||
|
dependsOn classes
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register('apiJavadocJar', Jar) {
|
||||||
|
archiveFileName = "${mod_id}-${minecraft_version}-${mod_version}-api-javadoc.jar"
|
||||||
|
archiveClassifier.set("api-javadoc")
|
||||||
|
from tasks.javadoc
|
||||||
|
include "top/r3944realms/superleadrope/api/**/*"
|
||||||
|
dependsOn tasks.javadoc
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register('apiJavadoc', Javadoc) {
|
||||||
|
group = 'documentation'
|
||||||
|
description = 'Generates Javadoc for API package only.'
|
||||||
|
destinationDir = file("$buildDir/docs/api-javadoc")
|
||||||
|
|
||||||
|
source = sourceSets.main.allJava.matching {
|
||||||
|
include "top/r3944realms/superleadrope/api/**/*"
|
||||||
|
include "top/r3944realms/superleadrope/SuperLeadRopeAPI.java"
|
||||||
|
}
|
||||||
|
classpath = sourceSets.main.compileClasspath
|
||||||
|
options.encoding = 'UTF-8'
|
||||||
|
options.charSet = 'UTF-8'
|
||||||
|
options.links("https://docs.oracle.com/en/java/javase/17/docs/api/")
|
||||||
|
options.memberLevel = JavadocMemberLevel.PUBLIC
|
||||||
|
options.addBooleanOption('Xdoclint:none', true)
|
||||||
|
options.addStringOption('doctitle', "${mod_name} API ${mod_version} Javadoc")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ===================== 主 Jar 与混淆 =====================
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes([
|
||||||
|
'Specification-Title' : mod_id,
|
||||||
|
'Specification-Vendor' : mod_authors,
|
||||||
|
'Specification-Version' : '1',
|
||||||
|
'Implementation-Title' : project.name,
|
||||||
|
'Implementation-Version' : archiveVersion,
|
||||||
|
'Implementation-Vendor' : mod_authors,
|
||||||
|
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||||
|
])
|
||||||
|
}
|
||||||
|
archiveFileName = "${mod_id}-${minecraft_version}-${mod_version}-origin.jar"
|
||||||
|
|
||||||
|
finalizedBy 'proguard'
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register('proguard', ProGuardTask) {
|
||||||
|
onlyIf { enableProguard }
|
||||||
|
dependsOn tasks.jar
|
||||||
|
configuration 'proguard.pro'
|
||||||
|
|
||||||
|
libraryjars "${System.getProperty('java.home')}/jmods"
|
||||||
|
configurations.proguardLibs.resolve().each { file ->
|
||||||
|
libraryjars file.absolutePath
|
||||||
|
}
|
||||||
|
|
||||||
|
def inputJar = tasks.jar.archiveFile.get().asFile
|
||||||
|
injars inputJar
|
||||||
|
outjars "${buildDir}/libs/[NOTUSE]${mod_id}-${minecraft_version}-${mod_version}-proguard.jar"
|
||||||
|
|
||||||
|
doFirst {
|
||||||
|
copy {
|
||||||
|
from inputJar
|
||||||
|
into "${buildDir}/libs"
|
||||||
|
rename { "[NOTUSE]${mod_id}-${minecraft_version}-${mod_version}-origin.jar" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inputs.files tasks.jar.archiveFile
|
||||||
|
finalizedBy 'reobfJar'
|
||||||
|
}
|
||||||
|
processResources {
|
||||||
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
|
}
|
||||||
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {
|
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {
|
||||||
var replaceProperties = [minecraft_version : minecraft_version,
|
var replaceProperties = [
|
||||||
minecraft_version_range: minecraft_version_range,
|
minecraft_version : minecraft_version,
|
||||||
neo_version : neo_version,
|
minecraft_version_range : minecraft_version_range,
|
||||||
neo_version_range : neo_version_range,
|
forge_version : forge_version,
|
||||||
loader_version_range : loader_version_range,
|
forge_version_range : forge_version_range,
|
||||||
mod_id : mod_id,
|
loader_version_range : loader_version_range,
|
||||||
mod_name : mod_name,
|
mod_id : mod_id,
|
||||||
mod_license : mod_license,
|
mod_name : mod_name,
|
||||||
mod_version : mod_version,
|
mod_license : mod_license,
|
||||||
mod_authors : mod_authors,
|
mod_version : mod_version,
|
||||||
mod_description : mod_description]
|
mod_authors : mod_authors,
|
||||||
|
mod_description : mod_description,
|
||||||
|
mod_credits : mod_credits
|
||||||
|
]
|
||||||
|
|
||||||
inputs.properties replaceProperties
|
inputs.properties replaceProperties
|
||||||
expand replaceProperties
|
expand replaceProperties
|
||||||
from "src/main/templates"
|
from "src/main/templates"
|
||||||
into "build/generated/sources/modMetadata"
|
into "build/generated/sources/modMetadata"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include the output of "generateModMetadata" as an input directory for the build
|
|
||||||
// this works with both building through Gradle and the IDE.
|
|
||||||
sourceSets.main.resources.srcDir generateModMetadata
|
sourceSets.main.resources.srcDir generateModMetadata
|
||||||
// To avoid having to run "generateModMetadata" manually, make it run on every project reload
|
legacyForge.ideSyncTask generateModMetadata
|
||||||
neoForge.ideSyncTask generateModMetadata
|
|
||||||
|
|
||||||
// Example configuration to allow publishing using the maven-publish plugin
|
tasks.named('publish') {
|
||||||
|
dependsOn build
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
tasks.named('reobfJar') {
|
||||||
|
if (enableProguard) {
|
||||||
|
dependsOn 'proguard'
|
||||||
|
input = file("${buildDir}/libs/[NOTUSE]${mod_id}-${minecraft_version}-${mod_version}-proguard.jar")
|
||||||
|
} else {
|
||||||
|
dependsOn 'jar'
|
||||||
|
input = tasks.jar.archiveFile.get().asFile
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ===================== 发布配置 =====================
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
register('mavenJava', MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
from components.java
|
artifactId = mod_id
|
||||||
|
|
||||||
|
artifact reobfJar
|
||||||
|
artifact sourceJar
|
||||||
|
artifact javadocJar
|
||||||
|
artifact apiJar
|
||||||
|
artifact apiSourceJar
|
||||||
|
artifact apiJavadocJar
|
||||||
|
|
||||||
|
pom {
|
||||||
|
name = "${mod_id}"
|
||||||
|
description = "The API for ${mod_name}"
|
||||||
|
url = "https://github.com/3944Realms/SuperLeadMod"
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name = mod_license
|
||||||
|
url = "https://www.gnu.org/licenses/gpl-3.0.en.html#license-text"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id = "${mod_id}"
|
||||||
|
name = mod_authors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url "file://${project.projectDir}/repo"
|
name = "local"
|
||||||
|
url = layout.buildDirectory.dir("repo")
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = 'LTDNexus'
|
||||||
|
url = 'https://nexus.bot.leisuretimedock.top/repository/maven-releases/'
|
||||||
|
credentials {
|
||||||
|
username = System.getenv('LTDNexusUsername') ?: ''
|
||||||
|
password = System.getenv('LTDNexusPassword') ?: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
|
// ===================== 构建任务依赖 =====================
|
||||||
|
tasks.named('build') {
|
||||||
|
dependsOn sourceJar, apiSourceJar, apiJar, apiJavadocJar
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named('clean') {
|
||||||
|
delete fileTree(dir: "${project.projectDir}/mcmodsrepo")
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===================== RenderDoc 运行支持 =====================
|
||||||
|
tasks.register("runWithRenderDoc", Exec) {
|
||||||
|
group = "minecraft"
|
||||||
|
description = "Run Minecraft with RenderDoc using runClientAuth configuration"
|
||||||
|
dependsOn "classes"
|
||||||
|
|
||||||
|
def renderDocCmd = file("RenderDoc_1.40_64/renderdoccmd.exe").absolutePath
|
||||||
|
def captureDir = file("$buildDir/renderdoc/capture").absolutePath
|
||||||
|
def runClientTask = tasks.named("runClientAuth", JavaExec).get()
|
||||||
|
def javaExecPath = new File(runClientTask.getJavaLauncher().get().metadata.installationPath.asFile, "bin/java.exe").absolutePath
|
||||||
|
def jdwpArgs = "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
|
||||||
|
|
||||||
|
commandLine renderDocCmd, "capture", "--opt-hook-children", "--wait-for-exit",
|
||||||
|
"--working-dir", "$projectDir/run",
|
||||||
|
"--capture-file", "${captureDir}/minecraft_capture",
|
||||||
|
javaExecPath, jdwpArgs,
|
||||||
|
"@${buildDir}/moddev/clientRunVmArgs.txt",
|
||||||
|
"@${buildDir}/moddev/clientRunProgramArgs.txt"
|
||||||
|
|
||||||
|
environment "MOD_CLASSES", "superleadrope%%${buildDir}/classes/java/main;superleadrope%%${buildDir}/resources/main"
|
||||||
|
|
||||||
|
doFirst {
|
||||||
|
println "Using JVM: ${javaExecPath}"
|
||||||
|
println "RenderDoc capture dir: ${captureDir}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===================== IDEA 支持 =====================
|
||||||
idea {
|
idea {
|
||||||
module {
|
module {
|
||||||
downloadSources = true
|
downloadSources = true
|
||||||
downloadJavadoc = true
|
downloadJavadoc = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tasks.register('showTaskTree') {
|
||||||
|
doLast {
|
||||||
|
def showTaskDeps
|
||||||
|
showTaskDeps = { task, prefix = '', isLast = true ->
|
||||||
|
// 当前任务节点
|
||||||
|
def connector = isLast ? '└── ' : '├── '
|
||||||
|
println "${prefix}${connector}${task.name}"
|
||||||
|
|
||||||
|
// 子任务
|
||||||
|
def dependencies = task.getTaskDependencies().getDependencies(task).toList()
|
||||||
|
def newPrefix = prefix + (isLast ? ' ' : '│ ')
|
||||||
|
|
||||||
|
dependencies.eachWithIndex { dep, index ->
|
||||||
|
def lastChild = index == dependencies.size() - 1
|
||||||
|
showTaskDeps(dep, newPrefix, lastChild)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def targetTask = tasks.findByName('build')
|
||||||
|
if (targetTask) {
|
||||||
|
println "构建任务依赖树:"
|
||||||
|
showTaskDeps(targetTask, '', true)
|
||||||
|
} else {
|
||||||
|
println "未找到 build 任务"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
149
dict.py
Normal file
149
dict.py
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
# Super Lead rope mod
|
||||||
|
# Copyright (C) 2025 R3944Realms
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
import os
|
||||||
|
import random
|
||||||
|
|
||||||
|
# 确保输出目录存在
|
||||||
|
os.makedirs("dict", exist_ok=True)
|
||||||
|
|
||||||
|
# 全局已使用名字集合,保证三类字典互不重复
|
||||||
|
used_names = set()
|
||||||
|
|
||||||
|
def gen_dict(count: int, length: int, filename: str, charset: str):
|
||||||
|
"""
|
||||||
|
生成字典文件:
|
||||||
|
- 所有字符都来自charset(纯中文汉字,包括易经符号)
|
||||||
|
- 保证全局唯一
|
||||||
|
"""
|
||||||
|
if length < 1:
|
||||||
|
raise ValueError("长度必须至少为 1")
|
||||||
|
|
||||||
|
chars = list(charset)
|
||||||
|
|
||||||
|
# 计算最大可能组合数
|
||||||
|
max_combinations = len(chars) ** length
|
||||||
|
if count > max_combinations:
|
||||||
|
raise ValueError(f"要求数量 {count} 超过最大可能组合数 {max_combinations}")
|
||||||
|
|
||||||
|
generated = set()
|
||||||
|
while len(generated) < count:
|
||||||
|
# 随机生成纯中文字符串
|
||||||
|
s = ''.join(random.choice(chars) for _ in range(length))
|
||||||
|
|
||||||
|
if s in used_names:
|
||||||
|
continue # 跳过已使用的名字
|
||||||
|
generated.add(s)
|
||||||
|
used_names.add(s)
|
||||||
|
|
||||||
|
with open(filename, "w", encoding='utf-8') as f:
|
||||||
|
for s in sorted(generated): # 排序便于查看
|
||||||
|
f.write(s + "\n")
|
||||||
|
|
||||||
|
print(f"生成完成,共 {len(generated)} 个写入 {filename}")
|
||||||
|
|
||||||
|
def get_chinese_chars():
|
||||||
|
"""
|
||||||
|
获取中文汉字字符集,包括:
|
||||||
|
1. 易经符号
|
||||||
|
2. 常用汉字
|
||||||
|
3. 扩展汉字
|
||||||
|
"""
|
||||||
|
# 1. 易经符号字符集 (64卦)
|
||||||
|
yijing_chars = "䷀䷁䷂䷃䷄䷅䷆䷇䷈䷉䷊䷋䷌䷍䷎䷏䷐䷑䷒䷓䷔䷕䷖䷗䷘䷙䷚䷛䷜䷝䷞䷟䷠䷡䷢䷣䷤䷥䷦䷧䷨䷩䷪䷫䷬䷭䷮䷯䷰䷱䷲䷳䷴䷵䷶䷷䷸䷹䷺䷻䷼䷽䷾䷿"
|
||||||
|
|
||||||
|
# 2. 常用汉字 (约3500个常用字)
|
||||||
|
common_chinese = (
|
||||||
|
"的一是不了在人有我他个大中来上们到说国和地也子时道出而要于就下得可你年生自会"
|
||||||
|
"那后能对着事其里所去行过家十用发天如然作方成者多日都三小军二无同么经法当起与"
|
||||||
|
"好看进学中第样道还法理文心现所政美手知明机高长部见定体此心合表化加动系表实新"
|
||||||
|
"量将两从问力等电开五心只实社资事制政济用所向好战无性前反合斗图把结第里正新开"
|
||||||
|
"论之物从当两些还天资事队批如应形想制心样干都向变关点育重其思与间内去因件日利"
|
||||||
|
"相由压员气业代全组数果期导平各基或月毛然问比展那它最及外没看治提五解系林者米"
|
||||||
|
"群头意只明四道马认次文通但条较克又公孔领军流入接席位情运器并飞原油放立题质指"
|
||||||
|
"建区验活众很教决特此常石强极土少已根共直团统式转别造切九你取西持总料连任志观"
|
||||||
|
"调七山程百报更见必真保热委手改管处己将修支识病象先老光专几什六型具示复安带每"
|
||||||
|
"东增则完风回南广劳轮科北打积车计给节做务被整联步类集号列温装即毫轴知研单色坚"
|
||||||
|
"据速防史拉世设达尔场织历花受求传口断况采精金界品判参层止边清至万确究书低术状"
|
||||||
|
"厂须离再目海交权且儿青才证越际八试规斯近注办布门铁需走议县兵虫固除般引齿千胜"
|
||||||
|
"细影济白格效置推空配刀叶率今选养德话查差半敌始片施响收华觉备名红续均药标记难"
|
||||||
|
"存测士身紧液派准斤角降维板许破述技消底床田势端感往神便圆村构照容非搞亚磨族火"
|
||||||
|
"段算适讲按值美态黄易彪服早班麦削信排台声该击素张密害侯草何树肥继右属市严径螺"
|
||||||
|
"检左页抗苏显苦英快称坏移约巴材省黑武培著河帝仅针怎植京助升王眼她抓含苗副杂普"
|
||||||
|
"谈围食射源例致酸旧却充足短划剂宣环落首尺波承粉践府鱼随考刻靠够满夫失包住促枝"
|
||||||
|
"局菌杆周护岩师举曲春元超负砂封换太模贫减阳扬江析亩木言球朝医校古呢稻宋听唯输"
|
||||||
|
"滑站另卫字鼓刚写刘微略范供阿块某功套友限项余倒卷创律雨让骨远帮初皮播优占死毒"
|
||||||
|
"圈伟季训控激找叫云互跟裂粮粒母练塞钢顶策双留误础吸阻故寸晚丝女焊攻株亲院冷彻"
|
||||||
|
"弹错散尼盾商视艺灭版烈零室轻血倍缺厘泵察绝富城冲喷壤简否柱李望盘磁雄似困巩益"
|
||||||
|
"洲脱投送奴侧润盖挥距触星松获独官混纪座依未突架宽冬兴章湿偏纹执矿寨责阀熟吃稳"
|
||||||
|
"夺硬价努翻奇甲预职评读背协损棉侵灰虽矛厚罗泥辟告卵箱掌氧恩爱停曾溶营终纲孟钱"
|
||||||
|
"待尽俄缩沙退陈讨奋械胞幼哪剥迫旋征槽倒握担仍呀鲜吧卡粗介钻逐弱脚怕盐末阴丰编"
|
||||||
|
"印蜂急扩伤飞域露核缘游振操央伍域甚迅辉异序免纸夜乡久隶缸夹念兰映沟乙吗儒杀汽"
|
||||||
|
"磷艰晶插埃燃欢铁补咱芽永瓦倾阵碳演威附牙芽永瓦斜灌欧献顺猪洋腐请透司危括脉宜"
|
||||||
|
"笑若尾束壮暴企菜穗楚汉愈绿拖牛份染既秋遍锻玉夏疗尖殖井费州访吹荣铜沿替滚客召"
|
||||||
|
"旱悟刺脑措贯藏令隙"
|
||||||
|
)
|
||||||
|
|
||||||
|
# 3. 扩展汉字 (Unicode CJK统一表意文字部分)
|
||||||
|
extended_chinese = []
|
||||||
|
# 添加一些Unicode范围的汉字(为了避免文件过大,我们只取一部分)
|
||||||
|
ranges = [
|
||||||
|
(0x4E00, 0x4EFF), # 基本汉字
|
||||||
|
(0x4F00, 0x4FFF), # 基本汉字
|
||||||
|
(0x3400, 0x34FF), # 扩展A区
|
||||||
|
]
|
||||||
|
|
||||||
|
for start, end in ranges:
|
||||||
|
for code in range(start, end + 1):
|
||||||
|
try:
|
||||||
|
char = chr(code)
|
||||||
|
# 过滤掉一些非常用的字符
|
||||||
|
if random.random() < 0.3: # 只取30%的字符,避免过多
|
||||||
|
extended_chinese.append(char)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# 合并所有中文字符
|
||||||
|
all_chinese = common_chinese + ''.join(extended_chinese)
|
||||||
|
|
||||||
|
# 去重并返回
|
||||||
|
return ''.join(sorted(set(all_chinese)))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
# 获取纯中文汉字字符集
|
||||||
|
chinese_charset = get_chinese_chars()
|
||||||
|
print(f"字符集大小:{len(chinese_charset)} 个汉字(包含易经符号)")
|
||||||
|
print(f"前50个字符示例:{chinese_charset[:50]}")
|
||||||
|
|
||||||
|
# 生成类名字典(纯中文)
|
||||||
|
gen_dict(
|
||||||
|
count=3000,
|
||||||
|
length=128, # 类名长度稍短
|
||||||
|
filename="dict/class_dict.txt",
|
||||||
|
charset=chinese_charset
|
||||||
|
)
|
||||||
|
|
||||||
|
# 生成字段/方法字典(纯中文)
|
||||||
|
gen_dict(
|
||||||
|
count=5000,
|
||||||
|
length=128, # 字段/方法名更短
|
||||||
|
filename="dict/member_dict.txt",
|
||||||
|
charset=chinese_charset
|
||||||
|
)
|
||||||
|
|
||||||
|
# 生成包名字典(纯中文)
|
||||||
|
gen_dict(
|
||||||
|
count=2000,
|
||||||
|
length=128, # 包名可以更长
|
||||||
|
filename="dict/package_dict.txt",
|
||||||
|
charset=chinese_charset
|
||||||
|
)
|
||||||
3000
dict/class_dict.txt
Normal file
3000
dict/class_dict.txt
Normal file
File diff suppressed because it is too large
Load Diff
5000
dict/member_dict.txt
Normal file
5000
dict/member_dict.txt
Normal file
File diff suppressed because it is too large
Load Diff
2000
dict/package_dict.txt
Normal file
2000
dict/package_dict.txt
Normal file
File diff suppressed because it is too large
Load Diff
91
doc/1.RenderSystem.MD
Normal file
91
doc/1.RenderSystem.MD
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
## 1️⃣ `VertexFormat` 的作用
|
||||||
|
|
||||||
|
在 Minecraft 渲染系统中,`VertexFormat` 是**顶点格式的描述类**。它定义了:
|
||||||
|
|
||||||
|
* 每个顶点包含哪些属性(position、color、normal、uv 等)
|
||||||
|
* 每个属性的数据类型和大小
|
||||||
|
* 这些属性在 GPU 缓冲区中的排列顺序(stride 和 offset)
|
||||||
|
|
||||||
|
换句话说,它告诉 GPU **如何从 VBO 里正确读取顶点数据**。
|
||||||
|
|
||||||
|
Minecraft 不再直接使用 `glVertex3f` 或 `glColor4f`,而是通过 `VertexFormat` + `BufferBuilder` 构建顶点数组,然后一次性上传到 GPU。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2️⃣ `VertexFormat` 的核心结构
|
||||||
|
|
||||||
|
在 Minecraft 中,`VertexFormat` 类主要包含:
|
||||||
|
|
||||||
|
| 成员 | 含义 |
|
||||||
|
| ------------ | ---------------------------------- |
|
||||||
|
| `elements` | 顶点属性列表,每个元素是 `VertexFormatElement` |
|
||||||
|
| `vertexSize` | 每个顶点的总字节数(stride) |
|
||||||
|
| `hasColor` | 是否包含颜色属性 |
|
||||||
|
| `hasNormal` | 是否包含法线 |
|
||||||
|
| `hasUV` | 是否包含纹理坐标 |
|
||||||
|
|
||||||
|
### `VertexFormatElement`
|
||||||
|
|
||||||
|
每个元素描述一个顶点属性,包含:
|
||||||
|
|
||||||
|
| 属性 | 含义 |
|
||||||
|
| ------- | -------------------------------------- |
|
||||||
|
| `type` | 数据类型(FLOAT、UBYTE 等) |
|
||||||
|
| `usage` | 属性用途(POSITION、COLOR、UV、NORMAL、PADDING) |
|
||||||
|
| `count` | 该属性的分量个数(例如 POSITION = 3, COLOR = 4) |
|
||||||
|
| `index` | 纹理坐标索引(有多个 UV 时用) |
|
||||||
|
|
||||||
|
**示例:**
|
||||||
|
Minecraft 默认块渲染顶点格式可能包含:
|
||||||
|
|
||||||
|
```text
|
||||||
|
POSITION (3 floats)
|
||||||
|
COLOR (4 bytes)
|
||||||
|
UV0 (2 floats)
|
||||||
|
NORMAL (3 bytes)
|
||||||
|
UV1 (2 floats, 光照贴图)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3️⃣ `VertexFormat` 在渲染管线中的位置
|
||||||
|
|
||||||
|
1. **顶点构建**
|
||||||
|
|
||||||
|
```java
|
||||||
|
BufferBuilder buffer = Tesselator.getInstance().getBuilder();
|
||||||
|
buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
|
||||||
|
buffer.vertex(x, y, z).color(r, g, b, a).uv(u, v).normal(nx, ny, nz).endVertex();
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **上传 GPU**
|
||||||
|
|
||||||
|
* `BufferBuilder` 会根据 `VertexFormat` 的定义把每个顶点的数据打包成连续的 **VBO 字节流**
|
||||||
|
* 使用 `glVertexAttribPointer` 告诉 GPU 每个属性的偏移量和类型
|
||||||
|
|
||||||
|
3. **绑定着色器**
|
||||||
|
|
||||||
|
* 着色器使用 `layout(location = X)` 对应 VertexFormat 的属性
|
||||||
|
* GPU 就能正确读取每个顶点属性用于渲染
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4️⃣ 常用顶点格式示例
|
||||||
|
|
||||||
|
Minecraft 1.20.1 内置了几种常用格式:
|
||||||
|
|
||||||
|
| 名称 | 用途 |
|
||||||
|
| ----------------------------------------------- | ----------------------------------------- |
|
||||||
|
| `DefaultVertexFormat.POSITION_COLOR` | GUI、简单方块渲染 |
|
||||||
|
| `DefaultVertexFormat.BLOCK` | 方块渲染,包含 position/color/uv/normal/lightmap |
|
||||||
|
| `DefaultVertexFormat.ITEM` | 物品渲染,类似 BLOCK |
|
||||||
|
| `DefaultVertexFormat.POSITION_TEX_COLOR_NORMAL` | 高级渲染,需要所有属性 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5️⃣ 总结
|
||||||
|
|
||||||
|
* `VertexFormat` 是 **顶点数据布局描述器**,告诉 GPU 每个顶点包含哪些属性、类型和顺序。
|
||||||
|
* Minecraft 的现代渲染完全基于 **VBO + VAO + 着色器**,`VertexFormat` 作为桥梁,让 Java 层构建的顶点数据正确映射到 GPU。
|
||||||
|
* 对于 mod 开发或自定义渲染,理解 VertexFormat 非常关键,因为你需要确保 **BufferBuilder 构建的数据格式和着色器匹配**。
|
||||||
|
|
||||||
176
doc/LeashDataCommandUsage_CN.MD
Normal file
176
doc/LeashDataCommandUsage_CN.MD
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
## 基础指令结构
|
||||||
|
|
||||||
|
### 主要指令
|
||||||
|
```
|
||||||
|
/slp leashdata [子命令]
|
||||||
|
```
|
||||||
|
|
||||||
|
### 指令权限
|
||||||
|
需要 OP 权限(权限等级 2)
|
||||||
|
|
||||||
|
## 子命令分类
|
||||||
|
|
||||||
|
### 1. GET 命令 - 获取信息
|
||||||
|
|
||||||
|
**获取实体拴绳数据:**
|
||||||
|
```
|
||||||
|
/slp leashdata get data <targets>
|
||||||
|
```
|
||||||
|
- `<targets>`: 目标实体(选择器)
|
||||||
|
|
||||||
|
**获取单个实体详细信息:**
|
||||||
|
```
|
||||||
|
/slp leashdata get info <target>
|
||||||
|
```
|
||||||
|
- `<target>`: 目标实体(选择器)
|
||||||
|
|
||||||
|
### 2. ADD 命令 - 添加拴绳
|
||||||
|
|
||||||
|
**添加实体拴绳:**
|
||||||
|
```
|
||||||
|
/slp leashdata add <targets> <holder> [maxDistance] [elasticDistanceScale] [keepTicks] [reserved]
|
||||||
|
```
|
||||||
|
- `<targets>`: 被拴绳实体
|
||||||
|
- `<holder>`: 持有者实体
|
||||||
|
- `[maxDistance]`: 最大距离(默认值范围)
|
||||||
|
- `[elasticDistanceScale]`: 弹性距离比例(默认值范围)
|
||||||
|
- `[keepTicks]`: 保持时间(游戏刻,≥0)
|
||||||
|
- `[reserved]`: 保留字段(字符串)
|
||||||
|
|
||||||
|
**添加方块拴绳:**
|
||||||
|
```
|
||||||
|
/slp leashdata add <targets> block <pos> [maxDistance] [elasticDistanceScale] [keepTicks] [reserved]
|
||||||
|
```
|
||||||
|
- `<pos>`: 方块位置
|
||||||
|
- 其他参数同上
|
||||||
|
|
||||||
|
### 3. REMOVE 命令 - 移除拴绳
|
||||||
|
|
||||||
|
**移除特定实体拴绳:**
|
||||||
|
```
|
||||||
|
/slp leashdata remove <targets> <holder>
|
||||||
|
```
|
||||||
|
- `<targets>`: 目标实体
|
||||||
|
- `<holder>`: 持有者实体
|
||||||
|
|
||||||
|
**移除方块拴绳:**
|
||||||
|
```
|
||||||
|
/slp leashdata remove <targets> block <pos>
|
||||||
|
```
|
||||||
|
- `<pos>`: 方块位置
|
||||||
|
|
||||||
|
**批量移除:**
|
||||||
|
```
|
||||||
|
/slp leashdata remove <targets> all # 移除所有拴绳
|
||||||
|
/slp leashdata remove <targets> holders # 移除所有实体拴绳
|
||||||
|
/slp leashdata remove <targets> knots # 移除所有方块拴绳
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. TRANSFER 命令 - 转移拴绳
|
||||||
|
|
||||||
|
**实体到实体转移:**
|
||||||
|
```
|
||||||
|
/slp leashdata transfer <targets> <from> <to> [reserved]
|
||||||
|
```
|
||||||
|
- `<from>`: 原持有者
|
||||||
|
- `<to>`: 新持有者
|
||||||
|
|
||||||
|
**方块到实体转移:**
|
||||||
|
```
|
||||||
|
/slp leashdata transfer <targets> fromBlock <fromPos> <to> [reserved]
|
||||||
|
```
|
||||||
|
- `<fromPos>`: 原方块位置
|
||||||
|
- `<to>`: 新持有者实体
|
||||||
|
|
||||||
|
**方块到方块转移:**
|
||||||
|
```
|
||||||
|
/slp leashdata transfer <targets> fromBlock <fromPos> toBlock <toPos> [reserved]
|
||||||
|
```
|
||||||
|
- `<fromPos>`: 原方块位置
|
||||||
|
- `<toPos>`: 新方块位置
|
||||||
|
|
||||||
|
### 5. SET 命令 - 设置属性
|
||||||
|
|
||||||
|
**设置静态属性(适用于所有拴绳):**
|
||||||
|
```
|
||||||
|
/slp leashdata set <targets> static maxDistance reset # 重置最大距离
|
||||||
|
/slp leashdata set <targets> static maxDistance <value> # 设置最大距离
|
||||||
|
/slp leashdata set <targets> static elasticDistanceScale reset # 重置弹性比例
|
||||||
|
/slp leashdata set <targets> static elasticDistanceScale <value> # 设置弹性比例
|
||||||
|
```
|
||||||
|
|
||||||
|
**设置实体拴绳属性:**
|
||||||
|
```
|
||||||
|
# 设置最大距离
|
||||||
|
/slp leashdata set <targets> entity maxDistance <holder> [distance] [keepTicks] [reserved]
|
||||||
|
/slp leashdata set <targets> entity maxDistance [distance] [keepTicks] [reserved] # 所有持有者
|
||||||
|
|
||||||
|
# 设置弹性距离比例
|
||||||
|
/slp leashdata set <targets> entity elasticDistanceScale <holder> [scale] [keepTicks] [reserved]
|
||||||
|
/slp leashdata set <targets> entity elasticDistanceScale [scale] [keepTicks] [reserved] # 所有持有者
|
||||||
|
```
|
||||||
|
|
||||||
|
**设置方块拴绳属性:**
|
||||||
|
```
|
||||||
|
# 设置最大距离
|
||||||
|
/slp leashdata set <targets> block <pos> maxDistance [distance] [keepTicks] [reserved]
|
||||||
|
/slp leashdata set <targets> block maxDistance [distance] [keepTicks] [reserved] # 所有节点
|
||||||
|
|
||||||
|
# 设置弹性距离比例
|
||||||
|
/slp leashdata set <targets> block <pos> elasticDistanceScale [scale] [keepTicks] [reserved]
|
||||||
|
/slp leashdata set <targets> block elasticDistanceScale [scale] [keepTicks] [reserved] # 所有节点
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. APPLY FORCES 命令 - 应用物理力
|
||||||
|
|
||||||
|
**对实体应用拴绳力:**
|
||||||
|
```
|
||||||
|
/slp leashdata applyForces <targets>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 参数说明
|
||||||
|
|
||||||
|
### 选择器参数:
|
||||||
|
- `<targets>`: 实体选择器(如 `@e[type=!player]`, `@a`, `@p`)
|
||||||
|
- `<holder>`, `<from>`, `<to>`: 单个实体选择器
|
||||||
|
|
||||||
|
### 数值参数:
|
||||||
|
- `maxDistance`: 最大距离(`Double`,范围:LeashConfigManager.MAX_DISTANCE_MIN_VALUE 到 MAX_DISTANCE_MAX_VALUE)
|
||||||
|
- `elasticDistanceScale`: 弹性距离比例(`Double`,范围:LeashConfigManager.ELASTIC_DISTANCE_MIN_VALUE 到 ELASTIC_DISTANCE_MAX_VALUE)
|
||||||
|
- `keepTicks`: 保持时间(`Integer`,≥0)
|
||||||
|
|
||||||
|
### 其他参数:
|
||||||
|
- `reserved`: 保留字段(`String`)
|
||||||
|
- `<pos>`, `<fromPos>`, `<toPos>`: 方块位置坐标
|
||||||
|
|
||||||
|
## 使用示例
|
||||||
|
|
||||||
|
1. **拴住所有羊到玩家:**
|
||||||
|
```
|
||||||
|
/slp leashdata add @e[type=sheep] @p 10.0 0.8 600 "farm"
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **查看玩家拴绳状态:**
|
||||||
|
```
|
||||||
|
/slp leashdata get info @p
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **将拴绳从木桩转移到玩家:**
|
||||||
|
```
|
||||||
|
/slp leashdata transfer @e[type=sheep] fromBlock 100 64 100 @p
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **设置所有拴绳的最大距离:**
|
||||||
|
```
|
||||||
|
/slp leashdata set @e[type=sheep] static maxDistance 15.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## 配置默认值
|
||||||
|
- 最大距离范围:`LeashConfigManager.MAX_DISTANCE_MIN_VALUE` 到 `MAX_DISTANCE_MAX_VALUE`
|
||||||
|
- 弹性比例范围:`LeashConfigManager.ELASTIC_DISTANCE_MIN_VALUE` 到 `ELASTIC_DISTANCE_MAX_VALUE`
|
||||||
|
|
||||||
|
## 注意事项
|
||||||
|
1. 所有指令需要 OP 权限(权限等级 2)
|
||||||
|
2. 方块拴绳需要在对应位置存在 SuperLeashKnotEntity
|
||||||
|
3. 转移操作不会作用于来源实体自身(避免循环)
|
||||||
|
4. 显示结果会限制最多显示 4 个实体(超过会显示省略号)
|
||||||
176
doc/LeashDataCommandUsage_EN.MD
Normal file
176
doc/LeashDataCommandUsage_EN.MD
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
## Basic Command Structure
|
||||||
|
|
||||||
|
### Main Command
|
||||||
|
```
|
||||||
|
/slp leashdata [subcommand]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Command Permissions
|
||||||
|
Requires OP permissions (permission level 2)
|
||||||
|
|
||||||
|
## Subcommand Categories
|
||||||
|
|
||||||
|
### 1. GET Commands - Retrieve Information
|
||||||
|
|
||||||
|
**Get leash data for entities:**
|
||||||
|
```
|
||||||
|
/slp leashdata get data <targets>
|
||||||
|
```
|
||||||
|
- `<targets>`: Target entities (selector)
|
||||||
|
|
||||||
|
**Get detailed info for a single entity:**
|
||||||
|
```
|
||||||
|
/slp leashdata get info <target>
|
||||||
|
```
|
||||||
|
- `<target>`: Target entity (selector)
|
||||||
|
|
||||||
|
### 2. ADD Commands - Add Leashes
|
||||||
|
|
||||||
|
**Add entity leash:**
|
||||||
|
```
|
||||||
|
/slp leashdata add <targets> <holder> [maxDistance] [elasticDistanceScale] [keepTicks] [reserved]
|
||||||
|
```
|
||||||
|
- `<targets>`: Entities to be leashed
|
||||||
|
- `<holder>`: Holder entity
|
||||||
|
- `[maxDistance]`: Maximum distance (default value range)
|
||||||
|
- `[elasticDistanceScale]`: Elastic distance scale (default value range)
|
||||||
|
- `[keepTicks]`: Keep duration (game ticks, ≥0)
|
||||||
|
- `[reserved]`: Reserved field (string)
|
||||||
|
|
||||||
|
**Add block leash:**
|
||||||
|
```
|
||||||
|
/slp leashdata add <targets> block <pos> [maxDistance] [elasticDistanceScale] [keepTicks] [reserved]
|
||||||
|
```
|
||||||
|
- `<pos>`: Block position
|
||||||
|
- Other parameters same as above
|
||||||
|
|
||||||
|
### 3. REMOVE Commands - Remove Leashes
|
||||||
|
|
||||||
|
**Remove specific entity leash:**
|
||||||
|
```
|
||||||
|
/slp leashdata remove <targets> <holder>
|
||||||
|
```
|
||||||
|
- `<targets>`: Target entities
|
||||||
|
- `<holder>`: Holder entity
|
||||||
|
|
||||||
|
**Remove block leash:**
|
||||||
|
```
|
||||||
|
/slp leashdata remove <targets> block <pos>
|
||||||
|
```
|
||||||
|
- `<pos>`: Block position
|
||||||
|
|
||||||
|
**Batch removal:**
|
||||||
|
```
|
||||||
|
/slp leashdata remove <targets> all # Remove all leashes
|
||||||
|
/slp leashdata remove <targets> holders # Remove all entity leashes
|
||||||
|
/slp leashdata remove <targets> knots # Remove all block leashes
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. TRANSFER Commands - Transfer Leashes
|
||||||
|
|
||||||
|
**Transfer from entity to entity:**
|
||||||
|
```
|
||||||
|
/slp leashdata transfer <targets> <from> <to> [reserved]
|
||||||
|
```
|
||||||
|
- `<from>`: Original holder
|
||||||
|
- `<to>`: New holder
|
||||||
|
|
||||||
|
**Transfer from block to entity:**
|
||||||
|
```
|
||||||
|
/slp leashdata transfer <targets> fromBlock <fromPos> <to> [reserved]
|
||||||
|
```
|
||||||
|
- `<fromPos>`: Original block position
|
||||||
|
- `<to>`: New holder entity
|
||||||
|
|
||||||
|
**Transfer from block to block:**
|
||||||
|
```
|
||||||
|
/slp leashdata transfer <targets> fromBlock <fromPos> toBlock <toPos> [reserved]
|
||||||
|
```
|
||||||
|
- `<fromPos>`: Original block position
|
||||||
|
- `<toPos>`: New block position
|
||||||
|
|
||||||
|
### 5. SET Commands - Set Properties
|
||||||
|
|
||||||
|
**Set static properties (applies to all leashes):**
|
||||||
|
```
|
||||||
|
/slp leashdata set <targets> static maxDistance reset # Reset max distance
|
||||||
|
/slp leashdata set <targets> static maxDistance <value> # Set max distance
|
||||||
|
/slp leashdata set <targets> static elasticDistanceScale reset # Reset elastic scale
|
||||||
|
/slp leashdata set <targets> static elasticDistanceScale <value> # Set elastic scale
|
||||||
|
```
|
||||||
|
|
||||||
|
**Set entity leash properties:**
|
||||||
|
```
|
||||||
|
# Set max distance
|
||||||
|
/slp leashdata set <targets> entity maxDistance <holder> [distance] [keepTicks] [reserved]
|
||||||
|
/slp leashdata set <targets> entity maxDistance [distance] [keepTicks] [reserved] # All holders
|
||||||
|
|
||||||
|
# Set elastic distance scale
|
||||||
|
/slp leashdata set <targets> entity elasticDistanceScale <holder> [scale] [keepTicks] [reserved]
|
||||||
|
/slp leashdata set <targets> entity elasticDistanceScale [scale] [keepTicks] [reserved] # All holders
|
||||||
|
```
|
||||||
|
|
||||||
|
**Set block leash properties:**
|
||||||
|
```
|
||||||
|
# Set max distance
|
||||||
|
/slp leashdata set <targets> block <pos> maxDistance [distance] [keepTicks] [reserved]
|
||||||
|
/slp leashdata set <targets> block maxDistance [distance] [keepTicks] [reserved] # All knots
|
||||||
|
|
||||||
|
# Set elastic distance scale
|
||||||
|
/slp leashdata set <targets> block <pos> elasticDistanceScale [scale] [keepTicks] [reserved]
|
||||||
|
/slp leashdata set <targets> block elasticDistanceScale [scale] [keepTicks] [reserved] # All knots
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. APPLY FORCES Command - Apply Physics Forces
|
||||||
|
|
||||||
|
**Apply leash forces to entities:**
|
||||||
|
```
|
||||||
|
/slp leashdata applyForces <targets>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Parameter Descriptions
|
||||||
|
|
||||||
|
### Selector Parameters:
|
||||||
|
- `<targets>`: Entity selector (e.g., `@e[type=!player]`, `@a`, `@p`)
|
||||||
|
- `<holder>`, `<from>`, `<to>`: Single entity selector
|
||||||
|
|
||||||
|
### Numerical Parameters:
|
||||||
|
- `maxDistance`: Maximum distance (`Double`, range: LeashConfigManager.MAX_DISTANCE_MIN_VALUE to MAX_DISTANCE_MAX_VALUE)
|
||||||
|
- `elasticDistanceScale`: Elastic distance scale (`Double`, range: LeashConfigManager.ELASTIC_DISTANCE_MIN_VALUE to ELASTIC_DISTANCE_MAX_VALUE)
|
||||||
|
- `keepTicks`: Keep duration (`Integer`, ≥0)
|
||||||
|
|
||||||
|
### Other Parameters:
|
||||||
|
- `reserved`: Reserved field (`String`)
|
||||||
|
- `<pos>`, `<fromPos>`, `<toPos>`: Block position coordinates
|
||||||
|
|
||||||
|
## Usage Examples
|
||||||
|
|
||||||
|
1. **Leash all sheep to player:**
|
||||||
|
```
|
||||||
|
/slp leashdata add @e[type=sheep] @p 10.0 0.8 600 "farm"
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Check player's leash status:**
|
||||||
|
```
|
||||||
|
/slp leashdata get info @p
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Transfer leash from fence post to player:**
|
||||||
|
```
|
||||||
|
/slp leashdata transfer @e[type=sheep] fromBlock 100 64 100 @p
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Set max distance for all leashes:**
|
||||||
|
```
|
||||||
|
/slp leashdata set @e[type=sheep] static maxDistance 15.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration Defaults
|
||||||
|
- Max distance range: `LeashConfigManager.MAX_DISTANCE_MIN_VALUE` to `MAX_DISTANCE_MAX_VALUE`
|
||||||
|
- Elastic scale range: `LeashConfigManager.ELASTIC_DISTANCE_MIN_VALUE` to `ELASTIC_DISTANCE_MAX_VALUE`
|
||||||
|
|
||||||
|
## Important Notes
|
||||||
|
1. All commands require OP permissions (permission level 2)
|
||||||
|
2. Block leashes require SuperLeashKnotEntity to exist at the target position
|
||||||
|
3. Transfer operations do not affect the source entity itself (to prevent loops)
|
||||||
|
4. Display results are limited to showing up to 4 entities (shows ellipsis for more)
|
||||||
5
gitattributes
Normal file
5
gitattributes
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Disable autocrlf on generated files, they always generate with LF
|
||||||
|
# Add any extra files or paths here to make git stop saying they
|
||||||
|
# are changed when only line endings change.
|
||||||
|
src/generated/**/.cache/cache text eol=lf
|
||||||
|
src/generated/**/*.json text eol=lf
|
||||||
|
|
@ -1,40 +1,72 @@
|
||||||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||||
org.gradle.jvmargs=-Xmx2G
|
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||||
org.gradle.daemon=true
|
org.gradle.jvmargs=-Xmx3G
|
||||||
|
org.gradle.daemon=false
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.configuration-cache=true
|
org.gradle.configuration-cache=false
|
||||||
|
neoForge.parchment.minecraftVersion=1.20.1
|
||||||
|
neoForge.parchment.mappingsVersion=2023.09.03
|
||||||
|
|
||||||
|
# enable ProGuard
|
||||||
|
enableProguard=false
|
||||||
|
# Jei Version
|
||||||
|
jei_version=15.20.0.112
|
||||||
|
#Other Mods Version
|
||||||
|
player_anim_version=1.0.2-rc1+1.20
|
||||||
|
geckolib_version=4.2.1
|
||||||
|
curios_version=5.5.0+1.20.1
|
||||||
## Environment Properties
|
## Environment Properties
|
||||||
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
|
|
||||||
# The Minecraft version must agree with the Neo version to get a valid artifact
|
# The Minecraft version must agree with the Forge version to get a valid artifact
|
||||||
minecraft_version=26.1.2
|
minecraft_version=1.20.1
|
||||||
# The Minecraft version range can use any release version of Minecraft as bounds.
|
# The Minecraft version range can use any release version of Minecraft as bounds.
|
||||||
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
|
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
|
||||||
# as they do not follow standard versioning conventions.
|
# as they do not follow standard versioning conventions.
|
||||||
minecraft_version_range=[26.1.2,27)
|
minecraft_version_range=[1.20.1,1.21)
|
||||||
# The Neo version must agree with the Minecraft version to get a valid artifact
|
# The Forge version must agree with the Minecraft version to get a valid artifact
|
||||||
neo_version=26.1.2.36-beta
|
forge_version=47.3.4
|
||||||
# The Neo version range can use any version of Neo as bounds
|
# The Forge version range can use any version of Forge as bounds or match the loader version range
|
||||||
neo_version_range=[26,)
|
forge_version_range=[47,)
|
||||||
# The loader version range can only use the major version of FML as bounds
|
# The loader version range can only use the major version of Forge/FML as bounds
|
||||||
loader_version_range=[4,)
|
loader_version_range=[47,)
|
||||||
parchment_minecraft_version=1.21.11
|
# The mapping channel to use for mappings.
|
||||||
parchment_mappings_version=2025.12.21-nightly-SNAPSHOT
|
# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"].
|
||||||
|
# Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin.
|
||||||
|
#
|
||||||
|
# | Channel | Version | |
|
||||||
|
# |-----------|----------------------|--------------------------------------------------------------------------------|
|
||||||
|
# | official | MCVersion | Official field/method names from Mojang mapping files |
|
||||||
|
# | parchment | YYYY.MM.DD-MCVersion | Open community-sourced parameter names and javadocs layered on top of official |
|
||||||
|
#
|
||||||
|
# You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
|
||||||
|
# See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
||||||
|
#
|
||||||
|
# Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge.
|
||||||
|
# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started
|
||||||
|
mapping_channel=parchment
|
||||||
|
# The mapping version to query from the mapping channel.
|
||||||
|
# This must match the format required by the mapping channel.
|
||||||
|
mapping_version=2023.09.03-1.20.1
|
||||||
|
mapping_lasting_version=2023.09.03
|
||||||
## Mod Properties
|
## Mod Properties
|
||||||
|
|
||||||
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
|
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
|
||||||
# Must match the String constant located in the main mod class annotated with @Mod.
|
# Must match the String constant located in the main mod class annotated with @Mod.
|
||||||
mod_id=superlead
|
mod_id=superleadrope
|
||||||
# The human-readable display name for the mod.
|
# The human-readable display name for the mod.
|
||||||
mod_name=SuperLead
|
mod_name=Super Lead Rope
|
||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=MIT
|
mod_license=GPLv3
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=0.0.1
|
mod_version=1.2.3
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
mod_group_id=top.r3944realms.superlead
|
mod_group_id=top.r3944realms.superleadrope
|
||||||
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
|
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
|
||||||
mod_authors=R3944Realms
|
mod_authors=R3944Realms
|
||||||
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
|
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
|
||||||
mod_description=Lib39
|
mod_description= A Lead Rope which is better than Bugjump.
|
||||||
|
|
||||||
|
mod_credits=Leisure Time Dock
|
||||||
|
|
|
||||||
10
gradle/libs.versions.toml
Normal file
10
gradle/libs.versions.toml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
# This file was generated by the Gradle 'init' task.
|
||||||
|
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
|
||||||
|
|
||||||
|
[versions]
|
||||||
|
guava = "33.4.5-jre"
|
||||||
|
junit-jupiter = "5.12.1"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||||
|
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-9.2.0-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
|
||||||
5
gradlew
vendored
5
gradlew
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015 the original authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
|
@ -114,6 +114,7 @@ case "$( uname )" in #(
|
||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
|
|
@ -171,6 +172,7 @@ fi
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if "$cygwin" || "$msys" ; then
|
if "$cygwin" || "$msys" ; then
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
|
@ -210,6 +212,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
|
|
|
||||||
3
gradlew.bat
vendored
3
gradlew.bat
vendored
|
|
@ -70,10 +70,11 @@ goto fail
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|
|
||||||
BIN
libs/curtain-1.20.1-1.3.2.jar
Normal file
BIN
libs/curtain-1.20.1-1.3.2.jar
Normal file
Binary file not shown.
16
node_modules/.bin/commitizen
generated
vendored
16
node_modules/.bin/commitizen
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../commitizen/bin/commitizen" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../commitizen/bin/commitizen" "$@"
|
|
||||||
fi
|
|
||||||
17
node_modules/.bin/commitizen.cmd
generated
vendored
17
node_modules/.bin/commitizen.cmd
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\commitizen\bin\commitizen" %*
|
|
||||||
28
node_modules/.bin/commitizen.ps1
generated
vendored
28
node_modules/.bin/commitizen.ps1
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../commitizen/bin/commitizen" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../commitizen/bin/commitizen" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../commitizen/bin/commitizen" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../commitizen/bin/commitizen" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
16
node_modules/.bin/conventional-commits-parser
generated
vendored
16
node_modules/.bin/conventional-commits-parser
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../conventional-commits-parser/dist/cli/index.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../conventional-commits-parser/dist/cli/index.js" "$@"
|
|
||||||
fi
|
|
||||||
17
node_modules/.bin/conventional-commits-parser.cmd
generated
vendored
17
node_modules/.bin/conventional-commits-parser.cmd
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\conventional-commits-parser\dist\cli\index.js" %*
|
|
||||||
28
node_modules/.bin/conventional-commits-parser.ps1
generated
vendored
28
node_modules/.bin/conventional-commits-parser.ps1
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../conventional-commits-parser/dist/cli/index.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../conventional-commits-parser/dist/cli/index.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../conventional-commits-parser/dist/cli/index.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../conventional-commits-parser/dist/cli/index.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
16
node_modules/.bin/cz
generated
vendored
16
node_modules/.bin/cz
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../commitizen/bin/git-cz" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../commitizen/bin/git-cz" "$@"
|
|
||||||
fi
|
|
||||||
17
node_modules/.bin/cz.cmd
generated
vendored
17
node_modules/.bin/cz.cmd
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\commitizen\bin\git-cz" %*
|
|
||||||
28
node_modules/.bin/cz.ps1
generated
vendored
28
node_modules/.bin/cz.ps1
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../commitizen/bin/git-cz" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../commitizen/bin/git-cz" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../commitizen/bin/git-cz" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../commitizen/bin/git-cz" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
16
node_modules/.bin/git-cz
generated
vendored
16
node_modules/.bin/git-cz
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../commitizen/bin/git-cz" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../commitizen/bin/git-cz" "$@"
|
|
||||||
fi
|
|
||||||
17
node_modules/.bin/git-cz.cmd
generated
vendored
17
node_modules/.bin/git-cz.cmd
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\commitizen\bin\git-cz" %*
|
|
||||||
28
node_modules/.bin/git-cz.ps1
generated
vendored
28
node_modules/.bin/git-cz.ps1
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../commitizen/bin/git-cz" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../commitizen/bin/git-cz" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../commitizen/bin/git-cz" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../commitizen/bin/git-cz" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
16
node_modules/.bin/jiti
generated
vendored
16
node_modules/.bin/jiti
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../jiti/lib/jiti-cli.mjs" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../jiti/lib/jiti-cli.mjs" "$@"
|
|
||||||
fi
|
|
||||||
17
node_modules/.bin/jiti.cmd
generated
vendored
17
node_modules/.bin/jiti.cmd
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jiti\lib\jiti-cli.mjs" %*
|
|
||||||
28
node_modules/.bin/jiti.ps1
generated
vendored
28
node_modules/.bin/jiti.ps1
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
16
node_modules/.bin/js-yaml
generated
vendored
16
node_modules/.bin/js-yaml
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
|
||||||
fi
|
|
||||||
17
node_modules/.bin/js-yaml.cmd
generated
vendored
17
node_modules/.bin/js-yaml.cmd
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %*
|
|
||||||
28
node_modules/.bin/js-yaml.ps1
generated
vendored
28
node_modules/.bin/js-yaml.ps1
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
16
node_modules/.bin/tsc
generated
vendored
16
node_modules/.bin/tsc
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
||||||
fi
|
|
||||||
17
node_modules/.bin/tsc.cmd
generated
vendored
17
node_modules/.bin/tsc.cmd
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %*
|
|
||||||
28
node_modules/.bin/tsc.ps1
generated
vendored
28
node_modules/.bin/tsc.ps1
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
16
node_modules/.bin/tsserver
generated
vendored
16
node_modules/.bin/tsserver
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
||||||
fi
|
|
||||||
17
node_modules/.bin/tsserver.cmd
generated
vendored
17
node_modules/.bin/tsserver.cmd
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %*
|
|
||||||
28
node_modules/.bin/tsserver.ps1
generated
vendored
28
node_modules/.bin/tsserver.ps1
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
16
node_modules/.bin/which
generated
vendored
16
node_modules/.bin/which
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*|*MINGW*|*MSYS*)
|
|
||||||
if command -v cygpath > /dev/null 2>&1; then
|
|
||||||
basedir=`cygpath -w "$basedir"`
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../which/bin/which" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../which/bin/which" "$@"
|
|
||||||
fi
|
|
||||||
17
node_modules/.bin/which.cmd
generated
vendored
17
node_modules/.bin/which.cmd
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
@ECHO off
|
|
||||||
GOTO start
|
|
||||||
:find_dp0
|
|
||||||
SET dp0=%~dp0
|
|
||||||
EXIT /b
|
|
||||||
:start
|
|
||||||
SETLOCAL
|
|
||||||
CALL :find_dp0
|
|
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" (
|
|
||||||
SET "_prog=%dp0%\node.exe"
|
|
||||||
) ELSE (
|
|
||||||
SET "_prog=node"
|
|
||||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
)
|
|
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\which" %*
|
|
||||||
28
node_modules/.bin/which.ps1
generated
vendored
28
node_modules/.bin/which.ps1
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
}
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../which/bin/which" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../which/bin/which" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../which/bin/which" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../which/bin/which" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
||||||
2058
node_modules/.package-lock.json
generated
vendored
2058
node_modules/.package-lock.json
generated
vendored
File diff suppressed because it is too large
Load Diff
22
node_modules/@babel/code-frame/LICENSE
generated
vendored
22
node_modules/@babel/code-frame/LICENSE
generated
vendored
|
|
@ -1,22 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
19
node_modules/@babel/code-frame/README.md
generated
vendored
19
node_modules/@babel/code-frame/README.md
generated
vendored
|
|
@ -1,19 +0,0 @@
|
||||||
# @babel/code-frame
|
|
||||||
|
|
||||||
> Generate errors that contain a code frame that point to source locations.
|
|
||||||
|
|
||||||
See our website [@babel/code-frame](https://babeljs.io/docs/babel-code-frame) for more information.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Using npm:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install --save-dev @babel/code-frame
|
|
||||||
```
|
|
||||||
|
|
||||||
or using yarn:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add @babel/code-frame --dev
|
|
||||||
```
|
|
||||||
217
node_modules/@babel/code-frame/lib/index.js
generated
vendored
217
node_modules/@babel/code-frame/lib/index.js
generated
vendored
|
|
@ -1,217 +0,0 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
Object.defineProperty(exports, '__esModule', { value: true });
|
|
||||||
|
|
||||||
var picocolors = require('picocolors');
|
|
||||||
var jsTokens = require('js-tokens');
|
|
||||||
var helperValidatorIdentifier = require('@babel/helper-validator-identifier');
|
|
||||||
|
|
||||||
function isColorSupported() {
|
|
||||||
return (typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const compose = (f, g) => v => f(g(v));
|
|
||||||
function buildDefs(colors) {
|
|
||||||
return {
|
|
||||||
keyword: colors.cyan,
|
|
||||||
capitalized: colors.yellow,
|
|
||||||
jsxIdentifier: colors.yellow,
|
|
||||||
punctuator: colors.yellow,
|
|
||||||
number: colors.magenta,
|
|
||||||
string: colors.green,
|
|
||||||
regex: colors.magenta,
|
|
||||||
comment: colors.gray,
|
|
||||||
invalid: compose(compose(colors.white, colors.bgRed), colors.bold),
|
|
||||||
gutter: colors.gray,
|
|
||||||
marker: compose(colors.red, colors.bold),
|
|
||||||
message: compose(colors.red, colors.bold),
|
|
||||||
reset: colors.reset
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const defsOn = buildDefs(picocolors.createColors(true));
|
|
||||||
const defsOff = buildDefs(picocolors.createColors(false));
|
|
||||||
function getDefs(enabled) {
|
|
||||||
return enabled ? defsOn : defsOff;
|
|
||||||
}
|
|
||||||
|
|
||||||
const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
|
|
||||||
const NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
|
|
||||||
const BRACKET = /^[()[\]{}]$/;
|
|
||||||
let tokenize;
|
|
||||||
const JSX_TAG = /^[a-z][\w-]*$/i;
|
|
||||||
const getTokenType = function (token, offset, text) {
|
|
||||||
if (token.type === "name") {
|
|
||||||
const tokenValue = token.value;
|
|
||||||
if (helperValidatorIdentifier.isKeyword(tokenValue) || helperValidatorIdentifier.isStrictReservedWord(tokenValue, true) || sometimesKeywords.has(tokenValue)) {
|
|
||||||
return "keyword";
|
|
||||||
}
|
|
||||||
if (JSX_TAG.test(tokenValue) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === "</")) {
|
|
||||||
return "jsxIdentifier";
|
|
||||||
}
|
|
||||||
const firstChar = String.fromCodePoint(tokenValue.codePointAt(0));
|
|
||||||
if (firstChar !== firstChar.toLowerCase()) {
|
|
||||||
return "capitalized";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (token.type === "punctuator" && BRACKET.test(token.value)) {
|
|
||||||
return "bracket";
|
|
||||||
}
|
|
||||||
if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
|
|
||||||
return "punctuator";
|
|
||||||
}
|
|
||||||
return token.type;
|
|
||||||
};
|
|
||||||
tokenize = function* (text) {
|
|
||||||
let match;
|
|
||||||
while (match = jsTokens.default.exec(text)) {
|
|
||||||
const token = jsTokens.matchToToken(match);
|
|
||||||
yield {
|
|
||||||
type: getTokenType(token, match.index, text),
|
|
||||||
value: token.value
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
function highlight(text) {
|
|
||||||
if (text === "") return "";
|
|
||||||
const defs = getDefs(true);
|
|
||||||
let highlighted = "";
|
|
||||||
for (const {
|
|
||||||
type,
|
|
||||||
value
|
|
||||||
} of tokenize(text)) {
|
|
||||||
if (type in defs) {
|
|
||||||
highlighted += value.split(NEWLINE$1).map(str => defs[type](str)).join("\n");
|
|
||||||
} else {
|
|
||||||
highlighted += value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return highlighted;
|
|
||||||
}
|
|
||||||
|
|
||||||
let deprecationWarningShown = false;
|
|
||||||
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
||||||
function getMarkerLines(loc, source, opts, startLineBaseZero) {
|
|
||||||
const startLoc = Object.assign({
|
|
||||||
column: 0,
|
|
||||||
line: -1
|
|
||||||
}, loc.start);
|
|
||||||
const endLoc = Object.assign({}, startLoc, loc.end);
|
|
||||||
const {
|
|
||||||
linesAbove = 2,
|
|
||||||
linesBelow = 3
|
|
||||||
} = opts || {};
|
|
||||||
const startLine = startLoc.line - startLineBaseZero;
|
|
||||||
const startColumn = startLoc.column;
|
|
||||||
const endLine = endLoc.line - startLineBaseZero;
|
|
||||||
const endColumn = endLoc.column;
|
|
||||||
let start = Math.max(startLine - (linesAbove + 1), 0);
|
|
||||||
let end = Math.min(source.length, endLine + linesBelow);
|
|
||||||
if (startLine === -1) {
|
|
||||||
start = 0;
|
|
||||||
}
|
|
||||||
if (endLine === -1) {
|
|
||||||
end = source.length;
|
|
||||||
}
|
|
||||||
const lineDiff = endLine - startLine;
|
|
||||||
const markerLines = {};
|
|
||||||
if (lineDiff) {
|
|
||||||
for (let i = 0; i <= lineDiff; i++) {
|
|
||||||
const lineNumber = i + startLine;
|
|
||||||
if (!startColumn) {
|
|
||||||
markerLines[lineNumber] = true;
|
|
||||||
} else if (i === 0) {
|
|
||||||
const sourceLength = source[lineNumber - 1].length;
|
|
||||||
markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
|
|
||||||
} else if (i === lineDiff) {
|
|
||||||
markerLines[lineNumber] = [0, endColumn];
|
|
||||||
} else {
|
|
||||||
const sourceLength = source[lineNumber - i].length;
|
|
||||||
markerLines[lineNumber] = [0, sourceLength];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (startColumn === endColumn) {
|
|
||||||
if (startColumn) {
|
|
||||||
markerLines[startLine] = [startColumn, 0];
|
|
||||||
} else {
|
|
||||||
markerLines[startLine] = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
markerLines[startLine] = [startColumn, endColumn - startColumn];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
start,
|
|
||||||
end,
|
|
||||||
markerLines
|
|
||||||
};
|
|
||||||
}
|
|
||||||
function codeFrameColumns(rawLines, loc, opts = {}) {
|
|
||||||
const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
|
|
||||||
const startLineBaseZero = (opts.startLine || 1) - 1;
|
|
||||||
const defs = getDefs(shouldHighlight);
|
|
||||||
const lines = rawLines.split(NEWLINE);
|
|
||||||
const {
|
|
||||||
start,
|
|
||||||
end,
|
|
||||||
markerLines
|
|
||||||
} = getMarkerLines(loc, lines, opts, startLineBaseZero);
|
|
||||||
const hasColumns = loc.start && typeof loc.start.column === "number";
|
|
||||||
const numberMaxWidth = String(end + startLineBaseZero).length;
|
|
||||||
const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;
|
|
||||||
let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
|
|
||||||
const number = start + 1 + index;
|
|
||||||
const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth);
|
|
||||||
const gutter = ` ${paddedNumber} |`;
|
|
||||||
const hasMarker = markerLines[number];
|
|
||||||
const lastMarkerLine = !markerLines[number + 1];
|
|
||||||
if (hasMarker) {
|
|
||||||
let markerLine = "";
|
|
||||||
if (Array.isArray(hasMarker)) {
|
|
||||||
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
|
|
||||||
const numberOfMarkers = hasMarker[1] || 1;
|
|
||||||
markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join("");
|
|
||||||
if (lastMarkerLine && opts.message) {
|
|
||||||
markerLine += " " + defs.message(opts.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
|
|
||||||
} else {
|
|
||||||
return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`;
|
|
||||||
}
|
|
||||||
}).join("\n");
|
|
||||||
if (opts.message && !hasColumns) {
|
|
||||||
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
|
|
||||||
}
|
|
||||||
if (shouldHighlight) {
|
|
||||||
return defs.reset(frame);
|
|
||||||
} else {
|
|
||||||
return frame;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function index (rawLines, lineNumber, colNumber, opts = {}) {
|
|
||||||
if (!deprecationWarningShown) {
|
|
||||||
deprecationWarningShown = true;
|
|
||||||
const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
|
|
||||||
if (process.emitWarning) {
|
|
||||||
process.emitWarning(message, "DeprecationWarning");
|
|
||||||
} else {
|
|
||||||
const deprecationError = new Error(message);
|
|
||||||
deprecationError.name = "DeprecationWarning";
|
|
||||||
console.warn(new Error(message));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
colNumber = Math.max(colNumber, 0);
|
|
||||||
const location = {
|
|
||||||
start: {
|
|
||||||
column: colNumber,
|
|
||||||
line: lineNumber
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return codeFrameColumns(rawLines, location, opts);
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.codeFrameColumns = codeFrameColumns;
|
|
||||||
exports.default = index;
|
|
||||||
exports.highlight = highlight;
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
1
node_modules/@babel/code-frame/lib/index.js.map
generated
vendored
1
node_modules/@babel/code-frame/lib/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
32
node_modules/@babel/code-frame/package.json
generated
vendored
32
node_modules/@babel/code-frame/package.json
generated
vendored
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@babel/code-frame",
|
|
||||||
"version": "7.29.0",
|
|
||||||
"description": "Generate errors that contain a code frame that point to source locations.",
|
|
||||||
"author": "The Babel Team (https://babel.dev/team)",
|
|
||||||
"homepage": "https://babel.dev/docs/en/next/babel-code-frame",
|
|
||||||
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen",
|
|
||||||
"license": "MIT",
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/babel/babel.git",
|
|
||||||
"directory": "packages/babel-code-frame"
|
|
||||||
},
|
|
||||||
"main": "./lib/index.js",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/helper-validator-identifier": "^7.28.5",
|
|
||||||
"js-tokens": "^4.0.0",
|
|
||||||
"picocolors": "^1.1.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"charcodes": "^0.2.0",
|
|
||||||
"import-meta-resolve": "^4.1.0",
|
|
||||||
"strip-ansi": "^4.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.9.0"
|
|
||||||
},
|
|
||||||
"type": "commonjs"
|
|
||||||
}
|
|
||||||
22
node_modules/@babel/helper-validator-identifier/LICENSE
generated
vendored
22
node_modules/@babel/helper-validator-identifier/LICENSE
generated
vendored
|
|
@ -1,22 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
19
node_modules/@babel/helper-validator-identifier/README.md
generated
vendored
19
node_modules/@babel/helper-validator-identifier/README.md
generated
vendored
|
|
@ -1,19 +0,0 @@
|
||||||
# @babel/helper-validator-identifier
|
|
||||||
|
|
||||||
> Validate identifier/keywords name
|
|
||||||
|
|
||||||
See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/babel-helper-validator-identifier) for more information.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Using npm:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install --save @babel/helper-validator-identifier
|
|
||||||
```
|
|
||||||
|
|
||||||
or using yarn:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add @babel/helper-validator-identifier
|
|
||||||
```
|
|
||||||
70
node_modules/@babel/helper-validator-identifier/lib/identifier.js
generated
vendored
70
node_modules/@babel/helper-validator-identifier/lib/identifier.js
generated
vendored
|
|
@ -1,70 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
exports.isIdentifierChar = isIdentifierChar;
|
|
||||||
exports.isIdentifierName = isIdentifierName;
|
|
||||||
exports.isIdentifierStart = isIdentifierStart;
|
|
||||||
let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088f\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5c\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdc-\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7dc\ua7f1-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
|
||||||
let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1add\u1ae0-\u1aeb\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65";
|
|
||||||
const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
|
||||||
const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
|
||||||
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
|
||||||
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
|
|
||||||
const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
||||||
function isInAstralSet(code, set) {
|
|
||||||
let pos = 0x10000;
|
|
||||||
for (let i = 0, length = set.length; i < length; i += 2) {
|
|
||||||
pos += set[i];
|
|
||||||
if (pos > code) return false;
|
|
||||||
pos += set[i + 1];
|
|
||||||
if (pos >= code) return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
function isIdentifierStart(code) {
|
|
||||||
if (code < 65) return code === 36;
|
|
||||||
if (code <= 90) return true;
|
|
||||||
if (code < 97) return code === 95;
|
|
||||||
if (code <= 122) return true;
|
|
||||||
if (code <= 0xffff) {
|
|
||||||
return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
|
|
||||||
}
|
|
||||||
return isInAstralSet(code, astralIdentifierStartCodes);
|
|
||||||
}
|
|
||||||
function isIdentifierChar(code) {
|
|
||||||
if (code < 48) return code === 36;
|
|
||||||
if (code < 58) return true;
|
|
||||||
if (code < 65) return false;
|
|
||||||
if (code <= 90) return true;
|
|
||||||
if (code < 97) return code === 95;
|
|
||||||
if (code <= 122) return true;
|
|
||||||
if (code <= 0xffff) {
|
|
||||||
return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
|
|
||||||
}
|
|
||||||
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
|
|
||||||
}
|
|
||||||
function isIdentifierName(name) {
|
|
||||||
let isFirst = true;
|
|
||||||
for (let i = 0; i < name.length; i++) {
|
|
||||||
let cp = name.charCodeAt(i);
|
|
||||||
if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {
|
|
||||||
const trail = name.charCodeAt(++i);
|
|
||||||
if ((trail & 0xfc00) === 0xdc00) {
|
|
||||||
cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isFirst) {
|
|
||||||
isFirst = false;
|
|
||||||
if (!isIdentifierStart(cp)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else if (!isIdentifierChar(cp)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return !isFirst;
|
|
||||||
}
|
|
||||||
|
|
||||||
//# sourceMappingURL=identifier.js.map
|
|
||||||
1
node_modules/@babel/helper-validator-identifier/lib/identifier.js.map
generated
vendored
1
node_modules/@babel/helper-validator-identifier/lib/identifier.js.map
generated
vendored
File diff suppressed because one or more lines are too long
57
node_modules/@babel/helper-validator-identifier/lib/index.js
generated
vendored
57
node_modules/@babel/helper-validator-identifier/lib/index.js
generated
vendored
|
|
@ -1,57 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "isIdentifierChar", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () {
|
|
||||||
return _identifier.isIdentifierChar;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "isIdentifierName", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () {
|
|
||||||
return _identifier.isIdentifierName;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "isIdentifierStart", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () {
|
|
||||||
return _identifier.isIdentifierStart;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "isKeyword", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () {
|
|
||||||
return _keyword.isKeyword;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "isReservedWord", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () {
|
|
||||||
return _keyword.isReservedWord;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () {
|
|
||||||
return _keyword.isStrictBindOnlyReservedWord;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "isStrictBindReservedWord", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () {
|
|
||||||
return _keyword.isStrictBindReservedWord;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Object.defineProperty(exports, "isStrictReservedWord", {
|
|
||||||
enumerable: true,
|
|
||||||
get: function () {
|
|
||||||
return _keyword.isStrictReservedWord;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var _identifier = require("./identifier.js");
|
|
||||||
var _keyword = require("./keyword.js");
|
|
||||||
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
1
node_modules/@babel/helper-validator-identifier/lib/index.js.map
generated
vendored
1
node_modules/@babel/helper-validator-identifier/lib/index.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"names":["_identifier","require","_keyword"],"sources":["../src/index.ts"],"sourcesContent":["export {\n isIdentifierName,\n isIdentifierChar,\n isIdentifierStart,\n} from \"./identifier.ts\";\nexport {\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"./keyword.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]}
|
|
||||||
35
node_modules/@babel/helper-validator-identifier/lib/keyword.js
generated
vendored
35
node_modules/@babel/helper-validator-identifier/lib/keyword.js
generated
vendored
|
|
@ -1,35 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
|
||||||
value: true
|
|
||||||
});
|
|
||||||
exports.isKeyword = isKeyword;
|
|
||||||
exports.isReservedWord = isReservedWord;
|
|
||||||
exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
|
|
||||||
exports.isStrictBindReservedWord = isStrictBindReservedWord;
|
|
||||||
exports.isStrictReservedWord = isStrictReservedWord;
|
|
||||||
const reservedWords = {
|
|
||||||
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
|
|
||||||
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
|
|
||||||
strictBind: ["eval", "arguments"]
|
|
||||||
};
|
|
||||||
const keywords = new Set(reservedWords.keyword);
|
|
||||||
const reservedWordsStrictSet = new Set(reservedWords.strict);
|
|
||||||
const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
|
|
||||||
function isReservedWord(word, inModule) {
|
|
||||||
return inModule && word === "await" || word === "enum";
|
|
||||||
}
|
|
||||||
function isStrictReservedWord(word, inModule) {
|
|
||||||
return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
|
|
||||||
}
|
|
||||||
function isStrictBindOnlyReservedWord(word) {
|
|
||||||
return reservedWordsStrictBindSet.has(word);
|
|
||||||
}
|
|
||||||
function isStrictBindReservedWord(word, inModule) {
|
|
||||||
return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
|
|
||||||
}
|
|
||||||
function isKeyword(word) {
|
|
||||||
return keywords.has(word);
|
|
||||||
}
|
|
||||||
|
|
||||||
//# sourceMappingURL=keyword.js.map
|
|
||||||
1
node_modules/@babel/helper-validator-identifier/lib/keyword.js.map
generated
vendored
1
node_modules/@babel/helper-validator-identifier/lib/keyword.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"names":["reservedWords","keyword","strict","strictBind","keywords","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword"],"sources":["../src/keyword.ts"],"sourcesContent":["const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,aAAa,GAAG;EACpBC,OAAO,EAAE,CACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,CACT;EACDC,MAAM,EAAE,CACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR;EACDC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW;AAClC,CAAC;AACD,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAACL,aAAa,CAACC,OAAO,CAAC;AAC/C,MAAMK,sBAAsB,GAAG,IAAID,GAAG,CAACL,aAAa,CAACE,MAAM,CAAC;AAC5D,MAAMK,0BAA0B,GAAG,IAAIF,GAAG,CAACL,aAAa,CAACG,UAAU,CAAC;AAK7D,SAASK,cAAcA,CAACC,IAAY,EAAEC,QAAiB,EAAW;EACvE,OAAQA,QAAQ,IAAID,IAAI,KAAK,OAAO,IAAKA,IAAI,KAAK,MAAM;AAC1D;AAOO,SAASE,oBAAoBA,CAACF,IAAY,EAAEC,QAAiB,EAAW;EAC7E,OAAOF,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIJ,sBAAsB,CAACM,GAAG,CAACH,IAAI,CAAC;AAC3E;AAMO,SAASI,4BAA4BA,CAACJ,IAAY,EAAW;EAClE,OAAOF,0BAA0B,CAACK,GAAG,CAACH,IAAI,CAAC;AAC7C;AAOO,SAASK,wBAAwBA,CACtCL,IAAY,EACZC,QAAiB,EACR;EACT,OACEC,oBAAoB,CAACF,IAAI,EAAEC,QAAQ,CAAC,IAAIG,4BAA4B,CAACJ,IAAI,CAAC;AAE9E;AAEO,SAASM,SAASA,CAACN,IAAY,EAAW;EAC/C,OAAOL,QAAQ,CAACQ,GAAG,CAACH,IAAI,CAAC;AAC3B","ignoreList":[]}
|
|
||||||
31
node_modules/@babel/helper-validator-identifier/package.json
generated
vendored
31
node_modules/@babel/helper-validator-identifier/package.json
generated
vendored
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@babel/helper-validator-identifier",
|
|
||||||
"version": "7.28.5",
|
|
||||||
"description": "Validate identifier/keywords name",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/babel/babel.git",
|
|
||||||
"directory": "packages/babel-helper-validator-identifier"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"main": "./lib/index.js",
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"types": "./lib/index.d.ts",
|
|
||||||
"default": "./lib/index.js"
|
|
||||||
},
|
|
||||||
"./package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@unicode/unicode-17.0.0": "^1.6.10",
|
|
||||||
"charcodes": "^0.2.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.9.0"
|
|
||||||
},
|
|
||||||
"author": "The Babel Team (https://babel.dev/team)",
|
|
||||||
"type": "commonjs"
|
|
||||||
}
|
|
||||||
105
node_modules/@commitlint/config-validator/lib/commitlint.schema.json
generated
vendored
105
node_modules/@commitlint/config-validator/lib/commitlint.schema.json
generated
vendored
|
|
@ -1,105 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "http://json-schema.org/draft-07/schema",
|
|
||||||
"type": "object",
|
|
||||||
"definitions": {
|
|
||||||
"rule": {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"description": "A rule",
|
|
||||||
"type": "array",
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"description": "Level: 0 disables the rule. For 1 it will be considered a warning, for 2 an error",
|
|
||||||
"type": "number",
|
|
||||||
"enum": [0, 1, 2]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Applicable: always|never: never inverts the rule",
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["always", "never"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Value: the value for this rule"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"minItems": 1,
|
|
||||||
"maxItems": 3,
|
|
||||||
"additionalItems": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "A rule",
|
|
||||||
"typeof": "function"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"extends": {
|
|
||||||
"description": "Resolveable ids to commitlint configurations to extend",
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "array",
|
|
||||||
"items": { "type": "string" }
|
|
||||||
},
|
|
||||||
{ "type": "string" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"parserPreset": {
|
|
||||||
"description": "Resolveable id to conventional-changelog parser preset to import and use",
|
|
||||||
"oneOf": [
|
|
||||||
{ "type": "string" },
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"name": { "type": "string" },
|
|
||||||
"path": { "type": "string" },
|
|
||||||
"parserOpts": {}
|
|
||||||
},
|
|
||||||
"additionalProperties": true
|
|
||||||
},
|
|
||||||
{ "typeof": "function" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"helpUrl": {
|
|
||||||
"description": "Custom URL to show upon failure",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"formatter": {
|
|
||||||
"description": "Resolveable id to package, from node_modules, which formats the output",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"description": "Rules to check against",
|
|
||||||
"type": "object",
|
|
||||||
"propertyNames": { "type": "string" },
|
|
||||||
"additionalProperties": { "$ref": "#/definitions/rule" }
|
|
||||||
},
|
|
||||||
"plugins": {
|
|
||||||
"description": "Resolveable ids of commitlint plugins from node_modules",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"anyOf": [
|
|
||||||
{ "type": "string" },
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"required": ["rules"],
|
|
||||||
"properties": {
|
|
||||||
"rules": {
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ignores": {
|
|
||||||
"type": "array",
|
|
||||||
"items": { "typeof": "function" },
|
|
||||||
"description": "Additional commits to ignore, defined by ignore matchers"
|
|
||||||
},
|
|
||||||
"defaultIgnores": {
|
|
||||||
"description": "Whether commitlint uses the default ignore rules",
|
|
||||||
"type": "boolean"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
9
node_modules/@commitlint/config-validator/lib/formatErrors.d.ts
generated
vendored
9
node_modules/@commitlint/config-validator/lib/formatErrors.d.ts
generated
vendored
|
|
@ -1,9 +0,0 @@
|
||||||
import type { ErrorObject } from "ajv";
|
|
||||||
/**
|
|
||||||
* Formats an array of schema validation errors.
|
|
||||||
* @param errors An array of error messages to format.
|
|
||||||
* @returns Formatted error message
|
|
||||||
* Based on https://github.com/eslint/eslint/blob/master/lib/shared/config-validator.js#L237-L261
|
|
||||||
*/
|
|
||||||
export declare function formatErrors(errors: ErrorObject[]): string;
|
|
||||||
//# sourceMappingURL=formatErrors.d.ts.map
|
|
||||||
1
node_modules/@commitlint/config-validator/lib/formatErrors.d.ts.map
generated
vendored
1
node_modules/@commitlint/config-validator/lib/formatErrors.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"formatErrors.d.ts","sourceRoot":"","sources":["../src/formatErrors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAoC1D"}
|
|
||||||
35
node_modules/@commitlint/config-validator/lib/formatErrors.js
generated
vendored
35
node_modules/@commitlint/config-validator/lib/formatErrors.js
generated
vendored
|
|
@ -1,35 +0,0 @@
|
||||||
/**
|
|
||||||
* Formats an array of schema validation errors.
|
|
||||||
* @param errors An array of error messages to format.
|
|
||||||
* @returns Formatted error message
|
|
||||||
* Based on https://github.com/eslint/eslint/blob/master/lib/shared/config-validator.js#L237-L261
|
|
||||||
*/
|
|
||||||
export function formatErrors(errors) {
|
|
||||||
return errors
|
|
||||||
.map((error) => {
|
|
||||||
if (error.keyword === "additionalProperties" &&
|
|
||||||
"additionalProperty" in error.params) {
|
|
||||||
const formattedPropertyPath = error.instancePath.length
|
|
||||||
? `${error.instancePath.slice(1)}.${error.params.additionalProperty}`
|
|
||||||
: error.params.additionalProperty;
|
|
||||||
return `Unexpected top-level property "${formattedPropertyPath}"`;
|
|
||||||
}
|
|
||||||
if (error.keyword === "type") {
|
|
||||||
const formattedField = error.instancePath.slice(1);
|
|
||||||
if (!formattedField) {
|
|
||||||
return `Config has the wrong type - ${error.message}`;
|
|
||||||
}
|
|
||||||
return `Property "${formattedField}" has the wrong type - ${error.message}`;
|
|
||||||
}
|
|
||||||
const field = (error.instancePath[0] === "."
|
|
||||||
? error.instancePath.slice(1)
|
|
||||||
: error.instancePath) || "Config";
|
|
||||||
if (error.keyword === "typeof") {
|
|
||||||
return `"${field}" should be a ${error.schema}. Value: ${JSON.stringify(error.data)}`;
|
|
||||||
}
|
|
||||||
return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
|
|
||||||
})
|
|
||||||
.map((message) => `\t- ${message}.\n`)
|
|
||||||
.join("");
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=formatErrors.js.map
|
|
||||||
1
node_modules/@commitlint/config-validator/lib/formatErrors.js.map
generated
vendored
1
node_modules/@commitlint/config-validator/lib/formatErrors.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"formatErrors.js","sourceRoot":"","sources":["../src/formatErrors.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAAqB;IACjD,OAAO,MAAM;SACX,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACd,IACC,KAAK,CAAC,OAAO,KAAK,sBAAsB;YACxC,oBAAoB,IAAI,KAAK,CAAC,MAAM,EACnC,CAAC;YACF,MAAM,qBAAqB,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM;gBACtD,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,kBAAkB,EAAE;gBACrE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC;YAEnC,OAAO,kCAAkC,qBAAqB,GAAG,CAAC;QACnE,CAAC;QACD,IAAI,KAAK,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC;YAC9B,MAAM,cAAc,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACnD,IAAI,CAAC,cAAc,EAAE,CAAC;gBACrB,OAAO,+BAA+B,KAAK,CAAC,OAAO,EAAE,CAAC;YACvD,CAAC;YACD,OAAO,aAAa,cAAc,0BAA0B,KAAK,CAAC,OAAO,EAAE,CAAC;QAC7E,CAAC;QACD,MAAM,KAAK,GACV,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,GAAG;YAC7B,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;YAC7B,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC;QACpC,IAAI,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAO,IAAI,KAAK,iBAAiB,KAAK,CAAC,MAAM,YAAY,IAAI,CAAC,SAAS,CACtE,KAAK,CAAC,IAAI,CACV,EAAE,CAAC;QACL,CAAC;QAED,OAAO,IAAI,KAAK,KAAK,KAAK,CAAC,OAAO,YAAY,IAAI,CAAC,SAAS,CAC3D,KAAK,CAAC,IAAI,CACV,EAAE,CAAC;IACL,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,OAAO,KAAK,CAAC;SACrC,IAAI,CAAC,EAAE,CAAC,CAAC;AACZ,CAAC"}
|
|
||||||
3
node_modules/@commitlint/config-validator/lib/validate.d.ts
generated
vendored
3
node_modules/@commitlint/config-validator/lib/validate.d.ts
generated
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
import { UserConfig } from "@commitlint/types";
|
|
||||||
export declare function validateConfig(source: string, config: unknown): asserts config is UserConfig;
|
|
||||||
//# sourceMappingURL=validate.d.ts.map
|
|
||||||
1
node_modules/@commitlint/config-validator/lib/validate.d.ts.map
generated
vendored
1
node_modules/@commitlint/config-validator/lib/validate.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAsB/C,wBAAgB,cAAc,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,GACb,OAAO,CAAC,MAAM,IAAI,UAAU,CA4B9B"}
|
|
||||||
39
node_modules/@commitlint/config-validator/lib/validate.js
generated
vendored
39
node_modules/@commitlint/config-validator/lib/validate.js
generated
vendored
|
|
@ -1,39 +0,0 @@
|
||||||
import { createRequire } from "node:module";
|
|
||||||
import _Ajv from "ajv";
|
|
||||||
import { formatErrors } from "./formatErrors.js";
|
|
||||||
const require = createRequire(import.meta.url);
|
|
||||||
const schema = require("./commitlint.schema.json");
|
|
||||||
const TYPE_OF = [
|
|
||||||
"undefined",
|
|
||||||
"string",
|
|
||||||
"number",
|
|
||||||
"object",
|
|
||||||
"function",
|
|
||||||
"boolean",
|
|
||||||
"symbol",
|
|
||||||
];
|
|
||||||
// FIXME: https://github.com/ajv-validator/ajv/issues/2132
|
|
||||||
const Ajv = _Ajv;
|
|
||||||
export function validateConfig(source, config) {
|
|
||||||
const ajv = new Ajv({
|
|
||||||
meta: false,
|
|
||||||
strict: false,
|
|
||||||
useDefaults: true,
|
|
||||||
validateSchema: false,
|
|
||||||
verbose: true,
|
|
||||||
});
|
|
||||||
ajv.addKeyword({
|
|
||||||
keyword: "typeof",
|
|
||||||
validate: function typeOfFunc(schema, data) {
|
|
||||||
return typeof data === schema;
|
|
||||||
},
|
|
||||||
metaSchema: { type: "string", enum: TYPE_OF },
|
|
||||||
schema: true,
|
|
||||||
});
|
|
||||||
const validate = ajv.compile(schema);
|
|
||||||
const isValid = validate(config);
|
|
||||||
if (!isValid && validate.errors && validate.errors.length) {
|
|
||||||
throw new Error(`Commitlint configuration in ${source} is invalid:\n${formatErrors(validate.errors)}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=validate.js.map
|
|
||||||
1
node_modules/@commitlint/config-validator/lib/validate.js.map
generated
vendored
1
node_modules/@commitlint/config-validator/lib/validate.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,IAAI,MAAM,KAAK,CAAC;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,MAAM,GAA8C,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAE9F,MAAM,OAAO,GAAG;IACf,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,SAAS;IACT,QAAQ;CACR,CAAC;AAEF,0DAA0D;AAC1D,MAAM,GAAG,GAAG,IAAsC,CAAC;AAEnD,MAAM,UAAU,cAAc,CAC7B,MAAc,EACd,MAAe;IAEf,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC;QACnB,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,IAAI;QACjB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,GAAG,CAAC,UAAU,CAAC;QACd,OAAO,EAAE,QAAQ;QACjB,QAAQ,EAAE,SAAS,UAAU,CAAC,MAAW,EAAE,IAAS;YACnD,OAAO,OAAO,IAAI,KAAK,MAAM,CAAC;QAC/B,CAAC;QACD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;QAC7C,MAAM,EAAE,IAAI;KACZ,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjC,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CACd,+BAA+B,MAAM,iBAAiB,YAAY,CACjE,QAAQ,CAAC,MAAM,CACf,EAAE,CACH,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
||||||
21
node_modules/@commitlint/config-validator/license.md
generated
vendored
21
node_modules/@commitlint/config-validator/license.md
generated
vendored
|
|
@ -1,21 +0,0 @@
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2016 - present Mario Nebl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
46
node_modules/@commitlint/config-validator/package.json
generated
vendored
46
node_modules/@commitlint/config-validator/package.json
generated
vendored
|
|
@ -1,46 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@commitlint/config-validator",
|
|
||||||
"type": "module",
|
|
||||||
"version": "20.5.0",
|
|
||||||
"description": "config validator for commitlint.config.js",
|
|
||||||
"main": "lib/validate.js",
|
|
||||||
"types": "lib/validate.d.ts",
|
|
||||||
"files": [
|
|
||||||
"lib/"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"deps": "dep-check",
|
|
||||||
"pkg": "pkg-check --skip-import"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=v18"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/conventional-changelog/commitlint.git",
|
|
||||||
"directory": "@commitlint/config-validator"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/conventional-changelog/commitlint/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://commitlint.js.org/",
|
|
||||||
"keywords": [
|
|
||||||
"conventional-changelog",
|
|
||||||
"commitlint",
|
|
||||||
"library",
|
|
||||||
"core"
|
|
||||||
],
|
|
||||||
"author": {
|
|
||||||
"name": "Mario Nebl",
|
|
||||||
"email": "hello@herebecode.com"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"devDependencies": {
|
|
||||||
"@commitlint/utils": "^20.0.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@commitlint/types": "^20.5.0",
|
|
||||||
"ajv": "^8.11.0"
|
|
||||||
},
|
|
||||||
"gitHead": "a7918e9cf70f822505cb4422c03150a86f802627"
|
|
||||||
}
|
|
||||||
7
node_modules/@commitlint/execute-rule/lib/index.d.ts
generated
vendored
7
node_modules/@commitlint/execute-rule/lib/index.d.ts
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
type Rule<T> = readonly [string, Config<T>];
|
|
||||||
type Config<T> = T | Promise<T> | ExectableConfig<T>;
|
|
||||||
type ExectableConfig<T> = (() => T) | (() => Promise<T>);
|
|
||||||
type ExecutedRule<T> = readonly [string, T];
|
|
||||||
export default execute;
|
|
||||||
export declare function execute<T = unknown>(rule?: Rule<T>): Promise<ExecutedRule<T> | null>;
|
|
||||||
//# sourceMappingURL=index.d.ts.map
|
|
||||||
1
node_modules/@commitlint/execute-rule/lib/index.d.ts.map
generated
vendored
1
node_modules/@commitlint/execute-rule/lib/index.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,CAAC,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;AACrD,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzD,KAAK,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAE5C,eAAe,OAAO,CAAC;AAEvB,wBAAsB,OAAO,CAAC,CAAC,GAAG,OAAO,EACxC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GACZ,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAUjC"}
|
|
||||||
13
node_modules/@commitlint/execute-rule/lib/index.js
generated
vendored
13
node_modules/@commitlint/execute-rule/lib/index.js
generated
vendored
|
|
@ -1,13 +0,0 @@
|
||||||
export default execute;
|
|
||||||
export async function execute(rule) {
|
|
||||||
if (!Array.isArray(rule)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const [name, config] = rule;
|
|
||||||
const fn = executable(config) ? config : async () => config;
|
|
||||||
return [name, await fn()];
|
|
||||||
}
|
|
||||||
function executable(config) {
|
|
||||||
return typeof config === "function";
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
1
node_modules/@commitlint/execute-rule/lib/index.js.map
generated
vendored
1
node_modules/@commitlint/execute-rule/lib/index.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,eAAe,OAAO,CAAC;AAEvB,MAAM,CAAC,KAAK,UAAU,OAAO,CAC5B,IAAc;IAEd,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAE5B,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC;IAE5D,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,UAAU,CAAI,MAAiB;IACvC,OAAO,OAAO,MAAM,KAAK,UAAU,CAAC;AACrC,CAAC"}
|
|
||||||
21
node_modules/@commitlint/execute-rule/license.md
generated
vendored
21
node_modules/@commitlint/execute-rule/license.md
generated
vendored
|
|
@ -1,21 +0,0 @@
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2016 - present Mario Nebl
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
42
node_modules/@commitlint/execute-rule/package.json
generated
vendored
42
node_modules/@commitlint/execute-rule/package.json
generated
vendored
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@commitlint/execute-rule",
|
|
||||||
"type": "module",
|
|
||||||
"version": "20.0.0",
|
|
||||||
"description": "Lint your commit messages",
|
|
||||||
"main": "lib/index.js",
|
|
||||||
"types": "lib/index.d.ts",
|
|
||||||
"files": [
|
|
||||||
"lib/"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"deps": "dep-check",
|
|
||||||
"pkg": "pkg-check"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=v18"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/conventional-changelog/commitlint.git",
|
|
||||||
"directory": "@commitlint/execute-rule"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/conventional-changelog/commitlint/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://commitlint.js.org/",
|
|
||||||
"keywords": [
|
|
||||||
"conventional-changelog",
|
|
||||||
"commitlint",
|
|
||||||
"library",
|
|
||||||
"core"
|
|
||||||
],
|
|
||||||
"author": {
|
|
||||||
"name": "Mario Nebl",
|
|
||||||
"email": "hello@herebecode.com"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"devDependencies": {
|
|
||||||
"@commitlint/utils": "^20.0.0"
|
|
||||||
},
|
|
||||||
"gitHead": "407be6c96b1a108ee012ed5330b0d80a165952d5"
|
|
||||||
}
|
|
||||||
15
node_modules/@commitlint/load/README.md
generated
vendored
15
node_modules/@commitlint/load/README.md
generated
vendored
|
|
@ -1,15 +0,0 @@
|
||||||
# @commitlint/load
|
|
||||||
|
|
||||||
Load shared commitlint configuration
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
```shell
|
|
||||||
npm install --save-dev @commitlint/load
|
|
||||||
```
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
Consult [API docs](https://commitlint.js.org/api/load) for comprehensive documentation.
|
|
||||||
|
|
||||||
Documentation generated from [`docs` folder](../../docs/api/format.md).
|
|
||||||
5
node_modules/@commitlint/load/lib/load.d.ts
generated
vendored
5
node_modules/@commitlint/load/lib/load.d.ts
generated
vendored
|
|
@ -1,5 +0,0 @@
|
||||||
import { resolveFrom, resolveFromSilent, resolveGlobalSilent } from "@commitlint/resolve-extends";
|
|
||||||
import { LoadOptions, QualifiedConfig, UserConfig } from "@commitlint/types";
|
|
||||||
export default function load(seed?: UserConfig, options?: LoadOptions): Promise<QualifiedConfig>;
|
|
||||||
export { resolveFrom, resolveFromSilent, resolveGlobalSilent };
|
|
||||||
//# sourceMappingURL=load.d.ts.map
|
|
||||||
1
node_modules/@commitlint/load/lib/load.d.ts.map
generated
vendored
1
node_modules/@commitlint/load/lib/load.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAIA,OAAuB,EACtB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,WAAW,EAEX,eAAe,EAEf,UAAU,EACV,MAAM,mBAAmB,CAAC;AAmB3B,wBAA8B,IAAI,CACjC,IAAI,GAAE,UAAe,EACrB,OAAO,GAAE,WAAgB,GACvB,OAAO,CAAC,eAAe,CAAC,CAsG1B;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
||||||
102
node_modules/@commitlint/load/lib/load.js
generated
vendored
102
node_modules/@commitlint/load/lib/load.js
generated
vendored
|
|
@ -1,102 +0,0 @@
|
||||||
import path from "node:path";
|
|
||||||
import { validateConfig } from "@commitlint/config-validator";
|
|
||||||
import executeRule from "@commitlint/execute-rule";
|
|
||||||
import resolveExtends, { resolveFrom, resolveFromSilent, resolveGlobalSilent, loadParserPreset, } from "@commitlint/resolve-extends";
|
|
||||||
import isPlainObject from "is-plain-obj";
|
|
||||||
import { merge } from "es-toolkit/compat";
|
|
||||||
import { loadConfig } from "./utils/load-config.js";
|
|
||||||
import { loadParserOpts } from "./utils/load-parser-opts.js";
|
|
||||||
import loadPlugin from "./utils/load-plugin.js";
|
|
||||||
/**
|
|
||||||
* formatter should be kept as is when unable to resolve it from config directory
|
|
||||||
*/
|
|
||||||
const resolveFormatter = (formatter, parent) => {
|
|
||||||
try {
|
|
||||||
return resolveFrom(formatter, parent);
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
return formatter;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
export default async function load(seed = {}, options = {}) {
|
|
||||||
const cwd = typeof options.cwd === "undefined" ? process.cwd() : options.cwd;
|
|
||||||
const loaded = await loadConfig(cwd, options.file);
|
|
||||||
const baseDirectory = loaded?.filepath ? path.dirname(loaded.filepath) : cwd;
|
|
||||||
const configFilePath = loaded?.filepath;
|
|
||||||
let config = {};
|
|
||||||
if (loaded) {
|
|
||||||
const resolvedConfig = typeof loaded.config === "function"
|
|
||||||
? await loaded.config()
|
|
||||||
: await loaded.config;
|
|
||||||
validateConfig(loaded.filepath || "", resolvedConfig);
|
|
||||||
config = resolvedConfig;
|
|
||||||
}
|
|
||||||
// Merge passed config with file based options
|
|
||||||
config = merge({
|
|
||||||
extends: [],
|
|
||||||
plugins: [],
|
|
||||||
rules: {},
|
|
||||||
}, config, seed);
|
|
||||||
// Resolve parserPreset key
|
|
||||||
if (typeof config.parserPreset === "string") {
|
|
||||||
const resolvedParserPreset = resolveFrom(config.parserPreset, configFilePath);
|
|
||||||
config.parserPreset = {
|
|
||||||
name: config.parserPreset,
|
|
||||||
...(await loadParserPreset(resolvedParserPreset)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// Resolve extends key
|
|
||||||
const extended = await resolveExtends(config, {
|
|
||||||
prefix: "commitlint-config",
|
|
||||||
cwd: baseDirectory,
|
|
||||||
parserPreset: await config.parserPreset,
|
|
||||||
});
|
|
||||||
if (!extended.formatter || typeof extended.formatter !== "string") {
|
|
||||||
extended.formatter = "@commitlint/format";
|
|
||||||
}
|
|
||||||
let plugins = {};
|
|
||||||
if (Array.isArray(extended.plugins)) {
|
|
||||||
const deduplicatedPlugins = [...new Set(extended.plugins)];
|
|
||||||
for (const plugin of deduplicatedPlugins) {
|
|
||||||
if (typeof plugin === "string") {
|
|
||||||
plugins = await loadPlugin(plugins, plugin, {
|
|
||||||
debug: process.env.DEBUG === "true",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
plugins.local = plugin;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const rules = (await Promise.all(Object.entries(extended.rules || {}).map((entry) => executeRule(entry)))).reduce((registry, item) => {
|
|
||||||
// type of `item` can be null, but Object.entries always returns key pair
|
|
||||||
const [key, value] = item;
|
|
||||||
registry[key] = value;
|
|
||||||
return registry;
|
|
||||||
}, {});
|
|
||||||
const helpUrl = typeof extended.helpUrl === "string"
|
|
||||||
? extended.helpUrl
|
|
||||||
: typeof config.helpUrl === "string"
|
|
||||||
? config.helpUrl
|
|
||||||
: "https://github.com/conventional-changelog/commitlint/#what-is-commitlint";
|
|
||||||
const prompt = extended.prompt && isPlainObject(extended.prompt) ? extended.prompt : {};
|
|
||||||
return {
|
|
||||||
extends: Array.isArray(extended.extends)
|
|
||||||
? extended.extends
|
|
||||||
: typeof extended.extends === "string"
|
|
||||||
? [extended.extends]
|
|
||||||
: [],
|
|
||||||
// Resolve config-relative formatter module
|
|
||||||
formatter: resolveFormatter(extended.formatter, configFilePath),
|
|
||||||
// Resolve parser-opts from preset
|
|
||||||
parserPreset: await loadParserOpts(extended.parserPreset),
|
|
||||||
ignores: extended.ignores,
|
|
||||||
defaultIgnores: extended.defaultIgnores,
|
|
||||||
plugins: plugins,
|
|
||||||
rules: rules,
|
|
||||||
helpUrl: helpUrl,
|
|
||||||
prompt,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
export { resolveFrom, resolveFromSilent, resolveGlobalSilent };
|
|
||||||
//# sourceMappingURL=load.js.map
|
|
||||||
1
node_modules/@commitlint/load/lib/load.js.map
generated
vendored
1
node_modules/@commitlint/load/lib/load.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,cAAc,EAAE,EACtB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GAChB,MAAM,6BAA6B,CAAC;AAQrC,OAAO,aAAa,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,SAAiB,EAAE,MAAe,EAAU,EAAE;IACvE,IAAI,CAAC;QACJ,OAAO,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,IAAI,CACjC,OAAmB,EAAE,EACrB,UAAuB,EAAE;IAEzB,MAAM,GAAG,GAAG,OAAO,OAAO,CAAC,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IAC7E,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC7E,MAAM,cAAc,GAAG,MAAM,EAAE,QAAQ,CAAC;IACxC,IAAI,MAAM,GAAe,EAAE,CAAC;IAC5B,IAAI,MAAM,EAAE,CAAC;QACZ,MAAM,cAAc,GACnB,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU;YAClC,CAAC,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE;YACvB,CAAC,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC;QACxB,cAAc,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,EAAE,cAAc,CAAC,CAAC;QACtD,MAAM,GAAG,cAAc,CAAC;IACzB,CAAC;IAED,8CAA8C;IAC9C,MAAM,GAAG,KAAK,CACb;QACC,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;KACT,EACD,MAAM,EACN,IAAI,CACJ,CAAC;IAEF,2BAA2B;IAC3B,IAAI,OAAO,MAAM,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;QAC7C,MAAM,oBAAoB,GAAG,WAAW,CACvC,MAAM,CAAC,YAAY,EACnB,cAAc,CACd,CAAC;QAEF,MAAM,CAAC,YAAY,GAAG;YACrB,IAAI,EAAE,MAAM,CAAC,YAAY;YACzB,GAAG,CAAC,MAAM,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;SACjD,CAAC;IACH,CAAC;IAED,sBAAsB;IACtB,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE;QAC7C,MAAM,EAAE,mBAAmB;QAC3B,GAAG,EAAE,aAAa;QAClB,YAAY,EAAE,MAAM,MAAM,CAAC,YAAY;KACvC,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,OAAO,QAAQ,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;QACnE,QAAQ,CAAC,SAAS,GAAG,oBAAoB,CAAC;IAC3C,CAAC;IAED,IAAI,OAAO,GAAkB,EAAE,CAAC;IAChC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,MAAM,mBAAmB,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3D,KAAK,MAAM,MAAM,IAAI,mBAAmB,EAAE,CAAC;YAC1C,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;gBAChC,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE;oBAC3C,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,MAAM;iBACnC,CAAC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACP,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC;YACxB,CAAC;QACF,CAAC;IACF,CAAC;IAED,MAAM,KAAK,GAAG,CACb,MAAM,OAAO,CAAC,GAAG,CAChB,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CACvE,CACD,CAAC,MAAM,CAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE;QAC3C,yEAAyE;QACzE,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,IAAK,CAAC;QAC3B,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACtB,OAAO,QAAQ,CAAC;IACjB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,OAAO,GACZ,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ;QACnC,CAAC,CAAC,QAAQ,CAAC,OAAO;QAClB,CAAC,CAAC,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,OAAO;YAChB,CAAC,CAAC,0EAA0E,CAAC;IAEhF,MAAM,MAAM,GACX,QAAQ,CAAC,MAAM,IAAI,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAE1E,OAAO;QACN,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;YACvC,CAAC,CAAC,QAAQ,CAAC,OAAO;YAClB,CAAC,CAAC,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ;gBACrC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACpB,CAAC,CAAC,EAAE;QACN,2CAA2C;QAC3C,SAAS,EAAE,gBAAgB,CAAC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;QAC/D,kCAAkC;QAClC,YAAY,EAAE,MAAM,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC;QACzD,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,cAAc,EAAE,QAAQ,CAAC,cAAc;QACvC,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,OAAO;QAChB,MAAM;KACN,CAAC;AACH,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
||||||
9
node_modules/@commitlint/load/lib/utils/load-config.d.ts
generated
vendored
9
node_modules/@commitlint/load/lib/utils/load-config.d.ts
generated
vendored
|
|
@ -1,9 +0,0 @@
|
||||||
export interface LoadConfigResult {
|
|
||||||
config: unknown;
|
|
||||||
filepath: string;
|
|
||||||
isEmpty?: boolean;
|
|
||||||
}
|
|
||||||
export declare function loadConfig(cwd: string, configPath?: string): Promise<LoadConfigResult | null>;
|
|
||||||
export declare const isDynamicAwaitSupported: () => boolean;
|
|
||||||
export declare const isEsmModule: (cwd: string) => boolean;
|
|
||||||
//# sourceMappingURL=load-config.d.ts.map
|
|
||||||
1
node_modules/@commitlint/load/lib/utils/load-config.d.ts.map
generated
vendored
1
node_modules/@commitlint/load/lib/utils/load-config.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"load-config.d.ts","sourceRoot":"","sources":["../../src/utils/load-config.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAKD,wBAAsB,UAAU,CAC/B,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CA6DlC;AAKD,eAAO,MAAM,uBAAuB,eAOnC,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,YAStC,CAAC"}
|
|
||||||
81
node_modules/@commitlint/load/lib/utils/load-config.js
generated
vendored
81
node_modules/@commitlint/load/lib/utils/load-config.js
generated
vendored
|
|
@ -1,81 +0,0 @@
|
||||||
import { existsSync, readFileSync } from "node:fs";
|
|
||||||
import path from "node:path";
|
|
||||||
import { cosmiconfig, defaultLoadersSync, defaultLoaders, } from "cosmiconfig";
|
|
||||||
import { TypeScriptLoader } from "cosmiconfig-typescript-loader";
|
|
||||||
const moduleName = "commitlint";
|
|
||||||
const searchStrategy = "global";
|
|
||||||
export async function loadConfig(cwd, configPath) {
|
|
||||||
let tsLoaderInstance;
|
|
||||||
const tsLoader = (...args) => {
|
|
||||||
if (!tsLoaderInstance) {
|
|
||||||
tsLoaderInstance = TypeScriptLoader();
|
|
||||||
}
|
|
||||||
return tsLoaderInstance(...args);
|
|
||||||
};
|
|
||||||
// If dynamic await is supported (Node >= v20.8.0) or directory uses ESM, support
|
|
||||||
// async js/cjs loaders (dynamic import). Otherwise, use synchronous js/cjs loaders.
|
|
||||||
const loaders = isDynamicAwaitSupported() || isEsmModule(cwd)
|
|
||||||
? defaultLoaders
|
|
||||||
: defaultLoadersSync;
|
|
||||||
const explorer = cosmiconfig(moduleName, {
|
|
||||||
searchStrategy,
|
|
||||||
searchPlaces: [
|
|
||||||
// cosmiconfig overrides default searchPlaces if any new search place is added (For e.g. `*.ts` files),
|
|
||||||
// we need to manually merge default searchPlaces from https://github.com/davidtheclark/cosmiconfig#searchplaces
|
|
||||||
"package.json",
|
|
||||||
"package.yaml",
|
|
||||||
`.${moduleName}rc`,
|
|
||||||
`.${moduleName}rc.json`,
|
|
||||||
`.${moduleName}rc.yaml`,
|
|
||||||
`.${moduleName}rc.yml`,
|
|
||||||
`.${moduleName}rc.js`,
|
|
||||||
`.${moduleName}rc.cjs`,
|
|
||||||
`.${moduleName}rc.mjs`,
|
|
||||||
`${moduleName}.config.js`,
|
|
||||||
`${moduleName}.config.cjs`,
|
|
||||||
`${moduleName}.config.mjs`,
|
|
||||||
// files supported by TypescriptLoader
|
|
||||||
`.${moduleName}rc.ts`,
|
|
||||||
`.${moduleName}rc.cts`,
|
|
||||||
`.${moduleName}rc.mts`,
|
|
||||||
`${moduleName}.config.ts`,
|
|
||||||
`${moduleName}.config.cts`,
|
|
||||||
`${moduleName}.config.mts`,
|
|
||||||
],
|
|
||||||
loaders: {
|
|
||||||
".ts": tsLoader,
|
|
||||||
".cts": tsLoader,
|
|
||||||
".mts": tsLoader,
|
|
||||||
".cjs": loaders[".cjs"],
|
|
||||||
".js": loaders[".js"],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const explicitPath = configPath ? path.resolve(cwd, configPath) : undefined;
|
|
||||||
const explore = explicitPath ? explorer.load : explorer.search;
|
|
||||||
const searchPath = explicitPath ? explicitPath : cwd;
|
|
||||||
const local = await explore(searchPath);
|
|
||||||
if (local) {
|
|
||||||
return local;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// See the following issues for more context, contributing to failing Jest tests:
|
|
||||||
// - Issue: https://github.com/nodejs/node/issues/40058
|
|
||||||
// - Resolution: https://github.com/nodejs/node/pull/48510 (Node v20.8.0)
|
|
||||||
export const isDynamicAwaitSupported = () => {
|
|
||||||
const [major, minor] = process.version
|
|
||||||
.replace("v", "")
|
|
||||||
.split(".")
|
|
||||||
.map((val) => parseInt(val));
|
|
||||||
return major >= 20 && minor >= 8;
|
|
||||||
};
|
|
||||||
// Is the given directory set up to use ESM (ECMAScript Modules)?
|
|
||||||
export const isEsmModule = (cwd) => {
|
|
||||||
const packagePath = path.join(cwd, "package.json");
|
|
||||||
if (!existsSync(packagePath)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const packageJSON = readFileSync(packagePath, { encoding: "utf-8" });
|
|
||||||
return JSON.parse(packageJSON)?.type === "module";
|
|
||||||
};
|
|
||||||
//# sourceMappingURL=load-config.js.map
|
|
||||||
1
node_modules/@commitlint/load/lib/utils/load-config.js.map
generated
vendored
1
node_modules/@commitlint/load/lib/utils/load-config.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"load-config.js","sourceRoot":"","sources":["../../src/utils/load-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACN,WAAW,EACX,kBAAkB,EAElB,cAAc,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQjE,MAAM,UAAU,GAAG,YAAY,CAAC;AAChC,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEhC,MAAM,CAAC,KAAK,UAAU,UAAU,CAC/B,GAAW,EACX,UAAmB;IAEnB,IAAI,gBAAoC,CAAC;IACzC,MAAM,QAAQ,GAAW,CAAC,GAAG,IAAI,EAAE,EAAE;QACpC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACvB,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;QACvC,CAAC;QACD,OAAO,gBAAgB,CAAC,GAAG,IAAI,CAAC,CAAC;IAClC,CAAC,CAAC;IAEF,iFAAiF;IACjF,oFAAoF;IACpF,MAAM,OAAO,GACZ,uBAAuB,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;QAC5C,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,kBAAkB,CAAC;IAEvB,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,EAAE;QACxC,cAAc;QACd,YAAY,EAAE;YACb,uGAAuG;YACvG,gHAAgH;YAChH,cAAc;YACd,cAAc;YACd,IAAI,UAAU,IAAI;YAClB,IAAI,UAAU,SAAS;YACvB,IAAI,UAAU,SAAS;YACvB,IAAI,UAAU,QAAQ;YACtB,IAAI,UAAU,OAAO;YACrB,IAAI,UAAU,QAAQ;YACtB,IAAI,UAAU,QAAQ;YACtB,GAAG,UAAU,YAAY;YACzB,GAAG,UAAU,aAAa;YAC1B,GAAG,UAAU,aAAa;YAE1B,sCAAsC;YACtC,IAAI,UAAU,OAAO;YACrB,IAAI,UAAU,QAAQ;YACtB,IAAI,UAAU,QAAQ;YACtB,GAAG,UAAU,YAAY;YACzB,GAAG,UAAU,aAAa;YAC1B,GAAG,UAAU,aAAa;SAC1B;QACD,OAAO,EAAE;YACR,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;YACvB,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC;SACrB;KACD,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5E,MAAM,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC/D,MAAM,UAAU,GAAG,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC;IACrD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;IAExC,IAAI,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED,iFAAiF;AACjF,wDAAwD;AACxD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC3C,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,OAAO;SACpC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;SAChB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAE9B,OAAO,KAAK,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;IAC1C,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAEnD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,WAAW,GAAG,YAAY,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,IAAI,KAAK,QAAQ,CAAC;AACnD,CAAC,CAAC"}
|
|
||||||
5
node_modules/@commitlint/load/lib/utils/load-parser-opts.d.ts
generated
vendored
5
node_modules/@commitlint/load/lib/utils/load-parser-opts.d.ts
generated
vendored
|
|
@ -1,5 +0,0 @@
|
||||||
import { ParserPreset } from "@commitlint/types";
|
|
||||||
type Awaitable<T> = T | PromiseLike<T>;
|
|
||||||
export declare function loadParserOpts(pendingParser: string | Awaitable<ParserPreset> | (() => Awaitable<ParserPreset>) | undefined): Promise<ParserPreset | undefined>;
|
|
||||||
export {};
|
|
||||||
//# sourceMappingURL=load-parser-opts.d.ts.map
|
|
||||||
1
node_modules/@commitlint/load/lib/utils/load-parser-opts.d.ts.map
generated
vendored
1
node_modules/@commitlint/load/lib/utils/load-parser-opts.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"load-parser-opts.d.ts","sourceRoot":"","sources":["../../src/utils/load-parser-opts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAgBvC,wBAAsB,cAAc,CACnC,aAAa,EACV,MAAM,GACN,SAAS,CAAC,YAAY,CAAC,GACvB,CAAC,MAAM,SAAS,CAAC,YAAY,CAAC,CAAC,GAC/B,SAAS,GACV,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAiEnC"}
|
|
||||||
60
node_modules/@commitlint/load/lib/utils/load-parser-opts.js
generated
vendored
60
node_modules/@commitlint/load/lib/utils/load-parser-opts.js
generated
vendored
|
|
@ -1,60 +0,0 @@
|
||||||
function isObjectLike(obj) {
|
|
||||||
return Boolean(obj) && typeof obj === "object"; // typeof null === 'object'
|
|
||||||
}
|
|
||||||
function isParserOptsFunction(obj) {
|
|
||||||
return typeof obj.parserOpts === "function";
|
|
||||||
}
|
|
||||||
export async function loadParserOpts(pendingParser) {
|
|
||||||
if (typeof pendingParser === "function") {
|
|
||||||
return loadParserOpts(pendingParser());
|
|
||||||
}
|
|
||||||
if (!pendingParser || typeof pendingParser !== "object") {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
// Await for the module, loaded with require
|
|
||||||
const parser = await pendingParser;
|
|
||||||
// exit early, no opts to resolve
|
|
||||||
if (!parser.parserOpts) {
|
|
||||||
return parser;
|
|
||||||
}
|
|
||||||
// Pull nested parserOpts, might happen if overwritten with a module in main config
|
|
||||||
if (typeof parser.parserOpts === "object") {
|
|
||||||
// Await parser opts if applicable
|
|
||||||
parser.parserOpts = await parser.parserOpts;
|
|
||||||
if (isObjectLike(parser.parserOpts) &&
|
|
||||||
isObjectLike(parser.parserOpts.parserOpts)) {
|
|
||||||
// Preserve any user-provided properties (e.g. issuePrefixes) that
|
|
||||||
// were merged at the outer parserOpts level during config resolution,
|
|
||||||
// while unwrapping the inner module-provided parserOpts (#4640).
|
|
||||||
const { parserOpts: inner, ...rest } = parser.parserOpts;
|
|
||||||
parser.parserOpts = { ...inner, ...rest };
|
|
||||||
}
|
|
||||||
return parser;
|
|
||||||
}
|
|
||||||
// Create parser opts from factory
|
|
||||||
if (isParserOptsFunction(parser) &&
|
|
||||||
typeof parser.name === "string" &&
|
|
||||||
parser.name.startsWith("conventional-changelog-")) {
|
|
||||||
return new Promise((resolve) => {
|
|
||||||
const result = parser.parserOpts((_, opts) => {
|
|
||||||
resolve({
|
|
||||||
...parser,
|
|
||||||
parserOpts: opts?.parserOpts,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
// If result has data or a promise, the parser doesn't support factory-init
|
|
||||||
// due to https://github.com/nodejs/promises-debugging/issues/16 it just quits, so let's use this fallback
|
|
||||||
if (result) {
|
|
||||||
Promise.resolve(result).then((opts) => {
|
|
||||||
resolve({
|
|
||||||
...parser,
|
|
||||||
parserOpts: opts?.parserOpts || opts?.parser,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return parser;
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=load-parser-opts.js.map
|
|
||||||
1
node_modules/@commitlint/load/lib/utils/load-parser-opts.js.map
generated
vendored
1
node_modules/@commitlint/load/lib/utils/load-parser-opts.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"load-parser-opts.js","sourceRoot":"","sources":["../../src/utils/load-parser-opts.ts"],"names":[],"mappings":"AAIA,SAAS,YAAY,CAAC,GAAY;IACjC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,2BAA2B;AAC5E,CAAC;AAED,SAAS,oBAAoB,CAC5B,GAAM;IAMN,OAAO,OAAO,GAAG,CAAC,UAAU,KAAK,UAAU,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CACnC,aAIY;IAEZ,IAAI,OAAO,aAAa,KAAK,UAAU,EAAE,CAAC;QACzC,OAAO,cAAc,CAAC,aAAa,EAAE,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,CAAC,aAAa,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;QACzD,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,4CAA4C;IAC5C,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC;IAEnC,iCAAiC;IACjC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACxB,OAAO,MAAM,CAAC;IACf,CAAC;IAED,mFAAmF;IACnF,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC3C,kCAAkC;QAClC,MAAM,CAAC,UAAU,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC;QAC5C,IACC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC;YAC/B,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,EACzC,CAAC;YACF,kEAAkE;YAClE,sEAAsE;YACtE,iEAAiE;YACjE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC,UAGH,CAAC;YAC5C,MAAM,CAAC,UAAU,GAAG,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,EAAE,CAAC;QAC3C,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,kCAAkC;IAClC,IACC,oBAAoB,CAAC,MAAM,CAAC;QAC5B,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ;QAC/B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,EAChD,CAAC;QACF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAQ,EAAE,IAAI,EAAE,EAAE;gBACnD,OAAO,CAAC;oBACP,GAAG,MAAM;oBACT,UAAU,EAAE,IAAI,EAAE,UAAU;iBAC5B,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,2EAA2E;YAC3E,0GAA0G;YAC1G,IAAI,MAAM,EAAE,CAAC;gBACZ,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;oBACrC,OAAO,CAAC;wBACP,GAAG,MAAM;wBACT,UAAU,EAAE,IAAI,EAAE,UAAU,IAAI,IAAI,EAAE,MAAM;qBAC5C,CAAC,CAAC;gBACJ,CAAC,CAAC,CAAC;YACJ,CAAC;YACD,OAAO;QACR,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
||||||
7
node_modules/@commitlint/load/lib/utils/load-plugin.d.ts
generated
vendored
7
node_modules/@commitlint/load/lib/utils/load-plugin.d.ts
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
import { PluginRecords } from "@commitlint/types";
|
|
||||||
export interface LoadPluginOptions {
|
|
||||||
debug?: boolean;
|
|
||||||
searchPaths?: string[];
|
|
||||||
}
|
|
||||||
export default function loadPlugin(plugins: PluginRecords, pluginName: string, options?: LoadPluginOptions | boolean): Promise<PluginRecords>;
|
|
||||||
//# sourceMappingURL=load-plugin.d.ts.map
|
|
||||||
1
node_modules/@commitlint/load/lib/utils/load-plugin.d.ts.map
generated
vendored
1
node_modules/@commitlint/load/lib/utils/load-plugin.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"load-plugin.d.ts","sourceRoot":"","sources":["../../src/utils/load-plugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAU,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAqC1D,MAAM,WAAW,iBAAiB;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAWD,wBAA8B,UAAU,CACvC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,iBAAiB,GAAG,OAAY,GACvC,OAAO,CAAC,aAAa,CAAC,CAuJxB"}
|
|
||||||
157
node_modules/@commitlint/load/lib/utils/load-plugin.js
generated
vendored
157
node_modules/@commitlint/load/lib/utils/load-plugin.js
generated
vendored
|
|
@ -1,157 +0,0 @@
|
||||||
import { createRequire } from "node:module";
|
|
||||||
import fs from "node:fs";
|
|
||||||
import path from "node:path";
|
|
||||||
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
||||||
import pc from "picocolors";
|
|
||||||
import { normalizePackageName, getShorthandName } from "./plugin-naming.js";
|
|
||||||
import { WhitespacePluginError, MissingPluginError } from "./plugin-errors.js";
|
|
||||||
import { resolveFromNpxCache } from "@commitlint/resolve-extends";
|
|
||||||
const require = createRequire(import.meta.url);
|
|
||||||
const __dirname = path.resolve(fileURLToPath(import.meta.url), "..");
|
|
||||||
const dynamicImport = async (id) => {
|
|
||||||
const imported = await import(path.isAbsolute(id) ? pathToFileURL(id).toString() : id);
|
|
||||||
return ("default" in imported && imported.default) || imported;
|
|
||||||
};
|
|
||||||
function sanitizeErrorMessage(message) {
|
|
||||||
return message
|
|
||||||
.replace(/\/[^/]+\/node_modules/g, "...")
|
|
||||||
.replace(/\\[^\\]+\\node_modules/g, "...");
|
|
||||||
}
|
|
||||||
function findPackageJson(dir) {
|
|
||||||
let current = dir;
|
|
||||||
const root = path.parse(dir).root;
|
|
||||||
while (current !== root) {
|
|
||||||
const pkgPath = path.join(current, "package.json");
|
|
||||||
if (fs.existsSync(pkgPath)) {
|
|
||||||
return pkgPath;
|
|
||||||
}
|
|
||||||
current = path.dirname(current);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
function normalizeOptions(options) {
|
|
||||||
if (typeof options === "boolean") {
|
|
||||||
return { debug: options };
|
|
||||||
}
|
|
||||||
return options;
|
|
||||||
}
|
|
||||||
export default async function loadPlugin(plugins, pluginName, options = {}) {
|
|
||||||
const normalized = normalizeOptions(options);
|
|
||||||
const { debug = false, searchPaths = [] } = normalized;
|
|
||||||
for (const searchPath of searchPaths) {
|
|
||||||
if (typeof searchPath !== "string" || !path.isAbsolute(searchPath)) {
|
|
||||||
throw new Error(`Invalid searchPath "${searchPath}": must be an absolute path`);
|
|
||||||
}
|
|
||||||
if (!fs.existsSync(searchPath)) {
|
|
||||||
throw new Error(`Invalid searchPath "${searchPath}": directory does not exist`);
|
|
||||||
}
|
|
||||||
if (!fs.statSync(searchPath).isDirectory()) {
|
|
||||||
throw new Error(`Invalid searchPath "${searchPath}": must be a directory, not a file`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const longName = normalizePackageName(pluginName);
|
|
||||||
const shortName = getShorthandName(longName);
|
|
||||||
if (pluginName.match(/\s+/u)) {
|
|
||||||
throw new WhitespacePluginError(pluginName, {
|
|
||||||
pluginName: longName,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
const pluginKey = longName === pluginName ? shortName : pluginName;
|
|
||||||
if (!plugins[pluginKey]) {
|
|
||||||
let plugin;
|
|
||||||
let resolvedPath;
|
|
||||||
// Try to load from npx cache directories using require.resolve
|
|
||||||
const npxResolvedPath = resolveFromNpxCache(longName);
|
|
||||||
if (npxResolvedPath) {
|
|
||||||
try {
|
|
||||||
plugin = await dynamicImport(npxResolvedPath);
|
|
||||||
resolvedPath = npxResolvedPath;
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
if (debug) {
|
|
||||||
console.debug(`Failed to load plugin ${longName} from npx cache: ${err.message}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Try to load from additional search paths (extended config's node_modules)
|
|
||||||
if (!plugin) {
|
|
||||||
for (const searchPath of searchPaths) {
|
|
||||||
try {
|
|
||||||
resolvedPath = require.resolve(longName, { paths: [searchPath] });
|
|
||||||
plugin = await dynamicImport(resolvedPath);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
if (debug) {
|
|
||||||
console.debug(`Failed to load plugin ${longName} from ${searchPath}: ${err.message}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Try default resolution as last resort
|
|
||||||
if (!plugin) {
|
|
||||||
try {
|
|
||||||
plugin = await dynamicImport(longName);
|
|
||||||
// Try to resolve path for debug logging
|
|
||||||
try {
|
|
||||||
resolvedPath = require.resolve(longName);
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
// Ignore - path not critical
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
let resolutionError;
|
|
||||||
try {
|
|
||||||
resolvedPath = require.resolve(longName);
|
|
||||||
}
|
|
||||||
catch (resolveErr) {
|
|
||||||
resolutionError = resolveErr;
|
|
||||||
}
|
|
||||||
if (resolutionError) {
|
|
||||||
// Resolution failed - throw MissingPluginError
|
|
||||||
if (debug) {
|
|
||||||
console.debug(`Failed to resolve plugin ${longName}: ${resolutionError.message}`);
|
|
||||||
}
|
|
||||||
throw new MissingPluginError(pluginName, sanitizeErrorMessage(resolutionError.message), {
|
|
||||||
pluginName: longName,
|
|
||||||
commitlintPath: path.resolve(__dirname, "../.."),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// Resolution succeeded but import failed - rethrow original error
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// This step is costly, so skip if debug is disabled
|
|
||||||
if (debug) {
|
|
||||||
let version = null;
|
|
||||||
if (resolvedPath) {
|
|
||||||
try {
|
|
||||||
const pkgPath = findPackageJson(path.dirname(resolvedPath));
|
|
||||||
if (pkgPath) {
|
|
||||||
version = require(pkgPath).version;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const loadedPluginAndVersion = version
|
|
||||||
? `${longName}@${version}`
|
|
||||||
: `${longName}, version unknown`;
|
|
||||||
const fromPath = resolvedPath ? ` (from ${resolvedPath})` : "";
|
|
||||||
console.log(pc.blue(`Loaded plugin ${pluginName} (${loadedPluginAndVersion})${fromPath}`));
|
|
||||||
}
|
|
||||||
if (plugin) {
|
|
||||||
plugins[pluginKey] = plugin;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw new MissingPluginError(pluginName, "Plugin loaded but is undefined", {
|
|
||||||
pluginName: longName,
|
|
||||||
commitlintPath: path.resolve(__dirname, "../.."),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return plugins;
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=load-plugin.js.map
|
|
||||||
1
node_modules/@commitlint/load/lib/utils/load-plugin.js.map
generated
vendored
1
node_modules/@commitlint/load/lib/utils/load-plugin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
13
node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts
generated
vendored
13
node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts
generated
vendored
|
|
@ -1,13 +0,0 @@
|
||||||
export declare class WhitespacePluginError extends Error {
|
|
||||||
__proto__: ErrorConstructor;
|
|
||||||
messageTemplate: string;
|
|
||||||
messageData: any;
|
|
||||||
constructor(pluginName?: string, data?: any);
|
|
||||||
}
|
|
||||||
export declare class MissingPluginError extends Error {
|
|
||||||
__proto__: ErrorConstructor;
|
|
||||||
messageTemplate: string;
|
|
||||||
messageData: any;
|
|
||||||
constructor(pluginName?: string, errorMessage?: string, data?: any);
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=plugin-errors.d.ts.map
|
|
||||||
1
node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts.map
generated
vendored
1
node_modules/@commitlint/load/lib/utils/plugin-errors.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"plugin-errors.d.ts","sourceRoot":"","sources":["../../src/utils/plugin-errors.ts"],"names":[],"mappings":"AAAA,qBAAa,qBAAsB,SAAQ,KAAK;IAC/C,SAAS,mBAAS;IAEX,eAAe,EAAE,MAAM,CAAsB;IAC7C,WAAW,EAAE,GAAG,CAAM;gBAEjB,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,GAAQ;CAO/C;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC5C,SAAS,mBAAS;IAEX,eAAe,EAAE,MAAM,CAAoB;IAC3C,WAAW,EAAE,GAAG,CAAC;gBAEZ,UAAU,CAAC,EAAE,MAAM,EAAE,YAAY,GAAE,MAAW,EAAE,IAAI,GAAE,GAAQ;CAO1E"}
|
|
||||||
21
node_modules/@commitlint/load/lib/utils/plugin-errors.js
generated
vendored
21
node_modules/@commitlint/load/lib/utils/plugin-errors.js
generated
vendored
|
|
@ -1,21 +0,0 @@
|
||||||
export class WhitespacePluginError extends Error {
|
|
||||||
__proto__ = Error;
|
|
||||||
messageTemplate = "whitespace-found";
|
|
||||||
messageData = {};
|
|
||||||
constructor(pluginName, data = {}) {
|
|
||||||
super(`Whitespace found in plugin name '${pluginName}'`);
|
|
||||||
this.messageData = data;
|
|
||||||
Object.setPrototypeOf(this, WhitespacePluginError.prototype);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export class MissingPluginError extends Error {
|
|
||||||
__proto__ = Error;
|
|
||||||
messageTemplate = "plugin-missing";
|
|
||||||
messageData;
|
|
||||||
constructor(pluginName, errorMessage = "", data = {}) {
|
|
||||||
super(`Failed to load plugin ${pluginName}: ${errorMessage}`);
|
|
||||||
this.messageData = data;
|
|
||||||
Object.setPrototypeOf(this, MissingPluginError.prototype);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=plugin-errors.js.map
|
|
||||||
1
node_modules/@commitlint/load/lib/utils/plugin-errors.js.map
generated
vendored
1
node_modules/@commitlint/load/lib/utils/plugin-errors.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"plugin-errors.js","sourceRoot":"","sources":["../../src/utils/plugin-errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC/C,SAAS,GAAG,KAAK,CAAC;IAEX,eAAe,GAAW,kBAAkB,CAAC;IAC7C,WAAW,GAAQ,EAAE,CAAC;IAE7B,YAAY,UAAmB,EAAE,OAAY,EAAE;QAC9C,KAAK,CAAC,oCAAoC,UAAU,GAAG,CAAC,CAAC;QAEzD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAExB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;CACD;AAED,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC5C,SAAS,GAAG,KAAK,CAAC;IAEX,eAAe,GAAW,gBAAgB,CAAC;IAC3C,WAAW,CAAM;IAExB,YAAY,UAAmB,EAAE,eAAuB,EAAE,EAAE,OAAY,EAAE;QACzE,KAAK,CAAC,yBAAyB,UAAU,KAAK,YAAY,EAAE,CAAC,CAAC;QAE9D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAExB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC;CACD"}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user