├── .gitignore
├── .npmrc
├── .yarnrc
├── LICENSE
├── README.md
├── config
└── user.json.template
├── dist
└── bundle.js
├── package.json
├── rollup.config.js
├── src
├── config
│ └── index.ts
├── index.ts
├── interfaces
│ ├── Auth.ts
│ ├── Job.ts
│ └── User.ts
├── modules
│ ├── jd
│ │ ├── auth
│ │ │ ├── MobileAuth.ts
│ │ │ └── WebAuth.ts
│ │ ├── index.ts
│ │ ├── interfaces
│ │ │ ├── MobileJob.ts
│ │ │ └── WebJob.ts
│ │ └── jobs
│ │ │ ├── DoubleSign.ts
│ │ │ ├── FuliDailyMobile.ts
│ │ │ ├── JingdouDaily.ts
│ │ │ ├── JingdouDailyMobile.ts
│ │ │ ├── JingdouShops.ts
│ │ │ ├── JingdouZhuanpanMobile.ts
│ │ │ ├── JinrongDaily.ts
│ │ │ └── JinrongZhuanqianMobile.ts
│ └── v2ex
│ │ ├── auth
│ │ └── WebAuth.ts
│ │ ├── index.ts
│ │ ├── interfaces
│ │ └── WebJob.ts
│ │ └── jobs
│ │ └── DailySign.ts
└── utils
│ ├── base64.ts
│ ├── browser.ts
│ ├── canvas.ts
│ ├── log.ts
│ ├── md5.ts
│ └── puppeteer.ts
├── tsconfig.json
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea
2 | /config/user.json
3 | /temp
4 |
5 | # Logs
6 | logs
7 | *.log
8 | npm-debug.log*
9 | yarn-debug.log*
10 | yarn-error.log*
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 |
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 |
24 | # nyc test coverage
25 | .nyc_output
26 |
27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28 | .grunt
29 |
30 | # Bower dependency directory (https://bower.io/)
31 | bower_components
32 |
33 | # node-waf configuration
34 | .lock-wscript
35 |
36 | # Compiled binary addons (https://nodejs.org/api/addons.html)
37 | build/Release
38 |
39 | # Dependency directories
40 | node_modules/
41 | jspm_packages/
42 |
43 | # TypeScript v1 declaration files
44 | typings/
45 |
46 | # Optional npm cache directory
47 | .npm
48 |
49 | # Optional eslint cache
50 | .eslintcache
51 |
52 | # Optional REPL history
53 | .node_repl_history
54 |
55 | # Output of 'npm pack'
56 | *.tgz
57 |
58 | # Yarn Integrity file
59 | .yarn-integrity
60 |
61 | # dotenv environment variables file
62 | .env
63 |
64 | # next.js build output
65 | .next
66 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | registry "https://registry.npm.taobao.org"
2 |
--------------------------------------------------------------------------------
/.yarnrc:
--------------------------------------------------------------------------------
1 | registry "https://registry.npm.taobao.org"
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
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 |
635 | Copyright (C)
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 .
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 | Copyright (C)
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 | .
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 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 日常签到助手
2 |
3 | 
4 |
5 | 
6 |
7 |
8 | ## 支持任务
9 |
10 | * 京东
11 | * 网页端每日签到
12 | * 网页端店铺每日签到
13 | * 网页端金融每日签到
14 | * 移动端每日签到
15 | * 移动端每日福利
16 | * 移动端京豆转福利
17 | * 移动端双签
18 | * 移动端金融赚钱签到
19 | * V2EX
20 | * 每日签到
21 |
22 | ## 使用方法
23 |
24 | 1. 下载代码
25 | 2. 添加配置,详见[配置说明](https://github.com/wxsms/daily-signer#配置说明)
26 | 3. 安装依赖:`npm install --production` or `yarn install --production` (下载困难的可以使用 [cnpm](https://npm.taobao.org/))
27 | 4. 运行:`npm start`
28 |
29 | ## 配置说明
30 |
31 | 修改 `config/user.json.template`,将其另存为 `config/user.json` 即可。支持设置多个账号。具体字段说明如下:
32 |
33 | ```js
34 | {
35 | "jd": [
36 | {
37 | "username": "", // 登录用户名
38 | "password": "", // 密码(非必填,如果设置了密码,在某些流程中可以自动登录)
39 | "skipLogin": false, // 当 cookie 过期时,是否允许重新登录
40 | "skip": false, // 是否忽略此账号的任务
41 | "skipJobs": [] // 忽略单个任务的列表,填写任务名,如"网页端每日签到"
42 | }
43 | ]
44 | }
45 | ```
46 |
47 | ## 登录方式
48 |
49 | 1. 初次使用时:
50 | 1. 如果该流程不支持自动登录,则会调起浏览器窗口,输入密码以及验证码登录即可
51 | 2. 如果支持自动登录,以及在配置文件中填写了密码,则程序会尝试自动登录,无需额外操作
52 | 2. 以后使用则会使用储存的 cookie 作为身份凭据,无需再次登录
53 | 3. 当 cookie 过期后,会重新进入 1 的流程
54 |
55 | 注:
56 |
57 | 1. 京东网页端以及移动端的 cookie 无法共享使用,因此首次使用时需要分别登录
58 | 2. cookie 使用 base64 加密,储存在项目根目录下的 `temp` 文件夹中
59 |
--------------------------------------------------------------------------------
/config/user.json.template:
--------------------------------------------------------------------------------
1 | {
2 | "jd": [
3 | {
4 | "username": "",
5 | "skipLogin": false,
6 | "skip": false,
7 | "skipJobs": []
8 | }
9 | ],
10 | "v2ex": []
11 | }
12 |
--------------------------------------------------------------------------------
/dist/bundle.js:
--------------------------------------------------------------------------------
1 | "use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var canvas=require("canvas"),crypto=require("crypto"),fs=require("fs"),puppeteer=require("puppeteer"),chalk=_interopDefault(require("chalk")),path=require("path"),extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function __extends(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function __awaiter(o,a,u,c){return new(u||(u=Promise))(function(e,t){function n(e){try{s(c.next(e))}catch(e){t(e)}}function r(e){try{s(c.throw(e))}catch(e){t(e)}}function s(t){t.done?e(t.value):new u(function(e){e(t.value)}).then(n,r)}s((c=c.apply(o,a||[])).next())})}function __generator(n,r){var s,o,a,e,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(s)throw new TypeError("Generator is already executing.");for(;u;)try{if(s=1,o&&(a=2&t[0]?o.return:t[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,t[1])).done)return a;switch(o=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,o=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1] a")];case 2:return e.sent(),this.user.username?[4,g.$eval("#loginname",function(e,t){return e.setAttribute("value",t)},this.user.username)]:[3,4];case 3:e.sent(),e.label=4;case 4:return this.user.password?[4,g.$eval("#nloginpwd",function(e,t){return e.setAttribute("value",t)},this.user.password)]:[3,6];case 5:e.sent(),e.label=6;case 6:return this.canAutoLogin?[4,g.click("#loginsubmit")]:[3,32];case 7:return e.sent(),[4,g.waitFor(1e3)];case 8:e.sent(),t=0,e.label=9;case 9:return(n=++t<20)?[4,g.$(".JDJRV-bigimg")]:[3,11];case 10:n=e.sent(),e.label=11;case 11:return n?(console.log("正在尝试通过验证码(第"+t+"次)"),[4,g.$(".JDJRV-bigimg > img")]):[3,32];case 12:return r=e.sent(),o=getVerifyPosition,[4,g.evaluate(function(e){return e.getAttribute("src")},r)];case 13:return a=[e.sent()],[4,g.evaluate(function(e){return parseInt(window.getComputedStyle(e).width)},r)];case 14:return[4,o.apply(void 0,a.concat([e.sent()]))];case 15:return s=e.sent(),[4,g.$(".JDJRV-slide-btn")];case 16:return u=e.sent(),[4,g.evaluate(function(e){var t=e.getBoundingClientRect();return{x:t.x,y:t.y,width:t.width,height:t.height}},u)];case 17:return c=e.sent(),i=c.x+c.width/2,l=c.y+c.height/2,10= 0',{timeout:0})];case 33:return e.sent(),[2]}})})},e.prototype._check=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,abortUselessRequests(t)];case 1:return e.sent(),[4,t.goto("https://order.jd.com/center/list.action")];case 2:return e.sent(),[4,t.$('body[myjd="_MYJD_ordercenter"]')];case 3:return[2,null!==e.sent()]}})})},e}(Auth),MobileAuth=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getCookiePath=function(){return path.join(process.cwd(),"temp",md5("cookies-jd-m"+this.user.username))},e.prototype._login=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,t.goto("https://plogin.m.jd.com/user/login.action")];case 1:return e.sent(),this.user.username?[4,t.type("#username",this.user.username)]:[3,3];case 2:e.sent(),e.label=3;case 3:return this.user.password?[4,t.type("#password",this.user.password)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[4,t.waitForFunction('window.location.href.indexOf("https://m.jd.com/") >= 0',{timeout:0})];case 6:return e.sent(),[2]}})})},e.prototype._check=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,t.goto("https://home.m.jd.com/myJd/newhome.action",{waitUntil:"networkidle0"})];case 1:return e.sent(),[4,t.$(".user_info")];case 2:return[2,null!==e.sent()]}})})},e}(Auth),error=chalk.bold.red,warn=chalk.keyword("orange"),success=chalk.green,mute=chalk.gray,Job=function(){function e(e){this.user=e,this.browser=getBrowser()}return e.prototype.run=function(){return __awaiter(this,void 0,Promise,function(){var t,n,r;return __generator(this,function(e){switch(e.label){case 0:if((t=this.user.skipJobs)&&0<=t.indexOf(this.name))return console.log("跳过【"+this.name+"】任务"),[2];console.log("开始【"+this.name+"】任务"),e.label=1;case 1:return e.trys.push([1,3,,8]),this.cookies=this.getCookies(this.user),[4,this._run()];case 2:return e.sent(),[3,8];case 3:n=e.sent(),console.log(error("任务失败,将重试一次"),error(n.message)),e.label=4;case 4:return e.trys.push([4,6,,7]),[4,this._run()];case 5:return e.sent(),[3,7];case 6:return r=e.sent(),console.log(error("任务失败"),error(r.message)),[3,7];case 7:return[3,8];case 8:return[2]}})})},e}(),WebJob=function(n){function e(e){var t=n.call(this,e)||this;return t.auth=new WebAuth(e),t}return __extends(e,n),e.prototype.getCookies=function(){return this.auth.getSavedCookies()},e}(Job),JingdouDaily=function(n){function e(e){var t=n.call(this,e)||this;return t.name="网页端每日签到",t}return __extends(e,n),e.prototype._run=function(){return __awaiter(this,void 0,void 0,function(){var t,n,r;return __generator(this,function(e){switch(e.label){case 0:return[4,this.browser.newPage()];case 1:return[4,abortUselessRequests(t=e.sent())];case 2:return e.sent(),[4,t.setCookie.apply(t,this.cookies)];case 3:return e.sent(),[4,t.goto("https://vip.jd.com/sign/index")];case 4:return e.sent(),[4,t.$(".day-info.active > .active-info > .title")];case 5:return n=e.sent(),[4,t.evaluate(function(e){return e.textContent},n)];case 6:return 0<=(r=e.sent()).indexOf("获得")?console.log(success(r)):console.log(mute(r)),[4,t.close()];case 7:return e.sent(),[2]}})})},e}(WebJob),JingdouShops=function(n){function e(e){var t=n.call(this,e)||this;return t._run=function(){return __awaiter(t,void 0,void 0,function(){var t,n,r,s,o,a,u,c,i,l,h,f;return __generator(this,function(e){switch(e.label){case 0:return[4,this.browser.newPage()];case 1:return[4,abortUselessRequests(t=e.sent())];case 2:return e.sent(),[4,t.setCookie.apply(t,this.cookies)];case 3:return e.sent(),[4,t.goto("https://bean.jd.com/myJingBean/list")];case 4:return e.sent(),[4,t.waitFor(".bean-shop-list")];case 5:return e.sent(),[4,t.$$(".bean-shop-list > li")];case 6:n=e.sent(),r=0,e.label=7;case 7:return r a")]:[3,29];case 8:return s=e.sent(),[4,t.evaluate(function(e){return e.textContent},s)];case 9:o=e.sent(),e.label=10;case 10:return e.trys.push([10,27,,28]),[4,t.evaluate(function(e){return e.getAttribute("href")},s)];case 11:return a=e.sent(),[4,this.browser.newPage()];case 12:return[4,abortUselessRequests(u=e.sent())];case 13:return e.sent(),[4,u.setCookie.apply(u,this.cookies)];case 14:return e.sent(),[4,u.goto(a)];case 15:return e.sent(),[4,u.waitFor(".jSign")];case 16:return e.sent(),[4,u.$(".unsigned")];case 17:return(c=e.sent())?[4,u.evaluate(function(e){return e.getAttribute("url")},c)]:[3,24];case 18:return i=e.sent(),[4,u.goto("https://"+i)];case 19:return e.sent(),[4,u.$(".jingdou")];case 20:return(l=e.sent())?[4,u.evaluate(function(e){return e.textContent},l)]:[3,22];case 21:return h=e.sent(),console.log(o,success(h)),[3,23];case 22:console.log(o,"颗粒无收"),e.label=23;case 23:return[3,25];case 24:console.log(o,mute("已签到")),e.label=25;case 25:return[4,u.close()];case 26:return e.sent(),[3,28];case 27:return f=e.sent(),console.log(o,error("任务失败"),error(f.message)),[3,28];case 28:return r++,[3,7];case 29:return[4,t.close()];case 30:return e.sent(),[2]}})})},t.name="网页端店铺每日签到",t}return __extends(e,n),e}(WebJob),devices=require("puppeteer/DeviceDescriptors"),MobileJob=function(n){function e(e){var t=n.call(this,e)||this;return t.auth=new MobileAuth(e),t}return __extends(e,n),e.prototype.getCookies=function(){return this.auth.getSavedCookies()},e.emulatePhone=function(t,n){return void 0===n&&(n="iPhone 7"),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,t.emulate(devices[n])];case 1:return e.sent(),[2]}})})},e.prototype.getCurrentBeanCount=function(){return __awaiter(this,void 0,void 0,function(){var t,n,r;return __generator(this,function(e){switch(e.label){case 0:return[4,this.browser.newPage()];case 1:return[4,abortUselessRequests(t=e.sent())];case 2:return e.sent(),[4,t.setCookie.apply(t,this.cookies)];case 3:return e.sent(),[4,t.goto("https://bean.m.jd.com/")];case 4:return e.sent(),[4,t.$('span[type="Bold"]')];case 5:return n=e.sent(),[4,t.evaluate(function(e){return e.textContent},n)];case 6:return r=e.sent(),[4,t.close()];case 7:return e.sent(),[2,parseInt(r)]}})})},e}(Job),JingdouDailyMobile=function(n){function e(e){var t=n.call(this,e)||this;return t._run=function(){return __awaiter(t,void 0,void 0,function(){var t,n,r;return __generator(this,function(e){switch(e.label){case 0:return[4,this.getCurrentBeanCount()];case 1:return t=e.sent(),[4,this.browser.newPage()];case 2:return[4,abortUselessRequests(n=e.sent())];case 3:return e.sent(),[4,n.setCookie.apply(n,this.cookies)];case 4:return e.sent(),[4,n.goto("https://bean.m.jd.com/bean/signIndex.action")];case 5:return e.sent(),[4,this.getCurrentBeanCount()];case 6:return(r=e.sent())===t?console.log(mute("今日已签到")):console.log(success("签到成功,获得"+(r-t)+"个京豆")),[4,n.close()];case 7:return e.sent(),[2]}})})},t.name="移动端每日签到",t}return __extends(e,n),e}(MobileJob),JinrongDaily=function(n){function e(e){var t=n.call(this,e)||this;return t._run=function(){return __awaiter(t,void 0,void 0,function(){var t,n,r,s,o,a;return __generator(this,function(e){switch(e.label){case 0:return[4,this.browser.newPage()];case 1:return[4,abortUselessRequests(t=e.sent())];case 2:return e.sent(),[4,t.setCookie.apply(t,this.cookies)];case 3:return e.sent(),[4,t.goto("https://vip.jr.jd.com/")];case 4:return e.sent(),[4,t.$(".m-qian")];case 5:return n=e.sent(),[4,t.evaluate(function(e){return e.textContent},n)];case 6:return 0<=e.sent().indexOf("已签到")?(console.log(mute("已签到")),[3,13]):[3,7];case 7:return[4,t.click(".m-qian")];case 8:return e.sent(),[4,t.waitFor(1e3)];case 9:return e.sent(),[4,t.waitFor("#getRewardText")];case 10:return e.sent(),o=(s=t).evaluate,a=[function(e){return e.textContent}],[4,t.$("#getRewardText")];case 11:return[4,o.apply(s,a.concat([e.sent()]))];case 12:r=e.sent(),console.log(r?success(r):warn("未知签到状态")),e.label=13;case 13:return[4,t.close()];case 14:return e.sent(),[2]}})})},t.name="网页端金融每日签到",t}return __extends(e,n),e}(WebJob),DoubleSign=function(n){function e(e){var t=n.call(this,e)||this;return t._run=function(){return __awaiter(t,void 0,void 0,function(){var t,n,r,s,o,a,u,c,i,l,h;return __generator(this,function(e){switch(e.label){case 0:return[4,this.getCurrentBeanCount()];case 1:return t=e.sent(),[4,this.browser.newPage()];case 2:return[4,(n=e.sent()).setCookie.apply(n,this.cookies)];case 3:return e.sent(),[4,n.goto("https://ljd.m.jd.com/countersign/receiveAward.json")];case 4:return e.sent(),o=(s=JSON).parse,u=(a=n).evaluate,c=[function(e){return e.textContent}],[4,n.$("pre")];case 5:return[4,u.apply(a,c.concat([e.sent()]))];case 6:return r=o.apply(s,[e.sent()]),i=r.res.code,l=r.res.data&&r.res.data[0],"0"!==i?[3,10]:l?[4,this.getCurrentBeanCount()]:[3,8];case 7:return(h=e.sent())===t?console.log(mute("今日已签到")):console.log(success("签到成功,获得"+(h-t)+"个京豆")),[3,9];case 8:console.log(mute("颗粒无收")),e.label=9;case 9:return[3,11];case 10:"DS102"===i?console.log(mute("活动未开始")):"DS103"===i?console.log(mute("活动已结束")):"DS104"===i?console.log(mute("颗粒无收")):"DS106"===i?console.log(mute("未完成双签")):console.log(error("未知状态"),error(i)),e.label=11;case 11:return[2]}})})},t.name="移动端双签",t}return __extends(e,n),e}(MobileJob);function doWheel(a){return __awaiter(this,void 0,void 0,function(){var t,n,r,s,o;return __generator(this,function(e){switch(e.label){case 0:return[4,a.$(".wheel_pointer_wrap")];case 1:return[4,e.sent().tap()];case 2:return e.sent(),[4,a.waitForResponse(function(e){return e.url().startsWith("https://api.m.jd.com/client.action?functionId=babelGetLottery")&&200===e.status()})];case 3:t=e.sent(),e.label=4;case 4:return e.trys.push([4,6,,7]),s=(r=JSON).parse,[4,t.text()];case 5:return n=s.apply(r,[e.sent().replace(/^jsonp2\(/,"").replace(/\)$/,"")]),console.log(success(n.promptMsg),success(n.prizeName)),[3,7];case 6:return o=e.sent(),console.log(error(o.message)),[3,7];case 7:return[2]}})})}var JingdouZhuanpanMobile=function(n){function e(e){var t=n.call(this,e)||this;return t._run=function(){return __awaiter(t,void 0,void 0,function(){var t,n,r,s,o,a,u,c,i,l,h,f;return __generator(this,function(e){switch(e.label){case 0:return[4,this.browser.newPage()];case 1:return[4,abortUselessRequests(t=e.sent())];case 2:return e.sent(),[4,t.setCookie.apply(t,this.cookies)];case 3:return e.sent(),[4,t.goto("https://bean.m.jd.com/")];case 4:return e.sent(),[4,t.addStyleTag({content:".modal{z-index: -1 !important;display: none !important;}"})];case 5:return e.sent(),[4,t.$x("//span[contains(text(), '转福利')]//ancestor::div[@accessible]")];case 6:return 0<(n=e.sent()).length?[4,n[0].tap()]:[3,21];case 7:return e.sent(),[4,t.waitForFunction('window.location.href.indexOf("https://pro.m.jd.com/mall/active/") >= 0')];case 8:return e.sent(),[4,t.waitFor(".wheel_chance")];case 9:return e.sent(),[4,t.waitForFunction('document.querySelector(".wheel_chance").textContent !== ""')];case 10:return e.sent(),o=(s=t).evaluate,a=[function(e){return e.textContent.replace(/[ \r\n]/g,"")}],[4,t.$(".wheel_chance_wrap")];case 11:return[4,o.apply(s,a.concat([e.sent()]))];case 12:return r=e.sent(),i=(c=t).evaluate,l=[function(e){return e.textContent}],[4,t.$(".wheel_chance")];case 13:return[4,i.apply(c,l.concat([e.sent()]))];case 14:return"0"!==(u=e.sent())?[3,15]:(console.log(mute(r)),[3,20]);case 15:console.log(success(r)),h=parseInt(u),f=0,e.label=16;case 16:return f p:first-child")];case 27:w=e.sent(),_=0,e.label=28;case 28:return _ {
19 | console.log('done.')
20 | process.exit(0)
21 | })
22 | .catch(err => {
23 | console.error(err)
24 | process.exit(1)
25 | })
26 |
--------------------------------------------------------------------------------
/src/interfaces/Auth.ts:
--------------------------------------------------------------------------------
1 | import * as puppeteer from 'puppeteer'
2 | import * as fs from 'fs'
3 | import * as base64 from '../utils/base64'
4 | import { getBrowser } from '../utils/browser'
5 | import User from './User'
6 |
7 | export default abstract class Auth {
8 | protected constructor (user: User) {
9 | this.user = user
10 | this.canAutoLogin = false
11 | }
12 |
13 | protected canAutoLogin: boolean
14 |
15 | protected readonly user: User
16 |
17 | protected abstract async _login (page: puppeteer.Page): Promise
18 |
19 | protected abstract async _check (page: puppeteer.Page): Promise
20 |
21 | protected abstract getCookiePath (): string
22 |
23 | public getSavedCookies (): puppeteer.Cookie[] {
24 | const cookieStr = fs.readFileSync(this.getCookiePath()).toString()
25 | return JSON.parse(base64.decode(cookieStr))
26 | }
27 |
28 | public async login (): Promise {
29 | const browser: puppeteer.Browser = await puppeteer.launch({
30 | headless: this.canAutoLogin,
31 | defaultViewport: {
32 | width: 1024,
33 | height: 768
34 | }
35 | })
36 | const page: puppeteer.Page = await browser.newPage()
37 | await this._login(page)
38 | const cookies: puppeteer.Cookie[] = await page.cookies()
39 | fs.writeFileSync(this.getCookiePath(), base64.encode(JSON.stringify(cookies)))
40 | await browser.close()
41 | console.log('登录成功!')
42 | }
43 |
44 | public async check (): Promise {
45 | try {
46 | console.log('检查 Cookies 是否有效...')
47 | const cookies: puppeteer.Cookie[] = this.getSavedCookies()
48 | const browser: puppeteer.Browser = getBrowser()
49 | const page: puppeteer.Page = await browser.newPage()
50 | await page.setCookie(...cookies)
51 | const valid: boolean = await this._check(page)
52 | if (valid) {
53 | console.log('Cookies 有效,直接登录')
54 | } else {
55 | console.log('Cookies 已失效,请重新登录')
56 | }
57 | await page.close()
58 | return valid
59 | } catch (e) {
60 | console.log('Cookies 未找到,请重新登录')
61 | return false
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/interfaces/Job.ts:
--------------------------------------------------------------------------------
1 | import { error } from '../utils/log'
2 | import { getBrowser } from '../utils/browser'
3 | import * as puppeteer from 'puppeteer'
4 | import User from './User'
5 |
6 | export default abstract class Job {
7 | protected constructor (user: User) {
8 | this.user = user
9 | this.browser = getBrowser()
10 | }
11 |
12 | protected readonly browser: puppeteer.Browser
13 | protected readonly user: User
14 | protected name: string
15 | protected cookies: puppeteer.Cookie[]
16 |
17 | protected abstract getCookies (user: User): puppeteer.Cookie[]
18 |
19 | protected abstract async _run (): Promise
20 |
21 | public async run (): Promise {
22 | const skipJobs = this.user.skipJobs
23 | if (skipJobs && skipJobs.indexOf(this.name) >= 0) {
24 | console.log(`跳过【${this.name}】任务`)
25 | return
26 | }
27 | console.log(`开始【${this.name}】任务`)
28 | try {
29 | this.cookies = this.getCookies(this.user)
30 | await this._run()
31 | } catch (e) {
32 | console.log(error('任务失败,将重试一次'), error(e.message))
33 | try {
34 | await this._run()
35 | } catch (e) {
36 | console.log(error('任务失败'), error(e.message))
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/interfaces/User.ts:
--------------------------------------------------------------------------------
1 | export default interface User {
2 | username: string,
3 | password?: string,
4 | skipLogin?: boolean,
5 | skip?: boolean,
6 | skipJobs?: string[]
7 | }
8 |
--------------------------------------------------------------------------------
/src/modules/jd/auth/MobileAuth.ts:
--------------------------------------------------------------------------------
1 | import * as path from 'path'
2 | import md5 from '../../../utils/md5'
3 | import Auth from '../../../interfaces/Auth'
4 |
5 | export default class MobileAuth extends Auth {
6 | constructor (user) {
7 | super(user)
8 | }
9 |
10 | protected getCookiePath () {
11 | return path.join(process.cwd(), 'temp', md5('cookies-jd-m' + this.user.username))
12 | }
13 |
14 | protected async _login (page) {
15 | await page.goto('https://plogin.m.jd.com/user/login.action')
16 | this.user.username && await page.type('#username', this.user.username)
17 | this.user.password && await page.type('#password', this.user.password)
18 | // 等待用户登录成功,页面将跳转到 jd.com
19 | await page.waitForFunction('window.location.href.indexOf("https://m.jd.com/") >= 0', {timeout: 0})
20 | }
21 |
22 | protected async _check (page) {
23 | await page.goto('https://home.m.jd.com/myJd/newhome.action', {waitUntil: 'networkidle0'})
24 | return await page.$('.user_info') !== null
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/modules/jd/auth/WebAuth.ts:
--------------------------------------------------------------------------------
1 | import * as path from 'path'
2 | import { createCanvas, Image } from 'canvas'
3 | import { abortUselessRequests } from '../../../utils/puppeteer'
4 | import md5 from '../../../utils/md5'
5 | import { combineRgba, tolerance } from '../../../utils/canvas'
6 | import Auth from '../../../interfaces/Auth'
7 |
8 | function getVerifyPosition (base64: string, actualWidth: number): Promise {
9 | return new Promise((resolve, reject) => {
10 | const canvas = createCanvas(1000, 1000)
11 | const ctx = canvas.getContext('2d')
12 | const img = new Image()
13 | img.onload = () => {
14 | const width: number = img.naturalWidth
15 | const height: number = img.naturalHeight
16 | ctx.drawImage(img, 0, 0)
17 | const maskRgba: number[] = [0, 0, 0, 0.65]
18 | const t: number = 10 // 色差容忍值
19 | let prevPixelRgba = null
20 | for (let x = 0; x < width; x++) {
21 | // 重新开始一列,清除上个像素的色值
22 | prevPixelRgba = null
23 | for (let y = 0; y < height; y++) {
24 | const rgba = ctx.getImageData(x, y, 1, 1).data
25 | if (prevPixelRgba) {
26 | // 所有原图中的 alpha 通道值都是1
27 | prevPixelRgba[3] = 1
28 | const maskedPrevPixel = combineRgba(prevPixelRgba, maskRgba)
29 | // 只要找到了一个色值匹配的像素点则直接返回,因为是自上而下,自左往右的查找,第一个像素点已经满足"最近"的条件
30 | if (tolerance(maskedPrevPixel, rgba, t)) {
31 | resolve(x * actualWidth / width)
32 | return
33 | }
34 | } else {
35 | prevPixelRgba = rgba
36 | }
37 | }
38 | }
39 | // 没有找到任何符合条件的像素点
40 | resolve(0)
41 | }
42 | img.onerror = reject
43 | img.src = base64
44 | })
45 | }
46 |
47 | export default class WebAuth extends Auth {
48 | constructor (user) {
49 | super(user)
50 | this.canAutoLogin = Boolean(user.password && user.username)
51 | }
52 |
53 | protected getCookiePath () {
54 | return path.join(process.cwd(), 'temp', md5('cookies-jd' + this.user.username))
55 | }
56 |
57 | protected async _login (page) {
58 | await page.goto('https://passport.jd.com/new/login.aspx')
59 | // 切换到用户名、密码登录tab
60 | await page.click('.login-tab.login-tab-r > a')
61 | // 自动填写表单
62 | this.user.username && await page.$eval('#loginname', (el, value) => el.setAttribute('value', value), this.user.username)
63 | this.user.password && await page.$eval('#nloginpwd', (el, value) => el.setAttribute('value', value), this.user.password)
64 | if (this.canAutoLogin) {
65 | await page.click('#loginsubmit')
66 | await page.waitFor(1000)
67 | // 需要验证码
68 | let tryTimes: number = 0
69 | // 最多尝试20次
70 | while (++tryTimes < 20 && await page.$('.JDJRV-bigimg')) {
71 | console.log(`正在尝试通过验证码(第${tryTimes}次)`)
72 | // 验证码图片(带缺口)
73 | const img = await page.$('.JDJRV-bigimg > img')
74 | // 获取缺口左x坐标
75 | const distance: number = await getVerifyPosition(
76 | await page.evaluate(element => element.getAttribute('src'), img),
77 | await page.evaluate(element => parseInt(window.getComputedStyle(element).width), img)
78 | )
79 |
80 | /*
81 | // debug 用:在页面上展示找到的位置
82 | await page.evaluate(distance => {
83 | var mark = document.createElement('div')
84 | mark.style.height = '10px'
85 | mark.style.width = '10px'
86 | mark.style.position = 'absolute'
87 | mark.style.left = distance + 'px'
88 | mark.style.top = '0px'
89 | mark.style.backgroundColor = 'green'
90 | document.querySelector('.JDJRV-bigimg').appendChild(mark)
91 | }, distance)
92 | await page.waitFor(2000)
93 | */
94 |
95 | // 滑块
96 | const dragBtn = await page.$('.JDJRV-slide-btn')
97 | const dragBtnPosition = await page.evaluate(element => {
98 | // 此处有 bug,无法直接返回 getBoundingClientRect()
99 | const {x, y, width, height} = element.getBoundingClientRect()
100 | return {x, y, width, height}
101 | }, dragBtn)
102 | // 按下位置设置在滑块中心
103 | const x: number = dragBtnPosition.x + dragBtnPosition.width / 2
104 | const y: number = dragBtnPosition.y + dragBtnPosition.height / 2
105 |
106 | if (distance > 10) {
107 | // 如果距离够长,则将距离设置为二段(模拟人工操作)
108 | const distance1: number = distance - 10
109 | const distance2: number = 10
110 | await page.mouse.move(x, y)
111 | await page.mouse.down()
112 | // 第一次滑动
113 | await page.mouse.move(x + distance1, y, {steps: 30})
114 | await page.waitFor(500)
115 | // 第二次滑动
116 | await page.mouse.move(x + distance1 + distance2, y, {steps: 20})
117 | await page.waitFor(500)
118 | await page.mouse.up()
119 | } else {
120 | // 否则直接滑到相应位置
121 | await page.mouse.move(x, y)
122 | await page.mouse.down()
123 | await page.mouse.move(x + distance, y, {steps: 30})
124 | await page.mouse.up()
125 | }
126 | // 等待验证结果
127 | await page.waitFor(3000)
128 | }
129 | }
130 | // 等待用户登录成功,页面将跳转到 jd.com
131 | await page.waitForFunction('window.location.href.indexOf("https://www.jd.com") >= 0', {timeout: 0})
132 | }
133 |
134 | protected async _check (page) {
135 | await abortUselessRequests(page)
136 | await page.goto('https://order.jd.com/center/list.action')
137 | return await page.$('body[myjd="_MYJD_ordercenter"]') !== null
138 | }
139 | }
140 |
--------------------------------------------------------------------------------
/src/modules/jd/index.ts:
--------------------------------------------------------------------------------
1 | import WebAuth from './auth/WebAuth'
2 | import MobileAuth from './auth/MobileAuth'
3 | import JingdouDaily from './jobs/JingdouDaily'
4 | import JingdouShops from './jobs/JingdouShops'
5 | import JingdouDailyMobile from './jobs/JingdouDailyMobile'
6 | import JinrongDaily from './jobs/JinrongDaily'
7 | import DoubleSign from './jobs/DoubleSign'
8 | import JingdouZhuanpanMobile from './jobs/JingdouZhuanpanMobile'
9 | import FuliDailyMobile from './jobs/FuliDailyMobile'
10 | import JinrongZhuanqianMobile from './jobs/JinrongZhuanqianMobile'
11 | import User from '../../interfaces/User'
12 | import config from '../../config/index'
13 |
14 | const users = config.jd
15 |
16 | async function _runMobileJobs (user) {
17 | await new JingdouDailyMobile(user).run()
18 | await new FuliDailyMobile(user).run()
19 | await new JingdouZhuanpanMobile(user).run()
20 | await new DoubleSign(user).run()
21 | await new JinrongZhuanqianMobile(user).run()
22 | }
23 |
24 | async function _runWebJobs (user) {
25 | await new JingdouDaily(user).run()
26 | await new JingdouShops(user).run()
27 | await new JinrongDaily(user).run()
28 | }
29 |
30 | async function runWebJobs (user) {
31 | const auth = new WebAuth(user)
32 | if (await auth.check()) {
33 | await _runWebJobs(user)
34 | } else {
35 | if (!user.skipLogin) {
36 | await auth.login()
37 | await _runWebJobs(user)
38 | }
39 | }
40 | }
41 |
42 | async function runMobileJobs (user) {
43 | const auth = new MobileAuth(user)
44 | if (await auth.check()) {
45 | await _runMobileJobs(user)
46 | } else {
47 | if (!user.skipLogin) {
48 | await auth.login()
49 | await _runMobileJobs(user)
50 | }
51 | }
52 | }
53 |
54 | export default async function () {
55 | console.log('开始【京东商城】任务')
56 | for (let i = 0; i < users.length; i++) {
57 | const user = users[i]
58 | if (user.skip) {
59 | continue
60 | }
61 | console.log('用户:', user.username)
62 | await runWebJobs(user)
63 | await runMobileJobs(user)
64 | }
65 | console.log('【京东商城】任务已全部完成')
66 | console.log('-----------------')
67 | }
68 |
--------------------------------------------------------------------------------
/src/modules/jd/interfaces/MobileJob.ts:
--------------------------------------------------------------------------------
1 | import * as puppeteer from 'puppeteer'
2 | import Job from '../../../interfaces/Job'
3 | import Auth from '../auth/MobileAuth'
4 | import { abortUselessRequests } from '../../../utils/puppeteer'
5 |
6 | const devices = require('puppeteer/DeviceDescriptors')
7 |
8 | export default abstract class MobileJob extends Job {
9 | protected constructor (user) {
10 | super(user)
11 | this.auth = new Auth(user)
12 | }
13 |
14 | protected auth: Auth
15 |
16 | protected getCookies () {
17 | return this.auth.getSavedCookies()
18 | }
19 |
20 | protected static async emulatePhone (page: puppeteer.Page, phone: string = 'iPhone 7') {
21 | await page.emulate(devices[phone])
22 | }
23 |
24 | protected async getCurrentBeanCount () {
25 | const page = await this.browser.newPage()
26 | await abortUselessRequests(page)
27 | await page.setCookie(...this.cookies)
28 | await page.goto('https://bean.m.jd.com/')
29 | const result = await page.$('span[type="Bold"]')
30 | const resultText = await page.evaluate(element => element.textContent, result)
31 | await page.close()
32 | return parseInt(resultText)
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/modules/jd/interfaces/WebJob.ts:
--------------------------------------------------------------------------------
1 | import Job from '../../../interfaces/Job'
2 | import Auth from '../auth/WebAuth'
3 |
4 | export default abstract class WebJob extends Job {
5 | protected constructor (user) {
6 | super(user)
7 | this.auth = new Auth(user)
8 | }
9 |
10 | protected auth: Auth
11 |
12 | protected getCookies () {
13 | return this.auth.getSavedCookies()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/modules/jd/jobs/DoubleSign.ts:
--------------------------------------------------------------------------------
1 | import { success, mute, error } from '../../../utils/log'
2 | import Job from '../interfaces/MobileJob'
3 |
4 | export default class DoubleSign extends Job {
5 | constructor (user) {
6 | super(user)
7 | this.name = '移动端双签'
8 | }
9 |
10 | protected _run = async () => {
11 | const beanBefore = await this.getCurrentBeanCount()
12 | const page = await this.browser.newPage()
13 | await page.setCookie(...this.cookies)
14 | await page.goto('https://ljd.m.jd.com/countersign/receiveAward.json')
15 | const res = JSON.parse(await page.evaluate(element => element.textContent, await page.$('pre')))
16 | const code = res.res.code
17 | const awardData = res.res.data && res.res.data[0]
18 | if (code === '0') {
19 | if (awardData) {
20 | const beanAfter = await this.getCurrentBeanCount()
21 | if (beanAfter === beanBefore) {
22 | console.log(mute('今日已签到'))
23 | } else {
24 | console.log(success(`签到成功,获得${beanAfter - beanBefore}个京豆`))
25 | }
26 | } else {
27 | console.log(mute('颗粒无收'))
28 | }
29 | } else if (code === 'DS102') {
30 | console.log(mute('活动未开始'))
31 | } else if (code === 'DS103') {
32 | console.log(mute('活动已结束'))
33 | } else if (code === 'DS104') {
34 | console.log(mute('颗粒无收'))
35 | } else if (code === 'DS106') {
36 | console.log(mute('未完成双签'))
37 | } else {
38 | console.log(error('未知状态'), error(code))
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/modules/jd/jobs/FuliDailyMobile.ts:
--------------------------------------------------------------------------------
1 | import { success, mute, error, warn } from '../../../utils/log'
2 | import { abortUselessRequests } from '../../../utils/puppeteer'
3 | import Job from '../interfaces/MobileJob'
4 |
5 | export default class FuliDailyMobile extends Job {
6 | constructor (user) {
7 | super(user)
8 | this.name = '移动端每日福利'
9 | }
10 |
11 | protected async _run () {
12 | const homepage = 'https://wqs.jd.com/promote/201712/mwelfare/m.html?logintag=#/main'
13 | const beanBefore = await this.getCurrentBeanCount()
14 | const page = await this.browser.newPage()
15 | await Job.emulatePhone(page)
16 | await abortUselessRequests(page)
17 | await page.setCookie(...this.cookies)
18 | await page.goto(homepage, {waitUntil: 'networkidle0'})
19 | // 签到
20 | console.log('执行签到...')
21 | const signBtn = await page.$('.signDay_day_item.day_able')
22 | if (signBtn) {
23 | await signBtn.click()
24 | const res = await page.waitForResponse(res => res.url().startsWith('https://s.m.jd.com/activemcenter/muserwelfare/sign'))
25 | try {
26 | const signData = JSON.parse((await res.text()).replace(/^try{.+?\(/, '').replace(/\);.+$/, ''))
27 | if (signData.ret == 0 && signData.level > 0) {
28 | console.log(success(`签到成功`))
29 | } else if (signData.ret == 10) {
30 | console.log(warn('网络异常,请重试'))
31 | } else if (signData.ret == 11) {
32 | console.log(mute('您已经签到过啦'))
33 | } else if ([15, 5, 6, 7, 11, 19].indexOf(signData.ret * 1) >= 0) {
34 | console.log(warn('该小时奖品已发放完,请下个时段再过来哦'))
35 | } else if ([3, 4, 10, 25, 21, 22].indexOf(signData.ret * 1) >= 0) {
36 | console.log(warn('奖品已发完,下次请早点来哦'))
37 | } else {
38 | console.log(error(`签到失败:${signData.ret}`))
39 | }
40 | } catch (e) {
41 | console.log(error(e.message))
42 | }
43 | } else {
44 | console.log(mute('今日已签到'))
45 | }
46 | // 每日任务
47 | let tryTimes = 0
48 | // 当页面上的任务按钮数为0,或尝试次数>5时结束
49 | while ((await page.$$('.welfareTask_btn')).length > 0 && ++tryTimes < 5) {
50 | // 找到所有任务按钮
51 | const taskBtns = await page.$$('.welfareTask_btn')
52 | for (let i = 0; i < taskBtns.length; i++) {
53 | const btn = taskBtns[i]
54 | const text = await page.evaluate(el => el.textContent, btn)
55 | if (text === '立即前往') {
56 | // 打开新页面执行任务
57 | const taskPage = await this.browser.newPage()
58 | await Job.emulatePhone(taskPage)
59 | await abortUselessRequests(taskPage)
60 | await taskPage.setCookie(...this.cookies)
61 | await taskPage.goto(homepage, {waitUntil: 'networkidle0'})
62 | // 新页面上的任务按钮
63 | const taskBtns = await taskPage.$$('.welfareTask_btn')
64 | const taskAwards = await taskPage.$$('.welfareTask_info > p:first-child')
65 | for (let i = 0; i < taskBtns.length; i++) {
66 | const btn = taskBtns[i]
67 | const award = taskAwards[i]
68 | const text = await taskPage.evaluate(el => el.textContent, btn)
69 | const textAward = await taskPage.evaluate(el => el.textContent, award)
70 | // 只要找到任何一个任务按钮,则点击(实际上应该是外层的同个按钮)
71 | if (text === '立即前往' && textAward.indexOf('京豆') >= 0) {
72 | console.log('执行每日福利任务...')
73 | await Promise.all([
74 | taskPage.waitForNavigation({waitUntil: 'networkidle0'}),
75 | btn.click()
76 | ])
77 | await taskPage.close()
78 | break
79 | }
80 | }
81 | } else if (text === '点击领取') {
82 | await btn.click()
83 | }
84 | }
85 | await page.reload({waitUntil: 'networkidle0'})
86 | }
87 |
88 | const beanAfter = await this.getCurrentBeanCount()
89 | if (beanAfter - beanBefore > 0) {
90 | console.log(success(`共获得${beanAfter - beanBefore}京豆`))
91 | }
92 | await page.close()
93 | }
94 | }
95 |
96 | /**
97 | * ref1
98 | */
99 | // URL
100 | // https://s.m.jd.com/activemcenter/muserwelfare/sign
101 | // RES
102 | // try{ jsonpCBKF({"active":"Myonghufliqiandao3","batchid":"","couponid":"","level":0,"ret":15,"retmsg":"no prize"} );}catch(e){}
103 | // CODE
104 | /*
105 | signFn: function(item) {
106 | var self = this;
107 | if (item.canDraw) {
108 | if (self.randomisk) {
109 | return showCommonDia("活动太火爆了,请稍后再试!");
110 | } else {
111 | if (self.btnClass == "day_bl") {
112 | if (self.myinfo && self.myinfo.beanNum && self.myinfo.beanNum * 1 < 10) {
113 | return showCommonDia("您的京豆数量不足,无法完成补签哦~");
114 | }
115 | }
116 | }
117 | sign(item.day, item.activeId, item.activeLevel, function(signData) {
118 | if (signData.ret == 2) {
119 | login.login({
120 | rurl: JD.url.addUrlParam(location.href, {
121 | logintag: 'sign'
122 | })
123 | });
124 | } else if (signData.ret == 0 && signData.level > 0) {
125 | var eventParam = (signData.batchid || "0") + "_" + 1 + "_" + (signData.couponid || "0");
126 | if (item.day == 7) {
127 | item.canDraw = false;
128 | item.bagClass = "bag_unable";
129 | item.bagHtml = '已领取
点击查看大礼包
';
130 | Vue.set(self.signList, item.day - 1, item);
131 | self.diaTitle = "恭喜您,获得专享大礼包";
132 | self.diaDesc = "已放入您的账户";
133 | self.isShowCouponBag = true;
134 | mClickReport("MWelfare_SignGetGift", eventParam);
135 | } else {
136 | if (item.btnText == "10京豆补签") {
137 | ui.info({
138 | msg: "补签成功,每周仅有2次补签机会哦"
139 | });
140 | mClickReport("MWelfare_SignSupply", eventParam);
141 | } else {
142 | ui.info({
143 | msg: "签到成功~"
144 | });
145 | mClickReport("MWelfare_SignGet", eventParam);
146 | }
147 | item.canDraw = false;
148 | item.btnText = "已签到领取";
149 | item.btnClass = "day_none";
150 | Vue.set(self.signList, item.day - 1, item);
151 | }
152 | if (item.Type == 4) {
153 | self.$emit("beanchange");
154 | }
155 | } else if (signData.ret == 3) {
156 | showCommonDia("您参与环境不对,请在浏览器中参与活动~")
157 | } else if (signData.ret == 10) {
158 | showCommonDia("网络异常,请刷新页面重试~", "刷新页面", function() {
159 | location.reload(true);
160 | })
161 | } else if (signData.ret == 11) {
162 | showCommonDia("您已经签到过啦~")
163 | } else if (signData.ret == 12) {
164 | showCommonDia("您没有连续签到,不能领券大礼包哦~")
165 | } else if (signData.ret == 13) {
166 | showCommonDia("签到失败,您已经补签过两次啦!")
167 | } else if (signData.ret == 14) {
168 | showCommonDia("京豆不足,无法补签哦~")
169 | } else if ([15, 5, 6, 7, 11, 19].indexOf(signData.ret * 1) >= 0) {
170 | showCommonDia("该小时奖品已发放完,请下个时段再过来哦~")
171 | } else if ([3, 4, 10, 25, 21, 22].indexOf(signData.ret * 1) >= 0) {
172 | showCommonDia("奖品已发完,下次请早点来哦~")
173 | } else {
174 | showCommonDia("活动太火爆了,请稍后再试~");
175 | }
176 | })
177 | } else if (item.day == 7) {
178 | if (item.level > 0) {
179 | self.diaTitle = "您已领取专享大礼包";
180 | self.diaDesc = "已放入您的账户";
181 | } else {
182 | self.diaTitle = "连续签到专享大礼包";
183 | self.diaDesc = "超值福利,等你来领";
184 | }
185 | self.isShowCouponBag = true;
186 | mClickReport("MWelfare_SignCheckGift");
187 | }
188 | },*/
189 |
190 | /**
191 | * ref2
192 | */
193 | // URL https://s.m.jd.com/activemcenter/muserwelfare/draw
194 | // RES try{ jsonpCBKF({"active":"mrenwu26","prize":[{"batchid":"","couponid":"","level":52}],"ret":0,"retmsg":"领取成功"} );}catch(e){}
195 |
--------------------------------------------------------------------------------
/src/modules/jd/jobs/JingdouDaily.ts:
--------------------------------------------------------------------------------
1 | import { success, mute } from '../../../utils/log'
2 | import { abortUselessRequests } from '../../../utils/puppeteer'
3 | import Job from '../interfaces/WebJob'
4 |
5 | export default class JingdouDaily extends Job {
6 | constructor (user) {
7 | super(user)
8 | this.name = '网页端每日签到'
9 | }
10 |
11 | protected async _run () {
12 | const page = await this.browser.newPage()
13 | await abortUselessRequests(page)
14 | await page.setCookie(...this.cookies)
15 | await page.goto('https://vip.jd.com/sign/index')
16 | const result = await page.$('.day-info.active > .active-info > .title')
17 | const successText = await page.evaluate(element => element.textContent, result)
18 | if (successText.indexOf('获得') >= 0) {
19 | console.log(success(successText))
20 | } else {
21 | console.log(mute(successText))
22 | }
23 | await page.close()
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/modules/jd/jobs/JingdouDailyMobile.ts:
--------------------------------------------------------------------------------
1 | import { success, mute } from '../../../utils/log'
2 | import { abortUselessRequests } from '../../../utils/puppeteer'
3 | import Job from '../interfaces/MobileJob'
4 |
5 | export default class JingdouDailyMobile extends Job {
6 | constructor (user) {
7 | super(user)
8 | this.name = '移动端每日签到'
9 | }
10 |
11 | protected _run = async () => {
12 | const beanBefore = await this.getCurrentBeanCount()
13 | const page = await this.browser.newPage()
14 | await abortUselessRequests(page)
15 | await page.setCookie(...this.cookies)
16 | await page.goto('https://bean.m.jd.com/bean/signIndex.action')
17 | const beanAfter = await this.getCurrentBeanCount()
18 | if (beanAfter === beanBefore) {
19 | console.log(mute('今日已签到'))
20 | } else {
21 | console.log(success(`签到成功,获得${beanAfter - beanBefore}个京豆`))
22 | }
23 | await page.close()
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/modules/jd/jobs/JingdouShops.ts:
--------------------------------------------------------------------------------
1 | import { success, mute, error } from '../../../utils/log'
2 | import { abortUselessRequests } from '../../../utils/puppeteer'
3 | import Job from '../interfaces/WebJob'
4 |
5 | export default class JingdouShops extends Job {
6 | constructor (user) {
7 | super(user)
8 | this.name = '网页端店铺每日签到'
9 | }
10 |
11 | protected _run = async () => {
12 | const page = await this.browser.newPage()
13 | await abortUselessRequests(page)
14 | await page.setCookie(...this.cookies)
15 | await page.goto('https://bean.jd.com/myJingBean/list')
16 | await page.waitFor('.bean-shop-list')
17 | const list = await page.$$('.bean-shop-list > li')
18 | for (let i = 0; i < list.length; i++) {
19 | const link = await list[i].$('.s-name > a')
20 | const linkText = await page.evaluate(element => element.textContent, link)
21 | try {
22 | const href = await page.evaluate(element => element.getAttribute('href'), link)
23 | //console.log(linkText, href)
24 | const shopPage = await this.browser.newPage()
25 | await abortUselessRequests(shopPage)
26 | await shopPage.setCookie(...this.cookies)
27 | await shopPage.goto(href)
28 | await shopPage.waitFor('.jSign')
29 | const unsignedLink = await shopPage.$('.unsigned')
30 | if (unsignedLink) {
31 | const unsignedHref = await shopPage.evaluate(element => element.getAttribute('url'), unsignedLink)
32 | //console.log(unsignedHref)
33 | await shopPage.goto('https://' + unsignedHref)
34 | const jingdou = await shopPage.$('.jingdou')
35 | if (jingdou) {
36 | const successText = await shopPage.evaluate(element => element.textContent, jingdou)
37 | console.log(linkText, success(successText))
38 | } else {
39 | console.log(linkText, '颗粒无收')
40 | }
41 | } else {
42 | console.log(linkText, mute('已签到'))
43 | }
44 | await shopPage.close()
45 | } catch (e) {
46 | console.log(linkText, error('任务失败'), error(e.message))
47 | }
48 | }
49 | await page.close()
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/modules/jd/jobs/JingdouZhuanpanMobile.ts:
--------------------------------------------------------------------------------
1 | import { success, mute, error } from '../../../utils/log'
2 | import { abortUselessRequests } from '../../../utils/puppeteer'
3 | import Job from '../interfaces/MobileJob'
4 |
5 | async function doWheel (page) {
6 | const btn = await page.$('.wheel_pointer_wrap')
7 | await btn.tap()
8 | const res = await page.waitForResponse(res => res.url().startsWith('https://api.m.jd.com/client.action?functionId=babelGetLottery') && res.status() === 200)
9 | try {
10 | const resJson = JSON.parse((await res.text()).replace(/^jsonp2\(/, '').replace(/\)$/, ''))
11 | console.log(success(resJson.promptMsg), success(resJson.prizeName))
12 | } catch (e) {
13 | console.log(error(e.message))
14 | }
15 | }
16 |
17 | export default class JingdouZhuanpanMobile extends Job {
18 | constructor (user) {
19 | super(user)
20 | this.name = '移动端京豆转福利'
21 | }
22 |
23 | protected _run = async () => {
24 | const page = await this.browser.newPage()
25 | await abortUselessRequests(page)
26 | await page.setCookie(...this.cookies)
27 | await page.goto('https://bean.m.jd.com/')
28 | // 模态框会导致目标元素点不到,将它处理掉
29 | await page.addStyleTag({content: '.modal{z-index: -1 !important;display: none !important;}'})
30 | const linkHandlers = await page.$x('//span[contains(text(), \'转福利\')]//ancestor::div[@accessible]')
31 | if (linkHandlers.length > 0) {
32 | //console.log(await page.evaluate(element => element.textContent, linkHandlers[0]))
33 | await linkHandlers[0].tap()
34 | await page.waitForFunction('window.location.href.indexOf("https://pro.m.jd.com/mall/active/") >= 0')
35 | await page.waitFor('.wheel_chance')
36 | await page.waitForFunction('document.querySelector(".wheel_chance").textContent !== ""')
37 | const chanceTextFull = await page.evaluate(element => element.textContent.replace(/[ \r\n]/g, ''), await page.$('.wheel_chance_wrap'))
38 | const chanceText = await page.evaluate(element => element.textContent, await page.$('.wheel_chance'))
39 | if (chanceText === '0') {
40 | // 已用完次数
41 | console.log(mute(chanceTextFull))
42 | } else {
43 | // 可以抽奖
44 | console.log(success(chanceTextFull))
45 | const chanceInt = parseInt(chanceText)
46 | for (let i = 0; i < chanceInt; i++) {
47 | await doWheel(page)
48 | await page.reload({waitUntil: 'networkidle0'})
49 | }
50 | }
51 | } else {
52 | console.log(mute('未找到活动入口'))
53 | }
54 | //await page.waitFor(9999999, {timeout: 0})
55 | await page.close()
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/modules/jd/jobs/JinrongDaily.ts:
--------------------------------------------------------------------------------
1 | import { success, mute, warn } from '../../../utils/log'
2 | import { abortUselessRequests } from '../../../utils/puppeteer'
3 | import Job from '../interfaces/WebJob'
4 |
5 | export default class JinrongDaily extends Job {
6 | constructor (user) {
7 | super(user)
8 | this.name = '网页端金融每日签到'
9 | }
10 |
11 | protected _run = async () => {
12 | const page = await this.browser.newPage()
13 | await abortUselessRequests(page)
14 | await page.setCookie(...this.cookies)
15 | await page.goto('https://vip.jr.jd.com/')
16 | const statusEle = await page.$('.m-qian')
17 | const statusText = await page.evaluate(element => element.textContent, statusEle)
18 | if (statusText.indexOf('已签到') >= 0) {
19 | console.log(mute('已签到'))
20 | } else {
21 | await page.click('.m-qian')
22 | await page.waitFor(1000)
23 | await page.waitFor('#getRewardText')
24 | const successText = await page.evaluate(element => element.textContent, await page.$('#getRewardText'))
25 | console.log(successText ? success(successText) : warn('未知签到状态'))
26 | }
27 | await page.close()
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/modules/jd/jobs/JinrongZhuanqianMobile.ts:
--------------------------------------------------------------------------------
1 | import { success, mute } from '../../../utils/log'
2 | import { abortUselessRequests } from '../../../utils/puppeteer'
3 | import Job from '../interfaces/MobileJob'
4 |
5 | export default class JinrongZhuanqianMobile extends Job {
6 | constructor (user) {
7 | super(user)
8 | this.name = '移动端金融赚钱签到'
9 | }
10 |
11 | protected _run = async () => {
12 | const page = await this.browser.newPage()
13 | //await abortUselessRequests(page)
14 | await page.setCookie(...this.cookies)
15 | await page.goto('https://m.jr.jd.com/spe/qyy/hzq/index.html?usertype=1176&from=daka#/', {waitUntil: 'networkidle0'})
16 | await page.waitForSelector('.gangbeng .btn', {visible: true})
17 | const btn = await page.$('.gangbeng .btn')
18 | await btn.click()
19 | await page.waitForSelector('.am-modal-body .title', {visible: true})
20 | const text = await page.evaluate(el => el.textContent, await page.$('.am-modal-body .title'))
21 | if (text.indexOf('明天再来') >= 0) {
22 | console.log(mute(text))
23 | } else {
24 | console.log(success(text))
25 | }
26 | await page.close()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/modules/v2ex/auth/WebAuth.ts:
--------------------------------------------------------------------------------
1 | import * as path from 'path'
2 | import { abortUselessRequests } from '../../../utils/puppeteer'
3 | import md5 from '../../../utils/md5'
4 | import Auth from '../../../interfaces/Auth'
5 | import { success } from '../../../utils/log'
6 |
7 | export default class WebAuth extends Auth {
8 | constructor (user) {
9 | super(user)
10 | }
11 |
12 | protected getCookiePath () {
13 | return path.join(process.cwd(), 'temp', md5('cookies-v2ex' + this.user.username))
14 | }
15 |
16 | protected async _login (page) {
17 | await page.goto('https://www.v2ex.com/signin')
18 | this.user.username && await page.type('.sl', this.user.username)
19 | this.user.password && await page.type('.sl[type="password"]', this.user.password)
20 | // 等待用户登录成功
21 | await page.waitForFunction('window.location.href === "https://www.v2ex.com/"', {timeout: 0})
22 | }
23 |
24 | protected async _check (page) {
25 | await abortUselessRequests(page)
26 | // V站由于某种特殊的原因,登录检测也需要用签到方式。因此当登录检测通过后,签到就已经成功了
27 | await page.goto('https://www.v2ex.com/mission/daily')
28 | const btn = await page.$('input[type="button"].super.normal.button')
29 | const btnText = await page.evaluate(element => element.getAttribute('value'), btn)
30 | // console.log(btnText)
31 | if (btn && btnText.indexOf('领取') >= 0) {
32 | const bodyHTMLBefore = await page.evaluate(() => document.body.innerHTML)
33 | const beforeMatch = bodyHTMLBefore.match(/已连续登录 \d+ 天/)
34 | await Promise.all([
35 | page.waitForNavigation(),
36 | btn.click()
37 | ])
38 | const bodyHTML = await page.evaluate(() => document.body.innerHTML)
39 | const successMatch = bodyHTML.match(/已连续登录 \d+ 天/)
40 | const isSuccess = successMatch[0] !== beforeMatch[0]
41 | if (isSuccess) {
42 | console.log(success('签到成功'))
43 | }
44 | return isSuccess
45 | } else {
46 | return true
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/modules/v2ex/index.ts:
--------------------------------------------------------------------------------
1 | import WebAuth from './auth/WebAuth'
2 | import DailySign from './jobs/DailySign'
3 | import User from '../../interfaces/User'
4 | import config from '../../config/index'
5 |
6 | const users = config.v2ex
7 |
8 | async function _runWebJobs (user) {
9 | await new DailySign(user).run()
10 | }
11 |
12 | async function runWebJobs (user) {
13 | const auth = new WebAuth(user)
14 | if (await auth.check()) {
15 | await _runWebJobs(user)
16 | } else {
17 | if (!user.skipLogin) {
18 | await auth.login()
19 | await _runWebJobs(user)
20 | }
21 | }
22 | }
23 |
24 | export default async function () {
25 | console.log('开始【V2EX】任务')
26 | for (let i = 0; i < users.length; i++) {
27 | const user = users[i]
28 | if (user.skip) {
29 | continue
30 | }
31 | console.log('用户:', user.username)
32 | await runWebJobs(user)
33 | }
34 | console.log('【V2EX】任务已全部完成')
35 | console.log('-----------------')
36 | }
37 |
--------------------------------------------------------------------------------
/src/modules/v2ex/interfaces/WebJob.ts:
--------------------------------------------------------------------------------
1 | import Job from '../../../interfaces/Job'
2 | import Auth from '../auth/WebAuth'
3 |
4 | export default abstract class WebJob extends Job {
5 | protected constructor (user) {
6 | super(user)
7 | this.auth = new Auth(user)
8 | }
9 |
10 | protected auth: Auth
11 |
12 | protected getCookies () {
13 | return this.auth.getSavedCookies()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/modules/v2ex/jobs/DailySign.ts:
--------------------------------------------------------------------------------
1 | import { success, mute } from '../../../utils/log'
2 | import { abortUselessRequests } from '../../../utils/puppeteer'
3 | import Job from '../interfaces/WebJob'
4 |
5 | export default class DailySign extends Job {
6 | constructor (user) {
7 | super(user)
8 | this.name = '每日签到'
9 | }
10 |
11 | protected _run = async () => {
12 | const page = await this.browser.newPage()
13 | await abortUselessRequests(page)
14 | await page.setCookie(...this.cookies)
15 | await page.goto('https://www.v2ex.com/mission/daily')
16 | const btn = await page.$('input[type="button"].super.normal.button')
17 | const btnText = await page.evaluate(element => element.getAttribute('value'), btn)
18 | // console.log(btnText)
19 | if (btn && btnText.indexOf('领取') >= 0) {
20 | await Promise.all([
21 | page.waitForNavigation(),
22 | btn.click()
23 | ])
24 | const bodyHTML = await page.evaluate(() => document.body.innerHTML)
25 | const successMatch = bodyHTML.match(/已连续登录 \d+ 天/)
26 | console.log(success(successMatch[0]))
27 | } else {
28 | const bodyHTML = await page.evaluate(() => document.body.innerHTML)
29 | const successMatch = bodyHTML.match(/已连续登录 \d+ 天/)
30 | console.log(mute(successMatch[0]))
31 | }
32 | await page.close()
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/utils/base64.ts:
--------------------------------------------------------------------------------
1 | export function encode (str: string): string {
2 | return Buffer.from(str).toString('base64')
3 | }
4 |
5 | export function decode (str: string): string {
6 | return Buffer.from(str, 'base64').toString('utf8')
7 | }
8 |
--------------------------------------------------------------------------------
/src/utils/browser.ts:
--------------------------------------------------------------------------------
1 | import * as puppeteer from 'puppeteer'
2 |
3 | let browser = null
4 |
5 | export async function initBrowser () {
6 | browser = await puppeteer.launch({
7 | headless: process.env.DEBUG !== '1',
8 | defaultViewport: {
9 | width: 1280,
10 | height: 768
11 | }
12 | })
13 | }
14 |
15 | export function getBrowser (): puppeteer.Browser {
16 | return browser
17 | }
18 |
--------------------------------------------------------------------------------
/src/utils/canvas.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * combine rgba colors [r, g, b, a]
3 | * @param rgba1 底色
4 | * @param rgba2 遮罩色
5 | * @returns {number[]}
6 | */
7 | export function combineRgba (rgba1: number[], rgba2: number[]): number[] {
8 | const [r1, g1, b1, a1] = rgba1
9 | const [r2, g2, b2, a2] = rgba2
10 | const a = a1 + a2 - a1 * a2
11 | const r = (r1 * a1 + r2 * a2 - r1 * a1 * a2) / a
12 | const g = (g1 * a1 + g2 * a2 - g1 * a1 * a2) / a
13 | const b = (b1 * a1 + b2 * a2 - b1 * a1 * a2) / a
14 | return [r, g, b, a]
15 | }
16 |
17 | //console.log(combineRgba([255, 255, 255, 1], [0, 0, 0, 0.65]))
18 | /**
19 | * 判断两个颜色是否相似
20 | * @param rgba1
21 | * @param rgba2
22 | * @param t
23 | * @returns {boolean}
24 | */
25 | export function tolerance (rgba1: number[], rgba2: number[], t: number): boolean {
26 | const [r1, g1, b1] = rgba1
27 | const [r2, g2, b2] = rgba2
28 | return (
29 | r1 > r2 - t && r1 < r2 + t
30 | && g1 > g2 - t && g1 < g2 + t
31 | && b1 > b2 - t && b1 < b2 + t
32 | )
33 | }
34 |
--------------------------------------------------------------------------------
/src/utils/log.ts:
--------------------------------------------------------------------------------
1 | import chalk from 'chalk'
2 |
3 | export const error = chalk.bold.red
4 | export const warn = chalk.keyword('orange')
5 | export const success = chalk.green
6 | export const mute = chalk.gray
7 |
8 |
--------------------------------------------------------------------------------
/src/utils/md5.ts:
--------------------------------------------------------------------------------
1 | import * as crypto from 'crypto'
2 |
3 | export default function (str: string): string {
4 | return crypto.createHash('md5').update(str).digest('hex')
5 | }
6 |
--------------------------------------------------------------------------------
/src/utils/puppeteer.ts:
--------------------------------------------------------------------------------
1 | import * as puppeteer from 'puppeteer'
2 |
3 | export async function abortUselessRequests (page: puppeteer.Page) {
4 | await page.setRequestInterception(true)
5 | page.on('request', request => {
6 | const type = request.resourceType()
7 | const useless = type === 'media' || type === 'image' || type === 'font' || type === 'stylesheet'
8 | useless ? request.abort() : request.continue()
9 | })
10 | }
11 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "outDir": "dist",
6 | "sourceMap": false,
7 | "lib": [
8 | "es2015",
9 | "dom"
10 | ]
11 | },
12 | "files": [
13 | "./node_modules/@types/node/index.d.ts",
14 | "./node_modules/@types/puppeteer/index.d.ts"
15 | ],
16 | "include": [
17 | "src/**/*.ts"
18 | ],
19 | "exclude": [
20 | "node_modules"
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@babel/code-frame@^7.0.0":
6 | version "7.0.0"
7 | resolved "http://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8"
8 | dependencies:
9 | "@babel/highlight" "^7.0.0"
10 |
11 | "@babel/highlight@^7.0.0":
12 | version "7.0.0"
13 | resolved "http://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
14 | dependencies:
15 | chalk "^2.0.0"
16 | esutils "^2.0.2"
17 | js-tokens "^4.0.0"
18 |
19 | "@types/estree@0.0.39":
20 | version "0.0.39"
21 | resolved "http://registry.npm.taobao.org/@types/estree/download/@types/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
22 |
23 | "@types/node@*", "@types/node@^10.12.2":
24 | version "10.12.2"
25 | resolved "http://registry.npm.taobao.org/@types/node/download/@types/node-10.12.2.tgz#d77f9faa027cadad9c912cd47f4f8b07b0fb0864"
26 |
27 | "@types/puppeteer@^1.9.1":
28 | version "1.9.1"
29 | resolved "http://registry.npm.taobao.org/@types/puppeteer/download/@types/puppeteer-1.9.1.tgz#a2499bb7eff5da8e9197f8407205e7b28bece29a"
30 | dependencies:
31 | "@types/node" "*"
32 |
33 | abbrev@1:
34 | version "1.1.1"
35 | resolved "http://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
36 |
37 | agent-base@^4.1.0:
38 | version "4.2.1"
39 | resolved "http://registry.npm.taobao.org/agent-base/download/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9"
40 | dependencies:
41 | es6-promisify "^5.0.0"
42 |
43 | ansi-regex@^2.0.0:
44 | version "2.1.1"
45 | resolved "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
46 |
47 | ansi-regex@^3.0.0:
48 | version "3.0.0"
49 | resolved "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
50 |
51 | ansi-styles@^3.2.1:
52 | version "3.2.1"
53 | resolved "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
54 | dependencies:
55 | color-convert "^1.9.0"
56 |
57 | aproba@^1.0.3:
58 | version "1.2.0"
59 | resolved "http://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
60 |
61 | are-we-there-yet@~1.1.2:
62 | version "1.1.5"
63 | resolved "http://registry.npm.taobao.org/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
64 | dependencies:
65 | delegates "^1.0.0"
66 | readable-stream "^2.0.6"
67 |
68 | arr-diff@^2.0.0:
69 | version "2.0.0"
70 | resolved "http://registry.npm.taobao.org/arr-diff/download/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
71 | dependencies:
72 | arr-flatten "^1.0.1"
73 |
74 | arr-flatten@^1.0.1:
75 | version "1.1.0"
76 | resolved "http://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
77 |
78 | array-unique@^0.2.1:
79 | version "0.2.1"
80 | resolved "http://registry.npm.taobao.org/array-unique/download/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
81 |
82 | async-limiter@~1.0.0:
83 | version "1.0.0"
84 | resolved "http://registry.npm.taobao.org/async-limiter/download/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
85 |
86 | balanced-match@^1.0.0:
87 | version "1.0.0"
88 | resolved "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
89 |
90 | brace-expansion@^1.1.7:
91 | version "1.1.11"
92 | resolved "http://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
93 | dependencies:
94 | balanced-match "^1.0.0"
95 | concat-map "0.0.1"
96 |
97 | braces@^1.8.2:
98 | version "1.8.5"
99 | resolved "http://registry.npm.taobao.org/braces/download/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
100 | dependencies:
101 | expand-range "^1.8.1"
102 | preserve "^0.2.0"
103 | repeat-element "^1.1.2"
104 |
105 | buffer-from@^1.0.0:
106 | version "1.1.1"
107 | resolved "http://registry.npm.taobao.org/buffer-from/download/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
108 |
109 | canvas@^2.0.1:
110 | version "2.0.1"
111 | resolved "http://registry.npm.taobao.org/canvas/download/canvas-2.0.1.tgz#267649ac4c9876de992fb2361252304b599b3e93"
112 | dependencies:
113 | nan "^2.11.1"
114 | node-pre-gyp "^0.11.0"
115 |
116 | chalk@^2.0.0, chalk@^2.4.1:
117 | version "2.4.1"
118 | resolved "http://registry.npm.taobao.org/chalk/download/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
119 | dependencies:
120 | ansi-styles "^3.2.1"
121 | escape-string-regexp "^1.0.5"
122 | supports-color "^5.3.0"
123 |
124 | chownr@^1.0.1:
125 | version "1.1.1"
126 | resolved "http://registry.npm.taobao.org/chownr/download/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494"
127 |
128 | code-point-at@^1.0.0:
129 | version "1.1.0"
130 | resolved "http://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
131 |
132 | color-convert@^1.9.0:
133 | version "1.9.3"
134 | resolved "http://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
135 | dependencies:
136 | color-name "1.1.3"
137 |
138 | color-name@1.1.3:
139 | version "1.1.3"
140 | resolved "http://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
141 |
142 | commander@~2.17.1:
143 | version "2.17.1"
144 | resolved "http://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
145 |
146 | concat-map@0.0.1:
147 | version "0.0.1"
148 | resolved "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
149 |
150 | concat-stream@1.6.2:
151 | version "1.6.2"
152 | resolved "http://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
153 | dependencies:
154 | buffer-from "^1.0.0"
155 | inherits "^2.0.3"
156 | readable-stream "^2.2.2"
157 | typedarray "^0.0.6"
158 |
159 | console-control-strings@^1.0.0, console-control-strings@~1.1.0:
160 | version "1.1.0"
161 | resolved "http://registry.npm.taobao.org/console-control-strings/download/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
162 |
163 | core-util-is@~1.0.0:
164 | version "1.0.2"
165 | resolved "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
166 |
167 | cross-env@^5.2.0:
168 | version "5.2.0"
169 | resolved "http://registry.npm.taobao.org/cross-env/download/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
170 | dependencies:
171 | cross-spawn "^6.0.5"
172 | is-windows "^1.0.0"
173 |
174 | cross-spawn@^6.0.5:
175 | version "6.0.5"
176 | resolved "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
177 | dependencies:
178 | nice-try "^1.0.4"
179 | path-key "^2.0.1"
180 | semver "^5.5.0"
181 | shebang-command "^1.2.0"
182 | which "^1.2.9"
183 |
184 | debug@2.6.9, debug@^2.1.2:
185 | version "2.6.9"
186 | resolved "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
187 | dependencies:
188 | ms "2.0.0"
189 |
190 | debug@^3.1.0:
191 | version "3.2.6"
192 | resolved "http://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
193 | dependencies:
194 | ms "^2.1.1"
195 |
196 | deep-extend@^0.6.0:
197 | version "0.6.0"
198 | resolved "http://registry.npm.taobao.org/deep-extend/download/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
199 |
200 | delegates@^1.0.0:
201 | version "1.0.0"
202 | resolved "http://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
203 |
204 | detect-libc@^1.0.2:
205 | version "1.0.3"
206 | resolved "http://registry.npm.taobao.org/detect-libc/download/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
207 |
208 | es6-promise@^4.0.3:
209 | version "4.2.5"
210 | resolved "http://registry.npm.taobao.org/es6-promise/download/es6-promise-4.2.5.tgz#da6d0d5692efb461e082c14817fe2427d8f5d054"
211 |
212 | es6-promisify@^5.0.0:
213 | version "5.0.0"
214 | resolved "http://registry.npm.taobao.org/es6-promisify/download/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
215 | dependencies:
216 | es6-promise "^4.0.3"
217 |
218 | escape-string-regexp@^1.0.5:
219 | version "1.0.5"
220 | resolved "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
221 |
222 | estree-walker@^0.5.2:
223 | version "0.5.2"
224 | resolved "http://registry.npm.taobao.org/estree-walker/download/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39"
225 |
226 | esutils@^2.0.2:
227 | version "2.0.2"
228 | resolved "http://registry.npm.taobao.org/esutils/download/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
229 |
230 | expand-brackets@^0.1.4:
231 | version "0.1.5"
232 | resolved "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
233 | dependencies:
234 | is-posix-bracket "^0.1.0"
235 |
236 | expand-range@^1.8.1:
237 | version "1.8.2"
238 | resolved "http://registry.npm.taobao.org/expand-range/download/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
239 | dependencies:
240 | fill-range "^2.1.0"
241 |
242 | extglob@^0.3.1:
243 | version "0.3.2"
244 | resolved "http://registry.npm.taobao.org/extglob/download/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
245 | dependencies:
246 | is-extglob "^1.0.0"
247 |
248 | extract-zip@^1.6.6:
249 | version "1.6.7"
250 | resolved "http://registry.npm.taobao.org/extract-zip/download/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9"
251 | dependencies:
252 | concat-stream "1.6.2"
253 | debug "2.6.9"
254 | mkdirp "0.5.1"
255 | yauzl "2.4.1"
256 |
257 | fd-slicer@~1.0.1:
258 | version "1.0.1"
259 | resolved "http://registry.npm.taobao.org/fd-slicer/download/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65"
260 | dependencies:
261 | pend "~1.2.0"
262 |
263 | filename-regex@^2.0.0:
264 | version "2.0.1"
265 | resolved "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
266 |
267 | fill-range@^2.1.0:
268 | version "2.2.4"
269 | resolved "http://registry.npm.taobao.org/fill-range/download/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
270 | dependencies:
271 | is-number "^2.1.0"
272 | isobject "^2.0.0"
273 | randomatic "^3.0.0"
274 | repeat-element "^1.1.2"
275 | repeat-string "^1.5.2"
276 |
277 | for-in@^1.0.1:
278 | version "1.0.2"
279 | resolved "http://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
280 |
281 | for-own@^0.1.4:
282 | version "0.1.5"
283 | resolved "http://registry.npm.taobao.org/for-own/download/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
284 | dependencies:
285 | for-in "^1.0.1"
286 |
287 | fs-minipass@^1.2.5:
288 | version "1.2.5"
289 | resolved "http://registry.npm.taobao.org/fs-minipass/download/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
290 | dependencies:
291 | minipass "^2.2.1"
292 |
293 | fs.realpath@^1.0.0:
294 | version "1.0.0"
295 | resolved "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
296 |
297 | gauge@~2.7.3:
298 | version "2.7.4"
299 | resolved "http://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
300 | dependencies:
301 | aproba "^1.0.3"
302 | console-control-strings "^1.0.0"
303 | has-unicode "^2.0.0"
304 | object-assign "^4.1.0"
305 | signal-exit "^3.0.0"
306 | string-width "^1.0.1"
307 | strip-ansi "^3.0.1"
308 | wide-align "^1.1.0"
309 |
310 | glob-base@^0.3.0:
311 | version "0.3.0"
312 | resolved "http://registry.npm.taobao.org/glob-base/download/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
313 | dependencies:
314 | glob-parent "^2.0.0"
315 | is-glob "^2.0.0"
316 |
317 | glob-parent@^2.0.0:
318 | version "2.0.0"
319 | resolved "http://registry.npm.taobao.org/glob-parent/download/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
320 | dependencies:
321 | is-glob "^2.0.0"
322 |
323 | glob@^7.0.5:
324 | version "7.1.3"
325 | resolved "http://registry.npm.taobao.org/glob/download/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
326 | dependencies:
327 | fs.realpath "^1.0.0"
328 | inflight "^1.0.4"
329 | inherits "2"
330 | minimatch "^3.0.4"
331 | once "^1.3.0"
332 | path-is-absolute "^1.0.0"
333 |
334 | has-flag@^3.0.0:
335 | version "3.0.0"
336 | resolved "http://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
337 |
338 | has-unicode@^2.0.0:
339 | version "2.0.1"
340 | resolved "http://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
341 |
342 | https-proxy-agent@^2.2.1:
343 | version "2.2.1"
344 | resolved "http://registry.npm.taobao.org/https-proxy-agent/download/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0"
345 | dependencies:
346 | agent-base "^4.1.0"
347 | debug "^3.1.0"
348 |
349 | iconv-lite@^0.4.4:
350 | version "0.4.24"
351 | resolved "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
352 | dependencies:
353 | safer-buffer ">= 2.1.2 < 3"
354 |
355 | ignore-walk@^3.0.1:
356 | version "3.0.1"
357 | resolved "http://registry.npm.taobao.org/ignore-walk/download/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8"
358 | dependencies:
359 | minimatch "^3.0.4"
360 |
361 | inflight@^1.0.4:
362 | version "1.0.6"
363 | resolved "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
364 | dependencies:
365 | once "^1.3.0"
366 | wrappy "1"
367 |
368 | inherits@2, inherits@^2.0.3, inherits@~2.0.3:
369 | version "2.0.3"
370 | resolved "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
371 |
372 | ini@~1.3.0:
373 | version "1.3.5"
374 | resolved "http://registry.npm.taobao.org/ini/download/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
375 |
376 | is-buffer@^1.1.5:
377 | version "1.1.6"
378 | resolved "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
379 |
380 | is-dotfile@^1.0.0:
381 | version "1.0.3"
382 | resolved "http://registry.npm.taobao.org/is-dotfile/download/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
383 |
384 | is-equal-shallow@^0.1.3:
385 | version "0.1.3"
386 | resolved "http://registry.npm.taobao.org/is-equal-shallow/download/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
387 | dependencies:
388 | is-primitive "^2.0.0"
389 |
390 | is-extendable@^0.1.1:
391 | version "0.1.1"
392 | resolved "http://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
393 |
394 | is-extglob@^1.0.0:
395 | version "1.0.0"
396 | resolved "http://registry.npm.taobao.org/is-extglob/download/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
397 |
398 | is-fullwidth-code-point@^1.0.0:
399 | version "1.0.0"
400 | resolved "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
401 | dependencies:
402 | number-is-nan "^1.0.0"
403 |
404 | is-fullwidth-code-point@^2.0.0:
405 | version "2.0.0"
406 | resolved "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
407 |
408 | is-glob@^2.0.0, is-glob@^2.0.1:
409 | version "2.0.1"
410 | resolved "http://registry.npm.taobao.org/is-glob/download/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
411 | dependencies:
412 | is-extglob "^1.0.0"
413 |
414 | is-number@^2.1.0:
415 | version "2.1.0"
416 | resolved "http://registry.npm.taobao.org/is-number/download/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
417 | dependencies:
418 | kind-of "^3.0.2"
419 |
420 | is-number@^4.0.0:
421 | version "4.0.0"
422 | resolved "http://registry.npm.taobao.org/is-number/download/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
423 |
424 | is-posix-bracket@^0.1.0:
425 | version "0.1.1"
426 | resolved "http://registry.npm.taobao.org/is-posix-bracket/download/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
427 |
428 | is-primitive@^2.0.0:
429 | version "2.0.0"
430 | resolved "http://registry.npm.taobao.org/is-primitive/download/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
431 |
432 | is-windows@^1.0.0:
433 | version "1.0.2"
434 | resolved "http://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
435 |
436 | isarray@1.0.0, isarray@~1.0.0:
437 | version "1.0.0"
438 | resolved "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
439 |
440 | isexe@^2.0.0:
441 | version "2.0.0"
442 | resolved "http://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
443 |
444 | isobject@^2.0.0:
445 | version "2.1.0"
446 | resolved "http://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
447 | dependencies:
448 | isarray "1.0.0"
449 |
450 | jest-worker@^23.2.0:
451 | version "23.2.0"
452 | resolved "http://registry.npm.taobao.org/jest-worker/download/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9"
453 | dependencies:
454 | merge-stream "^1.0.1"
455 |
456 | js-tokens@^4.0.0:
457 | version "4.0.0"
458 | resolved "http://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
459 |
460 | kind-of@^3.0.2:
461 | version "3.2.2"
462 | resolved "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
463 | dependencies:
464 | is-buffer "^1.1.5"
465 |
466 | kind-of@^6.0.0:
467 | version "6.0.2"
468 | resolved "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
469 |
470 | math-random@^1.0.1:
471 | version "1.0.1"
472 | resolved "http://registry.npm.taobao.org/math-random/download/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
473 |
474 | merge-stream@^1.0.1:
475 | version "1.0.1"
476 | resolved "http://registry.npm.taobao.org/merge-stream/download/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
477 | dependencies:
478 | readable-stream "^2.0.1"
479 |
480 | micromatch@^2.3.11:
481 | version "2.3.11"
482 | resolved "http://registry.npm.taobao.org/micromatch/download/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
483 | dependencies:
484 | arr-diff "^2.0.0"
485 | array-unique "^0.2.1"
486 | braces "^1.8.2"
487 | expand-brackets "^0.1.4"
488 | extglob "^0.3.1"
489 | filename-regex "^2.0.0"
490 | is-extglob "^1.0.0"
491 | is-glob "^2.0.1"
492 | kind-of "^3.0.2"
493 | normalize-path "^2.0.1"
494 | object.omit "^2.0.0"
495 | parse-glob "^3.0.4"
496 | regex-cache "^0.4.2"
497 |
498 | mime@^2.0.3:
499 | version "2.3.1"
500 | resolved "http://registry.npm.taobao.org/mime/download/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369"
501 |
502 | minimatch@^3.0.4:
503 | version "3.0.4"
504 | resolved "http://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
505 | dependencies:
506 | brace-expansion "^1.1.7"
507 |
508 | minimist@0.0.8:
509 | version "0.0.8"
510 | resolved "http://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
511 |
512 | minimist@^1.2.0:
513 | version "1.2.0"
514 | resolved "http://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
515 |
516 | minipass@^2.2.1, minipass@^2.3.3:
517 | version "2.3.5"
518 | resolved "http://registry.npm.taobao.org/minipass/download/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848"
519 | dependencies:
520 | safe-buffer "^5.1.2"
521 | yallist "^3.0.0"
522 |
523 | minizlib@^1.1.0:
524 | version "1.1.1"
525 | resolved "http://registry.npm.taobao.org/minizlib/download/minizlib-1.1.1.tgz#6734acc045a46e61d596a43bb9d9cd326e19cc42"
526 | dependencies:
527 | minipass "^2.2.1"
528 |
529 | mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1:
530 | version "0.5.1"
531 | resolved "http://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
532 | dependencies:
533 | minimist "0.0.8"
534 |
535 | ms@2.0.0:
536 | version "2.0.0"
537 | resolved "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
538 |
539 | ms@^2.1.1:
540 | version "2.1.1"
541 | resolved "http://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
542 |
543 | nan@^2.11.1:
544 | version "2.11.1"
545 | resolved "http://registry.npm.taobao.org/nan/download/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766"
546 |
547 | needle@^2.2.1:
548 | version "2.2.4"
549 | resolved "http://registry.npm.taobao.org/needle/download/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e"
550 | dependencies:
551 | debug "^2.1.2"
552 | iconv-lite "^0.4.4"
553 | sax "^1.2.4"
554 |
555 | nice-try@^1.0.4:
556 | version "1.0.5"
557 | resolved "http://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
558 |
559 | node-pre-gyp@^0.11.0:
560 | version "0.11.0"
561 | resolved "http://registry.npm.taobao.org/node-pre-gyp/download/node-pre-gyp-0.11.0.tgz#db1f33215272f692cd38f03238e3e9b47c5dd054"
562 | dependencies:
563 | detect-libc "^1.0.2"
564 | mkdirp "^0.5.1"
565 | needle "^2.2.1"
566 | nopt "^4.0.1"
567 | npm-packlist "^1.1.6"
568 | npmlog "^4.0.2"
569 | rc "^1.2.7"
570 | rimraf "^2.6.1"
571 | semver "^5.3.0"
572 | tar "^4"
573 |
574 | nopt@^4.0.1:
575 | version "4.0.1"
576 | resolved "http://registry.npm.taobao.org/nopt/download/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
577 | dependencies:
578 | abbrev "1"
579 | osenv "^0.1.4"
580 |
581 | normalize-path@^2.0.1:
582 | version "2.1.1"
583 | resolved "http://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
584 | dependencies:
585 | remove-trailing-separator "^1.0.1"
586 |
587 | npm-bundled@^1.0.1:
588 | version "1.0.5"
589 | resolved "http://registry.npm.taobao.org/npm-bundled/download/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979"
590 |
591 | npm-packlist@^1.1.6:
592 | version "1.1.12"
593 | resolved "http://registry.npm.taobao.org/npm-packlist/download/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a"
594 | dependencies:
595 | ignore-walk "^3.0.1"
596 | npm-bundled "^1.0.1"
597 |
598 | npmlog@^4.0.2:
599 | version "4.1.2"
600 | resolved "http://registry.npm.taobao.org/npmlog/download/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
601 | dependencies:
602 | are-we-there-yet "~1.1.2"
603 | console-control-strings "~1.1.0"
604 | gauge "~2.7.3"
605 | set-blocking "~2.0.0"
606 |
607 | number-is-nan@^1.0.0:
608 | version "1.0.1"
609 | resolved "http://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
610 |
611 | object-assign@^4.1.0:
612 | version "4.1.1"
613 | resolved "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
614 |
615 | object.omit@^2.0.0:
616 | version "2.0.1"
617 | resolved "http://registry.npm.taobao.org/object.omit/download/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
618 | dependencies:
619 | for-own "^0.1.4"
620 | is-extendable "^0.1.1"
621 |
622 | once@^1.3.0:
623 | version "1.4.0"
624 | resolved "http://registry.npm.taobao.org/once/download/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
625 | dependencies:
626 | wrappy "1"
627 |
628 | os-homedir@^1.0.0:
629 | version "1.0.2"
630 | resolved "http://registry.npm.taobao.org/os-homedir/download/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
631 |
632 | os-tmpdir@^1.0.0:
633 | version "1.0.2"
634 | resolved "http://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
635 |
636 | osenv@^0.1.4:
637 | version "0.1.5"
638 | resolved "http://registry.npm.taobao.org/osenv/download/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
639 | dependencies:
640 | os-homedir "^1.0.0"
641 | os-tmpdir "^1.0.0"
642 |
643 | parse-glob@^3.0.4:
644 | version "3.0.4"
645 | resolved "http://registry.npm.taobao.org/parse-glob/download/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
646 | dependencies:
647 | glob-base "^0.3.0"
648 | is-dotfile "^1.0.0"
649 | is-extglob "^1.0.0"
650 | is-glob "^2.0.0"
651 |
652 | path-is-absolute@^1.0.0:
653 | version "1.0.1"
654 | resolved "http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
655 |
656 | path-key@^2.0.1:
657 | version "2.0.1"
658 | resolved "http://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
659 |
660 | path-parse@^1.0.5:
661 | version "1.0.6"
662 | resolved "http://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
663 |
664 | pend@~1.2.0:
665 | version "1.2.0"
666 | resolved "http://registry.npm.taobao.org/pend/download/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
667 |
668 | preserve@^0.2.0:
669 | version "0.2.0"
670 | resolved "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
671 |
672 | process-nextick-args@~2.0.0:
673 | version "2.0.0"
674 | resolved "http://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
675 |
676 | progress@^2.0.0:
677 | version "2.0.1"
678 | resolved "http://registry.npm.taobao.org/progress/download/progress-2.0.1.tgz#c9242169342b1c29d275889c95734621b1952e31"
679 |
680 | proxy-from-env@^1.0.0:
681 | version "1.0.0"
682 | resolved "http://registry.npm.taobao.org/proxy-from-env/download/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee"
683 |
684 | puppeteer@^1.9.0:
685 | version "1.9.0"
686 | resolved "http://registry.npm.taobao.org/puppeteer/download/puppeteer-1.9.0.tgz#56dba79e7ea4faac807877bee3b23d63291fc59e"
687 | dependencies:
688 | debug "^3.1.0"
689 | extract-zip "^1.6.6"
690 | https-proxy-agent "^2.2.1"
691 | mime "^2.0.3"
692 | progress "^2.0.0"
693 | proxy-from-env "^1.0.0"
694 | rimraf "^2.6.1"
695 | ws "^5.1.1"
696 |
697 | randomatic@^3.0.0:
698 | version "3.1.1"
699 | resolved "http://registry.npm.taobao.org/randomatic/download/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed"
700 | dependencies:
701 | is-number "^4.0.0"
702 | kind-of "^6.0.0"
703 | math-random "^1.0.1"
704 |
705 | rc@^1.2.7:
706 | version "1.2.8"
707 | resolved "http://registry.npm.taobao.org/rc/download/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
708 | dependencies:
709 | deep-extend "^0.6.0"
710 | ini "~1.3.0"
711 | minimist "^1.2.0"
712 | strip-json-comments "~2.0.1"
713 |
714 | readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.2.2:
715 | version "2.3.6"
716 | resolved "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
717 | dependencies:
718 | core-util-is "~1.0.0"
719 | inherits "~2.0.3"
720 | isarray "~1.0.0"
721 | process-nextick-args "~2.0.0"
722 | safe-buffer "~5.1.1"
723 | string_decoder "~1.1.1"
724 | util-deprecate "~1.0.1"
725 |
726 | regex-cache@^0.4.2:
727 | version "0.4.4"
728 | resolved "http://registry.npm.taobao.org/regex-cache/download/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
729 | dependencies:
730 | is-equal-shallow "^0.1.3"
731 |
732 | remove-trailing-separator@^1.0.1:
733 | version "1.1.0"
734 | resolved "http://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
735 |
736 | repeat-element@^1.1.2:
737 | version "1.1.3"
738 | resolved "http://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
739 |
740 | repeat-string@^1.5.2:
741 | version "1.6.1"
742 | resolved "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
743 |
744 | resolve@^1.8.1:
745 | version "1.8.1"
746 | resolved "http://registry.npm.taobao.org/resolve/download/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
747 | dependencies:
748 | path-parse "^1.0.5"
749 |
750 | rimraf@^2.6.1:
751 | version "2.6.2"
752 | resolved "http://registry.npm.taobao.org/rimraf/download/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
753 | dependencies:
754 | glob "^7.0.5"
755 |
756 | rollup-plugin-typescript@^1.0.0:
757 | version "1.0.0"
758 | resolved "http://registry.npm.taobao.org/rollup-plugin-typescript/download/rollup-plugin-typescript-1.0.0.tgz#f7bcefe576011d9d2ebcc725b542ef35fb5005d4"
759 | dependencies:
760 | resolve "^1.8.1"
761 | rollup-pluginutils "^2.3.1"
762 |
763 | rollup-plugin-uglify@^6.0.0:
764 | version "6.0.0"
765 | resolved "http://registry.npm.taobao.org/rollup-plugin-uglify/download/rollup-plugin-uglify-6.0.0.tgz#15aa8919e5cdc63b7cfc9319c781788b40084ce4"
766 | dependencies:
767 | "@babel/code-frame" "^7.0.0"
768 | jest-worker "^23.2.0"
769 | serialize-javascript "^1.5.0"
770 | uglify-js "^3.4.9"
771 |
772 | rollup-pluginutils@^2.3.1:
773 | version "2.3.3"
774 | resolved "http://registry.npm.taobao.org/rollup-pluginutils/download/rollup-pluginutils-2.3.3.tgz#3aad9b1eb3e7fe8262820818840bf091e5ae6794"
775 | dependencies:
776 | estree-walker "^0.5.2"
777 | micromatch "^2.3.11"
778 |
779 | rollup@^0.67.0:
780 | version "0.67.0"
781 | resolved "http://registry.npm.taobao.org/rollup/download/rollup-0.67.0.tgz#16d4f259c55224dded6408e7666b7731500797a3"
782 | dependencies:
783 | "@types/estree" "0.0.39"
784 | "@types/node" "*"
785 |
786 | safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
787 | version "5.1.2"
788 | resolved "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
789 |
790 | "safer-buffer@>= 2.1.2 < 3":
791 | version "2.1.2"
792 | resolved "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
793 |
794 | sax@^1.2.4:
795 | version "1.2.4"
796 | resolved "http://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
797 |
798 | semver@^5.3.0, semver@^5.5.0:
799 | version "5.6.0"
800 | resolved "http://registry.npm.taobao.org/semver/download/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
801 |
802 | serialize-javascript@^1.5.0:
803 | version "1.5.0"
804 | resolved "http://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe"
805 |
806 | set-blocking@~2.0.0:
807 | version "2.0.0"
808 | resolved "http://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
809 |
810 | shebang-command@^1.2.0:
811 | version "1.2.0"
812 | resolved "http://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
813 | dependencies:
814 | shebang-regex "^1.0.0"
815 |
816 | shebang-regex@^1.0.0:
817 | version "1.0.0"
818 | resolved "http://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
819 |
820 | signal-exit@^3.0.0:
821 | version "3.0.2"
822 | resolved "http://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
823 |
824 | source-map@~0.6.1:
825 | version "0.6.1"
826 | resolved "http://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
827 |
828 | string-width@^1.0.1:
829 | version "1.0.2"
830 | resolved "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
831 | dependencies:
832 | code-point-at "^1.0.0"
833 | is-fullwidth-code-point "^1.0.0"
834 | strip-ansi "^3.0.0"
835 |
836 | "string-width@^1.0.2 || 2":
837 | version "2.1.1"
838 | resolved "http://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
839 | dependencies:
840 | is-fullwidth-code-point "^2.0.0"
841 | strip-ansi "^4.0.0"
842 |
843 | string_decoder@~1.1.1:
844 | version "1.1.1"
845 | resolved "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
846 | dependencies:
847 | safe-buffer "~5.1.0"
848 |
849 | strip-ansi@^3.0.0, strip-ansi@^3.0.1:
850 | version "3.0.1"
851 | resolved "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
852 | dependencies:
853 | ansi-regex "^2.0.0"
854 |
855 | strip-ansi@^4.0.0:
856 | version "4.0.0"
857 | resolved "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
858 | dependencies:
859 | ansi-regex "^3.0.0"
860 |
861 | strip-json-comments@~2.0.1:
862 | version "2.0.1"
863 | resolved "http://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
864 |
865 | supports-color@^5.3.0:
866 | version "5.5.0"
867 | resolved "http://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
868 | dependencies:
869 | has-flag "^3.0.0"
870 |
871 | tar@^4:
872 | version "4.4.6"
873 | resolved "http://registry.npm.taobao.org/tar/download/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b"
874 | dependencies:
875 | chownr "^1.0.1"
876 | fs-minipass "^1.2.5"
877 | minipass "^2.3.3"
878 | minizlib "^1.1.0"
879 | mkdirp "^0.5.0"
880 | safe-buffer "^5.1.2"
881 | yallist "^3.0.2"
882 |
883 | tslib@^1.9.3:
884 | version "1.9.3"
885 | resolved "http://registry.npm.taobao.org/tslib/download/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
886 |
887 | typedarray@^0.0.6:
888 | version "0.0.6"
889 | resolved "http://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
890 |
891 | typescript@^3.1.6:
892 | version "3.1.6"
893 | resolved "http://registry.npm.taobao.org/typescript/download/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68"
894 |
895 | uglify-js@^3.4.9:
896 | version "3.4.9"
897 | resolved "http://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3"
898 | dependencies:
899 | commander "~2.17.1"
900 | source-map "~0.6.1"
901 |
902 | util-deprecate@~1.0.1:
903 | version "1.0.2"
904 | resolved "http://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
905 |
906 | which@^1.2.9:
907 | version "1.3.1"
908 | resolved "http://registry.npm.taobao.org/which/download/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
909 | dependencies:
910 | isexe "^2.0.0"
911 |
912 | wide-align@^1.1.0:
913 | version "1.1.3"
914 | resolved "http://registry.npm.taobao.org/wide-align/download/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
915 | dependencies:
916 | string-width "^1.0.2 || 2"
917 |
918 | wrappy@1:
919 | version "1.0.2"
920 | resolved "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
921 |
922 | ws@^5.1.1:
923 | version "5.2.2"
924 | resolved "http://registry.npm.taobao.org/ws/download/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f"
925 | dependencies:
926 | async-limiter "~1.0.0"
927 |
928 | yallist@^3.0.0, yallist@^3.0.2:
929 | version "3.0.2"
930 | resolved "http://registry.npm.taobao.org/yallist/download/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9"
931 |
932 | yauzl@2.4.1:
933 | version "2.4.1"
934 | resolved "http://registry.npm.taobao.org/yauzl/download/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005"
935 | dependencies:
936 | fd-slicer "~1.0.1"
937 |
--------------------------------------------------------------------------------