Version Description
Released August 22th, 2017
- Changed:
- Complete rewrite, including full support for ACF 4 and 5.
Download this release
Release Info
Developer | atimmer |
Plugin | ACF Content Analysis for Yoast SEO |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.6 to 2.0.0
- LICENSE +675 -0
- README.md +0 -16
- inc/class-ac-yoast-acf-content-analysis.php +225 -0
- inc/class-yoast-acf-analysis-assets.php +54 -0
- inc/class-yoast-acf-analysis-facade.php +44 -0
- inc/class-yoast-acf-analysis-registry.php +32 -0
- inc/class-yoast-acf-analysis-requirements.php +46 -0
- inc/configuration/class-yoast-acf-analysis-configuration.php +239 -0
- inc/configuration/class-yoast-acf-analysis-string-store.php +67 -0
- inc/dependencies/class-yoast-acf-analysis-dependency-afc.php +39 -0
- inc/dependencies/class-yoast-acf-analysis-dependency-yoast-seo.php +89 -0
- inc/dependencies/interface-yoast-acf-analysis-depencency.php +17 -0
- index.php +4 -0
- js/src/app.js +77 -0
- js/src/cache/cache.attachments.js +49 -0
- js/src/cache/cache.js +58 -0
- js/src/collect/collect-v4.js +21 -0
- js/src/collect/collect-v5.js +9 -0
- js/src/collect/collect.js +86 -0
- js/src/config/config.js +1 -0
- js/src/helper.js +5 -0
- js/src/main.js +17 -0
- js/src/replacevars.js +57 -0
- js/src/scraper-store.js +91 -0
- js/src/scraper/scraper.email.js +24 -0
- js/src/scraper/scraper.gallery.js +48 -0
- js/src/scraper/scraper.image.js +42 -0
- js/src/scraper/scraper.taxonomy.js +66 -0
- js/src/scraper/scraper.text.js +59 -0
- js/src/scraper/scraper.textarea.js +24 -0
- js/src/scraper/scraper.url.js +24 -0
- js/src/scraper/scraper.wysiwyg.js +62 -0
- js/yoast-acf-analysis.js +842 -0
- license.txt +621 -0
- package-lock.json +2332 -0
- readme.txt +28 -67
- ruleset.xml +23 -0
- tests/js/system/.env.example.js +17 -0
- tests/js/system/data/acf4.php +103 -0
- tests/js/system/data/acf5.php +215 -0
- tests/js/system/helpers/dummyContent.js +14 -0
- tests/js/system/helpers/logContains.js +23 -0
- tests/js/system/helpers/replaceVars.js +27 -0
- tests/js/system/helpers/simpleField.js +17 -0
- tests/js/system/nightwatch.conf.example.js +4 -0
- tests/js/system/nightwatch.json +41 -0
- tests/js/system/pages/WordPressHelper.js +47 -0
- tests/js/system/tests/acf4/relational.js +58 -0
- tests/js/system/tests/acf5/basic.js +24 -0
- tests/js/system/tests/acf5/content-pro.js +62 -0
- tests/js/system/tests/acf5/relational.js +85 -0
- tests/js/system/tests/general/basic.js +67 -0
- tests/js/system/tests/general/content.js +107 -0
- tests/js/system/tests/general/filters.js +53 -0
- tests/php/phpunit.xml.dist +21 -0
- tests/php/unit/AssetsTest.php +34 -0
- tests/php/unit/Configuration/ConfigurationTest.php +289 -0
- tests/php/unit/Configuration/StringStoreTest.php +118 -0
- tests/php/unit/Dependencies/ACFClass.php +5 -0
- tests/php/unit/Dependencies/ACFDependencyTest.php +38 -0
- tests/php/unit/Dependencies/YoastSEODependencyTest.php +56 -0
- tests/php/unit/MainTest.php +39 -0
- tests/php/unit/RegistryTest.php +40 -0
- tests/php/unit/RequirementsTest.php +90 -0
- vendor/autoload.php +7 -0
- vendor/autoload_52.php +7 -0
- vendor/composer/ClassLoader.php +445 -0
- vendor/composer/ClassLoader52.php +271 -0
- vendor/composer/LICENSE +21 -0
- vendor/composer/autoload_classmap.php +106 -0
- vendor/composer/autoload_namespaces.php +10 -0
- vendor/composer/autoload_psr4.php +10 -0
- vendor/composer/autoload_real.php +52 -0
- vendor/composer/autoload_real_52.php +44 -0
- vendor/xrstf/composer-php52/LICENSE +19 -0
- vendor/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php +346 -0
- vendor/xrstf/composer-php52/lib/xrstf/Composer52/ClassLoader.php +271 -0
- vendor/xrstf/composer-php52/lib/xrstf/Composer52/Generator.php +39 -0
- yoast-acf-analysis.php +63 -0
- yoast-seo-acf-content-analysis.php +0 -168
- yoast-seo-plugin.js +0 -50
LICENSE
ADDED
@@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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
{one line to give the program's name and a brief idea of what it does.}
|
635 |
+
Copyright (C) {year} {name of author}
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
{project} Copyright (C) {year} {fullname}
|
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 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
675 |
+
|
README.md
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
# ACF Content Analysis for Yoast SEO
|
2 |
-
This plugin ensures that Yoast SEO analysize all ACF content including FlexiContent and Repeaters
|
3 |
-
|
4 |
-
## Filters
|
5 |
-
`ysacf_exclude_fields`: exclude acf fields from Yoast scoring.
|
6 |
-
|
7 |
-
|
8 |
-
Example: exclude text-color field from Yoast scoring.
|
9 |
-
|
10 |
-
```
|
11 |
-
add_filter('ysacf_exclude_fields', function(){
|
12 |
-
return array(
|
13 |
-
'text_color',
|
14 |
-
);
|
15 |
-
});
|
16 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-ac-yoast-acf-content-analysis.php
ADDED
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Yoast_ACF_Analysis
|
5 |
+
*
|
6 |
+
* Adds ACF data to the content analyses of WordPress SEO.
|
7 |
+
*/
|
8 |
+
class AC_Yoast_SEO_ACF_Content_Analysis {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Yoast_ACF_Analysis init.
|
12 |
+
*
|
13 |
+
* Add hooks and filters.
|
14 |
+
*/
|
15 |
+
public function init() {
|
16 |
+
add_action( 'admin_init', array( $this, 'admin_init' ) );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Check if all requirements are met and boot plugin if so
|
21 |
+
*/
|
22 |
+
public function admin_init() {
|
23 |
+
$dependencies = new Yoast_ACF_Analysis_Requirements();
|
24 |
+
$dependencies->add_dependency( new Yoast_ACF_Analysis_Dependency_Yoast_SEO() );
|
25 |
+
$dependencies->add_dependency( new Yoast_ACF_Analysis_Dependency_ACF() );
|
26 |
+
|
27 |
+
if ( ! $dependencies->are_met() ) {
|
28 |
+
return;
|
29 |
+
}
|
30 |
+
|
31 |
+
$this->boot();
|
32 |
+
|
33 |
+
if ( defined( 'AC_YOAST_ACF_ANALYSIS_ENVIRONMENT' ) && 'development' === AC_YOAST_ACF_ANALYSIS_ENVIRONMENT ) {
|
34 |
+
$this->boot_dev();
|
35 |
+
}
|
36 |
+
|
37 |
+
$this->register_config_filters();
|
38 |
+
|
39 |
+
$assets = new Yoast_ACF_Analysis_Assets();
|
40 |
+
$assets->init();
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Boots the plugin.
|
45 |
+
*/
|
46 |
+
public function boot() {
|
47 |
+
$registry = Yoast_ACF_Analysis_Facade::get_registry();
|
48 |
+
|
49 |
+
$configuration = $registry->get( 'config' );
|
50 |
+
|
51 |
+
if ( null !== $configuration && $configuration instanceof Yoast_ACF_Analysis_Configuration ) {
|
52 |
+
return;
|
53 |
+
}
|
54 |
+
|
55 |
+
$configuration = new Yoast_ACF_Analysis_Configuration(
|
56 |
+
$this->get_blacklist_type(),
|
57 |
+
$this->get_blacklist_name(),
|
58 |
+
$this->get_field_selectors()
|
59 |
+
);
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Filters the plugin configuration instance.
|
63 |
+
*
|
64 |
+
* You can replace the whole plugin configuration with a custom instance.
|
65 |
+
* Only use this as a last resort as there are multiple more specific filters in the default configuration.
|
66 |
+
*
|
67 |
+
* @see Yoast_ACF_Analysis_Configuration
|
68 |
+
*
|
69 |
+
* @since 2.0.0
|
70 |
+
*
|
71 |
+
* @param Yoast_ACF_Analysis_Configuration $configuration Plugin configuration instance
|
72 |
+
*/
|
73 |
+
$custom_configuration = apply_filters( Yoast_ACF_Analysis_Facade::get_filter_name( 'config' ), $configuration );
|
74 |
+
if ( $custom_configuration instanceof Yoast_ACF_Analysis_Configuration ) {
|
75 |
+
$configuration = $custom_configuration;
|
76 |
+
}
|
77 |
+
|
78 |
+
$registry->add( 'config', $configuration );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Boots the plugin for dev environment.
|
83 |
+
*/
|
84 |
+
public function boot_dev() {
|
85 |
+
$version = ( -1 === version_compare( get_option( 'acf_version' ), 5 ) ) ? '4' : '5';
|
86 |
+
require_once AC_SEO_ACF_ANALYSIS_PLUGIN_PATH . '/tests/js/system/data/acf' . $version . '.php';
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Filters the Scraper Configuration to add the headlines configuration for the text scraper.
|
91 |
+
*/
|
92 |
+
protected function register_config_filters() {
|
93 |
+
add_filter(
|
94 |
+
Yoast_ACF_Analysis_Facade::get_filter_name( 'scraper_config' ),
|
95 |
+
array( $this, 'filter_scraper_config')
|
96 |
+
);
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Enhances the scraper config with headlines configuration.
|
101 |
+
*
|
102 |
+
* @param array $scraper_config Scraper configuration.
|
103 |
+
*
|
104 |
+
* @return array Enhanched scraper config.
|
105 |
+
*/
|
106 |
+
public function filter_scraper_config( $scraper_config ) {
|
107 |
+
$scraper_config['text'] = array(
|
108 |
+
/**
|
109 |
+
* Filters which ACF text fields are to be treated as a headline by the text scraper.
|
110 |
+
*
|
111 |
+
* The array has the ACF field key as the array key and the value should be an integer from 1 to 6
|
112 |
+
* that corresponds to the 6 possible HTML tags <h1> to <h6>.
|
113 |
+
*
|
114 |
+
* So this is how to make the field with the key "field_591eb45f2be86" a <h3>:
|
115 |
+
*
|
116 |
+
* $headlines_config = array(
|
117 |
+
* 'field_591eb45f2be86' => 3
|
118 |
+
* );
|
119 |
+
*
|
120 |
+
* @since 2.0.0
|
121 |
+
*
|
122 |
+
* @param array $headlines_config {
|
123 |
+
* @type string $field_name Name of the ACF field
|
124 |
+
* @type int $headline_level Headline level 1 to 6
|
125 |
+
* }
|
126 |
+
*/
|
127 |
+
'headlines' => apply_filters( Yoast_ACF_Analysis_Facade::get_filter_name( 'headlines' ), array() ),
|
128 |
+
);
|
129 |
+
|
130 |
+
return $scraper_config;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Retrieves the default field selectors for ACF4.
|
135 |
+
*
|
136 |
+
* @return Yoast_ACF_Analysis_String_Store
|
137 |
+
*/
|
138 |
+
protected function get_field_selectors() {
|
139 |
+
$field_selectors = new Yoast_ACF_Analysis_String_Store();
|
140 |
+
|
141 |
+
$default_field_selectors = array(
|
142 |
+
// Text.
|
143 |
+
'input[type=text][id^=acf]',
|
144 |
+
|
145 |
+
// Textarea.
|
146 |
+
'textarea[id^=acf]',
|
147 |
+
|
148 |
+
// Email.
|
149 |
+
'input[type=email][id^=acf]',
|
150 |
+
|
151 |
+
// URL.
|
152 |
+
'input[type=url][id^=acf]',
|
153 |
+
|
154 |
+
// WYSIWYG.
|
155 |
+
'textarea[id^=wysiwyg-acf]',
|
156 |
+
|
157 |
+
// Image.
|
158 |
+
'input[type=hidden].acf-image-value',
|
159 |
+
|
160 |
+
// Taxonomy.
|
161 |
+
'.acf-taxonomy-field',
|
162 |
+
);
|
163 |
+
|
164 |
+
foreach ( $default_field_selectors as $field_selector ) {
|
165 |
+
$field_selectors->add( $field_selector );
|
166 |
+
}
|
167 |
+
|
168 |
+
return $field_selectors;
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Retrieves the default blacklist.
|
173 |
+
*
|
174 |
+
* @return Yoast_ACF_Analysis_String_Store
|
175 |
+
*/
|
176 |
+
protected function get_blacklist_type() {
|
177 |
+
|
178 |
+
$blacklist = new Yoast_ACF_Analysis_String_Store();
|
179 |
+
|
180 |
+
$default_blacklist = array(
|
181 |
+
'number',
|
182 |
+
'password',
|
183 |
+
|
184 |
+
'file',
|
185 |
+
|
186 |
+
'select',
|
187 |
+
'checkbox',
|
188 |
+
'radio',
|
189 |
+
'true_false',
|
190 |
+
|
191 |
+
'post_object',
|
192 |
+
'page_link',
|
193 |
+
'relationship',
|
194 |
+
'user',
|
195 |
+
|
196 |
+
'date_picker',
|
197 |
+
'color_picker',
|
198 |
+
|
199 |
+
'message',
|
200 |
+
'tab',
|
201 |
+
'repeater',
|
202 |
+
'flexible_content',
|
203 |
+
);
|
204 |
+
|
205 |
+
foreach ( $default_blacklist as $type ) {
|
206 |
+
$blacklist->add( $type );
|
207 |
+
}
|
208 |
+
|
209 |
+
if ( -1 === version_compare( get_option( 'acf_version' ), 5 ) ) {
|
210 |
+
// It is not worth supporting the Pro Addons to v4, as Pro users can just switch to v5.
|
211 |
+
$blacklist->remove( 'gallery' );
|
212 |
+
$blacklist->remove( 'repeater' );
|
213 |
+
$blacklist->remove( 'flexible_content' );
|
214 |
+
}
|
215 |
+
|
216 |
+
return $blacklist;
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* @return Yoast_ACF_Analysis_String_Store
|
221 |
+
*/
|
222 |
+
protected function get_blacklist_name() {
|
223 |
+
return new Yoast_ACF_Analysis_String_Store();
|
224 |
+
}
|
225 |
+
}
|
inc/class-yoast-acf-analysis-assets.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class Yoast_ACF_Analysis_Frontend
|
6 |
+
*/
|
7 |
+
class Yoast_ACF_Analysis_Assets {
|
8 |
+
|
9 |
+
/** @var array Plugin information. */
|
10 |
+
protected $plugin_data;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Initialize.
|
14 |
+
*/
|
15 |
+
public function init() {
|
16 |
+
$this->plugin_data = get_plugin_data( dirname( AC_SEO_ACF_ANALYSIS_PLUGIN_FILE ) );
|
17 |
+
|
18 |
+
add_filter( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Enqueue JavaScript file to feed data to Yoast Content Analyses.
|
23 |
+
*/
|
24 |
+
public function enqueue_scripts() {
|
25 |
+
global $pagenow;
|
26 |
+
|
27 |
+
/* @var $config Yoast_ACF_Analysis_Configuration */
|
28 |
+
$config = Yoast_ACF_Analysis_Facade::get_registry()->get( 'config' );
|
29 |
+
|
30 |
+
// Post page enqueue.
|
31 |
+
if ( 'post.php' === $pagenow || 'post-new.php' === $pagenow ) {
|
32 |
+
wp_enqueue_script(
|
33 |
+
'yoast-acf-analysis-post',
|
34 |
+
plugins_url( '/js/yoast-acf-analysis.js', AC_SEO_ACF_ANALYSIS_PLUGIN_FILE ),
|
35 |
+
array( 'jquery', 'yoast-seo-post-scraper', 'underscore' ),
|
36 |
+
$this->plugin_data['Version']
|
37 |
+
);
|
38 |
+
|
39 |
+
wp_localize_script( 'yoast-acf-analysis-post', 'YoastACFAnalysisConfig', $config->to_array() );
|
40 |
+
}
|
41 |
+
|
42 |
+
// Term page enqueue.
|
43 |
+
if ( 'term.php' === $pagenow ) {
|
44 |
+
wp_enqueue_script(
|
45 |
+
'yoast-acf-analysis-term',
|
46 |
+
plugins_url( '/js/yoast-acf-analysis.js', AC_SEO_ACF_ANALYSIS_PLUGIN_FILE ),
|
47 |
+
array( 'jquery', 'yoast-seo-term-scraper' ),
|
48 |
+
$this->plugin_data['Version']
|
49 |
+
);
|
50 |
+
|
51 |
+
wp_localize_script( 'yoast-acf-analysis-term', 'YoastACFAnalysisConfig', $config->to_array() );
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
inc/class-yoast-acf-analysis-facade.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Yoast_ACF_Analysis_Facade
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Yoast_ACF_Analysis_Facade {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Returns the identifier of the plugin.
|
11 |
+
*
|
12 |
+
* @return string The identifier of the plugin.
|
13 |
+
*/
|
14 |
+
public static function get_plugin_name() {
|
15 |
+
return 'yoast-acf-analysis';
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Retrieves the registry to use.
|
20 |
+
*
|
21 |
+
* @return Yoast_ACF_Analysis_Registry
|
22 |
+
*/
|
23 |
+
public static function get_registry() {
|
24 |
+
static $registry = null;
|
25 |
+
|
26 |
+
if( null === $registry ) {
|
27 |
+
$registry = new Yoast_ACF_Analysis_Registry();
|
28 |
+
}
|
29 |
+
|
30 |
+
return $registry;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Wraps the notification with an unique identifier.
|
35 |
+
*
|
36 |
+
* @param string $filter_name Filter to wrap.
|
37 |
+
*
|
38 |
+
* @return string Full filter name to use.
|
39 |
+
*/
|
40 |
+
public static function get_filter_name( $filter_name ) {
|
41 |
+
// Example: yoast-acf-analysis/refresh_rate
|
42 |
+
return sprintf( '%1$s/%2$s', self::get_plugin_name(), ltrim( $filter_name, '/' ) );
|
43 |
+
}
|
44 |
+
}
|
inc/class-yoast-acf-analysis-registry.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Yoast_ACF_Analysis_Registry
|
5 |
+
*/
|
6 |
+
class Yoast_ACF_Analysis_Registry {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Registry storage array
|
10 |
+
*
|
11 |
+
* @var array
|
12 |
+
*/
|
13 |
+
private $storage = array();
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @param string|int $id Registry index.
|
17 |
+
* @param mixed $item Item to store in the registry.
|
18 |
+
*/
|
19 |
+
public function add( $id, $item ) {
|
20 |
+
$this->storage[ $id ] = $item;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @param string|int $id Registry index.
|
25 |
+
*
|
26 |
+
* @return object|null Object if a class is registered for the ID, otherwise null.
|
27 |
+
*/
|
28 |
+
public function get( $id ) {
|
29 |
+
return array_key_exists( $id, $this->storage ) ? $this->storage[ $id ] : null;
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
inc/class-yoast-acf-analysis-requirements.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class Yoast_ACF_Analysis_Requirements
|
6 |
+
*/
|
7 |
+
class Yoast_ACF_Analysis_Requirements {
|
8 |
+
|
9 |
+
/** @var Yoast_ACF_Analysis_Dependency[] List of registered dependencies. */
|
10 |
+
protected $dependencies = array();
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Adds a dependency.
|
14 |
+
*
|
15 |
+
* @param Yoast_ACF_Analysis_Dependency $dependency Dependency to add.
|
16 |
+
*/
|
17 |
+
public function add_dependency( Yoast_ACF_Analysis_Dependency $dependency ) {
|
18 |
+
$this->dependencies[] = $dependency;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Checks if all depedencies are met.
|
23 |
+
*
|
24 |
+
* @return bool True if all requirements are met.
|
25 |
+
*/
|
26 |
+
public function are_met() {
|
27 |
+
/*
|
28 |
+
* If the user cannot control plugin activation,
|
29 |
+
* we don't want to bother with requirements which cannot be resolved.
|
30 |
+
*/
|
31 |
+
$can_manage_plugins = current_user_can( 'activate_plugins' );
|
32 |
+
|
33 |
+
$all_are_met = true;
|
34 |
+
foreach ( $this->dependencies as $depencency ) {
|
35 |
+
$is_met = $depencency->is_met();
|
36 |
+
if ( ! $is_met && $can_manage_plugins ) {
|
37 |
+
$depencency->register_notifications();
|
38 |
+
}
|
39 |
+
|
40 |
+
$all_are_met = $is_met && $all_are_met;
|
41 |
+
}
|
42 |
+
|
43 |
+
return $all_are_met;
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
inc/configuration/class-yoast-acf-analysis-configuration.php
ADDED
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class Yoast_ACF_Analysis_Configuration_Default
|
6 |
+
*/
|
7 |
+
class Yoast_ACF_Analysis_Configuration {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* @var Yoast_ACF_Analysis_String_Store
|
11 |
+
*/
|
12 |
+
protected $blacklist_type;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @var Yoast_ACF_Analysis_String_Store
|
16 |
+
*/
|
17 |
+
protected $blacklist_name;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @var Yoast_ACF_Analysis_String_Store
|
21 |
+
*/
|
22 |
+
protected $field_selectors;
|
23 |
+
|
24 |
+
/** @var int Refresh rate to use */
|
25 |
+
protected $refresh_rate = 1000;
|
26 |
+
|
27 |
+
/** @var array Scraper configuration */
|
28 |
+
protected $scraper_config = array();
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @param Yoast_ACF_Analysis_String_Store $blacklist_type Blacklist Type Configuration Object.
|
32 |
+
* @param Yoast_ACF_Analysis_String_Store $blacklist_name Blacklist Name Configuration Object.
|
33 |
+
* @param Yoast_ACF_Analysis_String_Store $field_selectors Field Selectors Configuration Object.
|
34 |
+
*/
|
35 |
+
public function __construct(
|
36 |
+
Yoast_ACF_Analysis_String_Store $blacklist_type,
|
37 |
+
Yoast_ACF_Analysis_String_Store $blacklist_name,
|
38 |
+
Yoast_ACF_Analysis_String_Store $field_selectors
|
39 |
+
) {
|
40 |
+
$this->blacklist_type = $blacklist_type;
|
41 |
+
$this->blacklist_name = $blacklist_name;
|
42 |
+
$this->field_selectors = $field_selectors;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Retrieves the ACF version.
|
47 |
+
*
|
48 |
+
* @return string The ACF version.
|
49 |
+
*/
|
50 |
+
public function get_acf_version() {
|
51 |
+
return get_option( 'acf_version' );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Retrieves the blacklist type store.
|
56 |
+
*
|
57 |
+
* @return Yoast_ACF_Analysis_String_Store The blacklist type store.
|
58 |
+
*/
|
59 |
+
public function get_blacklist_type() {
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Filters the fields to ignore based on field type.
|
63 |
+
*
|
64 |
+
* You can add or remove field types to be analysed.
|
65 |
+
* Be aware that when adding types this will only have an effect if there is a scraper for the type.
|
66 |
+
*
|
67 |
+
* @since 2.0.0
|
68 |
+
*
|
69 |
+
* @param Yoast_ACF_Analysis_String_Store $blacklist_type Store instance of ignored field types
|
70 |
+
*/
|
71 |
+
$blacklist_type = apply_filters(
|
72 |
+
Yoast_ACF_Analysis_Facade::get_filter_name( 'blacklist_type' ),
|
73 |
+
$this->blacklist_type
|
74 |
+
);
|
75 |
+
|
76 |
+
if ( $blacklist_type instanceof Yoast_ACF_Analysis_String_Store ) {
|
77 |
+
return $blacklist_type;
|
78 |
+
}
|
79 |
+
|
80 |
+
return $this->blacklist_type;
|
81 |
+
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Retrieves the blacklist name store.
|
86 |
+
*
|
87 |
+
* @return Yoast_ACF_Analysis_String_Store The blacklist name store.
|
88 |
+
*/
|
89 |
+
public function get_blacklist_name() {
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Filters the fields to ignore based on field name.
|
93 |
+
*
|
94 |
+
* You can add or remove fields to be analysed based on the field name.
|
95 |
+
*
|
96 |
+
* @since 1.0.0
|
97 |
+
* @deprecated 2.0.0 Use the {@see 'yoast-acf-analysis/blacklist_name'} filter instead.
|
98 |
+
*
|
99 |
+
* @param array $legacy_names Array with field names
|
100 |
+
*/
|
101 |
+
$legacy_names = apply_filters(
|
102 |
+
'ysacf_exclude_fields',
|
103 |
+
array()
|
104 |
+
);
|
105 |
+
|
106 |
+
if ( is_array( $legacy_names ) && ! empty( $legacy_names ) ) {
|
107 |
+
foreach ( $legacy_names as $legacy_name ) {
|
108 |
+
$this->blacklist_name->add( $legacy_name );
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Filters the fields to ignore based on field name.
|
114 |
+
*
|
115 |
+
* You can add or remove fields to be analysed based on the field name.
|
116 |
+
*
|
117 |
+
* @since 2.0.0
|
118 |
+
*
|
119 |
+
* @param Yoast_ACF_Analysis_String_Store $blacklist_name Store instance of ignored field names
|
120 |
+
*/
|
121 |
+
$blacklist_name = apply_filters(
|
122 |
+
Yoast_ACF_Analysis_Facade::get_filter_name( 'blacklist_name' ),
|
123 |
+
$this->blacklist_name
|
124 |
+
);
|
125 |
+
|
126 |
+
if ( $blacklist_name instanceof Yoast_ACF_Analysis_String_Store ) {
|
127 |
+
return $blacklist_name;
|
128 |
+
}
|
129 |
+
|
130 |
+
return $this->blacklist_name;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* @return bool
|
135 |
+
*/
|
136 |
+
public function is_debug() {
|
137 |
+
return ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG === true );
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Retrieves the scraper configuration.
|
142 |
+
*
|
143 |
+
* @return array The scraper configuration.
|
144 |
+
*/
|
145 |
+
public function get_scraper_config() {
|
146 |
+
/**
|
147 |
+
* Filters the scraper configuration.
|
148 |
+
*
|
149 |
+
* This nested array holds configuration specific to certain scrapers (for specific field types)
|
150 |
+
* Before using this filter see if there isn't a more specific one like {@see yoast-acf-analysis/headlines}.
|
151 |
+
*
|
152 |
+
* @since 2.0.0
|
153 |
+
*
|
154 |
+
* @param array $scraper_config Nested array of scraper configuration
|
155 |
+
*/
|
156 |
+
$scraper_config = apply_filters(
|
157 |
+
Yoast_ACF_Analysis_Facade::get_filter_name( 'scraper_config' ),
|
158 |
+
$this->scraper_config
|
159 |
+
);
|
160 |
+
|
161 |
+
if ( is_array( $scraper_config ) ) {
|
162 |
+
return $scraper_config;
|
163 |
+
}
|
164 |
+
|
165 |
+
return array();
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Retrieves the refresh rate to be used.
|
170 |
+
*
|
171 |
+
* @return int The number of milliseconds between scrape runs.
|
172 |
+
*/
|
173 |
+
public function get_refresh_rate() {
|
174 |
+
/**
|
175 |
+
* Refresh rate for changes to ACF fields
|
176 |
+
*
|
177 |
+
* This plugin limits the rate at which changes to ACF fields are reported to Yoast SEO.
|
178 |
+
* By default it will only report changes to Yoast SEO after no changes have happened for 1000 milliseconds.
|
179 |
+
* This filter allows to change this to any value above 200 milliseconds.
|
180 |
+
*
|
181 |
+
* @since 2.0.0
|
182 |
+
*
|
183 |
+
* @param int $refresh_rate Refresh rates in milliseconds
|
184 |
+
*/
|
185 |
+
$refresh_rate = apply_filters( Yoast_ACF_Analysis_Facade::get_filter_name( 'refresh_rate' ), $this->refresh_rate );
|
186 |
+
$refresh_rate = intval( $refresh_rate, 10 );
|
187 |
+
|
188 |
+
// Make sure the refresh rate is not too low, this will introduce problems in the browser of the user.
|
189 |
+
return max( 200, $refresh_rate );
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Retrieves the field selectors store.
|
194 |
+
*
|
195 |
+
* @return Yoast_ACF_Analysis_String_Store Field selectors store.
|
196 |
+
*/
|
197 |
+
public function get_field_selectors() {
|
198 |
+
/**
|
199 |
+
* Filters the CSS selectors that are used to find the fields when using ACF4.
|
200 |
+
*
|
201 |
+
* This is an advanced filter that should rarely if ever be used, especially because it only affects ACF4.
|
202 |
+
* If you want to exclude certain fields by type or name there are the more specific filters
|
203 |
+
* {@see 'yoast-acf-analysis/blacklist_type'} and {@see 'yoast-acf-analysis/blacklist_name'} for these.
|
204 |
+
*
|
205 |
+
* @see get_blacklist_type()
|
206 |
+
* @see get_blacklist_name()
|
207 |
+
*
|
208 |
+
* @since 2.0.0
|
209 |
+
*
|
210 |
+
* @param Yoast_ACF_Analysis_String_Store $field_selectors Field selector store instance
|
211 |
+
*/
|
212 |
+
$field_selectors = apply_filters(
|
213 |
+
Yoast_ACF_Analysis_Facade::get_filter_name( 'field_selectors' ),
|
214 |
+
$this->field_selectors
|
215 |
+
);
|
216 |
+
|
217 |
+
if ( $field_selectors instanceof Yoast_ACF_Analysis_String_Store ) {
|
218 |
+
return $field_selectors;
|
219 |
+
}
|
220 |
+
|
221 |
+
return $this->field_selectors;
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* @return array
|
226 |
+
*/
|
227 |
+
public function to_array() {
|
228 |
+
return array(
|
229 |
+
'pluginName' => Yoast_ACF_Analysis_Facade::get_plugin_name(),
|
230 |
+
'acfVersion' => $this->get_acf_version(),
|
231 |
+
'scraper' => $this->get_scraper_config(),
|
232 |
+
'refreshRate' => $this->get_refresh_rate(),
|
233 |
+
'blacklistType' => $this->get_blacklist_type()->to_array(),
|
234 |
+
'blacklistName' => $this->get_blacklist_name()->to_array(),
|
235 |
+
'fieldSelectors' => $this->get_field_selectors()->to_array(),
|
236 |
+
'debug' => $this->is_debug(),
|
237 |
+
);
|
238 |
+
}
|
239 |
+
}
|
inc/configuration/class-yoast-acf-analysis-string-store.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Yoast_ACF_Analysis_String_Store
|
5 |
+
*
|
6 |
+
* Stores a collection of strings.
|
7 |
+
*/
|
8 |
+
class Yoast_ACF_Analysis_String_Store {
|
9 |
+
|
10 |
+
/** @var array List of stored items. */
|
11 |
+
protected $items = array();
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Adds an item to the store.
|
15 |
+
*
|
16 |
+
* @param string $item Item to add.
|
17 |
+
*
|
18 |
+
* @return bool True if the item was added, False if it failed.
|
19 |
+
*/
|
20 |
+
public function add( $item ) {
|
21 |
+
if ( ! is_string( $item ) ) {
|
22 |
+
return false;
|
23 |
+
}
|
24 |
+
|
25 |
+
if ( ! in_array( $item, $this->items, true ) ) {
|
26 |
+
$this->items[] = $item;
|
27 |
+
sort( $this->items );
|
28 |
+
}
|
29 |
+
|
30 |
+
return true;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Removes an item from the store.
|
35 |
+
*
|
36 |
+
* @param string $item Item to remove from the store.
|
37 |
+
*
|
38 |
+
* @return bool True if the item was added, False if it failed.
|
39 |
+
*/
|
40 |
+
public function remove( $item ) {
|
41 |
+
if ( ! is_string( $item ) ) {
|
42 |
+
return false;
|
43 |
+
}
|
44 |
+
|
45 |
+
if ( ! in_array( $item, $this->items, true ) ) {
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
$this->items = array_values(
|
49 |
+
array_diff(
|
50 |
+
$this->items, [ $item ]
|
51 |
+
)
|
52 |
+
);
|
53 |
+
sort( $this->items );
|
54 |
+
|
55 |
+
return true;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Returns the list as array.
|
60 |
+
*
|
61 |
+
* @return array List of items in the store.
|
62 |
+
*/
|
63 |
+
public function to_array() {
|
64 |
+
return $this->items;
|
65 |
+
}
|
66 |
+
|
67 |
+
}
|
inc/dependencies/class-yoast-acf-analysis-dependency-afc.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
final class Yoast_ACF_Analysis_Dependency_ACF implements Yoast_ACF_Analysis_Dependency {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Checks if ACF is active.
|
7 |
+
*
|
8 |
+
* @return bool
|
9 |
+
*/
|
10 |
+
public function is_met() {
|
11 |
+
if ( ! class_exists( 'acf' ) ) {
|
12 |
+
return false;
|
13 |
+
}
|
14 |
+
|
15 |
+
return true;
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Registers the notification to show when the conditions are not met.
|
20 |
+
*/
|
21 |
+
public function register_notifications() {
|
22 |
+
add_action( 'admin_notices', array( $this, 'message_plugin_not_activated' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Notify that we need ACF to be installed and active.
|
27 |
+
*/
|
28 |
+
public function message_plugin_not_activated() {
|
29 |
+
$message = sprintf(
|
30 |
+
/* translators: %1$s resolves to Yoast SEO: ACF Analysis, %2$s resolves to Advanced Custom Fields */
|
31 |
+
__( '%1$s requires %2$s (free or pro) to be installed and activated.', 'yoast-acf-analysis' ),
|
32 |
+
'Yoast SEO: ACF Analysis',
|
33 |
+
'Advanced Custom Fields'
|
34 |
+
);
|
35 |
+
|
36 |
+
printf( '<div class="error"><p>%s</p></div>', esc_html( $message ) );
|
37 |
+
}
|
38 |
+
|
39 |
+
}
|
inc/dependencies/class-yoast-acf-analysis-dependency-yoast-seo.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
final class Yoast_ACF_Analysis_Dependency_Yoast_SEO implements Yoast_ACF_Analysis_Dependency {
|
4 |
+
|
5 |
+
const MINIMAL_REQUIRED_VERSION = 3.2;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Checks if this dependency is met.
|
9 |
+
*
|
10 |
+
* @return bool
|
11 |
+
*/
|
12 |
+
public function is_met() {
|
13 |
+
if ( ! defined( 'WPSEO_VERSION' ) ) {
|
14 |
+
return false;
|
15 |
+
}
|
16 |
+
|
17 |
+
if ( ! $this->has_required_version() ) {
|
18 |
+
return false;
|
19 |
+
}
|
20 |
+
|
21 |
+
return true;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Registers the notifications to be shown.
|
26 |
+
*/
|
27 |
+
public function register_notifications() {
|
28 |
+
if ( ! defined( 'WPSEO_VERSION' ) ) {
|
29 |
+
add_action( 'admin_notices', array( $this, 'message_plugin_not_activated' ) );
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
|
33 |
+
if ( ! $this->has_required_version() ) {
|
34 |
+
add_action( 'admin_notices', array( $this, 'message_minimum_version' ) );
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Notify that we need Yoast SEO for WordPress to be installed and active.
|
40 |
+
*/
|
41 |
+
public function message_plugin_not_activated() {
|
42 |
+
$message = sprintf(
|
43 |
+
/* translators: %1$s resolves to Yoast SEO: ACF Analysis, %2$s resolves to Yoast SEO for WordPress, %3$s resolves to the minimal plugin version */
|
44 |
+
__( '%1$s requires %2$s %3$s (or higher) to be installed and activated.', 'yoast-acf-analysis' ),
|
45 |
+
'Yoast SEO: ACF Analysis',
|
46 |
+
'Yoast SEO for WordPress',
|
47 |
+
self::MINIMAL_REQUIRED_VERSION
|
48 |
+
);
|
49 |
+
|
50 |
+
printf( '<div class="error"><p>%s</p></div>', esc_html( $message ) );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Notify that we need Yoast SEO for WordPress to be installed and active.
|
55 |
+
*/
|
56 |
+
public function message_minimum_version() {
|
57 |
+
$message = sprintf(
|
58 |
+
/* translators: %1$s resolves to Yoast SEO: ACF Analysis, %2$s resolves to Yoast SEO for WordPress, %3$s resolves to the minimal plugin version */
|
59 |
+
__( '%1$s requires %2$s %3$s or higher, please update the plugin.', 'yoast-acf-analysis' ),
|
60 |
+
'Yoast SEO: ACF Analysis',
|
61 |
+
'Yoast SEO for WordPress',
|
62 |
+
self::MINIMAL_REQUIRED_VERSION
|
63 |
+
);
|
64 |
+
|
65 |
+
printf( '<div class="error"><p>%s</p></div>', esc_html( $message ) );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Retrieves only the major version of a provided version string.
|
70 |
+
*
|
71 |
+
* @param string $version Version to get the major version of.
|
72 |
+
*
|
73 |
+
* @return string The major version part of the version string.
|
74 |
+
*/
|
75 |
+
private function get_major_version( $version ) {
|
76 |
+
$parts = explode( '.', $version, 3 );
|
77 |
+
return implode( '.', array_slice( $parts, 0, 2 ) );
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Determines if the WPSEO_VERSION is at a useful version.
|
82 |
+
*
|
83 |
+
* @return bool
|
84 |
+
*/
|
85 |
+
private function has_required_version() {
|
86 |
+
return -1 !== version_compare( $this->get_major_version( WPSEO_VERSION ), self::MINIMAL_REQUIRED_VERSION );
|
87 |
+
}
|
88 |
+
|
89 |
+
}
|
inc/dependencies/interface-yoast-acf-analysis-depencency.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
interface Yoast_ACF_Analysis_Dependency {
|
4 |
+
/**
|
5 |
+
* Checks if this dependency is met.
|
6 |
+
*
|
7 |
+
* @return bool True when met, False when not met.
|
8 |
+
*/
|
9 |
+
public function is_met();
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Registers the notifications to communicate the depedency is not met.
|
13 |
+
*
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
+
public function register_notifications();
|
17 |
+
}
|
index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Nothing to see here.
|
4 |
+
*/
|
js/src/app.js
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global YoastSEO */
|
2 |
+
var config = require( "./config/config.js" );
|
3 |
+
var helper = require( "./helper.js" );
|
4 |
+
var collect = require( "./collect/collect.js" );
|
5 |
+
var replaceVars = require( "./replacevars.js" );
|
6 |
+
|
7 |
+
var analysisTimeout = 0;
|
8 |
+
|
9 |
+
var App = function(){
|
10 |
+
|
11 |
+
YoastSEO.app.registerPlugin(config.pluginName, {status: 'ready'});
|
12 |
+
|
13 |
+
YoastSEO.app.registerModification('content', collect.append.bind(collect), config.pluginName);
|
14 |
+
|
15 |
+
this.bindListeners();
|
16 |
+
};
|
17 |
+
|
18 |
+
App.prototype.bindListeners = function(){
|
19 |
+
|
20 |
+
if(helper.acf_version >= 5){
|
21 |
+
var _self = this;
|
22 |
+
acf.add_action('ready', function () {
|
23 |
+
_self.replaceVars = replaceVars.createReplaceVars(collect);
|
24 |
+
acf.add_action('change remove append sortstop', _self.maybeRefresh);
|
25 |
+
acf.add_action('change remove append sortstop', replaceVars.updateReplaceVars.bind(_self, collect, _self.replaceVars));
|
26 |
+
});
|
27 |
+
}else{
|
28 |
+
var fieldSelectors = config.fieldSelectors.slice(0);
|
29 |
+
|
30 |
+
// Ignore Wysiwyg fields because they trigger a refresh in Yoast SEO itself
|
31 |
+
fieldSelectors = _.without(fieldSelectors, 'textarea[id^=wysiwyg-acf]');
|
32 |
+
|
33 |
+
var _self = this;
|
34 |
+
|
35 |
+
jQuery(document).on('acf/setup_fields', function(){
|
36 |
+
this.replaceVars = replaceVars.createReplaceVars(collect);
|
37 |
+
var fields = jQuery('#post-body, #edittag').find(fieldSelectors.join(','));
|
38 |
+
//This would cause faster updates while typing
|
39 |
+
//fields.on('change input', _self.maybeRefresh.bind(_self) );
|
40 |
+
fields.on('change', _self.maybeRefresh.bind(_self) );
|
41 |
+
fields.on('change', replaceVars.updateReplaceVars.bind(_self, collect, _self.replaceVars));
|
42 |
+
|
43 |
+
// Do not ignore Wysiwyg fields for the purpose of Replace Vars.
|
44 |
+
jQuery('textarea[id^=wysiwyg-acf]').on('change', replaceVars.updateReplaceVars.bind(_self, collect, _self.replaceVars));
|
45 |
+
if (YoastSEO.wp._tinyMCEHelper) {
|
46 |
+
jQuery('textarea[id^=wysiwyg-acf]').each( function () {
|
47 |
+
YoastSEO.wp._tinyMCEHelper.addEventHandler(this.id, [ 'input', 'change', 'cut', 'paste' ],
|
48 |
+
replaceVars.updateReplaceVars.bind(_self, collect, _self.replaceVars));
|
49 |
+
});
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
//Also refresh on media close as attachment data might have changed
|
54 |
+
wp.media.frame.on('close', _self.maybeRefresh.bind(_self) );
|
55 |
+
});
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
59 |
+
|
60 |
+
App.prototype.maybeRefresh = function(){
|
61 |
+
|
62 |
+
if ( analysisTimeout ) {
|
63 |
+
window.clearTimeout(analysisTimeout);
|
64 |
+
}
|
65 |
+
|
66 |
+
analysisTimeout = window.setTimeout( function() {
|
67 |
+
|
68 |
+
if(config.debug){
|
69 |
+
console.log('Recalculate...' + new Date() + '(Internal)');
|
70 |
+
}
|
71 |
+
|
72 |
+
YoastSEO.app.pluginReloaded(config.pluginName);
|
73 |
+
}, config.refreshRate );
|
74 |
+
|
75 |
+
};
|
76 |
+
|
77 |
+
module.exports = App;
|
js/src/cache/cache.attachments.js
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global _ */
|
2 |
+
var cache = require( "./cache.js" );
|
3 |
+
|
4 |
+
var refresh = function(attachment_ids){
|
5 |
+
|
6 |
+
var uncached = cache.getUncached(attachment_ids, 'attachment');
|
7 |
+
|
8 |
+
if (uncached.length === 0){
|
9 |
+
return;
|
10 |
+
}
|
11 |
+
|
12 |
+
window.wp.ajax.post('query-attachments', {
|
13 |
+
'query': {
|
14 |
+
'post__in': uncached
|
15 |
+
}
|
16 |
+
}).done(function (attachments) {
|
17 |
+
|
18 |
+
_.each(attachments, function (attachment) {
|
19 |
+
cache.set(attachment.id, attachment, 'attachment');
|
20 |
+
YoastACFAnalysis.maybeRefresh();
|
21 |
+
});
|
22 |
+
|
23 |
+
});
|
24 |
+
|
25 |
+
};
|
26 |
+
|
27 |
+
var get = function( id ){
|
28 |
+
|
29 |
+
var attachment = cache.get(id, 'attachment');
|
30 |
+
|
31 |
+
if(!attachment) return false;
|
32 |
+
|
33 |
+
var changedAttachment = wp.media.attachment( id );
|
34 |
+
|
35 |
+
if( changedAttachment.has('alt') ){
|
36 |
+
attachment.alt = changedAttachment.get('alt');
|
37 |
+
}
|
38 |
+
|
39 |
+
if( changedAttachment.has('title') ){
|
40 |
+
attachment.title = changedAttachment.get('title');
|
41 |
+
}
|
42 |
+
|
43 |
+
return attachment;
|
44 |
+
};
|
45 |
+
|
46 |
+
module.exports = {
|
47 |
+
refresh: refresh,
|
48 |
+
get: get
|
49 |
+
};
|
js/src/cache/cache.js
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global _ */
|
2 |
+
var Cache = function() {
|
3 |
+
this.clear('all');
|
4 |
+
};
|
5 |
+
|
6 |
+
var _cache;
|
7 |
+
|
8 |
+
Cache.prototype.set = function( id, value, store ) {
|
9 |
+
|
10 |
+
store = typeof store !== 'undefined' ? store : 'default';
|
11 |
+
|
12 |
+
if( !(store in _cache) ){
|
13 |
+
_cache[store] = {};
|
14 |
+
}
|
15 |
+
|
16 |
+
_cache[ store ][ id ] = value;
|
17 |
+
};
|
18 |
+
|
19 |
+
Cache.prototype.get = function( id, store ){
|
20 |
+
|
21 |
+
store = typeof store !== 'undefined' ? store : 'default';
|
22 |
+
|
23 |
+
if ( store in _cache && id in _cache[ store ] ) {
|
24 |
+
return _cache[ store ][ id ];
|
25 |
+
}else{
|
26 |
+
return false;
|
27 |
+
}
|
28 |
+
|
29 |
+
};
|
30 |
+
|
31 |
+
Cache.prototype.getUncached = function(ids, store){
|
32 |
+
|
33 |
+
store = typeof store !== 'undefined' ? store : 'default';
|
34 |
+
|
35 |
+
var that = this;
|
36 |
+
|
37 |
+
ids = _.uniq(ids);
|
38 |
+
|
39 |
+
return ids.filter(function(id){
|
40 |
+
var value = that.get(id, store);
|
41 |
+
return value === false;
|
42 |
+
});
|
43 |
+
|
44 |
+
};
|
45 |
+
|
46 |
+
Cache.prototype.clear = function(store){
|
47 |
+
|
48 |
+
store = typeof store !== 'undefined' ? store : 'default';
|
49 |
+
|
50 |
+
if(store === 'all'){
|
51 |
+
_cache = {};
|
52 |
+
}else{
|
53 |
+
_cache[store] = {};
|
54 |
+
}
|
55 |
+
|
56 |
+
};
|
57 |
+
|
58 |
+
module.exports = new Cache();
|
js/src/collect/collect-v4.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var config = require( "./../config/config.js" );
|
2 |
+
var fieldSelectors = config.fieldSelectors;
|
3 |
+
|
4 |
+
var field_data = [];
|
5 |
+
|
6 |
+
var fields = jQuery('#post-body, #edittag').find(fieldSelectors.join(','));
|
7 |
+
|
8 |
+
fields.each(function() {
|
9 |
+
|
10 |
+
var $el = jQuery(this).parents('.field').last();
|
11 |
+
|
12 |
+
field_data.push({
|
13 |
+
$el : $el,
|
14 |
+
key : $el.data('field_key'),
|
15 |
+
name : $el.data('field_name'),
|
16 |
+
type : $el.data('field_type')
|
17 |
+
});
|
18 |
+
|
19 |
+
});
|
20 |
+
|
21 |
+
module.exports = field_data;
|
js/src/collect/collect-v5.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = function(){
|
2 |
+
return _.map(acf.get_fields(), function(field){
|
3 |
+
|
4 |
+
var field_data = jQuery.extend( true, {}, acf.get_data(jQuery(field)) );
|
5 |
+
field_data.$el = jQuery(field);
|
6 |
+
return field_data;
|
7 |
+
|
8 |
+
});
|
9 |
+
};
|
js/src/collect/collect.js
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global acf, _ */
|
2 |
+
|
3 |
+
var config = require( "./../config/config.js" );
|
4 |
+
var helper = require( "./../helper.js" );
|
5 |
+
var scraper_store = require( "./../scraper-store.js" );
|
6 |
+
|
7 |
+
var Collect = function(){
|
8 |
+
|
9 |
+
};
|
10 |
+
|
11 |
+
Collect.prototype.getFieldData = function () {
|
12 |
+
var field_data = this.filterBroken(this.filterBlacklistName(this.filterBlacklistType(this.getData())));
|
13 |
+
|
14 |
+
var used_types = _.uniq(_.pluck(field_data, 'type'));
|
15 |
+
|
16 |
+
if(config.debug) {
|
17 |
+
|
18 |
+
console.log('Used types:')
|
19 |
+
console.log(used_types);
|
20 |
+
|
21 |
+
}
|
22 |
+
|
23 |
+
_.each(used_types, function(type){
|
24 |
+
field_data = scraper_store.getScraper(type).scrape(field_data);
|
25 |
+
});
|
26 |
+
|
27 |
+
return field_data;
|
28 |
+
};
|
29 |
+
|
30 |
+
Collect.prototype.append = function(data){
|
31 |
+
|
32 |
+
if(config.debug){
|
33 |
+
console.log('Recalculate...' + new Date());
|
34 |
+
}
|
35 |
+
|
36 |
+
var field_data = this.getFieldData();
|
37 |
+
|
38 |
+
_.each(field_data, function(field){
|
39 |
+
|
40 |
+
if(typeof field.content !== 'undefined' && field.content !== ''){
|
41 |
+
data += '\n' + field.content;
|
42 |
+
}
|
43 |
+
|
44 |
+
});
|
45 |
+
|
46 |
+
if(config.debug){
|
47 |
+
console.log('Field data:')
|
48 |
+
console.table(field_data);
|
49 |
+
|
50 |
+
console.log('Data:')
|
51 |
+
console.log(data);
|
52 |
+
}
|
53 |
+
|
54 |
+
return data;
|
55 |
+
|
56 |
+
};
|
57 |
+
|
58 |
+
Collect.prototype.getData = function(){
|
59 |
+
|
60 |
+
if(helper.acf_version >= 5){
|
61 |
+
return require( "./collect-v5.js" )();
|
62 |
+
}else{
|
63 |
+
return require( "./collect-v4.js" );
|
64 |
+
}
|
65 |
+
|
66 |
+
};
|
67 |
+
|
68 |
+
Collect.prototype.filterBlacklistType = function(field_data){
|
69 |
+
return _.filter(field_data, function(field){
|
70 |
+
return !_.contains(config.blacklistType, field.type);
|
71 |
+
});
|
72 |
+
};
|
73 |
+
|
74 |
+
Collect.prototype.filterBlacklistName = function(field_data){
|
75 |
+
return _.filter(field_data, function(field){
|
76 |
+
return !_.contains(config.blacklistName, field.name);
|
77 |
+
});
|
78 |
+
};
|
79 |
+
|
80 |
+
Collect.prototype.filterBroken = function(field_data){
|
81 |
+
return _.filter(field_data, function(field){
|
82 |
+
return ('key' in field);
|
83 |
+
});
|
84 |
+
};
|
85 |
+
|
86 |
+
module.exports = new Collect();
|
js/src/config/config.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
module.exports = YoastACFAnalysisConfig;
|
js/src/helper.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var config = require( "./config/config.js" );
|
2 |
+
|
3 |
+
module.exports = {
|
4 |
+
acf_version: parseFloat(config.acfVersion, 10)
|
5 |
+
};
|
js/src/main.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global jQuery, YoastACFAnalysis: true */
|
2 |
+
|
3 |
+
var App = require( "./app.js" );
|
4 |
+
|
5 |
+
(function($) {
|
6 |
+
|
7 |
+
$(document).ready(function() {
|
8 |
+
|
9 |
+
if( "undefined" !== typeof YoastSEO){
|
10 |
+
|
11 |
+
YoastACFAnalysis = new App();
|
12 |
+
|
13 |
+
}
|
14 |
+
|
15 |
+
});
|
16 |
+
|
17 |
+
}(jQuery));
|
js/src/replacevars.js
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global _, jQuery, YoastSEO, YoastReplaceVarPlugin */
|
2 |
+
|
3 |
+
var config = require( "./config/config.js" );
|
4 |
+
|
5 |
+
var ReplaceVar = YoastReplaceVarPlugin.ReplaceVar;
|
6 |
+
|
7 |
+
var supportedTypes = ['email', 'text', 'textarea', 'url', 'wysiwyg'];
|
8 |
+
|
9 |
+
var createReplaceVars = function (collect) {
|
10 |
+
if (ReplaceVar === undefined) {
|
11 |
+
if (config.debug) {
|
12 |
+
console.log('Replacing ACF variables in the Snippet Window requires the latest version of wordpress-seo.');
|
13 |
+
}
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
fieldData = _.filter(collect.getFieldData(), function (field) { return _.contains(supportedTypes, field.type) });
|
18 |
+
replaceVars = {}
|
19 |
+
|
20 |
+
_.each(fieldData, function(field) {
|
21 |
+
// Remove HTML tags using jQuery in case of a wysiwyg field.
|
22 |
+
var content = (field.type === 'wysiwyg') ? jQuery( jQuery.parseHTML( field.content) ).text() : field.content;
|
23 |
+
|
24 |
+
replaceVars[field.name] = new ReplaceVar( '%%cf_'+field.name+'%%', content, { source: 'direct' } );
|
25 |
+
YoastSEO.wp.replaceVarsPlugin.addReplacement( replaceVars[field.name] );
|
26 |
+
if (config.debug) {
|
27 |
+
console.log("Created ReplaceVar for: ", field.name, " with: ", content, replaceVars[field.name]);
|
28 |
+
}
|
29 |
+
});
|
30 |
+
|
31 |
+
return replaceVars;
|
32 |
+
};
|
33 |
+
|
34 |
+
var updateReplaceVars = function (collect, replace_vars) {
|
35 |
+
if (ReplaceVar === undefined) {
|
36 |
+
if (config.debug) {
|
37 |
+
console.log('Replacing ACF variables in the Snippet Window requires the latest version of wordpress-seo.');
|
38 |
+
}
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
|
42 |
+
fieldData = _.filter(collect.getFieldData(), function (field) { return _.contains(supportedTypes, field.type) });
|
43 |
+
_.each(fieldData, function(field) {
|
44 |
+
// Remove HTML tags using jQuery in case of a wysiwyg field.
|
45 |
+
var content = (field.type === 'wysiwyg') ? jQuery(jQuery.parseHTML(field.content)).text() : field.content;
|
46 |
+
|
47 |
+
replaceVars[field.name].replacement = content;
|
48 |
+
if (config.debug) {
|
49 |
+
console.log("Updated ReplaceVar for: ", field.name, " with: ", content, replaceVars[field.name]);
|
50 |
+
}
|
51 |
+
});
|
52 |
+
};
|
53 |
+
|
54 |
+
module.exports = {
|
55 |
+
createReplaceVars: createReplaceVars,
|
56 |
+
updateReplaceVars: updateReplaceVars
|
57 |
+
};
|
js/src/scraper-store.js
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global _ */
|
2 |
+
var config = require( "./config/config.js" );
|
3 |
+
|
4 |
+
var scraperObjects = {
|
5 |
+
|
6 |
+
//Basic
|
7 |
+
'text': require( "./scraper/scraper.text.js" ),
|
8 |
+
'textarea': require( "./scraper/scraper.textarea.js" ),
|
9 |
+
'email': require( "./scraper/scraper.email.js" ),
|
10 |
+
'url': require( "./scraper/scraper.url.js" ),
|
11 |
+
|
12 |
+
//Content
|
13 |
+
'wysiwyg': require( "./scraper/scraper.wysiwyg.js" ),
|
14 |
+
//TODO: Add oembed handler
|
15 |
+
'image': require( "./scraper/scraper.image.js" ),
|
16 |
+
'gallery': require( "./scraper/scraper.gallery.js" ),
|
17 |
+
|
18 |
+
//Choice
|
19 |
+
//TODO: select, checkbox, radio
|
20 |
+
|
21 |
+
//Relational
|
22 |
+
'taxonomy': require( "./scraper/scraper.taxonomy.js" )
|
23 |
+
|
24 |
+
//jQuery
|
25 |
+
//TODO: google_map, date_picker, color_picker
|
26 |
+
|
27 |
+
};
|
28 |
+
|
29 |
+
var scrapers = {};
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Set a scraper object on the store. Existing scrapers will be overwritten.
|
33 |
+
*
|
34 |
+
* @param {Object} scraper
|
35 |
+
* @param {string} type
|
36 |
+
*/
|
37 |
+
var setScraper = function(scraper, type){
|
38 |
+
|
39 |
+
if(config.debug && hasScraper(type)){
|
40 |
+
console.warn('Scraper for "' + type + '" already exists and will be overwritten.' );
|
41 |
+
}
|
42 |
+
|
43 |
+
scrapers[type] = scraper;
|
44 |
+
|
45 |
+
return scraper;
|
46 |
+
};
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Returns the scraper object for a field type.
|
50 |
+
* If there is no scraper object for this field type a no-op scraper is returned.
|
51 |
+
*
|
52 |
+
* @param {string} type
|
53 |
+
* @returns {Object}
|
54 |
+
*/
|
55 |
+
var getScraper = function(type){
|
56 |
+
|
57 |
+
if(hasScraper(type)){
|
58 |
+
return scrapers[type];
|
59 |
+
}else if(type in scraperObjects){
|
60 |
+
return setScraper(new scraperObjects[type](), type);
|
61 |
+
}else{
|
62 |
+
//If we do not have a scraper just pass the fields through so it will be filtered out by the app.
|
63 |
+
return {
|
64 |
+
scrape: function(fields){
|
65 |
+
if(config.debug){
|
66 |
+
console.warn('No Scraper for field type: ' + type );
|
67 |
+
}
|
68 |
+
return fields;
|
69 |
+
}
|
70 |
+
};
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Checks if there already is a scraper for a field type in the store.
|
76 |
+
*
|
77 |
+
* @param {string} type
|
78 |
+
* @returns {boolean}
|
79 |
+
*/
|
80 |
+
var hasScraper = function(type){
|
81 |
+
|
82 |
+
return (type in scrapers);
|
83 |
+
|
84 |
+
};
|
85 |
+
|
86 |
+
module.exports = {
|
87 |
+
|
88 |
+
setScraper: setScraper,
|
89 |
+
getScraper: getScraper
|
90 |
+
|
91 |
+
};
|
js/src/scraper/scraper.email.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var scrapers = require( "./../scraper-store.js" );
|
2 |
+
|
3 |
+
var Scraper = function() {};
|
4 |
+
|
5 |
+
Scraper.prototype.scrape = function(fields){
|
6 |
+
|
7 |
+
var that = this;
|
8 |
+
|
9 |
+
fields = _.map(fields, function(field){
|
10 |
+
|
11 |
+
if(field.type !== 'email'){
|
12 |
+
return field;
|
13 |
+
}
|
14 |
+
|
15 |
+
field.content = field.$el.find('input[type=email][id^=acf]').val();
|
16 |
+
|
17 |
+
return field;
|
18 |
+
});
|
19 |
+
|
20 |
+
return fields;
|
21 |
+
|
22 |
+
};
|
23 |
+
|
24 |
+
module.exports = Scraper;
|
js/src/scraper/scraper.gallery.js
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var attachmentCache = require( "./../cache/cache.attachments.js" );
|
2 |
+
var scrapers = require( "./../scraper-store.js" );
|
3 |
+
|
4 |
+
var Scraper = function() {};
|
5 |
+
|
6 |
+
Scraper.prototype.scrape = function(fields){
|
7 |
+
|
8 |
+
var that = this;
|
9 |
+
|
10 |
+
var attachment_ids = [];
|
11 |
+
|
12 |
+
fields = _.map(fields, function(field){
|
13 |
+
|
14 |
+
if(field.type !== 'gallery'){
|
15 |
+
return field;
|
16 |
+
}
|
17 |
+
|
18 |
+
field.content = '';
|
19 |
+
|
20 |
+
field.$el.find('.acf-gallery-attachment input[type=hidden]').each( function (index, element){
|
21 |
+
|
22 |
+
//TODO: Is this the best way to get the attachment id?
|
23 |
+
var attachment_id = jQuery( this ).val();
|
24 |
+
|
25 |
+
//Collect all attachment ids for cache refresh
|
26 |
+
attachment_ids.push(attachment_id);
|
27 |
+
|
28 |
+
//If we have the attachment data in the cache we can return a useful value
|
29 |
+
if(attachmentCache.get(attachment_id, 'attachment')){
|
30 |
+
|
31 |
+
var attachment = attachmentCache.get(attachment_id, 'attachment');
|
32 |
+
|
33 |
+
field.content += '<img src="' + attachment.url + '" alt="' + attachment.alt + '" title="' + attachment.title + '">';
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
});
|
38 |
+
|
39 |
+
return field;
|
40 |
+
});
|
41 |
+
|
42 |
+
attachmentCache.refresh(attachment_ids);
|
43 |
+
|
44 |
+
return fields;
|
45 |
+
|
46 |
+
};
|
47 |
+
|
48 |
+
module.exports = Scraper;
|
js/src/scraper/scraper.image.js
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var attachmentCache = require( "./../cache/cache.attachments.js" );
|
2 |
+
var scrapers = require( "./../scraper-store.js" );
|
3 |
+
|
4 |
+
var Scraper = function() {};
|
5 |
+
|
6 |
+
Scraper.prototype.scrape = function(fields){
|
7 |
+
|
8 |
+
var that = this;
|
9 |
+
|
10 |
+
var attachment_ids = [];
|
11 |
+
|
12 |
+
fields = _.map(fields, function(field){
|
13 |
+
|
14 |
+
if(field.type !== 'image'){
|
15 |
+
return field;
|
16 |
+
}
|
17 |
+
|
18 |
+
field.content = '';
|
19 |
+
|
20 |
+
var attachment_id = field.$el.find('input[type=hidden]').val();
|
21 |
+
|
22 |
+
attachment_ids.push(attachment_id);
|
23 |
+
|
24 |
+
if(attachmentCache.get(attachment_id, 'attachment')){
|
25 |
+
|
26 |
+
var attachment = attachmentCache.get(attachment_id, 'attachment');
|
27 |
+
|
28 |
+
field.content += '<img src="' + attachment.url + '" alt="' + attachment.alt + '" title="' + attachment.title + '">';
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
return field;
|
34 |
+
});
|
35 |
+
|
36 |
+
attachmentCache.refresh(attachment_ids);
|
37 |
+
|
38 |
+
return fields;
|
39 |
+
|
40 |
+
};
|
41 |
+
|
42 |
+
module.exports = Scraper;
|
js/src/scraper/scraper.taxonomy.js
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var scrapers = require( "./../scraper-store.js" );
|
2 |
+
var helper = require( "./../helper.js" );
|
3 |
+
|
4 |
+
var Scraper = function() {};
|
5 |
+
|
6 |
+
Scraper.prototype.scrape = function(fields){
|
7 |
+
|
8 |
+
var that = this;
|
9 |
+
|
10 |
+
fields = _.map(fields, function(field){
|
11 |
+
|
12 |
+
if(field.type !== 'taxonomy'){
|
13 |
+
return field;
|
14 |
+
}
|
15 |
+
|
16 |
+
var terms = [];
|
17 |
+
|
18 |
+
if( field.$el.find('.acf-taxonomy-field[data-type="multi_select"]').length > 0 ){
|
19 |
+
|
20 |
+
var select2Target = (helper.acf_version >= 5.6)?'select':'input';
|
21 |
+
|
22 |
+
terms = _.pluck(
|
23 |
+
field.$el.find('.acf-taxonomy-field[data-type="multi_select"] ' + select2Target )
|
24 |
+
.select2('data')
|
25 |
+
, 'text'
|
26 |
+
);
|
27 |
+
|
28 |
+
}else if( field.$el.find('.acf-taxonomy-field[data-type="checkbox"]').length > 0 ){
|
29 |
+
|
30 |
+
terms = _.pluck(
|
31 |
+
field.$el.find('.acf-taxonomy-field[data-type="checkbox"] input[type="checkbox"]:checked')
|
32 |
+
.next(),
|
33 |
+
'textContent'
|
34 |
+
);
|
35 |
+
|
36 |
+
}else if( field.$el.find('input[type=checkbox]:checked').length > 0 ){
|
37 |
+
|
38 |
+
terms = _.pluck(
|
39 |
+
field.$el.find('input[type=checkbox]:checked')
|
40 |
+
.parent(),
|
41 |
+
'textContent'
|
42 |
+
);
|
43 |
+
|
44 |
+
}else if( field.$el.find('select option:checked').length > 0 ){
|
45 |
+
|
46 |
+
terms = _.pluck(
|
47 |
+
field.$el.find('select option:checked'),
|
48 |
+
'textContent'
|
49 |
+
);
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
terms = _.map( terms, function(term){ return term.trim(); } );
|
54 |
+
|
55 |
+
if(terms.length>0){
|
56 |
+
field.content = '<ul>\n<li>' + terms.join('</li>\n<li>') + '</li>\n</ul>';
|
57 |
+
}
|
58 |
+
|
59 |
+
return field;
|
60 |
+
});
|
61 |
+
|
62 |
+
return fields;
|
63 |
+
|
64 |
+
};
|
65 |
+
|
66 |
+
module.exports = Scraper;
|
js/src/scraper/scraper.text.js
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var config = require( "./../config/config.js" );
|
2 |
+
var scrapers = require( "./../scraper-store.js" );
|
3 |
+
|
4 |
+
var Scraper = function() {};
|
5 |
+
|
6 |
+
Scraper.prototype.scrape = function(fields){
|
7 |
+
|
8 |
+
var that = this;
|
9 |
+
|
10 |
+
fields = _.map(fields, function(field){
|
11 |
+
|
12 |
+
if(field.type !== 'text'){
|
13 |
+
return field;
|
14 |
+
}
|
15 |
+
|
16 |
+
field.content = field.$el.find('input[type=text][id^=acf]').val();
|
17 |
+
|
18 |
+
field = that.wrapInHeadline(field);
|
19 |
+
|
20 |
+
return field;
|
21 |
+
});
|
22 |
+
|
23 |
+
return fields;
|
24 |
+
|
25 |
+
};
|
26 |
+
|
27 |
+
Scraper.prototype.wrapInHeadline = function(field){
|
28 |
+
|
29 |
+
var level = this.isHeadline(field);
|
30 |
+
if(level){
|
31 |
+
field.content = '<h' + level + '>' + field.content + '</h' + level + '>';
|
32 |
+
}
|
33 |
+
|
34 |
+
return field;
|
35 |
+
};
|
36 |
+
|
37 |
+
Scraper.prototype.isHeadline = function(field){
|
38 |
+
|
39 |
+
var level = false;
|
40 |
+
|
41 |
+
var level = _.find(config.scraper.text.headlines, function(value, key){
|
42 |
+
return field.key === key;
|
43 |
+
});
|
44 |
+
|
45 |
+
//It has to be an integer
|
46 |
+
if(level){
|
47 |
+
level = parseInt(level, 10);
|
48 |
+
}
|
49 |
+
|
50 |
+
//Headlines only exist from h1 to h6
|
51 |
+
if(level<1 || level>6){
|
52 |
+
level = false;
|
53 |
+
}
|
54 |
+
|
55 |
+
return level;
|
56 |
+
|
57 |
+
};
|
58 |
+
|
59 |
+
module.exports = Scraper;
|
js/src/scraper/scraper.textarea.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var scrapers = require( "./../scraper-store.js" );
|
2 |
+
|
3 |
+
var Scraper = function() {};
|
4 |
+
|
5 |
+
Scraper.prototype.scrape = function(fields){
|
6 |
+
|
7 |
+
var that = this;
|
8 |
+
|
9 |
+
fields = _.map(fields, function(field){
|
10 |
+
|
11 |
+
if(field.type !== 'textarea'){
|
12 |
+
return field;
|
13 |
+
}
|
14 |
+
|
15 |
+
field.content = field.$el.find('textarea[id^=acf]').val();
|
16 |
+
|
17 |
+
return field;
|
18 |
+
});
|
19 |
+
|
20 |
+
return fields;
|
21 |
+
|
22 |
+
};
|
23 |
+
|
24 |
+
module.exports = Scraper;
|
js/src/scraper/scraper.url.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var scrapers = require( "./../scraper-store.js" );
|
2 |
+
|
3 |
+
var Scraper = function() {};
|
4 |
+
|
5 |
+
Scraper.prototype.scrape = function(fields){
|
6 |
+
|
7 |
+
var that = this;
|
8 |
+
|
9 |
+
fields = _.map(fields, function(field){
|
10 |
+
|
11 |
+
if(field.type !== 'url'){
|
12 |
+
return field;
|
13 |
+
}
|
14 |
+
|
15 |
+
field.content = field.$el.find('input[type=url][id^=acf]').val();
|
16 |
+
|
17 |
+
return field;
|
18 |
+
});
|
19 |
+
|
20 |
+
return fields;
|
21 |
+
|
22 |
+
};
|
23 |
+
|
24 |
+
module.exports = Scraper;
|
js/src/scraper/scraper.wysiwyg.js
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var scrapers = require( "./../scraper-store.js" );
|
2 |
+
|
3 |
+
var Scraper = function() {};
|
4 |
+
|
5 |
+
Scraper.prototype.scrape = function(fields){
|
6 |
+
|
7 |
+
var that = this;
|
8 |
+
|
9 |
+
fields = _.map(fields, function(field){
|
10 |
+
|
11 |
+
if(field.type !== 'wysiwyg'){
|
12 |
+
return field;
|
13 |
+
}
|
14 |
+
|
15 |
+
field.content = getContentTinyMCE(field);
|
16 |
+
|
17 |
+
return field;
|
18 |
+
});
|
19 |
+
|
20 |
+
return fields;
|
21 |
+
|
22 |
+
};
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Adapted from wp-seo-shortcode-plugin-305.js:115-126
|
26 |
+
*
|
27 |
+
* @returns {string}
|
28 |
+
*/
|
29 |
+
var getContentTinyMCE = function(field) {
|
30 |
+
var textarea = field.$el.find('textarea')[0];
|
31 |
+
|
32 |
+
var editorID = textarea.id;
|
33 |
+
|
34 |
+
var val = textarea.value;
|
35 |
+
|
36 |
+
if ( isTinyMCEAvailable(editorID) ) {
|
37 |
+
val = tinyMCE.get( editorID ) && tinyMCE.get( editorID ).getContent() || '';
|
38 |
+
}
|
39 |
+
|
40 |
+
return val;
|
41 |
+
};
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Adapted from wp-seo-post-scraper-plugin-310.js:196-210
|
45 |
+
*
|
46 |
+
*
|
47 |
+
* @param editorID
|
48 |
+
* @returns {boolean}
|
49 |
+
*/
|
50 |
+
var isTinyMCEAvailable = function(editorID) {
|
51 |
+
if ( typeof tinyMCE === 'undefined' ||
|
52 |
+
typeof tinyMCE.editors === 'undefined' ||
|
53 |
+
tinyMCE.editors.length === 0 ||
|
54 |
+
tinyMCE.get( editorID ) === null ||
|
55 |
+
tinyMCE.get( editorID ).isHidden()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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
2 |
+
/* global YoastSEO */
|
3 |
+
var config = require( "./config/config.js" );
|
4 |
+
var helper = require( "./helper.js" );
|
5 |
+
var collect = require( "./collect/collect.js" );
|
6 |
+
var replaceVars = require( "./replacevars.js" );
|
7 |
+
|
8 |
+
var analysisTimeout = 0;
|
9 |
+
|
10 |
+
var App = function(){
|
11 |
+
|
12 |
+
YoastSEO.app.registerPlugin(config.pluginName, {status: 'ready'});
|
13 |
+
|
14 |
+
YoastSEO.app.registerModification('content', collect.append.bind(collect), config.pluginName);
|
15 |
+
|
16 |
+
this.bindListeners();
|
17 |
+
};
|
18 |
+
|
19 |
+
App.prototype.bindListeners = function(){
|
20 |
+
|
21 |
+
if(helper.acf_version >= 5){
|
22 |
+
var _self = this;
|
23 |
+
acf.add_action('ready', function () {
|
24 |
+
_self.replaceVars = replaceVars.createReplaceVars(collect);
|
25 |
+
acf.add_action('change remove append sortstop', _self.maybeRefresh);
|
26 |
+
acf.add_action('change remove append sortstop', replaceVars.updateReplaceVars.bind(_self, collect, _self.replaceVars));
|
27 |
+
});
|
28 |
+
}else{
|
29 |
+
var fieldSelectors = config.fieldSelectors.slice(0);
|
30 |
+
|
31 |
+
// Ignore Wysiwyg fields because they trigger a refresh in Yoast SEO itself
|
32 |
+
fieldSelectors = _.without(fieldSelectors, 'textarea[id^=wysiwyg-acf]');
|
33 |
+
|
34 |
+
var _self = this;
|
35 |
+
|
36 |
+
jQuery(document).on('acf/setup_fields', function(){
|
37 |
+
this.replaceVars = replaceVars.createReplaceVars(collect);
|
38 |
+
var fields = jQuery('#post-body, #edittag').find(fieldSelectors.join(','));
|
39 |
+
//This would cause faster updates while typing
|
40 |
+
//fields.on('change input', _self.maybeRefresh.bind(_self) );
|
41 |
+
fields.on('change', _self.maybeRefresh.bind(_self) );
|
42 |
+
fields.on('change', replaceVars.updateReplaceVars.bind(_self, collect, _self.replaceVars));
|
43 |
+
|
44 |
+
// Do not ignore Wysiwyg fields for the purpose of Replace Vars.
|
45 |
+
jQuery('textarea[id^=wysiwyg-acf]').on('change', replaceVars.updateReplaceVars.bind(_self, collect, _self.replaceVars));
|
46 |
+
if (YoastSEO.wp._tinyMCEHelper) {
|
47 |
+
jQuery('textarea[id^=wysiwyg-acf]').each( function () {
|
48 |
+
YoastSEO.wp._tinyMCEHelper.addEventHandler(this.id, [ 'input', 'change', 'cut', 'paste' ],
|
49 |
+
replaceVars.updateReplaceVars.bind(_self, collect, _self.replaceVars));
|
50 |
+
});
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
//Also refresh on media close as attachment data might have changed
|
55 |
+
wp.media.frame.on('close', _self.maybeRefresh.bind(_self) );
|
56 |
+
});
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
App.prototype.maybeRefresh = function(){
|
62 |
+
|
63 |
+
if ( analysisTimeout ) {
|
64 |
+
window.clearTimeout(analysisTimeout);
|
65 |
+
}
|
66 |
+
|
67 |
+
analysisTimeout = window.setTimeout( function() {
|
68 |
+
|
69 |
+
if(config.debug){
|
70 |
+
console.log('Recalculate...' + new Date() + '(Internal)');
|
71 |
+
}
|
72 |
+
|
73 |
+
YoastSEO.app.pluginReloaded(config.pluginName);
|
74 |
+
}, config.refreshRate );
|
75 |
+
|
76 |
+
};
|
77 |
+
|
78 |
+
module.exports = App;
|
79 |
+
|
80 |
+
},{"./collect/collect.js":6,"./config/config.js":7,"./helper.js":8,"./replacevars.js":10}],2:[function(require,module,exports){
|
81 |
+
/* global _ */
|
82 |
+
var cache = require( "./cache.js" );
|
83 |
+
|
84 |
+
var refresh = function(attachment_ids){
|
85 |
+
|
86 |
+
var uncached = cache.getUncached(attachment_ids, 'attachment');
|
87 |
+
|
88 |
+
if (uncached.length === 0){
|
89 |
+
return;
|
90 |
+
}
|
91 |
+
|
92 |
+
window.wp.ajax.post('query-attachments', {
|
93 |
+
'query': {
|
94 |
+
'post__in': uncached
|
95 |
+
}
|
96 |
+
}).done(function (attachments) {
|
97 |
+
|
98 |
+
_.each(attachments, function (attachment) {
|
99 |
+
cache.set(attachment.id, attachment, 'attachment');
|
100 |
+
YoastACFAnalysis.maybeRefresh();
|
101 |
+
});
|
102 |
+
|
103 |
+
});
|
104 |
+
|
105 |
+
};
|
106 |
+
|
107 |
+
var get = function( id ){
|
108 |
+
|
109 |
+
var attachment = cache.get(id, 'attachment');
|
110 |
+
|
111 |
+
if(!attachment) return false;
|
112 |
+
|
113 |
+
var changedAttachment = wp.media.attachment( id );
|
114 |
+
|
115 |
+
if( changedAttachment.has('alt') ){
|
116 |
+
attachment.alt = changedAttachment.get('alt');
|
117 |
+
}
|
118 |
+
|
119 |
+
if( changedAttachment.has('title') ){
|
120 |
+
attachment.title = changedAttachment.get('title');
|
121 |
+
}
|
122 |
+
|
123 |
+
return attachment;
|
124 |
+
};
|
125 |
+
|
126 |
+
module.exports = {
|
127 |
+
refresh: refresh,
|
128 |
+
get: get
|
129 |
+
};
|
130 |
+
},{"./cache.js":3}],3:[function(require,module,exports){
|
131 |
+
/* global _ */
|
132 |
+
var Cache = function() {
|
133 |
+
this.clear('all');
|
134 |
+
};
|
135 |
+
|
136 |
+
var _cache;
|
137 |
+
|
138 |
+
Cache.prototype.set = function( id, value, store ) {
|
139 |
+
|
140 |
+
store = typeof store !== 'undefined' ? store : 'default';
|
141 |
+
|
142 |
+
if( !(store in _cache) ){
|
143 |
+
_cache[store] = {};
|
144 |
+
}
|
145 |
+
|
146 |
+
_cache[ store ][ id ] = value;
|
147 |
+
};
|
148 |
+
|
149 |
+
Cache.prototype.get = function( id, store ){
|
150 |
+
|
151 |
+
store = typeof store !== 'undefined' ? store : 'default';
|
152 |
+
|
153 |
+
if ( store in _cache && id in _cache[ store ] ) {
|
154 |
+
return _cache[ store ][ id ];
|
155 |
+
}else{
|
156 |
+
return false;
|
157 |
+
}
|
158 |
+
|
159 |
+
};
|
160 |
+
|
161 |
+
Cache.prototype.getUncached = function(ids, store){
|
162 |
+
|
163 |
+
store = typeof store !== 'undefined' ? store : 'default';
|
164 |
+
|
165 |
+
var that = this;
|
166 |
+
|
167 |
+
ids = _.uniq(ids);
|
168 |
+
|
169 |
+
return ids.filter(function(id){
|
170 |
+
var value = that.get(id, store);
|
171 |
+
return value === false;
|
172 |
+
});
|
173 |
+
|
174 |
+
};
|
175 |
+
|
176 |
+
Cache.prototype.clear = function(store){
|
177 |
+
|
178 |
+
store = typeof store !== 'undefined' ? store : 'default';
|
179 |
+
|
180 |
+
if(store === 'all'){
|
181 |
+
_cache = {};
|
182 |
+
}else{
|
183 |
+
_cache[store] = {};
|
184 |
+
}
|
185 |
+
|
186 |
+
};
|
187 |
+
|
188 |
+
module.exports = new Cache();
|
189 |
+
},{}],4:[function(require,module,exports){
|
190 |
+
var config = require( "./../config/config.js" );
|
191 |
+
var fieldSelectors = config.fieldSelectors;
|
192 |
+
|
193 |
+
var field_data = [];
|
194 |
+
|
195 |
+
var fields = jQuery('#post-body, #edittag').find(fieldSelectors.join(','));
|
196 |
+
|
197 |
+
fields.each(function() {
|
198 |
+
|
199 |
+
var $el = jQuery(this).parents('.field').last();
|
200 |
+
|
201 |
+
field_data.push({
|
202 |
+
$el : $el,
|
203 |
+
key : $el.data('field_key'),
|
204 |
+
name : $el.data('field_name'),
|
205 |
+
type : $el.data('field_type')
|
206 |
+
});
|
207 |
+
|
208 |
+
});
|
209 |
+
|
210 |
+
module.exports = field_data;
|
211 |
+
},{"./../config/config.js":7}],5:[function(require,module,exports){
|
212 |
+
module.exports = function(){
|
213 |
+
return _.map(acf.get_fields(), function(field){
|
214 |
+
|
215 |
+
var field_data = jQuery.extend( true, {}, acf.get_data(jQuery(field)) );
|
216 |
+
field_data.$el = jQuery(field);
|
217 |
+
return field_data;
|
218 |
+
|
219 |
+
});
|
220 |
+
};
|
221 |
+
},{}],6:[function(require,module,exports){
|
222 |
+
/* global acf, _ */
|
223 |
+
|
224 |
+
var config = require( "./../config/config.js" );
|
225 |
+
var helper = require( "./../helper.js" );
|
226 |
+
var scraper_store = require( "./../scraper-store.js" );
|
227 |
+
|
228 |
+
var Collect = function(){
|
229 |
+
|
230 |
+
};
|
231 |
+
|
232 |
+
Collect.prototype.getFieldData = function () {
|
233 |
+
var field_data = this.filterBroken(this.filterBlacklistName(this.filterBlacklistType(this.getData())));
|
234 |
+
|
235 |
+
var used_types = _.uniq(_.pluck(field_data, 'type'));
|
236 |
+
|
237 |
+
if(config.debug) {
|
238 |
+
console.log('Used types:')
|
239 |
+
console.log(used_types);
|
240 |
+
}
|
241 |
+
|
242 |
+
_.each(used_types, function(type){
|
243 |
+
field_data = scraper_store.getScraper(type).scrape(field_data);
|
244 |
+
});
|
245 |
+
|
246 |
+
return field_data;
|
247 |
+
};
|
248 |
+
|
249 |
+
Collect.prototype.append = function(data){
|
250 |
+
|
251 |
+
if(config.debug){
|
252 |
+
console.log('Recalculate...' + new Date());
|
253 |
+
}
|
254 |
+
|
255 |
+
var field_data = this.getFieldData();
|
256 |
+
|
257 |
+
_.each(field_data, function(field){
|
258 |
+
|
259 |
+
if(typeof field.content !== 'undefined' && field.content !== ''){
|
260 |
+
data += '\n' + field.content;
|
261 |
+
}
|
262 |
+
|
263 |
+
});
|
264 |
+
|
265 |
+
if(config.debug){
|
266 |
+
console.log('Field data:')
|
267 |
+
console.table(field_data);
|
268 |
+
|
269 |
+
console.log('Data:')
|
270 |
+
console.log(data);
|
271 |
+
}
|
272 |
+
|
273 |
+
return data;
|
274 |
+
|
275 |
+
};
|
276 |
+
|
277 |
+
Collect.prototype.getData = function(){
|
278 |
+
|
279 |
+
if(helper.acf_version >= 5){
|
280 |
+
return require( "./collect-v5.js" )();
|
281 |
+
}else{
|
282 |
+
return require( "./collect-v4.js" );
|
283 |
+
}
|
284 |
+
|
285 |
+
};
|
286 |
+
|
287 |
+
Collect.prototype.filterBlacklistType = function(field_data){
|
288 |
+
return _.filter(field_data, function(field){
|
289 |
+
return !_.contains(config.blacklistType, field.type);
|
290 |
+
});
|
291 |
+
};
|
292 |
+
|
293 |
+
Collect.prototype.filterBlacklistName = function(field_data){
|
294 |
+
return _.filter(field_data, function(field){
|
295 |
+
return !_.contains(config.blacklistName, field.name);
|
296 |
+
});
|
297 |
+
};
|
298 |
+
|
299 |
+
Collect.prototype.filterBroken = function(field_data){
|
300 |
+
return _.filter(field_data, function(field){
|
301 |
+
return ('key' in field);
|
302 |
+
});
|
303 |
+
};
|
304 |
+
|
305 |
+
module.exports = new Collect();
|
306 |
+
|
307 |
+
},{"./../config/config.js":7,"./../helper.js":8,"./../scraper-store.js":11,"./collect-v4.js":4,"./collect-v5.js":5}],7:[function(require,module,exports){
|
308 |
+
module.exports = YoastACFAnalysisConfig;
|
309 |
+
},{}],8:[function(require,module,exports){
|
310 |
+
var config = require( "./config/config.js" );
|
311 |
+
|
312 |
+
module.exports = {
|
313 |
+
acf_version: parseFloat(config.acfVersion, 10)
|
314 |
+
};
|
315 |
+
},{"./config/config.js":7}],9:[function(require,module,exports){
|
316 |
+
/* global jQuery, YoastACFAnalysis: true */
|
317 |
+
|
318 |
+
var App = require( "./app.js" );
|
319 |
+
|
320 |
+
(function($) {
|
321 |
+
|
322 |
+
$(document).ready(function() {
|
323 |
+
|
324 |
+
if( "undefined" !== typeof YoastSEO){
|
325 |
+
|
326 |
+
YoastACFAnalysis = new App();
|
327 |
+
|
328 |
+
}
|
329 |
+
|
330 |
+
});
|
331 |
+
|
332 |
+
}(jQuery));
|
333 |
+
},{"./app.js":1}],10:[function(require,module,exports){
|
334 |
+
/* global _, jQuery, YoastSEO, YoastReplaceVarPlugin */
|
335 |
+
|
336 |
+
var config = require( "./config/config.js" );
|
337 |
+
|
338 |
+
var ReplaceVar = YoastReplaceVarPlugin.ReplaceVar;
|
339 |
+
|
340 |
+
var supportedTypes = ['email', 'text', 'textarea', 'url', 'wysiwyg'];
|
341 |
+
|
342 |
+
var createReplaceVars = function (collect) {
|
343 |
+
if (ReplaceVar === undefined) {
|
344 |
+
if (config.debug) {
|
345 |
+
console.log('Replacing ACF variables in the Snippet Window requires the latest version of wordpress-seo.');
|
346 |
+
}
|
347 |
+
return;
|
348 |
+
}
|
349 |
+
|
350 |
+
fieldData = _.filter(collect.getFieldData(), function (field) { return _.contains(supportedTypes, field.type) });
|
351 |
+
replaceVars = {}
|
352 |
+
|
353 |
+
_.each(fieldData, function(field) {
|
354 |
+
// Remove HTML tags using jQuery in case of a wysiwyg field.
|
355 |
+
var content = (field.type === 'wysiwyg') ? jQuery( jQuery.parseHTML( field.content) ).text() : field.content;
|
356 |
+
|
357 |
+
replaceVars[field.name] = new ReplaceVar( '%%cf_'+field.name+'%%', content, { source: 'direct' } );
|
358 |
+
YoastSEO.wp.replaceVarsPlugin.addReplacement( replaceVars[field.name] );
|
359 |
+
if (config.debug) {
|
360 |
+
console.log("Created ReplaceVar for: ", field.name, " with: ", content, replaceVars[field.name]);
|
361 |
+
}
|
362 |
+
});
|
363 |
+
|
364 |
+
return replaceVars;
|
365 |
+
};
|
366 |
+
|
367 |
+
var updateReplaceVars = function (collect, replace_vars) {
|
368 |
+
if (ReplaceVar === undefined) {
|
369 |
+
if (config.debug) {
|
370 |
+
console.log('Replacing ACF variables in the Snippet Window requires the latest version of wordpress-seo.');
|
371 |
+
}
|
372 |
+
return;
|
373 |
+
}
|
374 |
+
|
375 |
+
fieldData = _.filter(collect.getFieldData(), function (field) { return _.contains(supportedTypes, field.type) });
|
376 |
+
_.each(fieldData, function(field) {
|
377 |
+
// Remove HTML tags using jQuery in case of a wysiwyg field.
|
378 |
+
var content = (field.type === 'wysiwyg') ? jQuery(jQuery.parseHTML(field.content)).text() : field.content;
|
379 |
+
|
380 |
+
replaceVars[field.name].replacement = content;
|
381 |
+
if (config.debug) {
|
382 |
+
console.log("Updated ReplaceVar for: ", field.name, " with: ", content, replaceVars[field.name]);
|
383 |
+
}
|
384 |
+
});
|
385 |
+
};
|
386 |
+
|
387 |
+
module.exports = {
|
388 |
+
createReplaceVars: createReplaceVars,
|
389 |
+
updateReplaceVars: updateReplaceVars
|
390 |
+
};
|
391 |
+
|
392 |
+
},{"./config/config.js":7}],11:[function(require,module,exports){
|
393 |
+
/* global _ */
|
394 |
+
var config = require( "./config/config.js" );
|
395 |
+
|
396 |
+
var scraperObjects = {
|
397 |
+
|
398 |
+
//Basic
|
399 |
+
'text': require( "./scraper/scraper.text.js" ),
|
400 |
+
'textarea': require( "./scraper/scraper.textarea.js" ),
|
401 |
+
'email': require( "./scraper/scraper.email.js" ),
|
402 |
+
'url': require( "./scraper/scraper.url.js" ),
|
403 |
+
|
404 |
+
//Content
|
405 |
+
'wysiwyg': require( "./scraper/scraper.wysiwyg.js" ),
|
406 |
+
//TODO: Add oembed handler
|
407 |
+
'image': require( "./scraper/scraper.image.js" ),
|
408 |
+
'gallery': require( "./scraper/scraper.gallery.js" ),
|
409 |
+
|
410 |
+
//Choice
|
411 |
+
//TODO: select, checkbox, radio
|
412 |
+
|
413 |
+
//Relational
|
414 |
+
'taxonomy': require( "./scraper/scraper.taxonomy.js" )
|
415 |
+
|
416 |
+
//jQuery
|
417 |
+
//TODO: google_map, date_picker, color_picker
|
418 |
+
|
419 |
+
};
|
420 |
+
|
421 |
+
var scrapers = {};
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Set a scraper object on the store. Existing scrapers will be overwritten.
|
425 |
+
*
|
426 |
+
* @param {Object} scraper
|
427 |
+
* @param {string} type
|
428 |
+
*/
|
429 |
+
var setScraper = function(scraper, type){
|
430 |
+
|
431 |
+
if(config.debug && hasScraper(type)){
|
432 |
+
console.warn('Scraper for "' + type + '" already exists and will be overwritten.' );
|
433 |
+
}
|
434 |
+
|
435 |
+
scrapers[type] = scraper;
|
436 |
+
|
437 |
+
return scraper;
|
438 |
+
};
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Returns the scraper object for a field type.
|
442 |
+
* If there is no scraper object for this field type a no-op scraper is returned.
|
443 |
+
*
|
444 |
+
* @param {string} type
|
445 |
+
* @returns {Object}
|
446 |
+
*/
|
447 |
+
var getScraper = function(type){
|
448 |
+
|
449 |
+
if(hasScraper(type)){
|
450 |
+
return scrapers[type];
|
451 |
+
}else if(type in scraperObjects){
|
452 |
+
return setScraper(new scraperObjects[type](), type);
|
453 |
+
}else{
|
454 |
+
//If we do not have a scraper just pass the fields through so it will be filtered out by the app.
|
455 |
+
return {
|
456 |
+
scrape: function(fields){
|
457 |
+
if(config.debug){
|
458 |
+
console.warn('No Scraper for field type: ' + type );
|
459 |
+
}
|
460 |
+
return fields;
|
461 |
+
}
|
462 |
+
};
|
463 |
+
}
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* Checks if there already is a scraper for a field type in the store.
|
468 |
+
*
|
469 |
+
* @param {string} type
|
470 |
+
* @returns {boolean}
|
471 |
+
*/
|
472 |
+
var hasScraper = function(type){
|
473 |
+
|
474 |
+
return (type in scrapers);
|
475 |
+
|
476 |
+
};
|
477 |
+
|
478 |
+
module.exports = {
|
479 |
+
|
480 |
+
setScraper: setScraper,
|
481 |
+
getScraper: getScraper
|
482 |
+
|
483 |
+
};
|
484 |
+
},{"./config/config.js":7,"./scraper/scraper.email.js":12,"./scraper/scraper.gallery.js":13,"./scraper/scraper.image.js":14,"./scraper/scraper.taxonomy.js":15,"./scraper/scraper.text.js":16,"./scraper/scraper.textarea.js":17,"./scraper/scraper.url.js":18,"./scraper/scraper.wysiwyg.js":19}],12:[function(require,module,exports){
|
485 |
+
var scrapers = require( "./../scraper-store.js" );
|
486 |
+
|
487 |
+
var Scraper = function() {};
|
488 |
+
|
489 |
+
Scraper.prototype.scrape = function(fields){
|
490 |
+
|
491 |
+
var that = this;
|
492 |
+
|
493 |
+
fields = _.map(fields, function(field){
|
494 |
+
|
495 |
+
if(field.type !== 'email'){
|
496 |
+
return field;
|
497 |
+
}
|
498 |
+
|
499 |
+
field.content = field.$el.find('input[type=email][id^=acf]').val();
|
500 |
+
|
501 |
+
return field;
|
502 |
+
});
|
503 |
+
|
504 |
+
return fields;
|
505 |
+
|
506 |
+
};
|
507 |
+
|
508 |
+
module.exports = Scraper;
|
509 |
+
},{"./../scraper-store.js":11}],13:[function(require,module,exports){
|
510 |
+
var attachmentCache = require( "./../cache/cache.attachments.js" );
|
511 |
+
var scrapers = require( "./../scraper-store.js" );
|
512 |
+
|
513 |
+
var Scraper = function() {};
|
514 |
+
|
515 |
+
Scraper.prototype.scrape = function(fields){
|
516 |
+
|
517 |
+
var that = this;
|
518 |
+
|
519 |
+
var attachment_ids = [];
|
520 |
+
|
521 |
+
fields = _.map(fields, function(field){
|
522 |
+
|
523 |
+
if(field.type !== 'gallery'){
|
524 |
+
return field;
|
525 |
+
}
|
526 |
+
|
527 |
+
field.content = '';
|
528 |
+
|
529 |
+
field.$el.find('.acf-gallery-attachment input[type=hidden]').each( function (index, element){
|
530 |
+
|
531 |
+
//TODO: Is this the best way to get the attachment id?
|
532 |
+
var attachment_id = jQuery( this ).val();
|
533 |
+
|
534 |
+
//Collect all attachment ids for cache refresh
|
535 |
+
attachment_ids.push(attachment_id);
|
536 |
+
|
537 |
+
//If we have the attachment data in the cache we can return a useful value
|
538 |
+
if(attachmentCache.get(attachment_id, 'attachment')){
|
539 |
+
|
540 |
+
var attachment = attachmentCache.get(attachment_id, 'attachment');
|
541 |
+
|
542 |
+
field.content += '<img src="' + attachment.url + '" alt="' + attachment.alt + '" title="' + attachment.title + '">';
|
543 |
+
|
544 |
+
}
|
545 |
+
|
546 |
+
});
|
547 |
+
|
548 |
+
return field;
|
549 |
+
});
|
550 |
+
|
551 |
+
attachmentCache.refresh(attachment_ids);
|
552 |
+
|
553 |
+
return fields;
|
554 |
+
|
555 |
+
};
|
556 |
+
|
557 |
+
module.exports = Scraper;
|
558 |
+
},{"./../cache/cache.attachments.js":2,"./../scraper-store.js":11}],14:[function(require,module,exports){
|
559 |
+
var attachmentCache = require( "./../cache/cache.attachments.js" );
|
560 |
+
var scrapers = require( "./../scraper-store.js" );
|
561 |
+
|
562 |
+
var Scraper = function() {};
|
563 |
+
|
564 |
+
Scraper.prototype.scrape = function(fields){
|
565 |
+
|
566 |
+
var that = this;
|
567 |
+
|
568 |
+
var attachment_ids = [];
|
569 |
+
|
570 |
+
fields = _.map(fields, function(field){
|
571 |
+
|
572 |
+
if(field.type !== 'image'){
|
573 |
+
return field;
|
574 |
+
}
|
575 |
+
|
576 |
+
field.content = '';
|
577 |
+
|
578 |
+
var attachment_id = field.$el.find('input[type=hidden]').val();
|
579 |
+
|
580 |
+
attachment_ids.push(attachment_id);
|
581 |
+
|
582 |
+
if(attachmentCache.get(attachment_id, 'attachment')){
|
583 |
+
|
584 |
+
var attachment = attachmentCache.get(attachment_id, 'attachment');
|
585 |
+
|
586 |
+
field.content += '<img src="' + attachment.url + '" alt="' + attachment.alt + '" title="' + attachment.title + '">';
|
587 |
+
|
588 |
+
}
|
589 |
+
|
590 |
+
|
591 |
+
return field;
|
592 |
+
});
|
593 |
+
|
594 |
+
attachmentCache.refresh(attachment_ids);
|
595 |
+
|
596 |
+
return fields;
|
597 |
+
|
598 |
+
};
|
599 |
+
|
600 |
+
module.exports = Scraper;
|
601 |
+
},{"./../cache/cache.attachments.js":2,"./../scraper-store.js":11}],15:[function(require,module,exports){
|
602 |
+
var scrapers = require( "./../scraper-store.js" );
|
603 |
+
var helper = require( "./../helper.js" );
|
604 |
+
|
605 |
+
var Scraper = function() {};
|
606 |
+
|
607 |
+
Scraper.prototype.scrape = function(fields){
|
608 |
+
|
609 |
+
var that = this;
|
610 |
+
|
611 |
+
fields = _.map(fields, function(field){
|
612 |
+
|
613 |
+
if(field.type !== 'taxonomy'){
|
614 |
+
return field;
|
615 |
+
}
|
616 |
+
|
617 |
+
var terms = [];
|
618 |
+
|
619 |
+
if( field.$el.find('.acf-taxonomy-field[data-type="multi_select"]').length > 0 ){
|
620 |
+
|
621 |
+
var select2Target = (helper.acf_version >= 5.6)?'select':'input';
|
622 |
+
|
623 |
+
terms = _.pluck(
|
624 |
+
field.$el.find('.acf-taxonomy-field[data-type="multi_select"] ' + select2Target )
|
625 |
+
.select2('data')
|
626 |
+
, 'text'
|
627 |
+
);
|
628 |
+
|
629 |
+
}else if( field.$el.find('.acf-taxonomy-field[data-type="checkbox"]').length > 0 ){
|
630 |
+
|
631 |
+
terms = _.pluck(
|
632 |
+
field.$el.find('.acf-taxonomy-field[data-type="checkbox"] input[type="checkbox"]:checked')
|
633 |
+
.next(),
|
634 |
+
'textContent'
|
635 |
+
);
|
636 |
+
|
637 |
+
}else if( field.$el.find('input[type=checkbox]:checked').length > 0 ){
|
638 |
+
|
639 |
+
terms = _.pluck(
|
640 |
+
field.$el.find('input[type=checkbox]:checked')
|
641 |
+
.parent(),
|
642 |
+
'textContent'
|
643 |
+
);
|
644 |
+
|
645 |
+
}else if( field.$el.find('select option:checked').length > 0 ){
|
646 |
+
|
647 |
+
terms = _.pluck(
|
648 |
+
field.$el.find('select option:checked'),
|
649 |
+
'textContent'
|
650 |
+
);
|
651 |
+
|
652 |
+
}
|
653 |
+
|
654 |
+
terms = _.map( terms, function(term){ return term.trim(); } );
|
655 |
+
|
656 |
+
if(terms.length>0){
|
657 |
+
field.content = '<ul>\n<li>' + terms.join('</li>\n<li>') + '</li>\n</ul>';
|
658 |
+
}
|
659 |
+
|
660 |
+
return field;
|
661 |
+
});
|
662 |
+
|
663 |
+
return fields;
|
664 |
+
|
665 |
+
};
|
666 |
+
|
667 |
+
module.exports = Scraper;
|
668 |
+
},{"./../helper.js":8,"./../scraper-store.js":11}],16:[function(require,module,exports){
|
669 |
+
var config = require( "./../config/config.js" );
|
670 |
+
var scrapers = require( "./../scraper-store.js" );
|
671 |
+
|
672 |
+
var Scraper = function() {};
|
673 |
+
|
674 |
+
Scraper.prototype.scrape = function(fields){
|
675 |
+
|
676 |
+
var that = this;
|
677 |
+
|
678 |
+
fields = _.map(fields, function(field){
|
679 |
+
|
680 |
+
if(field.type !== 'text'){
|
681 |
+
return field;
|
682 |
+
}
|
683 |
+
|
684 |
+
field.content = field.$el.find('input[type=text][id^=acf]').val();
|
685 |
+
|
686 |
+
field = that.wrapInHeadline(field);
|
687 |
+
|
688 |
+
return field;
|
689 |
+
});
|
690 |
+
|
691 |
+
return fields;
|
692 |
+
|
693 |
+
};
|
694 |
+
|
695 |
+
Scraper.prototype.wrapInHeadline = function(field){
|
696 |
+
|
697 |
+
var level = this.isHeadline(field);
|
698 |
+
if(level){
|
699 |
+
field.content = '<h' + level + '>' + field.content + '</h' + level + '>';
|
700 |
+
}
|
701 |
+
|
702 |
+
return field;
|
703 |
+
};
|
704 |
+
|
705 |
+
Scraper.prototype.isHeadline = function(field){
|
706 |
+
|
707 |
+
var level = false;
|
708 |
+
|
709 |
+
var level = _.find(config.scraper.text.headlines, function(value, key){
|
710 |
+
return field.key === key;
|
711 |
+
});
|
712 |
+
|
713 |
+
//It has to be an integer
|
714 |
+
if(level){
|
715 |
+
level = parseInt(level, 10);
|
716 |
+
}
|
717 |
+
|
718 |
+
//Headlines only exist from h1 to h6
|
719 |
+
if(level<1 || level>6){
|
720 |
+
level = false;
|
721 |
+
}
|
722 |
+
|
723 |
+
return level;
|
724 |
+
|
725 |
+
};
|
726 |
+
|
727 |
+
module.exports = Scraper;
|
728 |
+
},{"./../config/config.js":7,"./../scraper-store.js":11}],17:[function(require,module,exports){
|
729 |
+
var scrapers = require( "./../scraper-store.js" );
|
730 |
+
|
731 |
+
var Scraper = function() {};
|
732 |
+
|
733 |
+
Scraper.prototype.scrape = function(fields){
|
734 |
+
|
735 |
+
var that = this;
|
736 |
+
|
737 |
+
fields = _.map(fields, function(field){
|
738 |
+
|
739 |
+
if(field.type !== 'textarea'){
|
740 |
+
return field;
|
741 |
+
}
|
742 |
+
|
743 |
+
field.content = field.$el.find('textarea[id^=acf]').val();
|
744 |
+
|
745 |
+
return field;
|
746 |
+
});
|
747 |
+
|
748 |
+
return fields;
|
749 |
+
|
750 |
+
};
|
751 |
+
|
752 |
+
module.exports = Scraper;
|
753 |
+
},{"./../scraper-store.js":11}],18:[function(require,module,exports){
|
754 |
+
var scrapers = require( "./../scraper-store.js" );
|
755 |
+
|
756 |
+
var Scraper = function() {};
|
757 |
+
|
758 |
+
Scraper.prototype.scrape = function(fields){
|
759 |
+
|
760 |
+
var that = this;
|
761 |
+
|
762 |
+
fields = _.map(fields, function(field){
|
763 |
+
|
764 |
+
if(field.type !== 'url'){
|
765 |
+
return field;
|
766 |
+
}
|
767 |
+
|
768 |
+
field.content = field.$el.find('input[type=url][id^=acf]').val();
|
769 |
+
|
770 |
+
return field;
|
771 |
+
});
|
772 |
+
|
773 |
+
return fields;
|
774 |
+
|
775 |
+
};
|
776 |
+
|
777 |
+
module.exports = Scraper;
|
778 |
+
},{"./../scraper-store.js":11}],19:[function(require,module,exports){
|
779 |
+
var scrapers = require( "./../scraper-store.js" );
|
780 |
+
|
781 |
+
var Scraper = function() {};
|
782 |
+
|
783 |
+
Scraper.prototype.scrape = function(fields){
|
784 |
+
|
785 |
+
var that = this;
|
786 |
+
|
787 |
+
fields = _.map(fields, function(field){
|
788 |
+
|
789 |
+
if(field.type !== 'wysiwyg'){
|
790 |
+
return field;
|
791 |
+
}
|
792 |
+
|
793 |
+
field.content = getContentTinyMCE(field);
|
794 |
+
|
795 |
+
return field;
|
796 |
+
});
|
797 |
+
|
798 |
+
return fields;
|
799 |
+
|
800 |
+
};
|
801 |
+
|
802 |
+
/**
|
803 |
+
* Adapted from wp-seo-shortcode-plugin-305.js:115-126
|
804 |
+
*
|
805 |
+
* @returns {string}
|
806 |
+
*/
|
807 |
+
var getContentTinyMCE = function(field) {
|
808 |
+
var textarea = field.$el.find('textarea')[0];
|
809 |
+
|
810 |
+
var editorID = textarea.id;
|
811 |
+
|
812 |
+
var val = textarea.value;
|
813 |
+
|
814 |
+
if ( isTinyMCEAvailable(editorID) ) {
|
815 |
+
val = tinyMCE.get( editorID ) && tinyMCE.get( editorID ).getContent() || '';
|
816 |
+
}
|
817 |
+
|
818 |
+
return val;
|
819 |
+
};
|
820 |
+
|
821 |
+
/**
|
822 |
+
* Adapted from wp-seo-post-scraper-plugin-310.js:196-210
|
823 |
+
*
|
824 |
+
*
|
825 |
+
* @param editorID
|
826 |
+
* @returns {boolean}
|
827 |
+
*/
|
828 |
+
var isTinyMCEAvailable = function(editorID) {
|
829 |
+
if ( typeof tinyMCE === 'undefined' ||
|
830 |
+
typeof tinyMCE.editors === 'undefined' ||
|
831 |
+
tinyMCE.editors.length === 0 ||
|
832 |
+
tinyMCE.get( editorID ) === null ||
|
833 |
+
tinyMCE.get( editorID ).isHidden() ) {
|
834 |
+
return false;
|
835 |
+
}
|
836 |
+
|
837 |
+
return true;
|
838 |
+
};
|
839 |
+
|
840 |
+
module.exports = Scraper;
|
841 |
+
},{"./../scraper-store.js":11}]},{},[9])
|
842 |
+
//# sourceMappingURL=data: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HJvdG90eXBlLm1heWJlUmVmcmVzaCA9IGZ1bmN0aW9uKCl7XG5cbiAgICBpZiAoIGFuYWx5c2lzVGltZW91dCApIHtcbiAgICAgICAgd2luZG93LmNsZWFyVGltZW91dChhbmFseXNpc1RpbWVvdXQpO1xuICAgIH1cblxuICAgIGFuYWx5c2lzVGltZW91dCA9IHdpbmRvdy5zZXRUaW1lb3V0KCBmdW5jdGlvbigpIHtcblxuICAgICAgICBpZihjb25maWcuZGVidWcpe1xuICAgICAgICAgICAgY29uc29sZS5sb2coJ1JlY2FsY3VsYXRlLi4uJyArIG5ldyBEYXRlKCkgKyAnKEludGVybmFsKScpO1xuICAgICAgICB9XG5cbiAgICAgICAgWW9hc3RTRU8uYXBwLnBsdWdpblJlbG9hZGVkKGNvbmZpZy5wbHVnaW5OYW1lKTtcbiAgICB9LCBjb25maWcucmVmcmVzaFJhdGUgKTtcblxufTtcblxubW9kdWxlLmV4cG9ydHMgPSBBcHA7XG4iLCIvKiBnbG9iYWwgXyAqL1xudmFyIGNhY2hlID0gcmVxdWlyZSggXCIuL2NhY2hlLmpzXCIgKTtcblxudmFyIHJlZnJlc2ggPSBmdW5jdGlvbihhdHRhY2htZW50X2lkcyl7XG5cbiAgICB2YXIgdW5jYWNoZWQgPSBjYWNoZS5nZXRVbmNhY2hlZChhdHRhY2htZW50X2lkcywgJ2F0dGFjaG1lbnQnKTtcblxuICAgIGlmICh1bmNhY2hlZC5sZW5ndGggPT09IDApe1xuICAgICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgd2luZG93LndwLmFqYXgucG9zdCgncXVlcnktYXR0YWNobWVudHMnLCB7XG4gICAgICAgICdxdWVyeSc6IHtcbiAgICAgICAgICAgICdwb3N0X19pbic6IHVuY2FjaGVkXG4gICAgICAgIH1cbiAgICB9KS5kb25lKGZ1bmN0aW9uIChhdHRhY2htZW50cykge1xuXG4gICAgICAgIF8uZWFjaChhdHRhY2htZW50cywgZnVuY3Rpb24gKGF0dGFjaG1lbnQpI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xuICAgIHZhciBhdHRhY2htZW50X2lkcyA9IFtdO1xuXG4gICAgZmllbGRzID0gXy5tYXAoZmllbGRzLCBmdW5jdGlvbihmaWVsZCl7XG5cbiAgICAgICAgaWYoZmllbGQudHlwZSAhPT0gJ2ltYWdlJyl7XG4gICAgICAgICAgICByZXR1cm4gZmllbGQ7XG4gICAgICAgIH1cblxuICAgICAgICBmaWVsZC5jb250ZW50ID0gJyc7XG5cbiAgICAgICAgdmFyIGF0dGFjaG1lbnRfaWQgPSBmaWVsZC4kZWwuZmluZCgnaW5wdXRbdHlwZT1oaWRkZW5dJykudmFsKCk7XG5cbiAgICAgICAgYXR0YWNobWVudF9pZHMucHVzaChhdHRhY2htZW50X2lkKTtcblxuICAgICAgICBpZihhdHRhY2htZW50Q2FjaGUuZ2V0KGF0dGFjaG1lbnRfaWQsICdhdHRhY2htZW50Jykpe1xuXG4gICAgICAgICAgICB2YXIgYXR0YWNobWVudCA9IGF0dGFjaG1lbnRDYWNoZS5nZXQoYXR0YWNobWVudF9pZCwgJ2F0dGFjaG1lbnQnKTtcblxuICAgICAgICAgICAgZmllbGQuY29udGVudCArPSAnPGltZyBzcmM9XCInICsgYXR0YWNobWVudC51cmwgKyAnXCIgYWx0PVwiJyArIGF0dGFjaG1lbnQuYWx0ICsgJ1wiIHRpdGxlPVwiJyArIGF0dGFjaG1lbnQudGl0bGUgKyAnXCI+JztcblxuICAgICAgICB9XG5cblxuICAgICAgICByZXR1cm4gZmllbGQ7XG4gICAgfSk7XG5cbiAgICBhdHRhY2htZW50Q2FjaGUucmVmcmVzaChhdHRhY2htZW50X2lkcyk7XG5cbiAgICByZXR1cm4gZmllbGRzO1xuXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IFNjcmFwZXI7IiwidmFyIHNjcmFwZXJzID0gcmVxdWlyZSggXCIuLy4uL3NjcmFwZXItc3RvcmUuanNcIiApO1xuXG52YXIgU2NyYXBlciA9IGZ1bmN0aW9uKCkge307XG5cblNjcmFwZXIucHJvdG90eXBlLnNjcmFwZSA9IGZ1bmN0aW9uKGZpZWxkcyl7XG5cbiAgICB2YXIgdGhhdCA9IHRoaXM7XG5cbiAgICBmaWVsZHMgPSBfLm1hcChmaWVsZHMsIGZ1bmN0aW9uKGZpZWxkKXtcblxuICAgICAgICBpZihmaWVsZC50eXBlICE9PSAndGF4b25vbXknKXtcbiAgICAgICAgICAgIHJldHVybiBmaWVsZDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB0ZXJtcyA9IFtdO1xuXG4gICAgICAgIGlmKCBmaWVsZC4kZWwuZmluZCgnLmFjZi10YXhvbm9teS1maWVsZFtkYXRhLXR5cGU9XCJtdWx0aV9zZWxlY3RcIl0nKS5sZW5ndGggPiAwICl7XG5cbiAgICAgICAgICAgIHRlcm1zID0gXy5wbHVjayhcbiAgICAgICAgICAgICAgICBmaWVsZC4kZWwuZmluZCgnLmFjZi10YXhvbm9teS1maWVsZFtkYXRhLXR5cGU9XCJtdWx0aV9zZWxlY3RcIl0gaW5wdXQnKVxuICAgICAgICAgICAgICAgICAgICAuc2VsZWN0MignZGF0YScpXG4gICAgICAgICAgICAgICAgLCAndGV4dCdcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgfWVsc2UgaWYoIGZpZWxkLiRlbC5maW5kKCcuYWNmLXRheG9ub215LWZpZWxkW2RhdGEtdHlwZT1cImNoZWNrYm94XCJdJykubGVuZ3RoID4gMCApe1xuXG4gICAgICAgICAgICB0ZXJtcyA9IF8ucGx1Y2soXG4gICAgICAgICAgICAgICAgZmllbGQuJGVsLmZpbmQoJy5hY2YtdGF4b25vbXktZmllbGRbZGF0YS10eXBlPVwiY2hlY2tib3hcIl0gaW5wdXRbdHlwZT1cImNoZWNrYm94XCJdOmNoZWNrZWQnKVxuICAgICAgICAgICAgICAgICAgICAubmV4dCgpLFxuICAgICAgICAgICAgICAgICd0ZXh0Q29udGVudCdcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgfWVsc2UgaWYoIGZpZWxkLiRlbC5maW5kKCdpbnB1dFt0eXBlPWNoZWNrYm94XTpjaGVja2VkJykubGVuZ3RoID4gMCApe1xuXG4gICAgICAgICAgICB0ZXJtcyA9IF8ucGx1Y2soXG4gICAgICAgICAgICAgICAgZmllbGQuJGVsLmZpbmQoJ2lucHV0W3R5cGU9Y2hlY2tib3hdOmNoZWNrZWQnKVxuICAgICAgICAgICAgICAgICAgICAucGFyZW50KCksXG4gICAgICAgICAgICAgICAgJ3RleHRDb250ZW50J1xuICAgICAgICAgICAgKTtcblxuICAgICAgICB9ZWxzZSBpZiggZmllbGQuJGVsLmZpbmQoJ3NlbGVjdCBvcHRpb246Y2hlY2tlZCcpLmxlbmd0aCA+IDAgKXtcblxuICAgICAgICAgICAgdGVybXMgPSBfLnBsdWNrKFxuICAgICAgICAgICAgICAgIGZpZWxkLiRlbC5maW5kKCdzZWxlY3Qgb3B0aW9uOmNoZWNrZWQnKSxcbiAgICAgICAgICAgICAgICAndGV4dENvbnRlbnQnXG4gICAgICAgICAgICApO1xuXG4gICAgICAgIH1cblxuICAgICAgICB0ZXJtcyA9IF8ubWFwKCB0ZXJtcywgZnVuY3Rpb24odGVybSl7IHJldHVybiB0ZXJtLnRyaW0oKTsgfSApO1xuXG4gICAgICAgIGlmKHRlcm1zLmxlbmd0aD4wKXtcbiAgICAgICAgICAgIGZpZWxkLmNvbnRlbnQgPSAnPHVsPlxcbjxsaT4nICsgdGVybXMuam9pbignPC9saT5cXG48bGk+JykgKyAnPC9saT5cXG48L3VsPic7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZmllbGQ7XG4gICAgfSk7XG5cbiAgICByZXR1cm4gZmllbGRzO1xuXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IFNjcmFwZXI7IiwidmFyIGNvbmZpZyA9IHJlcXVpcmUoIFwiLi8uLi9jb25maWcvY29uZmlnLmpzXCIgKTtcbnZhciBzY3JhcGVycyA9IHJlcXVpcmUoIFwiLi8uLi9zY3JhcGVy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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
package-lock.json
ADDED
@@ -0,0 +1,2332 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ysis",
|
3 |
+
"version": "2.0.0-dev",
|
4 |
+
"lockfileVersion": 1,
|
5 |
+
"dependencies": {
|
6 |
+
"acorn": {
|
7 |
+
"version": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz",
|
8 |
+
"integrity": "sha1-7c2jvZN+dVZBDULtWGD2c5nHlMA=",
|
9 |
+
"dev": true
|
10 |
+
},
|
11 |
+
"adm-zip": {
|
12 |
+
"version": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz",
|
13 |
+
"integrity": "sha1-hgbCy/HEJs6MjsABdER/1Jtur8E=",
|
14 |
+
"dev": true
|
15 |
+
},
|
16 |
+
"agent-base": {
|
17 |
+
"version": "https://registry.npmjs.org/agent-base/-/agent-base-2.0.1.tgz",
|
18 |
+
"integrity": "sha1-vY+ehqjrIh//oHvRS+/VXfFCgV4=",
|
19 |
+
"dev": true
|
20 |
+
},
|
21 |
+
"align-text": {
|
22 |
+
"version": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
|
23 |
+
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
|
24 |
+
"dev": true
|
25 |
+
},
|
26 |
+
"alter": {
|
27 |
+
"version": "https://registry.npmjs.org/alter/-/alter-0.2.0.tgz",
|
28 |
+
"integrity": "sha1-x1iICGF1cgNKrmJICvJrHU0cs80=",
|
29 |
+
"dev": true
|
30 |
+
},
|
31 |
+
"amdefine": {
|
32 |
+
"version": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
|
33 |
+
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
|
34 |
+
"dev": true,
|
35 |
+
"optional": true
|
36 |
+
},
|
37 |
+
"anymatch": {
|
38 |
+
"version": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz",
|
39 |
+
"integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=",
|
40 |
+
"dev": true
|
41 |
+
},
|
42 |
+
"arr-diff": {
|
43 |
+
"version": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
|
44 |
+
"integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
|
45 |
+
"dev": true
|
46 |
+
},
|
47 |
+
"arr-flatten": {
|
48 |
+
"version": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz",
|
49 |
+
"integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=",
|
50 |
+
"dev": true
|
51 |
+
},
|
52 |
+
"array-filter": {
|
53 |
+
"version": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz",
|
54 |
+
"integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=",
|
55 |
+
"dev": true
|
56 |
+
},
|
57 |
+
"array-map": {
|
58 |
+
"version": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz",
|
59 |
+
"integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=",
|
60 |
+
"dev": true
|
61 |
+
},
|
62 |
+
"array-reduce": {
|
63 |
+
"version": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz",
|
64 |
+
"integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=",
|
65 |
+
"dev": true
|
66 |
+
},
|
67 |
+
"array-unique": {
|
68 |
+
"version": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
|
69 |
+
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
|
70 |
+
"dev": true
|
71 |
+
},
|
72 |
+
"arrify": {
|
73 |
+
"version": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
|
74 |
+
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
|
75 |
+
"dev": true
|
76 |
+
},
|
77 |
+
"asn1.js": {
|
78 |
+
"version": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz",
|
79 |
+
"integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=",
|
80 |
+
"dev": true
|
81 |
+
},
|
82 |
+
"assert": {
|
83 |
+
"version": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
|
84 |
+
"integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
|
85 |
+
"dev": true
|
86 |
+
},
|
87 |
+
"assertion-error": {
|
88 |
+
"version": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz",
|
89 |
+
"integrity": "sha1-x/hUOP3UZrx8oWq5DIFRN5el0js=",
|
90 |
+
"dev": true
|
91 |
+
},
|
92 |
+
"ast-traverse": {
|
93 |
+
"version": "https://registry.npmjs.org/ast-traverse/-/ast-traverse-0.1.1.tgz",
|
94 |
+
"integrity": "sha1-ac8rg4bxnc2hux4F1o/jWdiJfeY=",
|
95 |
+
"dev": true
|
96 |
+
},
|
97 |
+
"ast-types": {
|
98 |
+
"version": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.11.tgz",
|
99 |
+
"integrity": "sha1-NxF3u1kjL/XOqh0J7lytcFsaWqk=",
|
100 |
+
"dev": true
|
101 |
+
},
|
102 |
+
"astw": {
|
103 |
+
"version": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz",
|
104 |
+
"integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=",
|
105 |
+
"dev": true
|
106 |
+
},
|
107 |
+
"async-each": {
|
108 |
+
"version": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
|
109 |
+
"integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
|
110 |
+
"dev": true
|
111 |
+
},
|
112 |
+
"balanced-match": {
|
113 |
+
"version": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
|
114 |
+
"integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=",
|
115 |
+
"dev": true
|
116 |
+
},
|
117 |
+
"base64-js": {
|
118 |
+
"version": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz",
|
119 |
+
"integrity": "sha1-o5mS1yNYSBGYK+XikLtqU9hnAPE=",
|
120 |
+
"dev": true
|
121 |
+
},
|
122 |
+
"binary-extensions": {
|
123 |
+
"version": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz",
|
124 |
+
"integrity": "sha1-SOyNFt9Dd+rl+liEaCSAr02Vx3Q=",
|
125 |
+
"dev": true
|
126 |
+
},
|
127 |
+
"bn.js": {
|
128 |
+
"version": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
|
129 |
+
"integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=",
|
130 |
+
"dev": true
|
131 |
+
},
|
132 |
+
"brace-expansion": {
|
133 |
+
"version": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz",
|
134 |
+
"integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=",
|
135 |
+
"dev": true
|
136 |
+
},
|
137 |
+
"braces": {
|
138 |
+
"version": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
|
139 |
+
"integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
|
140 |
+
"dev": true
|
141 |
+
},
|
142 |
+
"breakable": {
|
143 |
+
"version": "https://registry.npmjs.org/breakable/-/breakable-1.0.0.tgz",
|
144 |
+
"integrity": "sha1-eEp5eRWjjq0nutRWtVcstLuqeME=",
|
145 |
+
"dev": true
|
146 |
+
},
|
147 |
+
"brorand": {
|
148 |
+
"version": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
|
149 |
+
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
|
150 |
+
"dev": true
|
151 |
+
},
|
152 |
+
"browser-pack": {
|
153 |
+
"version": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz",
|
154 |
+
"integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=",
|
155 |
+
"dev": true
|
156 |
+
},
|
157 |
+
"browser-resolve": {
|
158 |
+
"version": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz",
|
159 |
+
"integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=",
|
160 |
+
"dev": true,
|
161 |
+
"dependencies": {
|
162 |
+
"resolve": {
|
163 |
+
"version": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
|
164 |
+
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
|
165 |
+
"dev": true
|
166 |
+
}
|
167 |
+
}
|
168 |
+
},
|
169 |
+
"browser-stdout": {
|
170 |
+
"version": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz",
|
171 |
+
"integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=",
|
172 |
+
"dev": true
|
173 |
+
},
|
174 |
+
"browserify": {
|
175 |
+
"version": "https://registry.npmjs.org/browserify/-/browserify-14.3.0.tgz",
|
176 |
+
"integrity": "sha1-/QA6I4asGuwSfwl4haPMY3O3RcQ=",
|
177 |
+
"dev": true
|
178 |
+
},
|
179 |
+
"browserify-aes": {
|
180 |
+
"version": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz",
|
181 |
+
"integrity": "sha1-Xncl297x/Vkw1OurSFZ85FHEigo=",
|
182 |
+
"dev": true
|
183 |
+
},
|
184 |
+
"browserify-cipher": {
|
185 |
+
"version": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz",
|
186 |
+
"integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=",
|
187 |
+
"dev": true
|
188 |
+
},
|
189 |
+
"browserify-des": {
|
190 |
+
"version": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz",
|
191 |
+
"integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=",
|
192 |
+
"dev": true
|
193 |
+
},
|
194 |
+
"browserify-rsa": {
|
195 |
+
"version": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
|
196 |
+
"integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
|
197 |
+
"dev": true
|
198 |
+
},
|
199 |
+
"browserify-sign": {
|
200 |
+
"version": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
|
201 |
+
"integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=",
|
202 |
+
"dev": true
|
203 |
+
},
|
204 |
+
"browserify-zlib": {
|
205 |
+
"version": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz",
|
206 |
+
"integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=",
|
207 |
+
"dev": true
|
208 |
+
},
|
209 |
+
"buffer": {
|
210 |
+
"version": "https://registry.npmjs.org/buffer/-/buffer-5.0.6.tgz",
|
211 |
+
"integrity": "sha1-LqZp9+7Atu2gWwj4tf9mGyhXNYg=",
|
212 |
+
"dev": true
|
213 |
+
},
|
214 |
+
"buffer-shims": {
|
215 |
+
"version": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
|
216 |
+
"integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=",
|
217 |
+
"dev": true
|
218 |
+
},
|
219 |
+
"buffer-xor": {
|
220 |
+
"version": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
|
221 |
+
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
|
222 |
+
"dev": true
|
223 |
+
},
|
224 |
+
"builtin-status-codes": {
|
225 |
+
"version": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
|
226 |
+
"integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
|
227 |
+
"dev": true
|
228 |
+
},
|
229 |
+
"cached-path-relative": {
|
230 |
+
"version": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz",
|
231 |
+
"integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=",
|
232 |
+
"dev": true
|
233 |
+
},
|
234 |
+
"camelcase": {
|
235 |
+
"version": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
|
236 |
+
"integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
|
237 |
+
"dev": true
|
238 |
+
},
|
239 |
+
"center-align": {
|
240 |
+
"version": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
|
241 |
+
"integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
|
242 |
+
"dev": true
|
243 |
+
},
|
244 |
+
"chai-nightwatch": {
|
245 |
+
"version": "https://registry.npmjs.org/chai-nightwatch/-/chai-nightwatch-0.1.1.tgz",
|
246 |
+
"integrity": "sha1-HKVt52jTwIaP5/wvTTLC/olOa+k=",
|
247 |
+
"dev": true
|
248 |
+
},
|
249 |
+
"chokidar": {
|
250 |
+
"version": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
|
251 |
+
"integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=",
|
252 |
+
"dev": true
|
253 |
+
},
|
254 |
+
"chromedriver": {
|
255 |
+
"version": "https://registry.npmjs.org/chromedriver/-/chromedriver-2.29.0.tgz",
|
256 |
+
"integrity": "sha1-4/2LPAjc4lYrgO8bC4Rll2WdDMM=",
|
257 |
+
"dev": true
|
258 |
+
},
|
259 |
+
"cipher-base": {
|
260 |
+
"version": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz",
|
261 |
+
"integrity": "sha1-7qvxlEGc6QDaMBjCB9IS8qbfCgc=",
|
262 |
+
"dev": true
|
263 |
+
},
|
264 |
+
"cliui": {
|
265 |
+
"version": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
|
266 |
+
"integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
|
267 |
+
"dev": true,
|
268 |
+
"dependencies": {
|
269 |
+
"wordwrap": {
|
270 |
+
"version": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
|
271 |
+
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
|
272 |
+
"dev": true
|
273 |
+
}
|
274 |
+
}
|
275 |
+
},
|
276 |
+
"co": {
|
277 |
+
"version": "https://registry.npmjs.org/co/-/co-3.0.6.tgz",
|
278 |
+
"integrity": "sha1-FEXyJsXrlWE45oyawwFn6n0ua9o=",
|
279 |
+
"dev": true
|
280 |
+
},
|
281 |
+
"combine-source-map": {
|
282 |
+
"version": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz",
|
283 |
+
"integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=",
|
284 |
+
"dev": true
|
285 |
+
},
|
286 |
+
"commander": {
|
287 |
+
"version": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
|
288 |
+
"integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
|
289 |
+
"dev": true
|
290 |
+
},
|
291 |
+
"commoner": {
|
292 |
+
"version": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz",
|
293 |
+
"integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=",
|
294 |
+
"dev": true,
|
295 |
+
"dependencies": {
|
296 |
+
"ast-types": {
|
297 |
+
"version": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz",
|
298 |
+
"integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=",
|
299 |
+
"dev": true
|
300 |
+
},
|
301 |
+
"glob": {
|
302 |
+
"version": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
|
303 |
+
"integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
|
304 |
+
"dev": true
|
305 |
+
},
|
306 |
+
"recast": {
|
307 |
+
"version": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz",
|
308 |
+
"integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=",
|
309 |
+
"dev": true
|
310 |
+
}
|
311 |
+
}
|
312 |
+
},
|
313 |
+
"concat-map": {
|
314 |
+
"version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
315 |
+
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
316 |
+
"dev": true
|
317 |
+
},
|
318 |
+
"concat-stream": {
|
319 |
+
"version": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz",
|
320 |
+
"integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=",
|
321 |
+
"dev": true,
|
322 |
+
"dependencies": {
|
323 |
+
"readable-stream": {
|
324 |
+
"version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
|
325 |
+
"integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
|
326 |
+
"dev": true
|
327 |
+
}
|
328 |
+
}
|
329 |
+
},
|
330 |
+
"console-browserify": {
|
331 |
+
"version": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
|
332 |
+
"integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
|
333 |
+
"dev": true
|
334 |
+
},
|
335 |
+
"constants-browserify": {
|
336 |
+
"version": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
|
337 |
+
"integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
|
338 |
+
"dev": true
|
339 |
+
},
|
340 |
+
"convert-source-map": {
|
341 |
+
"version": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz",
|
342 |
+
"integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=",
|
343 |
+
"dev": true
|
344 |
+
},
|
345 |
+
"core-util-is": {
|
346 |
+
"version": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
347 |
+
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
348 |
+
"dev": true
|
349 |
+
},
|
350 |
+
"create-ecdh": {
|
351 |
+
"version": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz",
|
352 |
+
"integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=",
|
353 |
+
"dev": true
|
354 |
+
},
|
355 |
+
"create-hash": {
|
356 |
+
"version": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
|
357 |
+
"integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=",
|
358 |
+
"dev": true
|
359 |
+
},
|
360 |
+
"create-hmac": {
|
361 |
+
"version": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz",
|
362 |
+
"integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=",
|
363 |
+
"dev": true
|
364 |
+
},
|
365 |
+
"crypto-browserify": {
|
366 |
+
"version": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz",
|
367 |
+
"integrity": "sha1-NlKgkGq5sqfgw85mpAjpV6JIVSI=",
|
368 |
+
"dev": true
|
369 |
+
},
|
370 |
+
"data-uri-to-buffer": {
|
371 |
+
"version": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-0.0.4.tgz",
|
372 |
+
"integrity": "sha1-RuE6udqOMJdFyNAc5UchPr2y/j8=",
|
373 |
+
"dev": true
|
374 |
+
},
|
375 |
+
"date-now": {
|
376 |
+
"version": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
|
377 |
+
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
|
378 |
+
"dev": true
|
379 |
+
},
|
380 |
+
"debug": {
|
381 |
+
"version": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
382 |
+
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
|
383 |
+
"dev": true
|
384 |
+
},
|
385 |
+
"decamelize": {
|
386 |
+
"version": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
387 |
+
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
|
388 |
+
"dev": true
|
389 |
+
},
|
390 |
+
"deep-eql": {
|
391 |
+
"version": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
|
392 |
+
"integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
|
393 |
+
"dev": true
|
394 |
+
},
|
395 |
+
"deep-is": {
|
396 |
+
"version": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
|
397 |
+
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
|
398 |
+
"dev": true
|
399 |
+
},
|
400 |
+
"defined": {
|
401 |
+
"version": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
|
402 |
+
"integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
|
403 |
+
"dev": true
|
404 |
+
},
|
405 |
+
"defs": {
|
406 |
+
"version": "https://registry.npmjs.org/defs/-/defs-1.1.1.tgz",
|
407 |
+
"integrity": "sha1-siYJ8sehG6ej2xFoBcE5scr/qdI=",
|
408 |
+
"dev": true,
|
409 |
+
"dependencies": {
|
410 |
+
"esprima-fb": {
|
411 |
+
"version": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz",
|
412 |
+
"integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=",
|
413 |
+
"dev": true
|
414 |
+
}
|
415 |
+
}
|
416 |
+
},
|
417 |
+
"degenerator": {
|
418 |
+
"version": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz",
|
419 |
+
"integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=",
|
420 |
+
"dev": true
|
421 |
+
},
|
422 |
+
"deps-sort": {
|
423 |
+
"version": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz",
|
424 |
+
"integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=",
|
425 |
+
"dev": true
|
426 |
+
},
|
427 |
+
"des.js": {
|
428 |
+
"version": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
|
429 |
+
"integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=",
|
430 |
+
"dev": true
|
431 |
+
},
|
432 |
+
"detective": {
|
433 |
+
"version": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz",
|
434 |
+
"integrity": "sha1-blqMaybmx6JUsca210kNmOyR7dE=",
|
435 |
+
"dev": true
|
436 |
+
},
|
437 |
+
"diff": {
|
438 |
+
"version": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
|
439 |
+
"integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=",
|
440 |
+
"dev": true
|
441 |
+
},
|
442 |
+
"diffie-hellman": {
|
443 |
+
"version": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz",
|
444 |
+
"integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=",
|
445 |
+
"dev": true
|
446 |
+
},
|
447 |
+
"domain-browser": {
|
448 |
+
"version": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz",
|
449 |
+
"integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=",
|
450 |
+
"dev": true
|
451 |
+
},
|
452 |
+
"duplexer": {
|
453 |
+
"version": "0.1.1",
|
454 |
+
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
455 |
+
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
|
456 |
+
"dev": true
|
457 |
+
},
|
458 |
+
"duplexer2": {
|
459 |
+
"version": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
|
460 |
+
"integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
|
461 |
+
"dev": true
|
462 |
+
},
|
463 |
+
"ejs": {
|
464 |
+
"version": "https://registry.npmjs.org/ejs/-/ejs-0.8.3.tgz",
|
465 |
+
"integrity": "sha1-24qsR/+Ap9+CtMgsEm/olwhwYm8=",
|
466 |
+
"dev": true
|
467 |
+
},
|
468 |
+
"elliptic": {
|
469 |
+
"version": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",
|
470 |
+
"integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",
|
471 |
+
"dev": true
|
472 |
+
},
|
473 |
+
"escape-string-regexp": {
|
474 |
+
"version": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
475 |
+
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
476 |
+
"dev": true
|
477 |
+
},
|
478 |
+
"escodegen": {
|
479 |
+
"version": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz",
|
480 |
+
"integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=",
|
481 |
+
"dev": true,
|
482 |
+
"dependencies": {
|
483 |
+
"esprima": {
|
484 |
+
"version": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
|
485 |
+
"integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
|
486 |
+
"dev": true
|
487 |
+
},
|
488 |
+
"source-map": {
|
489 |
+
"version": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz",
|
490 |
+
"integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=",
|
491 |
+
"dev": true,
|
492 |
+
"optional": true
|
493 |
+
}
|
494 |
+
}
|
495 |
+
},
|
496 |
+
"esprima": {
|
497 |
+
"version": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
|
498 |
+
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
|
499 |
+
"dev": true
|
500 |
+
},
|
501 |
+
"estraverse": {
|
502 |
+
"version": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz",
|
503 |
+
"integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=",
|
504 |
+
"dev": true
|
505 |
+
},
|
506 |
+
"esutils": {
|
507 |
+
"version": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
508 |
+
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
509 |
+
"dev": true
|
510 |
+
},
|
511 |
+
"event-stream": {
|
512 |
+
"version": "3.3.4",
|
513 |
+
"resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
|
514 |
+
"integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=",
|
515 |
+
"dev": true
|
516 |
+
},
|
517 |
+
"events": {
|
518 |
+
"version": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
|
519 |
+
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
|
520 |
+
"dev": true
|
521 |
+
},
|
522 |
+
"evp_bytestokey": {
|
523 |
+
"version": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz",
|
524 |
+
"integrity": "sha1-SXtmrZ/vZc18CKYYCCS6FHa2blM=",
|
525 |
+
"dev": true
|
526 |
+
},
|
527 |
+
"expand-brackets": {
|
528 |
+
"version": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
|
529 |
+
"integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
|
530 |
+
"dev": true
|
531 |
+
},
|
532 |
+
"expand-range": {
|
533 |
+
"version": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
|
534 |
+
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
|
535 |
+
"dev": true
|
536 |
+
},
|
537 |
+
"extend": {
|
538 |
+
"version": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
|
539 |
+
"integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
|
540 |
+
"dev": true
|
541 |
+
},
|
542 |
+
"extglob": {
|
543 |
+
"version": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
|
544 |
+
"integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
|
545 |
+
"dev": true
|
546 |
+
},
|
547 |
+
"fast-levenshtein": {
|
548 |
+
"version": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
549 |
+
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
|
550 |
+
"dev": true
|
551 |
+
},
|
552 |
+
"file-uri-to-path": {
|
553 |
+
"version": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-0.0.2.tgz",
|
554 |
+
"integrity": "sha1-N83RtbkFQEs/BeGyNkW+aU/3D4I=",
|
555 |
+
"dev": true
|
556 |
+
},
|
557 |
+
"filename-regex": {
|
558 |
+
"version": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
|
559 |
+
"integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
|
560 |
+
"dev": true
|
561 |
+
},
|
562 |
+
"fill-range": {
|
563 |
+
"version": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
|
564 |
+
"integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=",
|
565 |
+
"dev": true
|
566 |
+
},
|
567 |
+
"for-in": {
|
568 |
+
"version": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
|
569 |
+
"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
|
570 |
+
"dev": true
|
571 |
+
},
|
572 |
+
"for-own": {
|
573 |
+
"version": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
|
574 |
+
"integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
|
575 |
+
"dev": true
|
576 |
+
},
|
577 |
+
"from": {
|
578 |
+
"version": "0.1.7",
|
579 |
+
"resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",
|
580 |
+
"integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=",
|
581 |
+
"dev": true
|
582 |
+
},
|
583 |
+
"fs.realpath": {
|
584 |
+
"version": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
585 |
+
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
586 |
+
"dev": true
|
587 |
+
},
|
588 |
+
"fsevents": {
|
589 |
+
"version": "1.1.1",
|
590 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.1.tgz",
|
591 |
+
"integrity": "sha1-8Z/Sj0Pur3YWgOUZogPE0LPTGv8=",
|
592 |
+
"dev": true,
|
593 |
+
"optional": true,
|
594 |
+
"dependencies": {
|
595 |
+
"abbrev": {
|
596 |
+
"version": "1.1.0",
|
597 |
+
"bundled": true,
|
598 |
+
"dev": true,
|
599 |
+
"optional": true
|
600 |
+
},
|
601 |
+
"ansi-regex": {
|
602 |
+
"version": "2.1.1",
|
603 |
+
"bundled": true,
|
604 |
+
"dev": true
|
605 |
+
},
|
606 |
+
"ansi-styles": {
|
607 |
+
"version": "2.2.1",
|
608 |
+
"bundled": true,
|
609 |
+
"dev": true,
|
610 |
+
"optional": true
|
611 |
+
},
|
612 |
+
"aproba": {
|
613 |
+
"version": "1.1.1",
|
614 |
+
"bundled": true,
|
615 |
+
"dev": true,
|
616 |
+
"optional": true
|
617 |
+
},
|
618 |
+
"are-we-there-yet": {
|
619 |
+
"version": "1.1.2",
|
620 |
+
"bundled": true,
|
621 |
+
"dev": true,
|
622 |
+
"optional": true
|
623 |
+
},
|
624 |
+
"asn1": {
|
625 |
+
"version": "0.2.3",
|
626 |
+
"bundled": true,
|
627 |
+
"dev": true,
|
628 |
+
"optional": true
|
629 |
+
},
|
630 |
+
"assert-plus": {
|
631 |
+
"version": "0.2.0",
|
632 |
+
"bundled": true,
|
633 |
+
"dev": true,
|
634 |
+
"optional": true
|
635 |
+
},
|
636 |
+
"asynckit": {
|
637 |
+
"version": "0.4.0",
|
638 |
+
"bundled": true,
|
639 |
+
"dev": true,
|
640 |
+
"optional": true
|
641 |
+
},
|
642 |
+
"aws-sign2": {
|
643 |
+
"version": "0.6.0",
|
644 |
+
"bundled": true,
|
645 |
+
"dev": true,
|
646 |
+
"optional": true
|
647 |
+
},
|
648 |
+
"aws4": {
|
649 |
+
"version": "1.6.0",
|
650 |
+
"bundled": true,
|
651 |
+
"dev": true,
|
652 |
+
"optional": true
|
653 |
+
},
|
654 |
+
"balanced-match": {
|
655 |
+
"version": "0.4.2",
|
656 |
+
"bundled": true,
|
657 |
+
"dev": true
|
658 |
+
},
|
659 |
+
"bcrypt-pbkdf": {
|
660 |
+
"version": "1.0.1",
|
661 |
+
"bundled": true,
|
662 |
+
"dev": true,
|
663 |
+
"optional": true
|
664 |
+
},
|
665 |
+
"block-stream": {
|
666 |
+
"version": "0.0.9",
|
667 |
+
"bundled": true,
|
668 |
+
"dev": true
|
669 |
+
},
|
670 |
+
"boom": {
|
671 |
+
"version": "2.10.1",
|
672 |
+
"bundled": true,
|
673 |
+
"dev": true
|
674 |
+
},
|
675 |
+
"brace-expansion": {
|
676 |
+
"version": "1.1.6",
|
677 |
+
"bundled": true,
|
678 |
+
"dev": true
|
679 |
+
},
|
680 |
+
"buffer-shims": {
|
681 |
+
"version": "1.0.0",
|
682 |
+
"bundled": true,
|
683 |
+
"dev": true
|
684 |
+
},
|
685 |
+
"caseless": {
|
686 |
+
"version": "0.11.0",
|
687 |
+
"bundled": true,
|
688 |
+
"dev": true,
|
689 |
+
"optional": true
|
690 |
+
},
|
691 |
+
"chalk": {
|
692 |
+
"version": "1.1.3",
|
693 |
+
"bundled": true,
|
694 |
+
"dev": true,
|
695 |
+
"optional": true
|
696 |
+
},
|
697 |
+
"code-point-at": {
|
698 |
+
"version": "1.1.0",
|
699 |
+
"bundled": true,
|
700 |
+
"dev": true
|
701 |
+
},
|
702 |
+
"combined-stream": {
|
703 |
+
"version": "1.0.5",
|
704 |
+
"bundled": true,
|
705 |
+
"dev": true
|
706 |
+
},
|
707 |
+
"commander": {
|
708 |
+
"version": "2.9.0",
|
709 |
+
"bundled": true,
|
710 |
+
"dev": true,
|
711 |
+
"optional": true
|
712 |
+
},
|
713 |
+
"concat-map": {
|
714 |
+
"version": "0.0.1",
|
715 |
+
"bundled": true,
|
716 |
+
"dev": true
|
717 |
+
},
|
718 |
+
"console-control-strings": {
|
719 |
+
"version": "1.1.0",
|
720 |
+
"bundled": true,
|
721 |
+
"dev": true
|
722 |
+
},
|
723 |
+
"core-util-is": {
|
724 |
+
"version": "1.0.2",
|
725 |
+
"bundled": true,
|
726 |
+
"dev": true
|
727 |
+
},
|
728 |
+
"cryptiles": {
|
729 |
+
"version": "2.0.5",
|
730 |
+
"bundled": true,
|
731 |
+
"dev": true,
|
732 |
+
"optional": true
|
733 |
+
},
|
734 |
+
"dashdash": {
|
735 |
+
"version": "1.14.1",
|
736 |
+
"bundled": true,
|
737 |
+
"dev": true,
|
738 |
+
"optional": true,
|
739 |
+
"dependencies": {
|
740 |
+
"assert-plus": {
|
741 |
+
"version": "1.0.0",
|
742 |
+
"bundled": true,
|
743 |
+
"dev": true,
|
744 |
+
"optional": true
|
745 |
+
}
|
746 |
+
}
|
747 |
+
},
|
748 |
+
"debug": {
|
749 |
+
"version": "2.2.0",
|
750 |
+
"bundled": true,
|
751 |
+
"dev": true,
|
752 |
+
"optional": true
|
753 |
+
},
|
754 |
+
"deep-extend": {
|
755 |
+
"version": "0.4.1",
|
756 |
+
"bundled": true,
|
757 |
+
"dev": true,
|
758 |
+
"optional": true
|
759 |
+
},
|
760 |
+
"delayed-stream": {
|
761 |
+
"version": "1.0.0",
|
762 |
+
"bundled": true,
|
763 |
+
"dev": true
|
764 |
+
},
|
765 |
+
"delegates": {
|
766 |
+
"version": "1.0.0",
|
767 |
+
"bundled": true,
|
768 |
+
"dev": true,
|
769 |
+
"optional": true
|
770 |
+
},
|
771 |
+
"ecc-jsbn": {
|
772 |
+
"version": "0.1.1",
|
773 |
+
"bundled": true,
|
774 |
+
"dev": true,
|
775 |
+
"optional": true
|
776 |
+
},
|
777 |
+
"escape-string-regexp": {
|
778 |
+
"version": "1.0.5",
|
779 |
+
"bundled": true,
|
780 |
+
"dev": true,
|
781 |
+
"optional": true
|
782 |
+
},
|
783 |
+
"extend": {
|
784 |
+
"version": "3.0.0",
|
785 |
+
"bundled": true,
|
786 |
+
"dev": true,
|
787 |
+
"optional": true
|
788 |
+
},
|
789 |
+
"extsprintf": {
|
790 |
+
"version": "1.0.2",
|
791 |
+
"bundled": true,
|
792 |
+
"dev": true
|
793 |
+
},
|
794 |
+
"forever-agent": {
|
795 |
+
"version": "0.6.1",
|
796 |
+
"bundled": true,
|
797 |
+
"dev": true,
|
798 |
+
"optional": true
|
799 |
+
},
|
800 |
+
"form-data": {
|
801 |
+
"version": "2.1.2",
|
802 |
+
"bundled": true,
|
803 |
+
"dev": true,
|
804 |
+
"optional": true
|
805 |
+
},
|
806 |
+
"fs.realpath": {
|
807 |
+
"version": "1.0.0",
|
808 |
+
"bundled": true,
|
809 |
+
"dev": true
|
810 |
+
},
|
811 |
+
"fstream": {
|
812 |
+
"version": "1.0.10",
|
813 |
+
"bundled": true,
|
814 |
+
"dev": true
|
815 |
+
},
|
816 |
+
"fstream-ignore": {
|
817 |
+
"version": "1.0.5",
|
818 |
+
"bundled": true,
|
819 |
+
"dev": true,
|
820 |
+
"optional": true
|
821 |
+
},
|
822 |
+
"gauge": {
|
823 |
+
"version": "2.7.3",
|
824 |
+
"bundled": true,
|
825 |
+
"dev": true,
|
826 |
+
"optional": true
|
827 |
+
},
|
828 |
+
"generate-function": {
|
829 |
+
"version": "2.0.0",
|
830 |
+
"bundled": true,
|
831 |
+
"dev": true,
|
832 |
+
"optional": true
|
833 |
+
},
|
834 |
+
"generate-object-property": {
|
835 |
+
"version": "1.2.0",
|
836 |
+
"bundled": true,
|
837 |
+
"dev": true,
|
838 |
+
"optional": true
|
839 |
+
},
|
840 |
+
"getpass": {
|
841 |
+
"version": "0.1.6",
|
842 |
+
"bundled": true,
|
843 |
+
"dev": true,
|
844 |
+
"optional": true,
|
845 |
+
"dependencies": {
|
846 |
+
"assert-plus": {
|
847 |
+
"version": "1.0.0",
|
848 |
+
"bundled": true,
|
849 |
+
"dev": true,
|
850 |
+
"optional": true
|
851 |
+
}
|
852 |
+
}
|
853 |
+
},
|
854 |
+
"glob": {
|
855 |
+
"version": "7.1.1",
|
856 |
+
"bundled": true,
|
857 |
+
"dev": true
|
858 |
+
},
|
859 |
+
"graceful-fs": {
|
860 |
+
"version": "4.1.11",
|
861 |
+
"bundled": true,
|
862 |
+
"dev": true
|
863 |
+
},
|
864 |
+
"graceful-readlink": {
|
865 |
+
"version": "1.0.1",
|
866 |
+
"bundled": true,
|
867 |
+
"dev": true,
|
868 |
+
"optional": true
|
869 |
+
},
|
870 |
+
"har-validator": {
|
871 |
+
"version": "2.0.6",
|
872 |
+
"bundled": true,
|
873 |
+
"dev": true,
|
874 |
+
"optional": true
|
875 |
+
},
|
876 |
+
"has-ansi": {
|
877 |
+
"version": "2.0.0",
|
878 |
+
"bundled": true,
|
879 |
+
"dev": true,
|
880 |
+
"optional": true
|
881 |
+
},
|
882 |
+
"has-unicode": {
|
883 |
+
"version": "2.0.1",
|
884 |
+
"bundled": true,
|
885 |
+
"dev": true,
|
886 |
+
"optional": true
|
887 |
+
},
|
888 |
+
"hawk": {
|
889 |
+
"version": "3.1.3",
|
890 |
+
"bundled": true,
|
891 |
+
"dev": true,
|
892 |
+
"optional": true
|
893 |
+
},
|
894 |
+
"hoek": {
|
895 |
+
"version": "2.16.3",
|
896 |
+
"bundled": true,
|
897 |
+
"dev": true
|
898 |
+
},
|
899 |
+
"http-signature": {
|
900 |
+
"version": "1.1.1",
|
901 |
+
"bundled": true,
|
902 |
+
"dev": true,
|
903 |
+
"optional": true
|
904 |
+
},
|
905 |
+
"inflight": {
|
906 |
+
"version": "1.0.6",
|
907 |
+
"bundled": true,
|
908 |
+
"dev": true
|
909 |
+
},
|
910 |
+
"inherits": {
|
911 |
+
"version": "2.0.3",
|
912 |
+
"bundled": true,
|
913 |
+
"dev": true
|
914 |
+
},
|
915 |
+
"ini": {
|
916 |
+
"version": "1.3.4",
|
917 |
+
"bundled": true,
|
918 |
+
"dev": true,
|
919 |
+
"optional": true
|
920 |
+
},
|
921 |
+
"is-fullwidth-code-point": {
|
922 |
+
"version": "1.0.0",
|
923 |
+
"bundled": true,
|
924 |
+
"dev": true
|
925 |
+
},
|
926 |
+
"is-my-json-valid": {
|
927 |
+
"version": "2.15.0",
|
928 |
+
"bundled": true,
|
929 |
+
"dev": true,
|
930 |
+
"optional": true
|
931 |
+
},
|
932 |
+
"is-property": {
|
933 |
+
"version": "1.0.2",
|
934 |
+
"bundled": true,
|
935 |
+
"dev": true,
|
936 |
+
"optional": true
|
937 |
+
},
|
938 |
+
"is-typedarray": {
|
939 |
+
"version": "1.0.0",
|
940 |
+
"bundled": true,
|
941 |
+
"dev": true,
|
942 |
+
"optional": true
|
943 |
+
},
|
944 |
+
"isarray": {
|
945 |
+
"version": "1.0.0",
|
946 |
+
"bundled": true,
|
947 |
+
"dev": true
|
948 |
+
},
|
949 |
+
"isstream": {
|
950 |
+
"version": "0.1.2",
|
951 |
+
"bundled": true,
|
952 |
+
"dev": true,
|
953 |
+
"optional": true
|
954 |
+
},
|
955 |
+
"jodid25519": {
|
956 |
+
"version": "1.0.2",
|
957 |
+
"bundled": true,
|
958 |
+
"dev": true,
|
959 |
+
"optional": true
|
960 |
+
},
|
961 |
+
"jsbn": {
|
962 |
+
"version": "0.1.1",
|
963 |
+
"bundled": true,
|
964 |
+
"dev": true,
|
965 |
+
"optional": true
|
966 |
+
},
|
967 |
+
"json-schema": {
|
968 |
+
"version": "0.2.3",
|
969 |
+
"bundled": true,
|
970 |
+
"dev": true,
|
971 |
+
"optional": true
|
972 |
+
},
|
973 |
+
"json-stringify-safe": {
|
974 |
+
"version": "5.0.1",
|
975 |
+
"bundled": true,
|
976 |
+
"dev": true,
|
977 |
+
"optional": true
|
978 |
+
},
|
979 |
+
"jsonpointer": {
|
980 |
+
"version": "4.0.1",
|
981 |
+
"bundled": true,
|
982 |
+
"dev": true,
|
983 |
+
"optional": true
|
984 |
+
},
|
985 |
+
"jsprim": {
|
986 |
+
"version": "1.3.1",
|
987 |
+
"bundled": true,
|
988 |
+
"dev": true,
|
989 |
+
"optional": true
|
990 |
+
},
|
991 |
+
"mime-db": {
|
992 |
+
"version": "1.26.0",
|
993 |
+
"bundled": true,
|
994 |
+
"dev": true
|
995 |
+
},
|
996 |
+
"mime-types": {
|
997 |
+
"version": "2.1.14",
|
998 |
+
"bundled": true,
|
999 |
+
"dev": true
|
1000 |
+
},
|
1001 |
+
"minimatch": {
|
1002 |
+
"version": "3.0.3",
|
1003 |
+
"bundled": true,
|
1004 |
+
"dev": true
|
1005 |
+
},
|
1006 |
+
"minimist": {
|
1007 |
+
"version": "0.0.8",
|
1008 |
+
"bundled": true,
|
1009 |
+
"dev": true
|
1010 |
+
},
|
1011 |
+
"mkdirp": {
|
1012 |
+
"version": "0.5.1",
|
1013 |
+
"bundled": true,
|
1014 |
+
"dev": true
|
1015 |
+
},
|
1016 |
+
"ms": {
|
1017 |
+
"version": "0.7.1",
|
1018 |
+
"bundled": true,
|
1019 |
+
"dev": true,
|
1020 |
+
"optional": true
|
1021 |
+
},
|
1022 |
+
"node-pre-gyp": {
|
1023 |
+
"version": "0.6.33",
|
1024 |
+
"bundled": true,
|
1025 |
+
"dev": true,
|
1026 |
+
"optional": true
|
1027 |
+
},
|
1028 |
+
"nopt": {
|
1029 |
+
"version": "3.0.6",
|
1030 |
+
"bundled": true,
|
1031 |
+
"dev": true,
|
1032 |
+
"optional": true
|
1033 |
+
},
|
1034 |
+
"npmlog": {
|
1035 |
+
"version": "4.0.2",
|
1036 |
+
"bundled": true,
|
1037 |
+
"dev": true,
|
1038 |
+
"optional": true
|
1039 |
+
},
|
1040 |
+
"number-is-nan": {
|
1041 |
+
"version": "1.0.1",
|
1042 |
+
"bundled": true,
|
1043 |
+
"dev": true
|
1044 |
+
},
|
1045 |
+
"oauth-sign": {
|
1046 |
+
"version": "0.8.2",
|
1047 |
+
"bundled": true,
|
1048 |
+
"dev": true,
|
1049 |
+
"optional": true
|
1050 |
+
},
|
1051 |
+
"object-assign": {
|
1052 |
+
"version": "4.1.1",
|
1053 |
+
"bundled": true,
|
1054 |
+
"dev": true,
|
1055 |
+
"optional": true
|
1056 |
+
},
|
1057 |
+
"once": {
|
1058 |
+
"version": "1.4.0",
|
1059 |
+
"bundled": true,
|
1060 |
+
"dev": true
|
1061 |
+
},
|
1062 |
+
"path-is-absolute": {
|
1063 |
+
"version": "1.0.1",
|
1064 |
+
"bundled": true,
|
1065 |
+
"dev": true
|
1066 |
+
},
|
1067 |
+
"pinkie": {
|
1068 |
+
"version": "2.0.4",
|
1069 |
+
"bundled": true,
|
1070 |
+
"dev": true,
|
1071 |
+
"optional": true
|
1072 |
+
},
|
1073 |
+
"pinkie-promise": {
|
1074 |
+
"version": "2.0.1",
|
1075 |
+
"bundled": true,
|
1076 |
+
"dev": true,
|
1077 |
+
"optional": true
|
1078 |
+
},
|
1079 |
+
"process-nextick-args": {
|
1080 |
+
"version": "1.0.7",
|
1081 |
+
"bundled": true,
|
1082 |
+
"dev": true
|
1083 |
+
},
|
1084 |
+
"punycode": {
|
1085 |
+
"version": "1.4.1",
|
1086 |
+
"bundled": true,
|
1087 |
+
"dev": true,
|
1088 |
+
"optional": true
|
1089 |
+
},
|
1090 |
+
"qs": {
|
1091 |
+
"version": "6.3.1",
|
1092 |
+
"bundled": true,
|
1093 |
+
"dev": true,
|
1094 |
+
"optional": true
|
1095 |
+
},
|
1096 |
+
"rc": {
|
1097 |
+
"version": "1.1.7",
|
1098 |
+
"bundled": true,
|
1099 |
+
"dev": true,
|
1100 |
+
"optional": true,
|
1101 |
+
"dependencies": {
|
1102 |
+
"minimist": {
|
1103 |
+
"version": "1.2.0",
|
1104 |
+
"bundled": true,
|
1105 |
+
"dev": true,
|
1106 |
+
"optional": true
|
1107 |
+
}
|
1108 |
+
}
|
1109 |
+
},
|
1110 |
+
"readable-stream": {
|
1111 |
+
"version": "2.2.2",
|
1112 |
+
"bundled": true,
|
1113 |
+
"dev": true,
|
1114 |
+
"optional": true
|
1115 |
+
},
|
1116 |
+
"request": {
|
1117 |
+
"version": "2.79.0",
|
1118 |
+
"bundled": true,
|
1119 |
+
"dev": true,
|
1120 |
+
"optional": true
|
1121 |
+
},
|
1122 |
+
"rimraf": {
|
1123 |
+
"version": "2.5.4",
|
1124 |
+
"bundled": true,
|
1125 |
+
"dev": true
|
1126 |
+
},
|
1127 |
+
"semver": {
|
1128 |
+
"version": "5.3.0",
|
1129 |
+
"bundled": true,
|
1130 |
+
"dev": true,
|
1131 |
+
"optional": true
|
1132 |
+
},
|
1133 |
+
"set-blocking": {
|
1134 |
+
"version": "2.0.0",
|
1135 |
+
"bundled": true,
|
1136 |
+
"dev": true,
|
1137 |
+
"optional": true
|
1138 |
+
},
|
1139 |
+
"signal-exit": {
|
1140 |
+
"version": "3.0.2",
|
1141 |
+
"bundled": true,
|
1142 |
+
"dev": true,
|
1143 |
+
"optional": true
|
1144 |
+
},
|
1145 |
+
"sntp": {
|
1146 |
+
"version": "1.0.9",
|
1147 |
+
"bundled": true,
|
1148 |
+
"dev": true,
|
1149 |
+
"optional": true
|
1150 |
+
},
|
1151 |
+
"sshpk": {
|
1152 |
+
"version": "1.10.2",
|
1153 |
+
"bundled": true,
|
1154 |
+
"dev": true,
|
1155 |
+
"optional": true,
|
1156 |
+
"dependencies": {
|
1157 |
+
"assert-plus": {
|
1158 |
+
"version": "1.0.0",
|
1159 |
+
"bundled": true,
|
1160 |
+
"dev": true,
|
1161 |
+
"optional": true
|
1162 |
+
}
|
1163 |
+
}
|
1164 |
+
},
|
1165 |
+
"string_decoder": {
|
1166 |
+
"version": "0.10.31",
|
1167 |
+
"bundled": true,
|
1168 |
+
"dev": true
|
1169 |
+
},
|
1170 |
+
"string-width": {
|
1171 |
+
"version": "1.0.2",
|
1172 |
+
"bundled": true,
|
1173 |
+
"dev": true
|
1174 |
+
},
|
1175 |
+
"stringstream": {
|
1176 |
+
"version": "0.0.5",
|
1177 |
+
"bundled": true,
|
1178 |
+
"dev": true,
|
1179 |
+
"optional": true
|
1180 |
+
},
|
1181 |
+
"strip-ansi": {
|
1182 |
+
"version": "3.0.1",
|
1183 |
+
"bundled": true,
|
1184 |
+
"dev": true
|
1185 |
+
},
|
1186 |
+
"strip-json-comments": {
|
1187 |
+
"version": "2.0.1",
|
1188 |
+
"bundled": true,
|
1189 |
+
"dev": true,
|
1190 |
+
"optional": true
|
1191 |
+
},
|
1192 |
+
"supports-color": {
|
1193 |
+
"version": "2.0.0",
|
1194 |
+
"bundled": true,
|
1195 |
+
"dev": true,
|
1196 |
+
"optional": true
|
1197 |
+
},
|
1198 |
+
"tar": {
|
1199 |
+
"version": "2.2.1",
|
1200 |
+
"bundled": true,
|
1201 |
+
"dev": true
|
1202 |
+
},
|
1203 |
+
"tar-pack": {
|
1204 |
+
"version": "3.3.0",
|
1205 |
+
"bundled": true,
|
1206 |
+
"dev": true,
|
1207 |
+
"optional": true,
|
1208 |
+
"dependencies": {
|
1209 |
+
"once": {
|
1210 |
+
"version": "1.3.3",
|
1211 |
+
"bundled": true,
|
1212 |
+
"dev": true,
|
1213 |
+
"optional": true
|
1214 |
+
},
|
1215 |
+
"readable-stream": {
|
1216 |
+
"version": "2.1.5",
|
1217 |
+
"bundled": true,
|
1218 |
+
"dev": true,
|
1219 |
+
"optional": true
|
1220 |
+
}
|
1221 |
+
}
|
1222 |
+
},
|
1223 |
+
"tough-cookie": {
|
1224 |
+
"version": "2.3.2",
|
1225 |
+
"bundled": true,
|
1226 |
+
"dev": true,
|
1227 |
+
"optional": true
|
1228 |
+
},
|
1229 |
+
"tunnel-agent": {
|
1230 |
+
"version": "0.4.3",
|
1231 |
+
"bundled": true,
|
1232 |
+
"dev": true,
|
1233 |
+
"optional": true
|
1234 |
+
},
|
1235 |
+
"tweetnacl": {
|
1236 |
+
"version": "0.14.5",
|
1237 |
+
"bundled": true,
|
1238 |
+
"dev": true,
|
1239 |
+
"optional": true
|
1240 |
+
},
|
1241 |
+
"uid-number": {
|
1242 |
+
"version": "0.0.6",
|
1243 |
+
"bundled": true,
|
1244 |
+
"dev": true,
|
1245 |
+
"optional": true
|
1246 |
+
},
|
1247 |
+
"util-deprecate": {
|
1248 |
+
"version": "1.0.2",
|
1249 |
+
"bundled": true,
|
1250 |
+
"dev": true
|
1251 |
+
},
|
1252 |
+
"uuid": {
|
1253 |
+
"version": "3.0.1",
|
1254 |
+
"bundled": true,
|
1255 |
+
"dev": true,
|
1256 |
+
"optional": true
|
1257 |
+
},
|
1258 |
+
"verror": {
|
1259 |
+
"version": "1.3.6",
|
1260 |
+
"bundled": true,
|
1261 |
+
"dev": true,
|
1262 |
+
"optional": true
|
1263 |
+
},
|
1264 |
+
"wide-align": {
|
1265 |
+
"version": "1.1.0",
|
1266 |
+
"bundled": true,
|
1267 |
+
"dev": true,
|
1268 |
+
"optional": true
|
1269 |
+
},
|
1270 |
+
"wrappy": {
|
1271 |
+
"version": "1.0.2",
|
1272 |
+
"bundled": true,
|
1273 |
+
"dev": true
|
1274 |
+
},
|
1275 |
+
"xtend": {
|
1276 |
+
"version": "4.0.1",
|
1277 |
+
"bundled": true,
|
1278 |
+
"dev": true,
|
1279 |
+
"optional": true
|
1280 |
+
}
|
1281 |
+
}
|
1282 |
+
},
|
1283 |
+
"ftp": {
|
1284 |
+
"version": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz",
|
1285 |
+
"integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=",
|
1286 |
+
"dev": true,
|
1287 |
+
"dependencies": {
|
1288 |
+
"isarray": {
|
1289 |
+
"version": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
1290 |
+
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
|
1291 |
+
"dev": true
|
1292 |
+
},
|
1293 |
+
"readable-stream": {
|
1294 |
+
"version": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
1295 |
+
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
1296 |
+
"dev": true
|
1297 |
+
}
|
1298 |
+
}
|
1299 |
+
},
|
1300 |
+
"function-bind": {
|
1301 |
+
"version": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz",
|
1302 |
+
"integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=",
|
1303 |
+
"dev": true
|
1304 |
+
},
|
1305 |
+
"get-uri": {
|
1306 |
+
"version": "https://registry.npmjs.org/get-uri/-/get-uri-1.1.0.tgz",
|
1307 |
+
"integrity": "sha1-c3XQTa9/y1hLNjJnnL3zObUbsUk=",
|
1308 |
+
"dev": true
|
1309 |
+
},
|
1310 |
+
"glob": {
|
1311 |
+
"version": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz",
|
1312 |
+
"integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=",
|
1313 |
+
"dev": true
|
1314 |
+
},
|
1315 |
+
"glob-base": {
|
1316 |
+
"version": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
|
1317 |
+
"integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
|
1318 |
+
"dev": true
|
1319 |
+
},
|
1320 |
+
"glob-parent": {
|
1321 |
+
"version": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
|
1322 |
+
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
|
1323 |
+
"dev": true
|
1324 |
+
},
|
1325 |
+
"graceful-fs": {
|
1326 |
+
"version": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
1327 |
+
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
|
1328 |
+
"dev": true
|
1329 |
+
},
|
1330 |
+
"graceful-readlink": {
|
1331 |
+
"version": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
|
1332 |
+
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
|
1333 |
+
"dev": true
|
1334 |
+
},
|
1335 |
+
"growl": {
|
1336 |
+
"version": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz",
|
1337 |
+
"integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=",
|
1338 |
+
"dev": true
|
1339 |
+
},
|
1340 |
+
"has": {
|
1341 |
+
"version": "https://registry.npmjs.org/has/-/has-1.0.1.tgz",
|
1342 |
+
"integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=",
|
1343 |
+
"dev": true
|
1344 |
+
},
|
1345 |
+
"has-flag": {
|
1346 |
+
"version": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
|
1347 |
+
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
|
1348 |
+
"dev": true
|
1349 |
+
},
|
1350 |
+
"hash-base": {
|
1351 |
+
"version": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz",
|
1352 |
+
"integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=",
|
1353 |
+
"dev": true
|
1354 |
+
},
|
1355 |
+
"hash.js": {
|
1356 |
+
"version": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz",
|
1357 |
+
"integrity": "sha1-EzL/ABVsCg/92CNgE9B7d6BFFXM=",
|
1358 |
+
"dev": true
|
1359 |
+
},
|
1360 |
+
"hmac-drbg": {
|
1361 |
+
"version": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
1362 |
+
"integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
|
1363 |
+
"dev": true
|
1364 |
+
},
|
1365 |
+
"htmlescape": {
|
1366 |
+
"version": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz",
|
1367 |
+
"integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=",
|
1368 |
+
"dev": true
|
1369 |
+
},
|
1370 |
+
"http-proxy-agent": {
|
1371 |
+
"version": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz",
|
1372 |
+
"integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=",
|
1373 |
+
"dev": true
|
1374 |
+
},
|
1375 |
+
"https-browserify": {
|
1376 |
+
"version": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
|
1377 |
+
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
|
1378 |
+
"dev": true
|
1379 |
+
},
|
1380 |
+
"https-proxy-agent": {
|
1381 |
+
"version": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz",
|
1382 |
+
"integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=",
|
1383 |
+
"dev": true
|
1384 |
+
},
|
1385 |
+
"iconv-lite": {
|
1386 |
+
"version": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz",
|
1387 |
+
"integrity": "sha1-T9qjs4rLwsAxsEXQ7c3+HsqxjI0=",
|
1388 |
+
"dev": true
|
1389 |
+
},
|
1390 |
+
"ieee754": {
|
1391 |
+
"version": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
|
1392 |
+
"integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=",
|
1393 |
+
"dev": true
|
1394 |
+
},
|
1395 |
+
"indexof": {
|
1396 |
+
"version": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
|
1397 |
+
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
|
1398 |
+
"dev": true
|
1399 |
+
},
|
1400 |
+
"inflight": {
|
1401 |
+
"version": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
1402 |
+
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
1403 |
+
"dev": true
|
1404 |
+
},
|
1405 |
+
"inherits": {
|
1406 |
+
"version": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
1407 |
+
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
1408 |
+
"dev": true
|
1409 |
+
},
|
1410 |
+
"inline-source-map": {
|
1411 |
+
"version": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz",
|
1412 |
+
"integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=",
|
1413 |
+
"dev": true
|
1414 |
+
},
|
1415 |
+
"insert-module-globals": {
|
1416 |
+
"version": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz",
|
1417 |
+
"integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=",
|
1418 |
+
"dev": true
|
1419 |
+
},
|
1420 |
+
"invert-kv": {
|
1421 |
+
"version": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
|
1422 |
+
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
|
1423 |
+
"dev": true
|
1424 |
+
},
|
1425 |
+
"ip": {
|
1426 |
+
"version": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
|
1427 |
+
"integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=",
|
1428 |
+
"dev": true
|
1429 |
+
},
|
1430 |
+
"is-binary-path": {
|
1431 |
+
"version": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
|
1432 |
+
"integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
|
1433 |
+
"dev": true
|
1434 |
+
},
|
1435 |
+
"is-buffer": {
|
1436 |
+
"version": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz",
|
1437 |
+
"integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=",
|
1438 |
+
"dev": true
|
1439 |
+
},
|
1440 |
+
"is-dotfile": {
|
1441 |
+
"version": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz",
|
1442 |
+
"integrity": "sha1-LBMjg/ORmfjtwmjKAbmwB9IFzE0=",
|
1443 |
+
"dev": true
|
1444 |
+
},
|
1445 |
+
"is-equal-shallow": {
|
1446 |
+
"version": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
|
1447 |
+
"integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
|
1448 |
+
"dev": true
|
1449 |
+
},
|
1450 |
+
"is-extendable": {
|
1451 |
+
"version": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
|
1452 |
+
"integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
|
1453 |
+
"dev": true
|
1454 |
+
},
|
1455 |
+
"is-extglob": {
|
1456 |
+
"version": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
|
1457 |
+
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
|
1458 |
+
"dev": true
|
1459 |
+
},
|
1460 |
+
"is-glob": {
|
1461 |
+
"version": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
|
1462 |
+
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
|
1463 |
+
"dev": true
|
1464 |
+
},
|
1465 |
+
"is-number": {
|
1466 |
+
"version": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
|
1467 |
+
"integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
|
1468 |
+
"dev": true
|
1469 |
+
},
|
1470 |
+
"is-posix-bracket": {
|
1471 |
+
"version": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
|
1472 |
+
"integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=",
|
1473 |
+
"dev": true
|
1474 |
+
},
|
1475 |
+
"is-primitive": {
|
1476 |
+
"version": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
|
1477 |
+
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
|
1478 |
+
"dev": true
|
1479 |
+
},
|
1480 |
+
"isarray": {
|
1481 |
+
"version": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
1482 |
+
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
1483 |
+
"dev": true
|
1484 |
+
},
|
1485 |
+
"isobject": {
|
1486 |
+
"version": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
|
1487 |
+
"integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
|
1488 |
+
"dev": true
|
1489 |
+
},
|
1490 |
+
"json-stable-stringify": {
|
1491 |
+
"version": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz",
|
1492 |
+
"integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=",
|
1493 |
+
"dev": true
|
1494 |
+
},
|
1495 |
+
"json3": {
|
1496 |
+
"version": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz",
|
1497 |
+
"integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=",
|
1498 |
+
"dev": true
|
1499 |
+
},
|
1500 |
+
"jsonify": {
|
1501 |
+
"version": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
|
1502 |
+
"integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
|
1503 |
+
"dev": true
|
1504 |
+
},
|
1505 |
+
"jsonparse": {
|
1506 |
+
"version": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
|
1507 |
+
"integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=",
|
1508 |
+
"dev": true
|
1509 |
+
},
|
1510 |
+
"JSONStream": {
|
1511 |
+
"version": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz",
|
1512 |
+
"integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=",
|
1513 |
+
"dev": true
|
1514 |
+
},
|
1515 |
+
"kew": {
|
1516 |
+
"version": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz",
|
1517 |
+
"integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=",
|
1518 |
+
"dev": true
|
1519 |
+
},
|
1520 |
+
"kind-of": {
|
1521 |
+
"version": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
1522 |
+
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
|
1523 |
+
"dev": true
|
1524 |
+
},
|
1525 |
+
"labeled-stream-splicer": {
|
1526 |
+
"version": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz",
|
1527 |
+
"integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=",
|
1528 |
+
"dev": true,
|
1529 |
+
"dependencies": {
|
1530 |
+
"isarray": {
|
1531 |
+
"version": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
1532 |
+
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
|
1533 |
+
"dev": true
|
1534 |
+
}
|
1535 |
+
}
|
1536 |
+
},
|
1537 |
+
"lazy-cache": {
|
1538 |
+
"version": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
|
1539 |
+
"integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
|
1540 |
+
"dev": true
|
1541 |
+
},
|
1542 |
+
"lcid": {
|
1543 |
+
"version": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
|
1544 |
+
"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
|
1545 |
+
"dev": true
|
1546 |
+
},
|
1547 |
+
"levn": {
|
1548 |
+
"version": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
|
1549 |
+
"integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
|
1550 |
+
"dev": true
|
1551 |
+
},
|
1552 |
+
"lexical-scope": {
|
1553 |
+
"version": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz",
|
1554 |
+
"integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=",
|
1555 |
+
"dev": true
|
1556 |
+
},
|
1557 |
+
"lodash._arraycopy": {
|
1558 |
+
"version": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz",
|
1559 |
+
"integrity": "sha1-due3wfH7klRzdIeKVi7Qaj5Q9uE=",
|
1560 |
+
"dev": true
|
1561 |
+
},
|
1562 |
+
"lodash._arrayeach": {
|
1563 |
+
"version": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz",
|
1564 |
+
"integrity": "sha1-urFWsqkNPxu9XGU0AzSeXlkz754=",
|
1565 |
+
"dev": true
|
1566 |
+
},
|
1567 |
+
"lodash._baseassign": {
|
1568 |
+
"version": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
|
1569 |
+
"integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=",
|
1570 |
+
"dev": true
|
1571 |
+
},
|
1572 |
+
"lodash._baseclone": {
|
1573 |
+
"version": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz",
|
1574 |
+
"integrity": "sha1-MDUZv2OT/n5C802LYw73eU41Qrc=",
|
1575 |
+
"dev": true
|
1576 |
+
},
|
1577 |
+
"lodash._basecopy": {
|
1578 |
+
"version": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
|
1579 |
+
"integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
|
1580 |
+
"dev": true
|
1581 |
+
},
|
1582 |
+
"lodash._basecreate": {
|
1583 |
+
"version": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz",
|
1584 |
+
"integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=",
|
1585 |
+
"dev": true
|
1586 |
+
},
|
1587 |
+
"lodash._basefor": {
|
1588 |
+
"version": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz",
|
1589 |
+
"integrity": "sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI=",
|
1590 |
+
"dev": true
|
1591 |
+
},
|
1592 |
+
"lodash._bindcallback": {
|
1593 |
+
"version": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz",
|
1594 |
+
"integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=",
|
1595 |
+
"dev": true
|
1596 |
+
},
|
1597 |
+
"lodash._getnative": {
|
1598 |
+
"version": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
|
1599 |
+
"integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
|
1600 |
+
"dev": true
|
1601 |
+
},
|
1602 |
+
"lodash._isiterateecall": {
|
1603 |
+
"version": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
|
1604 |
+
"integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
|
1605 |
+
"dev": true
|
1606 |
+
},
|
1607 |
+
"lodash._stack": {
|
1608 |
+
"version": "https://registry.npmjs.org/lodash._stack/-/lodash._stack-4.1.3.tgz",
|
1609 |
+
"integrity": "sha1-dRqnbBuWSwR+dtFPxyoJP8teLdA=",
|
1610 |
+
"dev": true
|
1611 |
+
},
|
1612 |
+
"lodash.clone": {
|
1613 |
+
"version": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-3.0.3.tgz",
|
1614 |
+
"integrity": "sha1-hGiMc9MrWpDKJWFpY/GJJSqZcEM=",
|
1615 |
+
"dev": true
|
1616 |
+
},
|
1617 |
+
"lodash.create": {
|
1618 |
+
"version": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz",
|
1619 |
+
"integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=",
|
1620 |
+
"dev": true
|
1621 |
+
},
|
1622 |
+
"lodash.defaultsdeep": {
|
1623 |
+
"version": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.3.2.tgz",
|
1624 |
+
"integrity": "sha1-bBpYbmxWR7DmTi15gUG4g2FYvoo=",
|
1625 |
+
"dev": true,
|
1626 |
+
"dependencies": {
|
1627 |
+
"lodash._baseclone": {
|
1628 |
+
"version": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-4.5.7.tgz",
|
1629 |
+
"integrity": "sha1-zkKt4IOE711i+nfDD2GkbmhvhDQ=",
|
1630 |
+
"dev": true
|
1631 |
+
}
|
1632 |
+
}
|
1633 |
+
},
|
1634 |
+
"lodash.isarguments": {
|
1635 |
+
"version": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
|
1636 |
+
"integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
|
1637 |
+
"dev": true
|
1638 |
+
},
|
1639 |
+
"lodash.isarray": {
|
1640 |
+
"version": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
|
1641 |
+
"integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
|
1642 |
+
"dev": true
|
1643 |
+
},
|
1644 |
+
"lodash.isplainobject": {
|
1645 |
+
"version": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
1646 |
+
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
|
1647 |
+
"dev": true
|
1648 |
+
},
|
1649 |
+
"lodash.keys": {
|
1650 |
+
"version": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
|
1651 |
+
"integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
|
1652 |
+
"dev": true
|
1653 |
+
},
|
1654 |
+
"lodash.keysin": {
|
1655 |
+
"version": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-4.2.0.tgz",
|
1656 |
+
"integrity": "sha1-jMP7NcLZSsxEOhhj4C+kB5nqbyg=",
|
1657 |
+
"dev": true
|
1658 |
+
},
|
1659 |
+
"lodash.memoize": {
|
1660 |
+
"version": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz",
|
1661 |
+
"integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=",
|
1662 |
+
"dev": true
|
1663 |
+
},
|
1664 |
+
"lodash.mergewith": {
|
1665 |
+
"version": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz",
|
1666 |
+
"integrity": "sha1-FQzwoWeR9ZA7iJHqsVRgknS96lU=",
|
1667 |
+
"dev": true
|
1668 |
+
},
|
1669 |
+
"lodash.rest": {
|
1670 |
+
"version": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.5.tgz",
|
1671 |
+
"integrity": "sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo=",
|
1672 |
+
"dev": true
|
1673 |
+
},
|
1674 |
+
"longest": {
|
1675 |
+
"version": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
|
1676 |
+
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
|
1677 |
+
"dev": true
|
1678 |
+
},
|
1679 |
+
"lru-cache": {
|
1680 |
+
"version": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz",
|
1681 |
+
"integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=",
|
1682 |
+
"dev": true
|
1683 |
+
},
|
1684 |
+
"map-stream": {
|
1685 |
+
"version": "0.1.0",
|
1686 |
+
"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",
|
1687 |
+
"integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=",
|
1688 |
+
"dev": true
|
1689 |
+
},
|
1690 |
+
"micromatch": {
|
1691 |
+
"version": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
|
1692 |
+
"integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
|
1693 |
+
"dev": true
|
1694 |
+
},
|
1695 |
+
"miller-rabin": {
|
1696 |
+
"version": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz",
|
1697 |
+
"integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=",
|
1698 |
+
"dev": true
|
1699 |
+
},
|
1700 |
+
"minimalistic-assert": {
|
1701 |
+
"version": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz",
|
1702 |
+
"integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=",
|
1703 |
+
"dev": true
|
1704 |
+
},
|
1705 |
+
"minimalistic-crypto-utils": {
|
1706 |
+
"version": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
1707 |
+
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
|
1708 |
+
"dev": true
|
1709 |
+
},
|
1710 |
+
"minimatch": {
|
1711 |
+
"version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
1712 |
+
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
|
1713 |
+
"dev": true
|
1714 |
+
},
|
1715 |
+
"minimist": {
|
1716 |
+
"version": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
1717 |
+
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
1718 |
+
"dev": true
|
1719 |
+
},
|
1720 |
+
"mkdirp": {
|
1721 |
+
"version": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
1722 |
+
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
1723 |
+
"dev": true,
|
1724 |
+
"dependencies": {
|
1725 |
+
"minimist": {
|
1726 |
+
"version": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
1727 |
+
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
1728 |
+
"dev": true
|
1729 |
+
}
|
1730 |
+
}
|
1731 |
+
},
|
1732 |
+
"mkpath": {
|
1733 |
+
"version": "https://registry.npmjs.org/mkpath/-/mkpath-1.0.0.tgz",
|
1734 |
+
"integrity": "sha1-67Opd+evHGg65v2hK1Raa6bFhT0=",
|
1735 |
+
"dev": true
|
1736 |
+
},
|
1737 |
+
"mocha-nightwatch": {
|
1738 |
+
"version": "https://registry.npmjs.org/mocha-nightwatch/-/mocha-nightwatch-3.2.2.tgz",
|
1739 |
+
"integrity": "sha1-kby5s73gV912d8eBJeSR5Y1mZHw=",
|
1740 |
+
"dev": true,
|
1741 |
+
"dependencies": {
|
1742 |
+
"glob": {
|
1743 |
+
"version": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz",
|
1744 |
+
"integrity": "sha1-tCAqaQmbu00pKnwblbZoK2fr3JU=",
|
1745 |
+
"dev": true
|
1746 |
+
}
|
1747 |
+
}
|
1748 |
+
},
|
1749 |
+
"module-deps": {
|
1750 |
+
"version": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz",
|
1751 |
+
"integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=",
|
1752 |
+
"dev": true
|
1753 |
+
},
|
1754 |
+
"ms": {
|
1755 |
+
"version": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
1756 |
+
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=",
|
1757 |
+
"dev": true
|
1758 |
+
},
|
1759 |
+
"nan": {
|
1760 |
+
"version": "2.6.2",
|
1761 |
+
"resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz",
|
1762 |
+
"integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=",
|
1763 |
+
"dev": true,
|
1764 |
+
"optional": true
|
1765 |
+
},
|
1766 |
+
"netmask": {
|
1767 |
+
"version": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz",
|
1768 |
+
"integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=",
|
1769 |
+
"dev": true
|
1770 |
+
},
|
1771 |
+
"nightwatch": {
|
1772 |
+
"version": "https://registry.npmjs.org/nightwatch/-/nightwatch-0.9.15.tgz",
|
1773 |
+
"integrity": "sha1-caYqoWNo6doJ+ugAzLn7NNA2Fk0=",
|
1774 |
+
"dev": true,
|
1775 |
+
"dependencies": {
|
1776 |
+
"minimatch": {
|
1777 |
+
"version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
|
1778 |
+
"integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=",
|
1779 |
+
"dev": true
|
1780 |
+
}
|
1781 |
+
}
|
1782 |
+
},
|
1783 |
+
"normalize-path": {
|
1784 |
+
"version": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
|
1785 |
+
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
|
1786 |
+
"dev": true
|
1787 |
+
},
|
1788 |
+
"object.omit": {
|
1789 |
+
"version": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
|
1790 |
+
"integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
|
1791 |
+
"dev": true
|
1792 |
+
},
|
1793 |
+
"once": {
|
1794 |
+
"version": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
1795 |
+
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
1796 |
+
"dev": true
|
1797 |
+
},
|
1798 |
+
"optimist": {
|
1799 |
+
"version": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
|
1800 |
+
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
|
1801 |
+
"dev": true,
|
1802 |
+
"dependencies": {
|
1803 |
+
"minimist": {
|
1804 |
+
"version": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
1805 |
+
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
|
1806 |
+
"dev": true
|
1807 |
+
}
|
1808 |
+
}
|
1809 |
+
},
|
1810 |
+
"optionator": {
|
1811 |
+
"version": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
|
1812 |
+
"integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
|
1813 |
+
"dev": true,
|
1814 |
+
"dependencies": {
|
1815 |
+
"wordwrap": {
|
1816 |
+
"version": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
|
1817 |
+
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
|
1818 |
+
"dev": true
|
1819 |
+
}
|
1820 |
+
}
|
1821 |
+
},
|
1822 |
+
"os-browserify": {
|
1823 |
+
"version": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz",
|
1824 |
+
"integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=",
|
1825 |
+
"dev": true
|
1826 |
+
},
|
1827 |
+
"os-locale": {
|
1828 |
+
"version": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
|
1829 |
+
"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
|
1830 |
+
"dev": true
|
1831 |
+
},
|
1832 |
+
"outpipe": {
|
1833 |
+
"version": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz",
|
1834 |
+
"integrity": "sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I=",
|
1835 |
+
"dev": true
|
1836 |
+
},
|
1837 |
+
"pac-proxy-agent": {
|
1838 |
+
"version": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-1.0.0.tgz",
|
1839 |
+
"integrity": "sha1-3NW3RlgTZ0MKI26I6s/U5bjQaKU=",
|
1840 |
+
"dev": true
|
1841 |
+
},
|
1842 |
+
"pac-resolver": {
|
1843 |
+
"version": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-1.2.6.tgz",
|
1844 |
+
"integrity": "sha1-7QOvDFtZM1Bb3T8H91F1Rm1efPs=",
|
1845 |
+
"dev": true
|
1846 |
+
},
|
1847 |
+
"pako": {
|
1848 |
+
"version": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
|
1849 |
+
"integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=",
|
1850 |
+
"dev": true
|
1851 |
+
},
|
1852 |
+
"parents": {
|
1853 |
+
"version": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz",
|
1854 |
+
"integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=",
|
1855 |
+
"dev": true
|
1856 |
+
},
|
1857 |
+
"parse-asn1": {
|
1858 |
+
"version": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz",
|
1859 |
+
"integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=",
|
1860 |
+
"dev": true
|
1861 |
+
},
|
1862 |
+
"parse-glob": {
|
1863 |
+
"version": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
|
1864 |
+
"integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
|
1865 |
+
"dev": true
|
1866 |
+
},
|
1867 |
+
"path-browserify": {
|
1868 |
+
"version": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
|
1869 |
+
"integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
|
1870 |
+
"dev": true
|
1871 |
+
},
|
1872 |
+
"path-is-absolute": {
|
1873 |
+
"version": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
1874 |
+
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
1875 |
+
"dev": true
|
1876 |
+
},
|
1877 |
+
"path-parse": {
|
1878 |
+
"version": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
|
1879 |
+
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
|
1880 |
+
"dev": true
|
1881 |
+
},
|
1882 |
+
"path-platform": {
|
1883 |
+
"version": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz",
|
1884 |
+
"integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=",
|
1885 |
+
"dev": true
|
1886 |
+
},
|
1887 |
+
"pause-stream": {
|
1888 |
+
"version": "0.0.11",
|
1889 |
+
"resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
|
1890 |
+
"integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=",
|
1891 |
+
"dev": true
|
1892 |
+
},
|
1893 |
+
"pbkdf2": {
|
1894 |
+
"version": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.12.tgz",
|
1895 |
+
"integrity": "sha1-vjZ4XFBn6kjYBv+SMojF91C2uKI=",
|
1896 |
+
"dev": true
|
1897 |
+
},
|
1898 |
+
"prelude-ls": {
|
1899 |
+
"version": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
1900 |
+
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
|
1901 |
+
"dev": true
|
1902 |
+
},
|
1903 |
+
"preserve": {
|
1904 |
+
"version": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
|
1905 |
+
"integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
|
1906 |
+
"dev": true
|
1907 |
+
},
|
1908 |
+
"private": {
|
1909 |
+
"version": "https://registry.npmjs.org/private/-/private-0.1.7.tgz",
|
1910 |
+
"integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=",
|
1911 |
+
"dev": true
|
1912 |
+
},
|
1913 |
+
"process": {
|
1914 |
+
"version": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
1915 |
+
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
|
1916 |
+
"dev": true
|
1917 |
+
},
|
1918 |
+
"process-nextick-args": {
|
1919 |
+
"version": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
1920 |
+
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
|
1921 |
+
"dev": true
|
1922 |
+
},
|
1923 |
+
"proxy-agent": {
|
1924 |
+
"version": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.0.0.tgz",
|
1925 |
+
"integrity": "sha1-V+tTR6qAXXTsaByyVknbo5yTNJk=",
|
1926 |
+
"dev": true
|
1927 |
+
},
|
1928 |
+
"ps-tree": {
|
1929 |
+
"version": "1.1.0",
|
1930 |
+
"resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.1.0.tgz",
|
1931 |
+
"integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=",
|
1932 |
+
"dev": true
|
1933 |
+
},
|
1934 |
+
"public-encrypt": {
|
1935 |
+
"version": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz",
|
1936 |
+
"integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=",
|
1937 |
+
"dev": true
|
1938 |
+
},
|
1939 |
+
"punycode": {
|
1940 |
+
"version": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
|
1941 |
+
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
|
1942 |
+
"dev": true
|
1943 |
+
},
|
1944 |
+
"q": {
|
1945 |
+
"version": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
|
1946 |
+
"integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=",
|
1947 |
+
"dev": true
|
1948 |
+
},
|
1949 |
+
"querystring": {
|
1950 |
+
"version": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
|
1951 |
+
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
|
1952 |
+
"dev": true
|
1953 |
+
},
|
1954 |
+
"querystring-es3": {
|
1955 |
+
"version": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
|
1956 |
+
"integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
|
1957 |
+
"dev": true
|
1958 |
+
},
|
1959 |
+
"randomatic": {
|
1960 |
+
"version": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz",
|
1961 |
+
"integrity": "sha1-EQ3Kv/OX6dz/fAeJzMCkmt8exbs=",
|
1962 |
+
"dev": true
|
1963 |
+
},
|
1964 |
+
"randombytes": {
|
1965 |
+
"version": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz",
|
1966 |
+
"integrity": "sha1-Z0yZdgkBw8QRJ3GjHlIdw0nMCew=",
|
1967 |
+
"dev": true
|
1968 |
+
},
|
1969 |
+
"read-only-stream": {
|
1970 |
+
"version": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz",
|
1971 |
+
"integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=",
|
1972 |
+
"dev": true
|
1973 |
+
},
|
1974 |
+
"readable-stream": {
|
1975 |
+
"version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz",
|
1976 |
+
"integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=",
|
1977 |
+
"dev": true,
|
1978 |
+
"dependencies": {
|
1979 |
+
"string_decoder": {
|
1980 |
+
"version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
|
1981 |
+
"integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
|
1982 |
+
"dev": true
|
1983 |
+
}
|
1984 |
+
}
|
1985 |
+
},
|
1986 |
+
"readdirp": {
|
1987 |
+
"version": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
|
1988 |
+
"integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=",
|
1989 |
+
"dev": true
|
1990 |
+
},
|
1991 |
+
"recast": {
|
1992 |
+
"version": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz",
|
1993 |
+
"integrity": "sha1-lCgI96oBbx+nFCxGHX5XBKqo1pc=",
|
1994 |
+
"dev": true,
|
1995 |
+
"dependencies": {
|
1996 |
+
"ast-types": {
|
1997 |
+
"version": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.12.tgz",
|
1998 |
+
"integrity": "sha1-oNkOQ1G7iHcWyD/WN+v4GK9K38w=",
|
1999 |
+
"dev": true
|
2000 |
+
},
|
2001 |
+
"esprima-fb": {
|
2002 |
+
"version": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz",
|
2003 |
+
"integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=",
|
2004 |
+
"dev": true
|
2005 |
+
}
|
2006 |
+
}
|
2007 |
+
},
|
2008 |
+
"regenerator": {
|
2009 |
+
"version": "https://registry.npmjs.org/regenerator/-/regenerator-0.8.46.tgz",
|
2010 |
+
"integrity": "sha1-FUwydoY2HtUsrWmyVF78U6PQdpY=",
|
2011 |
+
"dev": true,
|
2012 |
+
"dependencies": {
|
2013 |
+
"esprima-fb": {
|
2014 |
+
"version": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz",
|
2015 |
+
"integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=",
|
2016 |
+
"dev": true
|
2017 |
+
}
|
2018 |
+
}
|
2019 |
+
},
|
2020 |
+
"regenerator-runtime": {
|
2021 |
+
"version": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz",
|
2022 |
+
"integrity": "sha1-0z65XQ0gAaS+OWWXB8UbDLcc4Ck=",
|
2023 |
+
"dev": true
|
2024 |
+
},
|
2025 |
+
"regex-cache": {
|
2026 |
+
"version": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz",
|
2027 |
+
"integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=",
|
2028 |
+
"dev": true
|
2029 |
+
},
|
2030 |
+
"remove-trailing-separator": {
|
2031 |
+
"version": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz",
|
2032 |
+
"integrity": "sha1-YV67lq9VlVLUv0BXyENtSGq2PMQ=",
|
2033 |
+
"dev": true
|
2034 |
+
},
|
2035 |
+
"repeat-element": {
|
2036 |
+
"version": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
|
2037 |
+
"integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=",
|
2038 |
+
"dev": true
|
2039 |
+
},
|
2040 |
+
"repeat-string": {
|
2041 |
+
"version": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
|
2042 |
+
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
|
2043 |
+
"dev": true
|
2044 |
+
},
|
2045 |
+
"resolve": {
|
2046 |
+
"version": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz",
|
2047 |
+
"integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=",
|
2048 |
+
"dev": true
|
2049 |
+
},
|
2050 |
+
"right-align": {
|
2051 |
+
"version": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
|
2052 |
+
"integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
|
2053 |
+
"dev": true
|
2054 |
+
},
|
2055 |
+
"rimraf": {
|
2056 |
+
"version": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
|
2057 |
+
"integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
|
2058 |
+
"dev": true
|
2059 |
+
},
|
2060 |
+
"ripemd160": {
|
2061 |
+
"version": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz",
|
2062 |
+
"integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=",
|
2063 |
+
"dev": true
|
2064 |
+
},
|
2065 |
+
"safe-buffer": {
|
2066 |
+
"version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
|
2067 |
+
"integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=",
|
2068 |
+
"dev": true
|
2069 |
+
},
|
2070 |
+
"semver": {
|
2071 |
+
"version": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
|
2072 |
+
"integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=",
|
2073 |
+
"dev": true
|
2074 |
+
},
|
2075 |
+
"set-immediate-shim": {
|
2076 |
+
"version": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
|
2077 |
+
"integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=",
|
2078 |
+
"dev": true
|
2079 |
+
},
|
2080 |
+
"sha.js": {
|
2081 |
+
"version": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz",
|
2082 |
+
"integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=",
|
2083 |
+
"dev": true
|
2084 |
+
},
|
2085 |
+
"shasum": {
|
2086 |
+
"version": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz",
|
2087 |
+
"integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=",
|
2088 |
+
"dev": true
|
2089 |
+
},
|
2090 |
+
"shell-quote": {
|
2091 |
+
"version": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz",
|
2092 |
+
"integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=",
|
2093 |
+
"dev": true
|
2094 |
+
},
|
2095 |
+
"simple-fmt": {
|
2096 |
+
"version": "https://registry.npmjs.org/simple-fmt/-/simple-fmt-0.1.0.tgz",
|
2097 |
+
"integrity": "sha1-GRv1ZqWeZTBILLJatTtKjchcOms=",
|
2098 |
+
"dev": true
|
2099 |
+
},
|
2100 |
+
"simple-is": {
|
2101 |
+
"version": "https://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz",
|
2102 |
+
"integrity": "sha1-Krt1qt453rXMgVzhDmGRFkhQuvA=",
|
2103 |
+
"dev": true
|
2104 |
+
},
|
2105 |
+
"smart-buffer": {
|
2106 |
+
"version": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
|
2107 |
+
"integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=",
|
2108 |
+
"dev": true
|
2109 |
+
},
|
2110 |
+
"socks": {
|
2111 |
+
"version": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz",
|
2112 |
+
"integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=",
|
2113 |
+
"dev": true
|
2114 |
+
},
|
2115 |
+
"socks-proxy-agent": {
|
2116 |
+
"version": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.0.0.tgz",
|
2117 |
+
"integrity": "sha1-xnSELXBBD7KK4ekuYTWpJ4VLwnU=",
|
2118 |
+
"dev": true
|
2119 |
+
},
|
2120 |
+
"source-map": {
|
2121 |
+
"version": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
|
2122 |
+
"integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
|
2123 |
+
"dev": true
|
2124 |
+
},
|
2125 |
+
"split": {
|
2126 |
+
"version": "0.3.3",
|
2127 |
+
"resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",
|
2128 |
+
"integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=",
|
2129 |
+
"dev": true
|
2130 |
+
},
|
2131 |
+
"stable": {
|
2132 |
+
"version": "https://registry.npmjs.org/stable/-/stable-0.1.6.tgz",
|
2133 |
+
"integrity": "sha1-kQ9dKu17Ugxud3SZwfMuE5/eyxA=",
|
2134 |
+
"dev": true
|
2135 |
+
},
|
2136 |
+
"stream-browserify": {
|
2137 |
+
"version": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
|
2138 |
+
"integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
|
2139 |
+
"dev": true
|
2140 |
+
},
|
2141 |
+
"stream-combiner": {
|
2142 |
+
"version": "0.0.4",
|
2143 |
+
"resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",
|
2144 |
+
"integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=",
|
2145 |
+
"dev": true
|
2146 |
+
},
|
2147 |
+
"stream-combiner2": {
|
2148 |
+
"version": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
|
2149 |
+
"integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
|
2150 |
+
"dev": true
|
2151 |
+
},
|
2152 |
+
"stream-http": {
|
2153 |
+
"version": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.1.tgz",
|
2154 |
+
"integrity": "sha1-VGpRdBrVprB+njGwsQRBqRffUoo=",
|
2155 |
+
"dev": true
|
2156 |
+
},
|
2157 |
+
"stream-splicer": {
|
2158 |
+
"version": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz",
|
2159 |
+
"integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=",
|
2160 |
+
"dev": true
|
2161 |
+
},
|
2162 |
+
"stream-to": {
|
2163 |
+
"version": "https://registry.npmjs.org/stream-to/-/stream-to-0.2.2.tgz",
|
2164 |
+
"integrity": "sha1-hDBgmNhf25kLn6MAsbPM9V6O8B0=",
|
2165 |
+
"dev": true
|
2166 |
+
},
|
2167 |
+
"stream-to-buffer": {
|
2168 |
+
"version": "https://registry.npmjs.org/stream-to-buffer/-/stream-to-buffer-0.1.0.tgz",
|
2169 |
+
"integrity": "sha1-JnmdkDqyAlyb1VCsRxcbAPjdgKk=",
|
2170 |
+
"dev": true
|
2171 |
+
},
|
2172 |
+
"string_decoder": {
|
2173 |
+
"version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
2174 |
+
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
|
2175 |
+
"dev": true
|
2176 |
+
},
|
2177 |
+
"stringmap": {
|
2178 |
+
"version": "https://registry.npmjs.org/stringmap/-/stringmap-0.2.2.tgz",
|
2179 |
+
"integrity": "sha1-VWwTeyWPlCuHdvWy71gqoGnX0bE=",
|
2180 |
+
"dev": true
|
2181 |
+
},
|
2182 |
+
"stringset": {
|
2183 |
+
"version": "https://registry.npmjs.org/stringset/-/stringset-0.2.1.tgz",
|
2184 |
+
"integrity": "sha1-7yWcTjSTRDd/zRyRPdLoSMnAQrU=",
|
2185 |
+
"dev": true
|
2186 |
+
},
|
2187 |
+
"subarg": {
|
2188 |
+
"version": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
|
2189 |
+
"integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=",
|
2190 |
+
"dev": true
|
2191 |
+
},
|
2192 |
+
"supports-color": {
|
2193 |
+
"version": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz",
|
2194 |
+
"integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=",
|
2195 |
+
"dev": true
|
2196 |
+
},
|
2197 |
+
"syntax-error": {
|
2198 |
+
"version": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz",
|
2199 |
+
"integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=",
|
2200 |
+
"dev": true
|
2201 |
+
},
|
2202 |
+
"through": {
|
2203 |
+
"version": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
2204 |
+
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
|
2205 |
+
"dev": true
|
2206 |
+
},
|
2207 |
+
"through2": {
|
2208 |
+
"version": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
|
2209 |
+
"integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
|
2210 |
+
"dev": true
|
2211 |
+
},
|
2212 |
+
"thunkify": {
|
2213 |
+
"version": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz",
|
2214 |
+
"integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=",
|
2215 |
+
"dev": true
|
2216 |
+
},
|
2217 |
+
"timers-browserify": {
|
2218 |
+
"version": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz",
|
2219 |
+
"integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=",
|
2220 |
+
"dev": true
|
2221 |
+
},
|
2222 |
+
"to-arraybuffer": {
|
2223 |
+
"version": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
|
2224 |
+
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
|
2225 |
+
"dev": true
|
2226 |
+
},
|
2227 |
+
"tryor": {
|
2228 |
+
"version": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz",
|
2229 |
+
"integrity": "sha1-gUXkynyv9ArN48z5Rui4u3W0Fys=",
|
2230 |
+
"dev": true
|
2231 |
+
},
|
2232 |
+
"tty-browserify": {
|
2233 |
+
"version": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
|
2234 |
+
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
|
2235 |
+
"dev": true
|
2236 |
+
},
|
2237 |
+
"type-check": {
|
2238 |
+
"version": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
|
2239 |
+
"integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
|
2240 |
+
"dev": true
|
2241 |
+
},
|
2242 |
+
"type-detect": {
|
2243 |
+
"version": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
|
2244 |
+
"integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=",
|
2245 |
+
"dev": true
|
2246 |
+
},
|
2247 |
+
"typedarray": {
|
2248 |
+
"version": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
2249 |
+
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
|
2250 |
+
"dev": true
|
2251 |
+
},
|
2252 |
+
"umd": {
|
2253 |
+
"version": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz",
|
2254 |
+
"integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=",
|
2255 |
+
"dev": true
|
2256 |
+
},
|
2257 |
+
"url": {
|
2258 |
+
"version": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
|
2259 |
+
"integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
|
2260 |
+
"dev": true,
|
2261 |
+
"dependencies": {
|
2262 |
+
"punycode": {
|
2263 |
+
"version": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
|
2264 |
+
"integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
|
2265 |
+
"dev": true
|
2266 |
+
}
|
2267 |
+
}
|
2268 |
+
},
|
2269 |
+
"util": {
|
2270 |
+
"version": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
|
2271 |
+
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
|
2272 |
+
"dev": true,
|
2273 |
+
"dependencies": {
|
2274 |
+
"inherits": {
|
2275 |
+
"version": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
|
2276 |
+
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
|
2277 |
+
"dev": true
|
2278 |
+
}
|
2279 |
+
}
|
2280 |
+
},
|
2281 |
+
"util-deprecate": {
|
2282 |
+
"version": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
2283 |
+
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
2284 |
+
"dev": true
|
2285 |
+
},
|
2286 |
+
"vm-browserify": {
|
2287 |
+
"version": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
|
2288 |
+
"integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
|
2289 |
+
"dev": true
|
2290 |
+
},
|
2291 |
+
"watchify": {
|
2292 |
+
"version": "https://registry.npmjs.org/watchify/-/watchify-3.9.0.tgz",
|
2293 |
+
"integrity": "sha1-8HX9LoqGrN6Eztum5cKgvt1SPZ4=",
|
2294 |
+
"dev": true
|
2295 |
+
},
|
2296 |
+
"window-size": {
|
2297 |
+
"version": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz",
|
2298 |
+
"integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=",
|
2299 |
+
"dev": true
|
2300 |
+
},
|
2301 |
+
"wordwrap": {
|
2302 |
+
"version": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
|
2303 |
+
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
|
2304 |
+
"dev": true
|
2305 |
+
},
|
2306 |
+
"wrappy": {
|
2307 |
+
"version": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
2308 |
+
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
2309 |
+
"dev": true
|
2310 |
+
},
|
2311 |
+
"xregexp": {
|
2312 |
+
"version": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz",
|
2313 |
+
"integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=",
|
2314 |
+
"dev": true
|
2315 |
+
},
|
2316 |
+
"xtend": {
|
2317 |
+
"version": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
2318 |
+
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
|
2319 |
+
"dev": true
|
2320 |
+
},
|
2321 |
+
"y18n": {
|
2322 |
+
"version": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
|
2323 |
+
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
|
2324 |
+
"dev": true
|
2325 |
+
},
|
2326 |
+
"yargs": {
|
2327 |
+
"version": "https://registry.npmjs.org/yargs/-/yargs-3.27.0.tgz",
|
2328 |
+
"integrity": "sha1-ISBUaTFuk5Ex1Z8toMbX+YIh6kA=",
|
2329 |
+
"dev": true
|
2330 |
+
}
|
2331 |
+
}
|
2332 |
+
}
|
readme.txt
CHANGED
@@ -1,90 +1,51 @@
|
|
1 |
=== ACF Content Analysis for Yoast SEO ===
|
2 |
-
Contributors:
|
3 |
-
Tags:
|
4 |
-
Requires at least: 4.
|
5 |
-
Tested up to: 4.
|
6 |
-
|
7 |
-
License:
|
8 |
-
|
|
|
9 |
|
10 |
-
|
11 |
-
Requires version 3.0 or later of Yoast SEO plugin.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
This plugin ensures that Yoast SEO
|
16 |
-
Requires version 3.0 or later of Yoast SEO plugin.
|
17 |
|
18 |
-
|
19 |
-
`ysacf_exclude_fields`: exclude acf fields from Yoast scoring. Should return array of field names.
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
add_filter('ysacf_exclude_fields', function(){
|
25 |
-
return array(
|
26 |
-
'text_color',
|
27 |
-
'background_image'
|
28 |
-
);
|
29 |
-
});
|
30 |
-
`
|
31 |
|
|
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
1. Download, unzip and upload the plugin folder to the `/wp-content/plugins/` directory
|
36 |
-
2. Activate the plugin through the 'Plugins' menu in WordPress (activate for network if multisite)
|
37 |
-
|
38 |
-
== Frequently Asked Questions ==
|
39 |
-
|
40 |
-
= I'm using Flexible Content and the field name is displayed in the snippet preview. How do I remove it? =
|
41 |
-
|
42 |
-
You can remove it using the ysacf_exclude_fields filter.
|
43 |
-
|
44 |
-
`
|
45 |
-
add_filter('ysacf_exclude_fields', function(){
|
46 |
-
return array(
|
47 |
-
'acf_fc_layout',
|
48 |
-
);
|
49 |
-
});
|
50 |
-
`
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
-
=
|
55 |
-
* Tested with WordPress 4.7.3.
|
56 |
-
* Added FAQ section to plugin repository page.
|
57 |
|
58 |
-
|
59 |
-
* Fix for taxonomies in the latest version of WordPress
|
60 |
|
61 |
-
|
62 |
-
*
|
63 |
-
* Add check for empty content.
|
64 |
|
65 |
-
= 1.2.
|
66 |
-
* Fix PHP warnings.
|
67 |
-
* Works with WordPress 4.5
|
68 |
|
69 |
-
|
70 |
-
* Fix warning for undefined index
|
71 |
-
* Fix support for multisite
|
72 |
|
73 |
-
|
74 |
-
*
|
75 |
|
76 |
= 1.2.0 =
|
77 |
-
* Add support for alt and title tags in images.
|
78 |
-
* Security improvements
|
79 |
-
* Images returned as url will now be analysed as urls.
|
80 |
|
81 |
-
|
82 |
-
* Bugfix for undefined index
|
83 |
|
84 |
-
|
85 |
-
*
|
86 |
-
* Bug fixes and stability improvements
|
87 |
-
* Works with WordPress 4.4.1
|
88 |
|
89 |
-
|
90 |
-
*
|
1 |
=== ACF Content Analysis for Yoast SEO ===
|
2 |
+
Contributors: yoast, angrycreative, kraftner, marcusforsberg, viktorfroberg, joostdevalk, atimmer, jipmoors, theorboman
|
3 |
+
Tags: Yoast, SEO, ACF, Advanced Custom Fields, analysis, Search Engine Optimization
|
4 |
+
Requires at least: 4.3.1
|
5 |
+
Tested up to: 4.8.1
|
6 |
+
License: GPLv3
|
7 |
+
License URI: http://www.gnu.org/licenses/gpl.html
|
8 |
+
Stable tag: 2.0.0
|
9 |
+
Text Domain: yoast-acf-analysis
|
10 |
|
11 |
+
WordPress plugin that adds the content of all ACF fields to the Yoast SEO score analysis.
|
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
This plugin ensures that Yoast SEO analyzes all ACF content including Flexible Content and Repeaters.
|
|
|
16 |
|
17 |
+
[Yoast SEO for WordPress](https://yoast.com/wordpress/plugins/) content and SEO analysis does not take in to account the content of a post's [Advanced Custom Fields](http://www.advancedcustomfields.com/). This plugin uses the plugin system of Yoast SEO for WordPress 3.1+ to hook into the analyser in order to add ACF content to the SEO analysis.
|
|
|
18 |
|
19 |
+
This had previously been done by the [WordPress SEO ACF Content Analysis](https://wordpress.org/plugins/wp-seo-acf-content-analysis/) plugin but that no longer works with Yoast 3.0. Kudos to [ryuheixys](https://profiles.wordpress.org/ryuheixys/), the author of that plugin, for the original idea.
|
20 |
|
21 |
+
This Plugin is compatible with the free ACF 4 Version as well as with the PRO Version 5. Please be aware that it ignores Pro Add-Ons for Version 4. In that case please upgrade to ACF PRO Version 5.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
> If you have issues, please [submit them on GitHub](https://github.com/Yoast/yoast-acf-analysis/issues)
|
24 |
|
25 |
+
Previously called Yoast ACF Analysis.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
== Changelog ==
|
28 |
|
29 |
+
= 2.0.0 =
|
|
|
|
|
30 |
|
31 |
+
Released August 22th, 2017
|
|
|
32 |
|
33 |
+
* Changed:
|
34 |
+
* Complete rewrite, including full support for ACF 4 and 5.
|
|
|
35 |
|
36 |
+
= 1.2.1 =
|
|
|
|
|
37 |
|
38 |
+
Released July 24th, 2017
|
|
|
|
|
39 |
|
40 |
+
Bugfixes:
|
41 |
+
* Fixes Yoast SEO Premium social sharing tabs not showing any content when this plugin is active, props [Matt McAchran](https://github.com/mmcachran).
|
42 |
|
43 |
= 1.2.0 =
|
|
|
|
|
|
|
44 |
|
45 |
+
Released June 30th, 2016
|
|
|
46 |
|
47 |
+
* Bugfixes:
|
48 |
+
* Fixes an incompatibility issue with Yoast SEO version 3.2+ where the assets are registered with a new prefix.
|
|
|
|
|
49 |
|
50 |
+
* Internationalization:
|
51 |
+
* Improved text in notifications when dependencies are missing.
|
ruleset.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<ruleset name="Yoast SEO ACF Analysis">
|
3 |
+
<description>Yoast SEO ACF Analysis Coding Standards</description>
|
4 |
+
|
5 |
+
<!-- ##### WordPress sniffs #####-->
|
6 |
+
<rule ref="WordPress">
|
7 |
+
<!-- Catches way too many things, like vars and file headers. -->
|
8 |
+
<exclude name="Generic.Commenting.DocComment.MissingShort" />
|
9 |
+
|
10 |
+
<!-- Namespacing hooks sound reasonable. -->
|
11 |
+
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
|
12 |
+
</rule>
|
13 |
+
|
14 |
+
<!-- exclude the 'empty' index files from some documentation checks -->
|
15 |
+
<rule ref="Squiz.Commenting.FileComment">
|
16 |
+
<exclude-pattern>*/index.php</exclude-pattern>
|
17 |
+
</rule>
|
18 |
+
|
19 |
+
<rule ref="Squiz.Commenting">
|
20 |
+
<exclude name="Squiz.Commenting.FileComment.Missing" />
|
21 |
+
</rule>
|
22 |
+
|
23 |
+
</ruleset>
|
tests/js/system/.env.example.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var chromedriver = require('chromedriver');
|
2 |
+
module.exports = {
|
3 |
+
"user" : "wp",
|
4 |
+
"password" : "wp",
|
5 |
+
before : function(done) {
|
6 |
+
chromedriver.start();
|
7 |
+
done();
|
8 |
+
},
|
9 |
+
after : function(done) {
|
10 |
+
chromedriver.stop();
|
11 |
+
done();
|
12 |
+
},
|
13 |
+
beforeEach: function( browser, done ) {
|
14 |
+
var page = browser.page.WordPressHelper();
|
15 |
+
page.login();
|
16 |
+
}
|
17 |
+
};
|
tests/js/system/data/acf4.php
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(function_exists("register_field_group"))
|
3 |
+
{
|
4 |
+
register_field_group(array (
|
5 |
+
'id' => 'acf_yoast-acf-analysis-test-fields-acf4',
|
6 |
+
'title' => 'Yoast ACF Analysis Test Fields ACF4',
|
7 |
+
'fields' => array (
|
8 |
+
array (
|
9 |
+
'key' => 'field_591eb45f2be86',
|
10 |
+
'label' => 'Text',
|
11 |
+
'name' => 'yoast_acf_analysis_text',
|
12 |
+
'type' => 'text',
|
13 |
+
'default_value' => '',
|
14 |
+
'placeholder' => '',
|
15 |
+
'prepend' => '',
|
16 |
+
'append' => '',
|
17 |
+
'formatting' => 'html',
|
18 |
+
'maxlength' => '',
|
19 |
+
),
|
20 |
+
array (
|
21 |
+
'key' => 'field_591eb47e2be87',
|
22 |
+
'label' => 'Text Area',
|
23 |
+
'name' => 'yoast_acf_analysis_textarea',
|
24 |
+
'type' => 'textarea',
|
25 |
+
'default_value' => '',
|
26 |
+
'placeholder' => '',
|
27 |
+
'maxlength' => '',
|
28 |
+
'rows' => '',
|
29 |
+
'formatting' => 'br',
|
30 |
+
),
|
31 |
+
array (
|
32 |
+
'key' => 'field_591eb4a92be89',
|
33 |
+
'label' => 'Email',
|
34 |
+
'name' => 'yoast_acf_analysis_email',
|
35 |
+
'type' => 'email',
|
36 |
+
'default_value' => '',
|
37 |
+
'placeholder' => '',
|
38 |
+
'prepend' => '',
|
39 |
+
'append' => '',
|
40 |
+
),
|
41 |
+
array (
|
42 |
+
'key' => 'field_591eb4da2be8b',
|
43 |
+
'label' => 'Wysiwyg',
|
44 |
+
'name' => 'yoast_acf_analysis_wysiwyg',
|
45 |
+
'type' => 'wysiwyg',
|
46 |
+
'default_value' => '',
|
47 |
+
'toolbar' => 'full',
|
48 |
+
'media_upload' => 'yes',
|
49 |
+
),
|
50 |
+
array (
|
51 |
+
'key' => 'field_591eb4fa2be8c',
|
52 |
+
'label' => 'Image',
|
53 |
+
'name' => 'yoast_acf_analysis_image',
|
54 |
+
'type' => 'image',
|
55 |
+
'save_format' => 'object',
|
56 |
+
'preview_size' => 'thumbnail',
|
57 |
+
'library' => 'all',
|
58 |
+
),
|
59 |
+
array (
|
60 |
+
'key' => 'field_591eb5152be8d',
|
61 |
+
'label' => 'Taxonomy Checkbox',
|
62 |
+
'name' => 'yoast_acf_analysis_taxonomy_checkbox',
|
63 |
+
'type' => 'taxonomy',
|
64 |
+
'taxonomy' => 'category',
|
65 |
+
'field_type' => 'checkbox',
|
66 |
+
'allow_null' => 0,
|
67 |
+
'load_save_terms' => 0,
|
68 |
+
'return_format' => 'id',
|
69 |
+
'multiple' => 0,
|
70 |
+
),
|
71 |
+
array (
|
72 |
+
'key' => 'field_591eb55c2be8e',
|
73 |
+
'label' => 'Taxonomy Multi Select',
|
74 |
+
'name' => 'yoast_acf_analysis_taxonomy_multiselect',
|
75 |
+
'type' => 'taxonomy',
|
76 |
+
'taxonomy' => 'category',
|
77 |
+
'field_type' => 'multi_select',
|
78 |
+
'allow_null' => 0,
|
79 |
+
'load_save_terms' => 0,
|
80 |
+
'return_format' => 'id',
|
81 |
+
'multiple' => 0,
|
82 |
+
),
|
83 |
+
),
|
84 |
+
'location' => array (
|
85 |
+
array (
|
86 |
+
array (
|
87 |
+
'param' => 'post_type',
|
88 |
+
'operator' => '==',
|
89 |
+
'value' => 'post',
|
90 |
+
'order_no' => 0,
|
91 |
+
'group_no' => 0,
|
92 |
+
),
|
93 |
+
),
|
94 |
+
),
|
95 |
+
'options' => array (
|
96 |
+
'position' => 'normal',
|
97 |
+
'layout' => 'default',
|
98 |
+
'hide_on_screen' => array (
|
99 |
+
),
|
100 |
+
),
|
101 |
+
'menu_order' => 0,
|
102 |
+
));
|
103 |
+
}
|
tests/js/system/data/acf5.php
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if( function_exists('acf_add_local_field_group') ):
|
3 |
+
|
4 |
+
acf_add_local_field_group(array (
|
5 |
+
'key' => 'group_592573d9be0dd',
|
6 |
+
'title' => 'Yoast ACF Analysis Test Fields - ACF 5',
|
7 |
+
'fields' => array (
|
8 |
+
array (
|
9 |
+
'key' => 'field_591eb45f2be86',
|
10 |
+
'label' => 'Text',
|
11 |
+
'name' => 'yoast_acf_analysis_text',
|
12 |
+
'type' => 'text',
|
13 |
+
'instructions' => '',
|
14 |
+
'required' => 0,
|
15 |
+
'conditional_logic' => 0,
|
16 |
+
'wrapper' => array (
|
17 |
+
'width' => '',
|
18 |
+
'class' => '',
|
19 |
+
'id' => '',
|
20 |
+
),
|
21 |
+
'default_value' => '',
|
22 |
+
'placeholder' => '',
|
23 |
+
'prepend' => '',
|
24 |
+
'append' => '',
|
25 |
+
'formatting' => 'html',
|
26 |
+
'maxlength' => '',
|
27 |
+
),
|
28 |
+
array (
|
29 |
+
'key' => 'field_591eb47e2be87',
|
30 |
+
'label' => 'Text Area',
|
31 |
+
'name' => 'yoast_acf_analysis_textarea',
|
32 |
+
'type' => 'textarea',
|
33 |
+
'instructions' => '',
|
34 |
+
'required' => 0,
|
35 |
+
'conditional_logic' => 0,
|
36 |
+
'wrapper' => array (
|
37 |
+
'width' => '',
|
38 |
+
'class' => '',
|
39 |
+
'id' => '',
|
40 |
+
),
|
41 |
+
'default_value' => '',
|
42 |
+
'placeholder' => '',
|
43 |
+
'maxlength' => '',
|
44 |
+
'rows' => '',
|
45 |
+
'new_lines' => 'br',
|
46 |
+
),
|
47 |
+
array (
|
48 |
+
'key' => 'field_591eb4a92be89',
|
49 |
+
'label' => 'Email',
|
50 |
+
'name' => 'yoast_acf_analysis_email',
|
51 |
+
'type' => 'email',
|
52 |
+
'instructions' => '',
|
53 |
+
'required' => 0,
|
54 |
+
'conditional_logic' => 0,
|
55 |
+
'wrapper' => array (
|
56 |
+
'width' => '',
|
57 |
+
'class' => '',
|
58 |
+
'id' => '',
|
59 |
+
),
|
60 |
+
'default_value' => '',
|
61 |
+
'placeholder' => '',
|
62 |
+
'prepend' => '',
|
63 |
+
'append' => '',
|
64 |
+
),
|
65 |
+
array (
|
66 |
+
'key' => 'field_59256f74f2224',
|
67 |
+
'label' => 'Url',
|
68 |
+
'name' => 'yoast_acf_analysis_url',
|
69 |
+
'type' => 'url',
|
70 |
+
'instructions' => '',
|
71 |
+
'required' => 0,
|
72 |
+
'conditional_logic' => 0,
|
73 |
+
'wrapper' => array (
|
74 |
+
'width' => '',
|
75 |
+
'class' => '',
|
76 |
+
'id' => '',
|
77 |
+
),
|
78 |
+
'default_value' => '',
|
79 |
+
'placeholder' => '',
|
80 |
+
),
|
81 |
+
array (
|
82 |
+
'key' => 'field_591eb4da2be8b',
|
83 |
+
'label' => 'Wysiwyg',
|
84 |
+
'name' => 'yoast_acf_analysis_wysiwyg',
|
85 |
+
'type' => 'wysiwyg',
|
86 |
+
'instructions' => '',
|
87 |
+
'required' => 0,
|
88 |
+
'conditional_logic' => 0,
|
89 |
+
'wrapper' => array (
|
90 |
+
'width' => '',
|
91 |
+
'class' => '',
|
92 |
+
'id' => '',
|
93 |
+
),
|
94 |
+
'default_value' => '',
|
95 |
+
'toolbar' => 'full',
|
96 |
+
'media_upload' => 1,
|
97 |
+
'tabs' => 'all',
|
98 |
+
'delay' => 0,
|
99 |
+
),
|
100 |
+
array (
|
101 |
+
'key' => 'field_591eb4fa2be8c',
|
102 |
+
'label' => 'Image',
|
103 |
+
'name' => 'yoast_acf_analysis_image',
|
104 |
+
'type' => 'image',
|
105 |
+
'instructions' => '',
|
106 |
+
'required' => 0,
|
107 |
+
'conditional_logic' => 0,
|
108 |
+
'wrapper' => array (
|
109 |
+
'width' => '',
|
110 |
+
'class' => '',
|
111 |
+
'id' => '',
|
112 |
+
),
|
113 |
+
'preview_size' => 'thumbnail',
|
114 |
+
'library' => 'all',
|
115 |
+
'return_format' => 'array',
|
116 |
+
'min_width' => 0,
|
117 |
+
'min_height' => 0,
|
118 |
+
'min_size' => 0,
|
119 |
+
'max_width' => 0,
|
120 |
+
'max_height' => 0,
|
121 |
+
'max_size' => 0,
|
122 |
+
'mime_types' => '',
|
123 |
+
),
|
124 |
+
array (
|
125 |
+
'key' => 'field_59256f82f2225',
|
126 |
+
'label' => 'Gallery',
|
127 |
+
'name' => 'yoast_acf_analysis_gallery',
|
128 |
+
'type' => 'gallery',
|
129 |
+
'instructions' => '',
|
130 |
+
'required' => 0,
|
131 |
+
'conditional_logic' => 0,
|
132 |
+
'wrapper' => array (
|
133 |
+
'width' => '',
|
134 |
+
'class' => '',
|
135 |
+
'id' => '',
|
136 |
+
),
|
137 |
+
'min' => '',
|
138 |
+
'max' => '',
|
139 |
+
'insert' => 'append',
|
140 |
+
'library' => 'all',
|
141 |
+
'min_width' => '',
|
142 |
+
'min_height' => '',
|
143 |
+
'min_size' => '',
|
144 |
+
'max_width' => '',
|
145 |
+
'max_height' => '',
|
146 |
+
'max_size' => '',
|
147 |
+
'mime_types' => '',
|
148 |
+
),
|
149 |
+
array (
|
150 |
+
'key' => 'field_591eb5152be8d',
|
151 |
+
'label' => 'Taxonomy Checkbox',
|
152 |
+
'name' => 'yoast_acf_analysis_taxonomy_checkbox',
|
153 |
+
'type' => 'taxonomy',
|
154 |
+
'instructions' => '',
|
155 |
+
'required' => 0,
|
156 |
+
'conditional_logic' => 0,
|
157 |
+
'wrapper' => array (
|
158 |
+
'width' => '',
|
159 |
+
'class' => '',
|
160 |
+
'id' => '',
|
161 |
+
),
|
162 |
+
'taxonomy' => 'category',
|
163 |
+
'field_type' => 'checkbox',
|
164 |
+
'allow_null' => 0,
|
165 |
+
'load_save_terms' => 0,
|
166 |
+
'return_format' => 'id',
|
167 |
+
'multiple' => 0,
|
168 |
+
'add_term' => 1,
|
169 |
+
'load_terms' => 0,
|
170 |
+
'save_terms' => 0,
|
171 |
+
),
|
172 |
+
array (
|
173 |
+
'key' => 'field_591eb55c2be8e',
|
174 |
+
'label' => 'Taxonomy Multi Select',
|
175 |
+
'name' => 'yoast_acf_analysis_taxonomy_multiselect',
|
176 |
+
'type' => 'taxonomy',
|
177 |
+
'instructions' => '',
|
178 |
+
'required' => 0,
|
179 |
+
'conditional_logic' => 0,
|
180 |
+
'wrapper' => array (
|
181 |
+
'width' => '',
|
182 |
+
'class' => '',
|
183 |
+
'id' => '',
|
184 |
+
),
|
185 |
+
'taxonomy' => 'category',
|
186 |
+
'field_type' => 'multi_select',
|
187 |
+
'allow_null' => 0,
|
188 |
+
'load_save_terms' => 0,
|
189 |
+
'return_format' => 'id',
|
190 |
+
'multiple' => 0,
|
191 |
+
'add_term' => 1,
|
192 |
+
'load_terms' => 0,
|
193 |
+
'save_terms' => 0,
|
194 |
+
),
|
195 |
+
),
|
196 |
+
'location' => array (
|
197 |
+
array (
|
198 |
+
array (
|
199 |
+
'param' => 'post_type',
|
200 |
+
'operator' => '==',
|
201 |
+
'value' => 'post',
|
202 |
+
),
|
203 |
+
),
|
204 |
+
),
|
205 |
+
'menu_order' => 0,
|
206 |
+
'position' => 'normal',
|
207 |
+
'style' => 'seamless',
|
208 |
+
'label_placement' => 'top',
|
209 |
+
'instruction_placement' => 'label',
|
210 |
+
'hide_on_screen' => '',
|
211 |
+
'active' => 1,
|
212 |
+
'description' => '',
|
213 |
+
));
|
214 |
+
|
215 |
+
endif;
|
tests/js/system/helpers/dummyContent.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var crypto = require('crypto');
|
2 |
+
|
3 |
+
module.exports = {
|
4 |
+
|
5 |
+
hash: function( toHash ){
|
6 |
+
|
7 |
+
if(!toHash){
|
8 |
+
toHash = (new Date()).toString();
|
9 |
+
}
|
10 |
+
|
11 |
+
return crypto.createHash('sha256').update( toHash, 'utf8').digest('hex');
|
12 |
+
}
|
13 |
+
|
14 |
+
}
|
tests/js/system/helpers/logContains.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = function( browser, string, callback ){
|
2 |
+
|
3 |
+
browser.getLog('browser', function(logEntriesArray) {
|
4 |
+
|
5 |
+
var hasText = false;
|
6 |
+
|
7 |
+
logEntriesArray.forEach(function(log) {
|
8 |
+
|
9 |
+
//console.log('[' + log.level + '] ' + log.timestamp + ' : ' + log.message);
|
10 |
+
|
11 |
+
if( hasText || log.message.indexOf(string) !== -1 ){
|
12 |
+
hasText = true;
|
13 |
+
}
|
14 |
+
|
15 |
+
});
|
16 |
+
|
17 |
+
//console.log(string);
|
18 |
+
|
19 |
+
callback( hasText );
|
20 |
+
|
21 |
+
});
|
22 |
+
|
23 |
+
}
|
tests/js/system/helpers/replaceVars.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var logContains = require('./logContains');
|
2 |
+
|
3 |
+
module.exports = function ( browser, fieldName, fieldValue ) {
|
4 |
+
|
5 |
+
|
6 |
+
browser.execute(
|
7 |
+
function() {
|
8 |
+
return YoastReplaceVarPlugin.ReplaceVar !== undefined;
|
9 |
+
},
|
10 |
+
[],
|
11 |
+
function( result ){
|
12 |
+
var replaceVarPresent = result.value;
|
13 |
+
|
14 |
+
if( replaceVarPresent ){
|
15 |
+
browser.execute(function () { YoastSEO.app.snippetPreview.openEditor(); } );
|
16 |
+
|
17 |
+
browser.clearValue( '.js-snippet-editor-title' );
|
18 |
+
browser.setValue( '.js-snippet-editor-title', [ '%%cf_'+fieldName+'%%' , browser.Keys.TAB ] );
|
19 |
+
|
20 |
+
browser.pause( 3000 );
|
21 |
+
|
22 |
+
browser.expect.element('#snippet_title').text.to.contain( fieldValue );
|
23 |
+
}
|
24 |
+
}
|
25 |
+
);
|
26 |
+
|
27 |
+
};
|
tests/js/system/helpers/simpleField.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var logContains = require('./logContains');
|
2 |
+
var dummyContent = require('./dummyContent');
|
3 |
+
|
4 |
+
module.exports = function( browser, selector ){
|
5 |
+
|
6 |
+
var hash = dummyContent.hash();
|
7 |
+
|
8 |
+
browser.setValue( selector, [ hash , browser.Keys.TAB ] );
|
9 |
+
|
10 |
+
browser.pause( 3000 );
|
11 |
+
|
12 |
+
logContains( browser, hash, browser.assert.ok );
|
13 |
+
|
14 |
+
browser.expect.element('#snippet_meta').text.to.contain( hash );
|
15 |
+
|
16 |
+
return hash;
|
17 |
+
};
|
tests/js/system/nightwatch.conf.example.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = (function(settings) {
|
2 |
+
settings.test_settings.default.launch_url = "http://yoast-acf-analysis.vvv.dev";
|
3 |
+
return settings;
|
4 |
+
})(require('./nightwatch.json'));
|
tests/js/system/nightwatch.json
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"src_folders": ["tests"],
|
3 |
+
"output_folder": "reports",
|
4 |
+
"custom_commands_path": "",
|
5 |
+
"custom_assertions_path": "",
|
6 |
+
"page_objects_path": "pages",
|
7 |
+
"globals_path": ".env.js",
|
8 |
+
"selenium": {
|
9 |
+
"start_process": false
|
10 |
+
},
|
11 |
+
"test_settings": {
|
12 |
+
"default" : {
|
13 |
+
"launch_url" : "http://yoast-acf-analysis.vvv.dev",
|
14 |
+
"globals" : {
|
15 |
+
},
|
16 |
+
"screenshots" : {
|
17 |
+
"enabled" : true,
|
18 |
+
"on_failure" : true,
|
19 |
+
"on_error" : false,
|
20 |
+
"path" : "screenshots"
|
21 |
+
},
|
22 |
+
"selenium_port" : 9515,
|
23 |
+
"selenium_host" : "localhost",
|
24 |
+
"default_path_prefix" : "",
|
25 |
+
"desiredCapabilities": {
|
26 |
+
"loggingPrefs": {
|
27 |
+
"browser": "ALL"
|
28 |
+
},
|
29 |
+
"browserName": "chrome",
|
30 |
+
"chromeOptions" : {
|
31 |
+
"args": [
|
32 |
+
"--headless",
|
33 |
+
"--disable-gpu",
|
34 |
+
"--incognito",
|
35 |
+
"--window-size=1280,4048"
|
36 |
+
]
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
tests/js/system/pages/WordPressHelper.js
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = {
|
2 |
+
url: function() {
|
3 |
+
return this.api.launchUrl + '/wp/wp-login.php';
|
4 |
+
},
|
5 |
+
elements: {
|
6 |
+
user: '#user_login',
|
7 |
+
password: '#user_pass',
|
8 |
+
submitButton: '#wp-submit'
|
9 |
+
},
|
10 |
+
commands: [
|
11 |
+
{
|
12 |
+
login: function(){
|
13 |
+
this.navigate();
|
14 |
+
return this.fillLogin().submit();
|
15 |
+
},
|
16 |
+
fillLogin: function(){
|
17 |
+
this.waitForElementVisible('@user', 5000);
|
18 |
+
this.setValue('@user', []);
|
19 |
+
this.setValue('@user', [this.api.globals.user]);
|
20 |
+
this.api.pause(100);
|
21 |
+
this.waitForElementVisible('@password', 5000);
|
22 |
+
return this.setValue('@password', this.api.globals.password);
|
23 |
+
},
|
24 |
+
submit: function() {
|
25 |
+
this.waitForElementVisible('@submitButton', 5000);
|
26 |
+
//this.api.saveScreenshot('screenshots/login-' + (new Date()).getTime() + '.png');
|
27 |
+
this.click('@submitButton');
|
28 |
+
return this.waitForElementVisible('#adminmenu #menu-dashboard .current', 15000);
|
29 |
+
},
|
30 |
+
newPost: function(){
|
31 |
+
this.api.url( this.api.launchUrl + '/wp/wp-admin/post-new.php' );
|
32 |
+
this.waitForElementVisible('body.post-new-php', 15000);
|
33 |
+
|
34 |
+
return this.api.execute(function() {
|
35 |
+
YoastACFAnalysisConfig.refreshRate=10;
|
36 |
+
}, [] );
|
37 |
+
},
|
38 |
+
openMediaLibraryTab: function(){
|
39 |
+
this.api.useXpath();
|
40 |
+
var mediaLibraryTabSelector = "//div[contains(@class, 'media-modal')]//a[contains(@class, 'media-menu-item') and text()='Media Library']";
|
41 |
+
this.waitForElementVisible(mediaLibraryTabSelector, 10000);
|
42 |
+
this.click(mediaLibraryTabSelector);
|
43 |
+
this.api.useCss();
|
44 |
+
}
|
45 |
+
}
|
46 |
+
]
|
47 |
+
};
|
tests/js/system/tests/acf4/relational.js
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var assert = require('assert');
|
2 |
+
var logContains = require('../../helpers/logContains');
|
3 |
+
|
4 |
+
module.exports = {
|
5 |
+
tags: ['acf4', 'relational'],
|
6 |
+
|
7 |
+
before: function (browser) {
|
8 |
+
var page = browser.page.WordPressHelper();
|
9 |
+
page.newPost();
|
10 |
+
},
|
11 |
+
|
12 |
+
beforeEach: function (browser) {
|
13 |
+
},
|
14 |
+
|
15 |
+
'Taxonomy Checkbox Field' : function (browser) {
|
16 |
+
|
17 |
+
var selector = '.acf-taxonomy-field .acf-checkbox-list li:first-child ';
|
18 |
+
|
19 |
+
browser.waitForElementVisible( selector, 1000 );
|
20 |
+
|
21 |
+
browser.pause( 3000 );
|
22 |
+
|
23 |
+
browser.click( selector + 'input' );
|
24 |
+
|
25 |
+
browser.getText( selector + 'label', function(result) {
|
26 |
+
|
27 |
+
browser.pause( 3000 );
|
28 |
+
|
29 |
+
logContains( browser, 'li>' + result.value, this.assert.ok );
|
30 |
+
|
31 |
+
});
|
32 |
+
|
33 |
+
},
|
34 |
+
|
35 |
+
'Taxonomy Multi Select Field' : function (browser) {
|
36 |
+
|
37 |
+
var selector = '.acf-taxonomy-field select ';
|
38 |
+
|
39 |
+
browser.waitForElementVisible( selector, 1000 );
|
40 |
+
|
41 |
+
browser.pause( 3000 );
|
42 |
+
|
43 |
+
browser.click( selector + 'option:first-child' );
|
44 |
+
|
45 |
+
browser.getText( selector + 'option:checked', function(result) {
|
46 |
+
|
47 |
+
this.pause( 3000 );
|
48 |
+
|
49 |
+
logContains( browser, 'li>' + result.value, this.assert.ok );
|
50 |
+
|
51 |
+
});
|
52 |
+
|
53 |
+
},
|
54 |
+
|
55 |
+
after : function(browser) {
|
56 |
+
browser.end();
|
57 |
+
}
|
58 |
+
};
|
tests/js/system/tests/acf5/basic.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var assert = require('assert');
|
2 |
+
var simpleField = require('../../helpers/simpleField');
|
3 |
+
var replaceVars = require('../../helpers/replaceVars');
|
4 |
+
|
5 |
+
module.exports = {
|
6 |
+
tags: ['acf5', 'basic'],
|
7 |
+
|
8 |
+
before: function (browser) {
|
9 |
+
var page = browser.page.WordPressHelper();
|
10 |
+
page.newPost();
|
11 |
+
},
|
12 |
+
|
13 |
+
beforeEach: function (browser) {
|
14 |
+
},
|
15 |
+
|
16 |
+
'URL Field' : function (browser) {
|
17 |
+
var value = simpleField( browser, '.field_type-url input, .acf-field-url input' );
|
18 |
+
replaceVars( browser, 'yoast_acf_analysis_url', value );
|
19 |
+
},
|
20 |
+
|
21 |
+
after : function(browser) {
|
22 |
+
browser.end();
|
23 |
+
}
|
24 |
+
};
|
tests/js/system/tests/acf5/content-pro.js
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var assert = require('assert');
|
2 |
+
var logContains = require('../../helpers/logContains');
|
3 |
+
var dummyContent = require('../../helpers/dummyContent');
|
4 |
+
|
5 |
+
module.exports = {
|
6 |
+
tags: ['acf5', 'pro', 'content'],
|
7 |
+
|
8 |
+
before: function (browser) {
|
9 |
+
|
10 |
+
},
|
11 |
+
|
12 |
+
beforeEach: function (browser) {
|
13 |
+
var page = browser.page.WordPressHelper();
|
14 |
+
page.newPost();
|
15 |
+
},
|
16 |
+
|
17 |
+
'Gallery Field': function (browser) {
|
18 |
+
|
19 |
+
var hashTitle = dummyContent.hash();
|
20 |
+
var hashAlt = dummyContent.hash();
|
21 |
+
|
22 |
+
//Open Modal
|
23 |
+
browser.waitForElementVisible('.acf-field-gallery .acf-gallery-add', 10000);
|
24 |
+
browser.click(".acf-field-gallery .acf-gallery-add");
|
25 |
+
|
26 |
+
// Open Media Library
|
27 |
+
browser.page.WordPressHelper().openMediaLibraryTab();
|
28 |
+
|
29 |
+
// Select Attachment
|
30 |
+
browser.waitForElementVisible('.media-modal .attachment', 10000);
|
31 |
+
browser.click(".media-modal .attachment");
|
32 |
+
|
33 |
+
// Update Title
|
34 |
+
browser.waitForElementVisible('.setting[data-setting="title"] input', 1000);
|
35 |
+
browser
|
36 |
+
.clearValue( '.setting[data-setting="title"] input')
|
37 |
+
.setValue( '.setting[data-setting="title"] input', [ hashTitle , browser.Keys.TAB ] );
|
38 |
+
|
39 |
+
|
40 |
+
browser.waitForElementNotPresent( '.attachment-details.save-waiting', 10000 );
|
41 |
+
|
42 |
+
// Update Alt
|
43 |
+
browser.waitForElementVisible('.setting[data-setting="alt"] input', 1000);
|
44 |
+
browser
|
45 |
+
.clearValue( '.setting[data-setting="alt"] input')
|
46 |
+
.setValue( '.setting[data-setting="alt"] input', [ hashAlt , browser.Keys.TAB ] );
|
47 |
+
|
48 |
+
browser.waitForElementNotPresent( '.attachment-details.save-waiting', 10000 );
|
49 |
+
|
50 |
+
// Insert Attachment (closes Modal)
|
51 |
+
browser.click(".media-modal .media-toolbar-primary .media-button-select");
|
52 |
+
|
53 |
+
browser.pause( 15000 );
|
54 |
+
|
55 |
+
logContains( browser, 'alt=\\"' + hashTitle + '\\" title=\\"' + hashAlt + '\\"', browser.assert.ok );
|
56 |
+
|
57 |
+
},
|
58 |
+
|
59 |
+
after : function(browser) {
|
60 |
+
browser.end();
|
61 |
+
}
|
62 |
+
};
|
tests/js/system/tests/acf5/relational.js
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var assert = require('assert');
|
2 |
+
var logContains = require('../../helpers/logContains');
|
3 |
+
|
4 |
+
module.exports = {
|
5 |
+
tags: ['acf5', 'relational'],
|
6 |
+
|
7 |
+
before: function (browser) {
|
8 |
+
var page = browser.page.WordPressHelper();
|
9 |
+
page.newPost();
|
10 |
+
},
|
11 |
+
|
12 |
+
beforeEach: function (browser) {
|
13 |
+
},
|
14 |
+
|
15 |
+
'Taxonomy Checkbox Field' : function (browser) {
|
16 |
+
|
17 |
+
var selector = '.acf-taxonomy-field[data-type="checkbox"][data-taxonomy="category"] li[data-id="1"] ';
|
18 |
+
|
19 |
+
browser.waitForElementVisible( selector, 10000 );
|
20 |
+
|
21 |
+
browser.click( selector + 'input[type=checkbox]' );
|
22 |
+
|
23 |
+
browser.getText( selector + 'span', function(result) {
|
24 |
+
|
25 |
+
this.pause( 3000 );
|
26 |
+
|
27 |
+
logContains( browser, 'li>' + result.value, this.assert.ok );
|
28 |
+
|
29 |
+
});
|
30 |
+
|
31 |
+
},
|
32 |
+
|
33 |
+
'Taxonomy Multi Select Field' : function (browser) {
|
34 |
+
|
35 |
+
browser.execute(
|
36 |
+
function() {
|
37 |
+
return parseFloat(YoastACFAnalysisConfig.acfVersion, 10);
|
38 |
+
},
|
39 |
+
[],
|
40 |
+
function( result ){
|
41 |
+
var acfVersion = result.value;
|
42 |
+
var inputSelector, optionSelector, choiceSelector;
|
43 |
+
|
44 |
+
if( acfVersion >= 5.6 ){
|
45 |
+
inputSelector = '.acf-taxonomy-field[data-type="multi_select"][data-taxonomy="category"] .select2-search__field ';
|
46 |
+
optionSelector = '.select2-results__option--highlighted';
|
47 |
+
choiceSelector = '.acf-taxonomy-field .select2-selection__choice';
|
48 |
+
}else{
|
49 |
+
inputSelector = '.acf-taxonomy-field[data-type="multi_select"][data-taxonomy="category"] .select2-input ';
|
50 |
+
optionSelector = '.select2-result:first-child';
|
51 |
+
choiceSelector = '.acf-taxonomy-field .select2-search-choice';
|
52 |
+
}
|
53 |
+
|
54 |
+
browser.waitForElementVisible( inputSelector, 10000 );
|
55 |
+
|
56 |
+
browser.setValue( inputSelector, [ browser.Keys.SPACE ] );
|
57 |
+
|
58 |
+
browser.waitForElementVisible( optionSelector, 10000 );
|
59 |
+
|
60 |
+
browser.setValue( inputSelector, [ browser.Keys.ENTER ] );
|
61 |
+
|
62 |
+
browser.waitForElementVisible( choiceSelector, 10000 );
|
63 |
+
|
64 |
+
browser.execute(
|
65 |
+
function() {
|
66 |
+
|
67 |
+
var select2Target = (parseFloat(YoastACFAnalysisConfig.acfVersion, 10) >= 5.6)?'select':'input';
|
68 |
+
|
69 |
+
return jQuery('.acf-taxonomy-field[data-type="multi_select"] ' + select2Target).select2('data')[0].text
|
70 |
+
},
|
71 |
+
[],
|
72 |
+
function( result ){
|
73 |
+
this.pause( 3000 );
|
74 |
+
logContains( browser, 'li>' + result.value , browser.assert.ok );
|
75 |
+
}
|
76 |
+
);
|
77 |
+
}
|
78 |
+
);
|
79 |
+
|
80 |
+
},
|
81 |
+
|
82 |
+
after : function(browser) {
|
83 |
+
browser.end();
|
84 |
+
}
|
85 |
+
};
|
tests/js/system/tests/general/basic.js
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var assert = require('assert');
|
2 |
+
var logContains = require('../../helpers/logContains');
|
3 |
+
var dummyContent = require('../../helpers/dummyContent');
|
4 |
+
var simpleField = require('../../helpers/simpleField');
|
5 |
+
var replaceVars = require('../../helpers/replaceVars');
|
6 |
+
|
7 |
+
module.exports = {
|
8 |
+
tags: ['acf4', 'acf5', 'basic'],
|
9 |
+
|
10 |
+
before: function (browser) {
|
11 |
+
var page = browser.page.WordPressHelper();
|
12 |
+
page.newPost();
|
13 |
+
},
|
14 |
+
|
15 |
+
beforeEach: function (browser) {
|
16 |
+
},
|
17 |
+
|
18 |
+
'Text Field' : function (browser) {
|
19 |
+
var value = simpleField(browser, '.field_type-text input, .acf-field-text input');
|
20 |
+
replaceVars( browser, 'yoast_acf_analysis_text', value );
|
21 |
+
},
|
22 |
+
|
23 |
+
'Text Field (as Headline)' : function (browser) {
|
24 |
+
|
25 |
+
browser.execute(function() {
|
26 |
+
return jQuery('.acf-field-text').data('key') || jQuery('.field_type-text').data('field_key');
|
27 |
+
},
|
28 |
+
[],
|
29 |
+
function(result){
|
30 |
+
|
31 |
+
browser.execute(
|
32 |
+
function( key ) {
|
33 |
+
YoastACFAnalysisConfig.scraper.text.headlines = {};
|
34 |
+
YoastACFAnalysisConfig.scraper.text.headlines[key] = 2;
|
35 |
+
},
|
36 |
+
[result.value]
|
37 |
+
);
|
38 |
+
|
39 |
+
} );
|
40 |
+
|
41 |
+
var hash = dummyContent.hash();
|
42 |
+
|
43 |
+
browser
|
44 |
+
.clearValue( '.field_type-text input, .acf-field-text input' )
|
45 |
+
.setValue( '.field_type-text input, .acf-field-text input', [ hash , browser.Keys.TAB ] );
|
46 |
+
|
47 |
+
browser.pause( 3000 );
|
48 |
+
|
49 |
+
logContains( browser, 'h2>' + hash, browser.assert.ok );
|
50 |
+
|
51 |
+
browser.clearValue( '.field_type-text input, .acf-field-text input' );
|
52 |
+
},
|
53 |
+
|
54 |
+
'Textarea Field' : function (browser) {
|
55 |
+
var value = simpleField( browser, '.field_type-textarea textarea, .acf-field-textarea textarea' );
|
56 |
+
replaceVars( browser, 'yoast_acf_analysis_textarea', value );
|
57 |
+
},
|
58 |
+
|
59 |
+
'Email Field' : function (browser) {
|
60 |
+
var value = simpleField( browser, '.field_type-email input, .acf-field-email input' );
|
61 |
+
replaceVars( browser, 'yoast_acf_analysis_email', value );
|
62 |
+
},
|
63 |
+
|
64 |
+
after : function(browser) {
|
65 |
+
browser.end();
|
66 |
+
}
|
67 |
+
};
|
tests/js/system/tests/general/content.js
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var assert = require('assert');
|
2 |
+
var logContains = require('../../helpers/logContains');
|
3 |
+
var dummyContent = require('../../helpers/dummyContent');
|
4 |
+
var replaceVars = require('../../helpers/replaceVars');
|
5 |
+
|
6 |
+
module.exports = {
|
7 |
+
tags: ['acf4', 'acf5', 'content'],
|
8 |
+
|
9 |
+
before: function (browser) {
|
10 |
+
},
|
11 |
+
|
12 |
+
beforeEach: function (browser) {
|
13 |
+
var page = browser.page.WordPressHelper();
|
14 |
+
page.newPost();
|
15 |
+
},
|
16 |
+
|
17 |
+
'WYSIWYG Field': function (browser) {
|
18 |
+
|
19 |
+
browser.pause( 3000 );
|
20 |
+
|
21 |
+
var hash = dummyContent.hash();
|
22 |
+
|
23 |
+
var insertIntoTinyMCE = function(result) {
|
24 |
+
browser.execute(function(id, hash) {
|
25 |
+
tinyMCE.get( id ).execCommand( 'mceInsertContent', false, hash );
|
26 |
+
}, [result.value,hash]);
|
27 |
+
};
|
28 |
+
|
29 |
+
browser.element('css selector', '.acf-field-wysiwyg textarea', function(res) {
|
30 |
+
if( 0 === res.status ){
|
31 |
+
browser.getAttribute(".acf-field-wysiwyg textarea", "id", insertIntoTinyMCE);
|
32 |
+
}
|
33 |
+
});
|
34 |
+
|
35 |
+
browser.element('css selector', '.field_type-wysiwyg textarea', function(res) {
|
36 |
+
if( 0 === res.status ){
|
37 |
+
browser.getAttribute(".field_type-wysiwyg textarea", "id", insertIntoTinyMCE);
|
38 |
+
}
|
39 |
+
});
|
40 |
+
|
41 |
+
browser.pause( 10000 );
|
42 |
+
|
43 |
+
logContains( browser, hash, browser.assert.ok );
|
44 |
+
|
45 |
+
browser.expect.element('#snippet_meta').text.to.contain( hash );
|
46 |
+
|
47 |
+
replaceVars( browser, 'yoast_acf_analysis_wysiwyg', hash );
|
48 |
+
},
|
49 |
+
|
50 |
+
'Image Field': function (browser) {
|
51 |
+
|
52 |
+
browser.pause( 3000 );
|
53 |
+
|
54 |
+
var hashTitle = dummyContent.hash();
|
55 |
+
var hashAlt = dummyContent.hash();
|
56 |
+
|
57 |
+
browser.element('css selector', '.field_type-image .button', function(res) {
|
58 |
+
if( 0 === res.status ){
|
59 |
+
//Open Modal
|
60 |
+
browser.click('.field_type-image .button');
|
61 |
+
}
|
62 |
+
});
|
63 |
+
|
64 |
+
browser.element('css selector', '.acf-field-image .acf-button', function(res) {
|
65 |
+
if( 0 === res.status ){
|
66 |
+
//Open Modal
|
67 |
+
browser.click('.acf-field-image .acf-button');
|
68 |
+
}
|
69 |
+
});
|
70 |
+
|
71 |
+
// Open Media Library
|
72 |
+
browser.page.WordPressHelper().openMediaLibraryTab();
|
73 |
+
|
74 |
+
// Select Attachment
|
75 |
+
browser.waitForElementVisible('.media-modal .attachment', 10000);
|
76 |
+
browser.click(".media-modal .attachment");
|
77 |
+
|
78 |
+
// Update Title
|
79 |
+
browser.waitForElementVisible('.setting[data-setting="title"] input', 1000);
|
80 |
+
browser
|
81 |
+
.clearValue( '.setting[data-setting="title"] input')
|
82 |
+
.setValue( '.setting[data-setting="title"] input', [ hashTitle , browser.Keys.TAB ] );
|
83 |
+
|
84 |
+
|
85 |
+
browser.waitForElementNotPresent( '.attachment-details.save-waiting', 10000 );
|
86 |
+
|
87 |
+
// Update Alt
|
88 |
+
browser.waitForElementVisible('.setting[data-setting="alt"] input', 1000);
|
89 |
+
browser
|
90 |
+
.clearValue( '.setting[data-setting="alt"] input')
|
91 |
+
.setValue( '.setting[data-setting="alt"] input', [ hashAlt , browser.Keys.TAB ] );
|
92 |
+
|
93 |
+
browser.waitForElementNotPresent( '.attachment-details.save-waiting', 10000 );
|
94 |
+
|
95 |
+
// Insert Attachment (closes Modal)
|
96 |
+
browser.click(".media-modal .media-toolbar-primary .media-button-select");
|
97 |
+
|
98 |
+
browser.pause( 10000 );
|
99 |
+
|
100 |
+
logContains( browser, 'alt=\\"' + hashTitle + '\\" title=\\"' + hashAlt + '\\"', browser.assert.ok );
|
101 |
+
|
102 |
+
},
|
103 |
+
|
104 |
+
after : function(browser) {
|
105 |
+
browser.end();
|
106 |
+
}
|
107 |
+
};
|
tests/js/system/tests/general/filters.js
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var assert = require('assert');
|
2 |
+
var logContains = require('../../helpers/logContains');
|
3 |
+
var dummyContent = require('../../helpers/dummyContent');
|
4 |
+
var simpleField = require('../../helpers/simpleField');
|
5 |
+
|
6 |
+
module.exports = {
|
7 |
+
tags: ['acf4', 'acf5', 'filters'],
|
8 |
+
|
9 |
+
before: function (browser) {
|
10 |
+
var page = browser.page.WordPressHelper();
|
11 |
+
page.newPost();
|
12 |
+
},
|
13 |
+
|
14 |
+
beforeEach: function (browser) {
|
15 |
+
},
|
16 |
+
|
17 |
+
'Text Field (blacklisted by name)' : function (browser) {
|
18 |
+
|
19 |
+
browser.execute(function() {
|
20 |
+
return jQuery('.acf-field-text').data('key') || jQuery('.field_type-text').data('field_key');
|
21 |
+
},
|
22 |
+
[],
|
23 |
+
function(result){
|
24 |
+
|
25 |
+
browser.execute(
|
26 |
+
function( key ) {
|
27 |
+
//As defined in /tests/js/system/data/acf5.php
|
28 |
+
YoastACFAnalysisConfig.blacklistName = [ 'yoast_acf_analysis_text' ];
|
29 |
+
},
|
30 |
+
[result.value]
|
31 |
+
);
|
32 |
+
|
33 |
+
} );
|
34 |
+
|
35 |
+
var hash = dummyContent.hash();
|
36 |
+
|
37 |
+
browser
|
38 |
+
.clearValue( '.field_type-text input, .acf-field-text input' )
|
39 |
+
.setValue( '.field_type-text input, .acf-field-text input', [ hash , browser.Keys.TAB ] );
|
40 |
+
|
41 |
+
browser.pause( 3000 );
|
42 |
+
|
43 |
+
logContains( browser, 'h2>' + hash, function( hasText ){
|
44 |
+
return browser.assert.ok( !hasText );
|
45 |
+
} );
|
46 |
+
|
47 |
+
browser.clearValue( '.field_type-text input, .acf-field-text input' );
|
48 |
+
},
|
49 |
+
|
50 |
+
after : function(browser) {
|
51 |
+
browser.end();
|
52 |
+
}
|
53 |
+
};
|
tests/php/phpunit.xml.dist
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
3 |
+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
|
4 |
+
backupGlobals="false"
|
5 |
+
beStrictAboutCoversAnnotation="true"
|
6 |
+
beStrictAboutOutputDuringTests="true"
|
7 |
+
beStrictAboutTestsThatDoNotTestAnything="true"
|
8 |
+
beStrictAboutTodoAnnotatedTests="true"
|
9 |
+
verbose="true">
|
10 |
+
<testsuites>
|
11 |
+
<testsuite name="unit">
|
12 |
+
<directory suffix="Test.php">unit</directory>
|
13 |
+
</testsuite>
|
14 |
+
</testsuites>
|
15 |
+
|
16 |
+
<filter>
|
17 |
+
<whitelist>
|
18 |
+
<directory suffix=".php">../../inc/</directory>
|
19 |
+
</whitelist>
|
20 |
+
</filter>
|
21 |
+
</phpunit>
|
tests/php/unit/AssetsTest.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Yoast\AcfAnalysis\Tests\Assets;
|
4 |
+
|
5 |
+
use Brain\Monkey;
|
6 |
+
use Brain\Monkey\Functions;
|
7 |
+
|
8 |
+
class AssetsTest extends \PHPUnit_Framework_TestCase {
|
9 |
+
protected $preserveGlobalState = false;
|
10 |
+
protected $runTestInSeparateProcess = true;
|
11 |
+
|
12 |
+
protected function setUp() {
|
13 |
+
parent::setUp();
|
14 |
+
Monkey\setUp();
|
15 |
+
}
|
16 |
+
|
17 |
+
public function testInitHook() {
|
18 |
+
define( 'AC_SEO_ACF_ANALYSIS_PLUGIN_FILE', '/directory/file' );
|
19 |
+
Functions\expect( 'get_plugin_data' )
|
20 |
+
->once()
|
21 |
+
->with( dirname( AC_SEO_ACF_ANALYSIS_PLUGIN_FILE ) )
|
22 |
+
->andReturn( array( 'Version' => '1.0.0' ) );
|
23 |
+
|
24 |
+
$testee = new \Yoast_ACF_Analysis_Assets();
|
25 |
+
$testee->init();
|
26 |
+
|
27 |
+
$this->assertTrue( has_filter( 'admin_enqueue_scripts', array( $testee, 'enqueue_scripts' ) ) );
|
28 |
+
}
|
29 |
+
|
30 |
+
protected function tearDown() {
|
31 |
+
Monkey\tearDown();
|
32 |
+
parent::tearDown();
|
33 |
+
}
|
34 |
+
}
|
tests/php/unit/Configuration/ConfigurationTest.php
ADDED
@@ -0,0 +1,289 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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protected function setUp() {
|
12 |
+
parent::setUp();
|
13 |
+
Monkey\setUp();
|
14 |
+
}
|
15 |
+
|
16 |
+
public function testEmpty() {
|
17 |
+
|
18 |
+
$version = '4.0.0';
|
19 |
+
|
20 |
+
Functions\expect( 'get_option' )
|
21 |
+
->once()
|
22 |
+
->with( 'acf_version' )
|
23 |
+
->andReturn( $version );
|
24 |
+
|
25 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
26 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
27 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
28 |
+
new \Yoast_ACF_Analysis_String_Store()
|
29 |
+
);
|
30 |
+
|
31 |
+
$this->assertSame(
|
32 |
+
[
|
33 |
+
'pluginName' => \Yoast_ACF_Analysis_Facade::get_plugin_name(),
|
34 |
+
'acfVersion' => $version,
|
35 |
+
'scraper' => [],
|
36 |
+
'refreshRate' => 1000,
|
37 |
+
'blacklistType' => [],
|
38 |
+
'blacklistName' => [],
|
39 |
+
'fieldSelectors' => [],
|
40 |
+
'debug' => false,
|
41 |
+
],
|
42 |
+
$configuration->to_array()
|
43 |
+
);
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
public function testBlacklistTypeFilter() {
|
48 |
+
|
49 |
+
$blacklist_type = new \Yoast_ACF_Analysis_String_Store();
|
50 |
+
|
51 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
52 |
+
$blacklist_type,
|
53 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
54 |
+
new \Yoast_ACF_Analysis_String_Store()
|
55 |
+
);
|
56 |
+
|
57 |
+
$blacklist_type2 = new \Yoast_ACF_Analysis_String_Store();
|
58 |
+
|
59 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'blacklist_type' ) )
|
60 |
+
->once()
|
61 |
+
->with( $blacklist_type )
|
62 |
+
->andReturn( $blacklist_type2 );
|
63 |
+
|
64 |
+
$this->assertSame( $blacklist_type2, $configuration->get_blacklist_type() );
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
public function testBlacklistTypeFilterInvalid() {
|
69 |
+
|
70 |
+
$store = new \Yoast_ACF_Analysis_String_Store();
|
71 |
+
|
72 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
73 |
+
$store,
|
74 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
75 |
+
new \Yoast_ACF_Analysis_String_Store()
|
76 |
+
);
|
77 |
+
|
78 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'blacklist_type' ) )
|
79 |
+
->once()
|
80 |
+
->with( $store )
|
81 |
+
->andReturn( '' );
|
82 |
+
|
83 |
+
$this->assertSame( $store, $configuration->get_blacklist_type() );
|
84 |
+
}
|
85 |
+
|
86 |
+
public function testBlacklistNameFilter() {
|
87 |
+
|
88 |
+
$blacklist_name = new \Yoast_ACF_Analysis_String_Store();
|
89 |
+
|
90 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
91 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
92 |
+
$blacklist_name,
|
93 |
+
new \Yoast_ACF_Analysis_String_Store()
|
94 |
+
);
|
95 |
+
|
96 |
+
$blacklist_name2 = new \Yoast_ACF_Analysis_String_Store();
|
97 |
+
|
98 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'blacklist_name' ) )
|
99 |
+
->once()
|
100 |
+
->with( $blacklist_name )
|
101 |
+
->andReturn( $blacklist_name2 );
|
102 |
+
|
103 |
+
$this->assertSame( $blacklist_name2, $configuration->get_blacklist_name() );
|
104 |
+
}
|
105 |
+
|
106 |
+
public function testLegacyBlackistNameFilter() {
|
107 |
+
|
108 |
+
$blacklist_name = new \Yoast_ACF_Analysis_String_Store();
|
109 |
+
|
110 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
111 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
112 |
+
$blacklist_name,
|
113 |
+
new \Yoast_ACF_Analysis_String_Store()
|
114 |
+
);
|
115 |
+
|
116 |
+
Filters\expectApplied( 'ysacf_exclude_fields' )
|
117 |
+
->once()
|
118 |
+
->with( [] )
|
119 |
+
->andReturn( [] );
|
120 |
+
|
121 |
+
$this->assertSame( $configuration->get_blacklist_name(), $blacklist_name );
|
122 |
+
|
123 |
+
|
124 |
+
Filters\expectApplied( 'ysacf_exclude_fields' )
|
125 |
+
->once()
|
126 |
+
->with( [] )
|
127 |
+
->andReturn( [] );
|
128 |
+
|
129 |
+
$this->assertSame( $configuration->get_blacklist_name()->to_array(), [] );
|
130 |
+
|
131 |
+
|
132 |
+
Filters\expectApplied( 'ysacf_exclude_fields' )
|
133 |
+
->once()
|
134 |
+
->with( [] )
|
135 |
+
->andReturn( [ 'some_field_name' ] );
|
136 |
+
|
137 |
+
$this->assertSame( $configuration->get_blacklist_name()->to_array(), [ 'some_field_name' ] );
|
138 |
+
}
|
139 |
+
|
140 |
+
public function testLegacyBlackistNameFilterInvalid() {
|
141 |
+
|
142 |
+
$blacklist_name = new \Yoast_ACF_Analysis_String_Store();
|
143 |
+
|
144 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
145 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
146 |
+
$blacklist_name,
|
147 |
+
new \Yoast_ACF_Analysis_String_Store()
|
148 |
+
);
|
149 |
+
|
150 |
+
Filters\expectApplied( 'ysacf_exclude_fields' )
|
151 |
+
->once()
|
152 |
+
->with( [] )
|
153 |
+
->andReturn( 'invalid' );
|
154 |
+
|
155 |
+
$this->assertSame( $configuration->get_blacklist_name(), $blacklist_name );
|
156 |
+
|
157 |
+
Filters\expectApplied( 'ysacf_exclude_fields' )
|
158 |
+
->once()
|
159 |
+
->with( [] )
|
160 |
+
->andReturn( 'invalid' );
|
161 |
+
|
162 |
+
$this->assertSame( $configuration->get_blacklist_name()->to_array(), [] );
|
163 |
+
}
|
164 |
+
|
165 |
+
public function testBlacklistNameFilterInvalid() {
|
166 |
+
|
167 |
+
$store = new \Yoast_ACF_Analysis_String_Store();
|
168 |
+
|
169 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
170 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
171 |
+
$store,
|
172 |
+
new \Yoast_ACF_Analysis_String_Store()
|
173 |
+
);
|
174 |
+
|
175 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'blacklist_name' ) )
|
176 |
+
->once()
|
177 |
+
->with( $store )
|
178 |
+
->andReturn( '' );
|
179 |
+
|
180 |
+
$this->assertSame( $store, $configuration->get_blacklist_name() );
|
181 |
+
}
|
182 |
+
|
183 |
+
public function testScraperConfigFilter(){
|
184 |
+
$config = array();
|
185 |
+
$blacklist = new \Yoast_ACF_Analysis_String_Store();
|
186 |
+
|
187 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
188 |
+
$blacklist,
|
189 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
190 |
+
new \Yoast_ACF_Analysis_String_Store()
|
191 |
+
);
|
192 |
+
|
193 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'scraper_config' ) )
|
194 |
+
->once()
|
195 |
+
->with( array() )
|
196 |
+
->andReturn( $config );
|
197 |
+
|
198 |
+
$this->assertSame( $config, $configuration->get_scraper_config() );
|
199 |
+
}
|
200 |
+
|
201 |
+
public function testInvalidScraperConfigFilter(){
|
202 |
+
$blacklist = new \Yoast_ACF_Analysis_String_Store();
|
203 |
+
|
204 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
205 |
+
$blacklist,
|
206 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
207 |
+
new \Yoast_ACF_Analysis_String_Store()
|
208 |
+
);
|
209 |
+
|
210 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'scraper_config' ) )
|
211 |
+
->once()
|
212 |
+
->with( array() )
|
213 |
+
->andReturn( '' );
|
214 |
+
|
215 |
+
$this->assertSame( array(), $configuration->get_scraper_config() );
|
216 |
+
}
|
217 |
+
|
218 |
+
public function testRefreshRateFilter() {
|
219 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'refresh_rate' ) )
|
220 |
+
->once()
|
221 |
+
->with( 1000 )
|
222 |
+
->andReturn( 9999 );
|
223 |
+
|
224 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
225 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
226 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
227 |
+
new \Yoast_ACF_Analysis_String_Store()
|
228 |
+
);
|
229 |
+
|
230 |
+
$this->assertSame( 9999, $configuration->get_refresh_rate() );
|
231 |
+
}
|
232 |
+
|
233 |
+
public function testRefreshRateMinimumValueFilter() {
|
234 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'refresh_rate' ) )
|
235 |
+
->once()
|
236 |
+
->with( 1000 )
|
237 |
+
->andReturn( 1 );
|
238 |
+
|
239 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
240 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
241 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
242 |
+
new \Yoast_ACF_Analysis_String_Store()
|
243 |
+
);
|
244 |
+
|
245 |
+
$this->assertSame( 200, $configuration->get_refresh_rate() );
|
246 |
+
}
|
247 |
+
|
248 |
+
public function testFieldSelectorsFilter(){
|
249 |
+
$custom_store = new \Yoast_ACF_Analysis_String_Store();
|
250 |
+
$field_selector = new \Yoast_ACF_Analysis_String_Store();
|
251 |
+
|
252 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
253 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
254 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
255 |
+
$field_selector
|
256 |
+
);
|
257 |
+
|
258 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'field_selectors' ) )
|
259 |
+
->once()
|
260 |
+
->with( $field_selector )
|
261 |
+
->andReturn( $custom_store );
|
262 |
+
|
263 |
+
$this->assertSame( $custom_store, $configuration->get_field_selectors() );
|
264 |
+
}
|
265 |
+
|
266 |
+
public function testFieldSelectorsFilterInvalid() {
|
267 |
+
|
268 |
+
$store = new \Yoast_ACF_Analysis_String_Store();
|
269 |
+
|
270 |
+
$configuration = new \Yoast_ACF_Analysis_Configuration(
|
271 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
272 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
273 |
+
$store
|
274 |
+
);
|
275 |
+
|
276 |
+
Filters\expectApplied( \Yoast_ACF_Analysis_Facade::get_filter_name( 'field_selectors' ) )
|
277 |
+
->once()
|
278 |
+
->with( $store )
|
279 |
+
->andReturn( '' );
|
280 |
+
|
281 |
+
$this->assertSame( $store, $configuration->get_field_selectors() );
|
282 |
+
|
283 |
+
}
|
284 |
+
|
285 |
+
protected function tearDown() {
|
286 |
+
Monkey\tearDown();
|
287 |
+
parent::tearDown();
|
288 |
+
}
|
289 |
+
}
|
tests/php/unit/Configuration/StringStoreTest.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
namespace Yoast\AcfAnalysis\Tests\Configuration;
|
5 |
+
|
6 |
+
|
7 |
+
class StringStoreTest extends \PHPUnit_Framework_TestCase {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* @return \Yoast_ACF_Analysis_String_Store
|
11 |
+
*/
|
12 |
+
protected function getStore() {
|
13 |
+
return new \Yoast_ACF_Analysis_String_Store();
|
14 |
+
}
|
15 |
+
|
16 |
+
public function testEmpty(){
|
17 |
+
$store = $this->getStore();
|
18 |
+
$this->assertEmpty( $store->to_array() );
|
19 |
+
}
|
20 |
+
|
21 |
+
public function testAdd(){
|
22 |
+
|
23 |
+
$type = "test";
|
24 |
+
|
25 |
+
$store = $this->getStore();
|
26 |
+
$store->add( $type );
|
27 |
+
|
28 |
+
$this->assertSame( [ $type ], $store->to_array() );
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
public function testAddSame(){
|
33 |
+
|
34 |
+
$type = "test";
|
35 |
+
|
36 |
+
$store = $this->getStore();
|
37 |
+
$store->add( $type );
|
38 |
+
$store->add( $type );
|
39 |
+
|
40 |
+
$this->assertSame( [ $type ], $store->to_array() );
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
public function testAddMultiple(){
|
45 |
+
|
46 |
+
$typeA= "A";
|
47 |
+
$typeB= "B";
|
48 |
+
|
49 |
+
$store = $this->getStore();
|
50 |
+
$store->add( $typeA );
|
51 |
+
$store->add( $typeB );
|
52 |
+
|
53 |
+
$this->assertSame( [ $typeA, $typeB ], $store->to_array() );
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
public function testAddMultipleSorting(){
|
58 |
+
|
59 |
+
$typeA= "Z";
|
60 |
+
$typeB= "A";
|
61 |
+
|
62 |
+
$store = $this->getStore();
|
63 |
+
$store->add( $typeA );
|
64 |
+
$store->add( $typeB );
|
65 |
+
|
66 |
+
$this->assertSame( [ $typeB, $typeA ], $store->to_array() );
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
public function testAddNonString(){
|
71 |
+
|
72 |
+
$store = $this->getStore();
|
73 |
+
|
74 |
+
$this->assertFalse( $store->add( 999 ) );
|
75 |
+
$this->assertEmpty( $store->to_array() );
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
public function testRemove(){
|
80 |
+
|
81 |
+
$typeA= "A";
|
82 |
+
$typeB= "B";
|
83 |
+
|
84 |
+
$store = $this->getStore();
|
85 |
+
|
86 |
+
$store->add( $typeA );
|
87 |
+
$store->add( $typeB );
|
88 |
+
|
89 |
+
$this->assertSame( [ $typeA, $typeB ], $store->to_array() );
|
90 |
+
|
91 |
+
$store->remove( $typeA );
|
92 |
+
|
93 |
+
$this->assertSame( [ $typeB ], $store->to_array() );
|
94 |
+
|
95 |
+
$store->remove( $typeB );
|
96 |
+
|
97 |
+
$this->assertEmpty( $store->to_array() );
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
+
public function testRemoveNonString(){
|
102 |
+
|
103 |
+
$store = $this->getStore();
|
104 |
+
$store->add( "999" );
|
105 |
+
|
106 |
+
$this->assertFalse( $store->remove( 999 ) );
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
public function testRemoveNonExist(){
|
111 |
+
|
112 |
+
$store = $this->getStore();
|
113 |
+
|
114 |
+
$this->assertFalse( $store->remove( "test" ) );
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
}
|
tests/php/unit/Dependencies/ACFClass.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class acf {
|
4 |
+
|
5 |
+
}
|
tests/php/unit/Dependencies/ACFDependencyTest.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Yoast\AcfAnalysis\Tests\Dependencies;
|
4 |
+
|
5 |
+
use Brain\Monkey;
|
6 |
+
|
7 |
+
class ACFDependencyTest extends \PHPUnit_Framework_TestCase {
|
8 |
+
protected function setUp() {
|
9 |
+
parent::setUp();
|
10 |
+
Monkey\setUp();
|
11 |
+
}
|
12 |
+
|
13 |
+
public function testNoACFClassExists() {
|
14 |
+
$testee = new \Yoast_ACF_Analysis_Dependency_ACF();
|
15 |
+
|
16 |
+
$this->assertFalse( $testee->is_met() );
|
17 |
+
}
|
18 |
+
|
19 |
+
public function testACFClassExists() {
|
20 |
+
$testee = new \Yoast_ACF_Analysis_Dependency_ACF();
|
21 |
+
|
22 |
+
require_once __DIR__ . DIRECTORY_SEPARATOR . 'ACFClass.php';
|
23 |
+
|
24 |
+
$this->assertTrue( $testee->is_met() );
|
25 |
+
}
|
26 |
+
|
27 |
+
public function testAdminNotice() {
|
28 |
+
$testee = new \Yoast_ACF_Analysis_Dependency_ACF();
|
29 |
+
$testee->register_notifications();
|
30 |
+
|
31 |
+
$this->assertTrue( has_action( 'admin_notices', array( $testee, 'message_plugin_not_activated' ) ) );
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function tearDown() {
|
35 |
+
Monkey\tearDown();
|
36 |
+
parent::tearDown();
|
37 |
+
}
|
38 |
+
}
|
tests/php/unit/Dependencies/YoastSEODependencyTest.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Yoast\AcfAnalysis\Tests\Dependencies;
|
4 |
+
|
5 |
+
use Brain\Monkey;
|
6 |
+
|
7 |
+
class YoastSEODependencyTest extends \PHPUnit_Framework_TestCase {
|
8 |
+
protected $preserveGlobalState = false;
|
9 |
+
protected $runTestInSeparateProcess = true;
|
10 |
+
|
11 |
+
protected function setUp() {
|
12 |
+
parent::setUp();
|
13 |
+
Monkey\setUp();
|
14 |
+
}
|
15 |
+
|
16 |
+
public function testFail() {
|
17 |
+
$testee = new \Yoast_ACF_Analysis_Dependency_Yoast_SEO();
|
18 |
+
|
19 |
+
$this->assertFalse( $testee->is_met() );
|
20 |
+
}
|
21 |
+
|
22 |
+
public function testPass() {
|
23 |
+
define( 'WPSEO_VERSION', '4.0.0' );
|
24 |
+
|
25 |
+
$testee = new \Yoast_ACF_Analysis_Dependency_Yoast_SEO();
|
26 |
+
$this->assertTrue( $testee->is_met() );
|
27 |
+
}
|
28 |
+
|
29 |
+
public function testOldVersion() {
|
30 |
+
define( 'WPSEO_VERSION', '2.0.0' );
|
31 |
+
|
32 |
+
$testee = new \Yoast_ACF_Analysis_Dependency_Yoast_SEO();
|
33 |
+
$this->assertFalse( $testee->is_met() );
|
34 |
+
}
|
35 |
+
|
36 |
+
public function testAdminNotice() {
|
37 |
+
$testee = new \Yoast_ACF_Analysis_Dependency_Yoast_SEO();
|
38 |
+
$testee->register_notifications();
|
39 |
+
|
40 |
+
$this->assertTrue( has_action( 'admin_notices', array( $testee, 'message_plugin_not_activated' ) ) );
|
41 |
+
}
|
42 |
+
|
43 |
+
public function testAdminNoticeMinimumVersion() {
|
44 |
+
define( 'WPSEO_VERSION', '2.0.0' );
|
45 |
+
|
46 |
+
$testee = new \Yoast_ACF_Analysis_Dependency_Yoast_SEO();
|
47 |
+
$testee->register_notifications();
|
48 |
+
|
49 |
+
$this->assertTrue( has_action( 'admin_notices', array( $testee, 'message_minimum_version' ) ) );
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function tearDown() {
|
53 |
+
Monkey\tearDown();
|
54 |
+
parent::tearDown();
|
55 |
+
}
|
56 |
+
}
|
tests/php/unit/MainTest.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Yoast\AcfAnalysis\Tests;
|
4 |
+
|
5 |
+
use Brain\Monkey;
|
6 |
+
use Brain\Monkey\Functions;
|
7 |
+
|
8 |
+
class MainTest extends \PHPUnit_Framework_TestCase {
|
9 |
+
|
10 |
+
protected function setUp() {
|
11 |
+
parent::setUp();
|
12 |
+
Monkey\setUp();
|
13 |
+
}
|
14 |
+
|
15 |
+
public function testInvalidConfig() {
|
16 |
+
|
17 |
+
$registry = \Yoast_ACF_Analysis_Facade::get_registry();
|
18 |
+
|
19 |
+
$registry->add( 'config', 'Invalid Config' );
|
20 |
+
|
21 |
+
$testee = new \AC_Yoast_SEO_ACF_Content_Analysis();
|
22 |
+
|
23 |
+
Functions\expect('get_option')
|
24 |
+
->once()
|
25 |
+
->with('acf_version')
|
26 |
+
->andReturn(5);
|
27 |
+
|
28 |
+
$testee->boot();
|
29 |
+
|
30 |
+
$this->assertNotSame( 'Invalid Config', $registry->get( 'config' ) );
|
31 |
+
$this->assertInstanceOf('\Yoast_ACF_Analysis_Configuration', $registry->get( 'config' ) );
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
protected function tearDown() {
|
36 |
+
Monkey\tearDown();
|
37 |
+
parent::tearDown();
|
38 |
+
}
|
39 |
+
}
|
tests/php/unit/RegistryTest.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
namespace Yoast\AcfAnalysis\Tests\Configuration;
|
5 |
+
|
6 |
+
class RegistryTest extends \PHPUnit_Framework_TestCase {
|
7 |
+
|
8 |
+
public function testSingleton(){
|
9 |
+
|
10 |
+
$first = \Yoast_ACF_Analysis_Facade::get_registry();
|
11 |
+
$second = \Yoast_ACF_Analysis_Facade::get_registry();
|
12 |
+
|
13 |
+
$this->assertSame( $first, $second );
|
14 |
+
|
15 |
+
$first->add( 'id', new \Yoast_ACF_Analysis_Configuration(
|
16 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
17 |
+
new \Yoast_ACF_Analysis_String_Store(),
|
18 |
+
new \Yoast_ACF_Analysis_String_Store()
|
19 |
+
) );
|
20 |
+
|
21 |
+
$this->assertSame( $first, $second );
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
public function testAdd(){
|
26 |
+
|
27 |
+
$id = 'add';
|
28 |
+
$content = 'something';
|
29 |
+
|
30 |
+
$registry = new \Yoast_ACF_Analysis_Registry();
|
31 |
+
|
32 |
+
$this->assertNull( $registry->get( $id ) );
|
33 |
+
|
34 |
+
$registry->add( $id, $content );
|
35 |
+
|
36 |
+
$this->assertSame( $content, $registry->get( $id ) );
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
}
|
tests/php/unit/RequirementsTest.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
namespace Yoast\AcfAnalysis\Tests\Configuration;
|
5 |
+
|
6 |
+
use Brain\Monkey;
|
7 |
+
use Brain\Monkey\Functions;
|
8 |
+
use Brain\Monkey\Filters;
|
9 |
+
|
10 |
+
|
11 |
+
class PassingDependency implements \Yoast_ACF_Analysis_Dependency {
|
12 |
+
/**
|
13 |
+
* Checks if this dependency is met.
|
14 |
+
*
|
15 |
+
* @return bool True when met, False when not met.
|
16 |
+
*/
|
17 |
+
public function is_met() {
|
18 |
+
return true;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Registers the notifications to communicate the depedency is not met.
|
23 |
+
*
|
24 |
+
* @return void
|
25 |
+
*/
|
26 |
+
public function register_notifications() {
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
class FailingDependency implements \Yoast_ACF_Analysis_Dependency {
|
31 |
+
/**
|
32 |
+
* Checks if this dependency is met.
|
33 |
+
*
|
34 |
+
* @return bool True when met, False when not met.
|
35 |
+
*/
|
36 |
+
public function is_met() {
|
37 |
+
return false;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Registers the notifications to communicate the depedency is not met.
|
42 |
+
*
|
43 |
+
* @return void
|
44 |
+
*/
|
45 |
+
public function register_notifications() {
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
class RequirementsTest extends \PHPUnit_Framework_TestCase {
|
50 |
+
|
51 |
+
protected function setUp() {
|
52 |
+
parent::setUp();
|
53 |
+
Monkey\setUp();
|
54 |
+
|
55 |
+
Functions\expect( 'current_user_can' )->andReturn( true );
|
56 |
+
}
|
57 |
+
|
58 |
+
public function testNoDependencies() {
|
59 |
+
$testee = new \Yoast_ACF_Analysis_Requirements();
|
60 |
+
$this->assertTrue( $testee->are_met() );
|
61 |
+
}
|
62 |
+
|
63 |
+
public function testPassingDependency() {
|
64 |
+
$testee = new \Yoast_ACF_Analysis_Requirements();
|
65 |
+
$testee->add_dependency( new PassingDependency() );
|
66 |
+
|
67 |
+
$this->assertTrue( $testee->are_met() );
|
68 |
+
}
|
69 |
+
|
70 |
+
public function testFailingDependency() {
|
71 |
+
$testee = new \Yoast_ACF_Analysis_Requirements();
|
72 |
+
$testee->add_dependency( new FailingDependency() );
|
73 |
+
|
74 |
+
$this->assertFalse( $testee->are_met() );
|
75 |
+
}
|
76 |
+
|
77 |
+
public function testMixedDependencies() {
|
78 |
+
$testee = new \Yoast_ACF_Analysis_Requirements();
|
79 |
+
$testee->add_dependency( new FailingDependency() );
|
80 |
+
$testee->add_dependency( new PassingDependency() );
|
81 |
+
|
82 |
+
$this->assertFalse( $testee->are_met() );
|
83 |
+
}
|
84 |
+
|
85 |
+
protected function tearDown() {
|
86 |
+
Monkey\tearDown();
|
87 |
+
parent::tearDown();
|
88 |
+
}
|
89 |
+
|
90 |
+
}
|
vendor/autoload.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload.php @generated by Composer
|
4 |
+
|
5 |
+
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
+
|
7 |
+
return ComposerAutoloaderInit8a764063ff1a9e4efff80091766c8d97::getLoader();
|
vendor/autoload_52.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_52.php generated by xrstf/composer-php52
|
4 |
+
|
5 |
+
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Composer.
|
5 |
+
*
|
6 |
+
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
+
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Composer\Autoload;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
17 |
+
*
|
18 |
+
* $loader = new \Composer\Autoload\ClassLoader();
|
19 |
+
*
|
20 |
+
* // register classes with namespaces
|
21 |
+
* $loader->add('Symfony\Component', __DIR__.'/component');
|
22 |
+
* $loader->add('Symfony', __DIR__.'/framework');
|
23 |
+
*
|
24 |
+
* // activate the autoloader
|
25 |
+
* $loader->register();
|
26 |
+
*
|
27 |
+
* // to enable searching the include path (eg. for PEAR packages)
|
28 |
+
* $loader->setUseIncludePath(true);
|
29 |
+
*
|
30 |
+
* In this example, if you try to use a class in the Symfony\Component
|
31 |
+
* namespace or one of its children (Symfony\Component\Console for instance),
|
32 |
+
* the autoloader will first look for the class under the component/
|
33 |
+
* directory, and it will then fallback to the framework/ directory if not
|
34 |
+
* found before giving up.
|
35 |
+
*
|
36 |
+
* This class is loosely based on the Symfony UniversalClassLoader.
|
37 |
+
*
|
38 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
+
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
+
* @see http://www.php-fig.org/psr/psr-0/
|
41 |
+
* @see http://www.php-fig.org/psr/psr-4/
|
42 |
+
*/
|
43 |
+
class ClassLoader
|
44 |
+
{
|
45 |
+
// PSR-4
|
46 |
+
private $prefixLengthsPsr4 = array();
|
47 |
+
private $prefixDirsPsr4 = array();
|
48 |
+
private $fallbackDirsPsr4 = array();
|
49 |
+
|
50 |
+
// PSR-0
|
51 |
+
private $prefixesPsr0 = array();
|
52 |
+
private $fallbackDirsPsr0 = array();
|
53 |
+
|
54 |
+
private $useIncludePath = false;
|
55 |
+
private $classMap = array();
|
56 |
+
private $classMapAuthoritative = false;
|
57 |
+
private $missingClasses = array();
|
58 |
+
private $apcuPrefix;
|
59 |
+
|
60 |
+
public function getPrefixes()
|
61 |
+
{
|
62 |
+
if (!empty($this->prefixesPsr0)) {
|
63 |
+
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
64 |
+
}
|
65 |
+
|
66 |
+
return array();
|
67 |
+
}
|
68 |
+
|
69 |
+
public function getPrefixesPsr4()
|
70 |
+
{
|
71 |
+
return $this->prefixDirsPsr4;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function getFallbackDirs()
|
75 |
+
{
|
76 |
+
return $this->fallbackDirsPsr0;
|
77 |
+
}
|
78 |
+
|
79 |
+
public function getFallbackDirsPsr4()
|
80 |
+
{
|
81 |
+
return $this->fallbackDirsPsr4;
|
82 |
+
}
|
83 |
+
|
84 |
+
public function getClassMap()
|
85 |
+
{
|
86 |
+
return $this->classMap;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @param array $classMap Class to filename map
|
91 |
+
*/
|
92 |
+
public function addClassMap(array $classMap)
|
93 |
+
{
|
94 |
+
if ($this->classMap) {
|
95 |
+
$this->classMap = array_merge($this->classMap, $classMap);
|
96 |
+
} else {
|
97 |
+
$this->classMap = $classMap;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Registers a set of PSR-0 directories for a given prefix, either
|
103 |
+
* appending or prepending to the ones previously set for this prefix.
|
104 |
+
*
|
105 |
+
* @param string $prefix The prefix
|
106 |
+
* @param array|string $paths The PSR-0 root directories
|
107 |
+
* @param bool $prepend Whether to prepend the directories
|
108 |
+
*/
|
109 |
+
public function add($prefix, $paths, $prepend = false)
|
110 |
+
{
|
111 |
+
if (!$prefix) {
|
112 |
+
if ($prepend) {
|
113 |
+
$this->fallbackDirsPsr0 = array_merge(
|
114 |
+
(array) $paths,
|
115 |
+
$this->fallbackDirsPsr0
|
116 |
+
);
|
117 |
+
} else {
|
118 |
+
$this->fallbackDirsPsr0 = array_merge(
|
119 |
+
$this->fallbackDirsPsr0,
|
120 |
+
(array) $paths
|
121 |
+
);
|
122 |
+
}
|
123 |
+
|
124 |
+
return;
|
125 |
+
}
|
126 |
+
|
127 |
+
$first = $prefix[0];
|
128 |
+
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
129 |
+
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
130 |
+
|
131 |
+
return;
|
132 |
+
}
|
133 |
+
if ($prepend) {
|
134 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
135 |
+
(array) $paths,
|
136 |
+
$this->prefixesPsr0[$first][$prefix]
|
137 |
+
);
|
138 |
+
} else {
|
139 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
140 |
+
$this->prefixesPsr0[$first][$prefix],
|
141 |
+
(array) $paths
|
142 |
+
);
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Registers a set of PSR-4 directories for a given namespace, either
|
148 |
+
* appending or prepending to the ones previously set for this namespace.
|
149 |
+
*
|
150 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
151 |
+
* @param array|string $paths The PSR-4 base directories
|
152 |
+
* @param bool $prepend Whether to prepend the directories
|
153 |
+
*
|
154 |
+
* @throws \InvalidArgumentException
|
155 |
+
*/
|
156 |
+
public function addPsr4($prefix, $paths, $prepend = false)
|
157 |
+
{
|
158 |
+
if (!$prefix) {
|
159 |
+
// Register directories for the root namespace.
|
160 |
+
if ($prepend) {
|
161 |
+
$this->fallbackDirsPsr4 = array_merge(
|
162 |
+
(array) $paths,
|
163 |
+
$this->fallbackDirsPsr4
|
164 |
+
);
|
165 |
+
} else {
|
166 |
+
$this->fallbackDirsPsr4 = array_merge(
|
167 |
+
$this->fallbackDirsPsr4,
|
168 |
+
(array) $paths
|
169 |
+
);
|
170 |
+
}
|
171 |
+
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
172 |
+
// Register directories for a new namespace.
|
173 |
+
$length = strlen($prefix);
|
174 |
+
if ('\\' !== $prefix[$length - 1]) {
|
175 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
176 |
+
}
|
177 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
178 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
179 |
+
} elseif ($prepend) {
|
180 |
+
// Prepend directories for an already registered namespace.
|
181 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
182 |
+
(array) $paths,
|
183 |
+
$this->prefixDirsPsr4[$prefix]
|
184 |
+
);
|
185 |
+
} else {
|
186 |
+
// Append directories for an already registered namespace.
|
187 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
188 |
+
$this->prefixDirsPsr4[$prefix],
|
189 |
+
(array) $paths
|
190 |
+
);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Registers a set of PSR-0 directories for a given prefix,
|
196 |
+
* replacing any others previously set for this prefix.
|
197 |
+
*
|
198 |
+
* @param string $prefix The prefix
|
199 |
+
* @param array|string $paths The PSR-0 base directories
|
200 |
+
*/
|
201 |
+
public function set($prefix, $paths)
|
202 |
+
{
|
203 |
+
if (!$prefix) {
|
204 |
+
$this->fallbackDirsPsr0 = (array) $paths;
|
205 |
+
} else {
|
206 |
+
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Registers a set of PSR-4 directories for a given namespace,
|
212 |
+
* replacing any others previously set for this namespace.
|
213 |
+
*
|
214 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
215 |
+
* @param array|string $paths The PSR-4 base directories
|
216 |
+
*
|
217 |
+
* @throws \InvalidArgumentException
|
218 |
+
*/
|
219 |
+
public function setPsr4($prefix, $paths)
|
220 |
+
{
|
221 |
+
if (!$prefix) {
|
222 |
+
$this->fallbackDirsPsr4 = (array) $paths;
|
223 |
+
} else {
|
224 |
+
$length = strlen($prefix);
|
225 |
+
if ('\\' !== $prefix[$length - 1]) {
|
226 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
227 |
+
}
|
228 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
229 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Turns on searching the include path for class files.
|
235 |
+
*
|
236 |
+
* @param bool $useIncludePath
|
237 |
+
*/
|
238 |
+
public function setUseIncludePath($useIncludePath)
|
239 |
+
{
|
240 |
+
$this->useIncludePath = $useIncludePath;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Can be used to check if the autoloader uses the include path to check
|
245 |
+
* for classes.
|
246 |
+
*
|
247 |
+
* @return bool
|
248 |
+
*/
|
249 |
+
public function getUseIncludePath()
|
250 |
+
{
|
251 |
+
return $this->useIncludePath;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Turns off searching the prefix and fallback directories for classes
|
256 |
+
* that have not been registered with the class map.
|
257 |
+
*
|
258 |
+
* @param bool $classMapAuthoritative
|
259 |
+
*/
|
260 |
+
public function setClassMapAuthoritative($classMapAuthoritative)
|
261 |
+
{
|
262 |
+
$this->classMapAuthoritative = $classMapAuthoritative;
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Should class lookup fail if not found in the current class map?
|
267 |
+
*
|
268 |
+
* @return bool
|
269 |
+
*/
|
270 |
+
public function isClassMapAuthoritative()
|
271 |
+
{
|
272 |
+
return $this->classMapAuthoritative;
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
277 |
+
*
|
278 |
+
* @param string|null $apcuPrefix
|
279 |
+
*/
|
280 |
+
public function setApcuPrefix($apcuPrefix)
|
281 |
+
{
|
282 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* The APCu prefix in use, or null if APCu caching is not enabled.
|
287 |
+
*
|
288 |
+
* @return string|null
|
289 |
+
*/
|
290 |
+
public function getApcuPrefix()
|
291 |
+
{
|
292 |
+
return $this->apcuPrefix;
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Registers this instance as an autoloader.
|
297 |
+
*
|
298 |
+
* @param bool $prepend Whether to prepend the autoloader or not
|
299 |
+
*/
|
300 |
+
public function register($prepend = false)
|
301 |
+
{
|
302 |
+
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Unregisters this instance as an autoloader.
|
307 |
+
*/
|
308 |
+
public function unregister()
|
309 |
+
{
|
310 |
+
spl_autoload_unregister(array($this, 'loadClass'));
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Loads the given class or interface.
|
315 |
+
*
|
316 |
+
* @param string $class The name of the class
|
317 |
+
* @return bool|null True if loaded, null otherwise
|
318 |
+
*/
|
319 |
+
public function loadClass($class)
|
320 |
+
{
|
321 |
+
if ($file = $this->findFile($class)) {
|
322 |
+
includeFile($file);
|
323 |
+
|
324 |
+
return true;
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Finds the path to the file where the class is defined.
|
330 |
+
*
|
331 |
+
* @param string $class The name of the class
|
332 |
+
*
|
333 |
+
* @return string|false The path if found, false otherwise
|
334 |
+
*/
|
335 |
+
public function findFile($class)
|
336 |
+
{
|
337 |
+
// class map lookup
|
338 |
+
if (isset($this->classMap[$class])) {
|
339 |
+
return $this->classMap[$class];
|
340 |
+
}
|
341 |
+
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
342 |
+
return false;
|
343 |
+
}
|
344 |
+
if (null !== $this->apcuPrefix) {
|
345 |
+
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
346 |
+
if ($hit) {
|
347 |
+
return $file;
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
+
$file = $this->findFileWithExtension($class, '.php');
|
352 |
+
|
353 |
+
// Search for Hack files if we are running on HHVM
|
354 |
+
if (false === $file && defined('HHVM_VERSION')) {
|
355 |
+
$file = $this->findFileWithExtension($class, '.hh');
|
356 |
+
}
|
357 |
+
|
358 |
+
if (null !== $this->apcuPrefix) {
|
359 |
+
apcu_add($this->apcuPrefix.$class, $file);
|
360 |
+
}
|
361 |
+
|
362 |
+
if (false === $file) {
|
363 |
+
// Remember that this class does not exist.
|
364 |
+
$this->missingClasses[$class] = true;
|
365 |
+
}
|
366 |
+
|
367 |
+
return $file;
|
368 |
+
}
|
369 |
+
|
370 |
+
private function findFileWithExtension($class, $ext)
|
371 |
+
{
|
372 |
+
// PSR-4 lookup
|
373 |
+
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
374 |
+
|
375 |
+
$first = $class[0];
|
376 |
+
if (isset($this->prefixLengthsPsr4[$first])) {
|
377 |
+
$subPath = $class;
|
378 |
+
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
379 |
+
$subPath = substr($subPath, 0, $lastPos);
|
380 |
+
$search = $subPath.'\\';
|
381 |
+
if (isset($this->prefixDirsPsr4[$search])) {
|
382 |
+
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
383 |
+
$length = $this->prefixLengthsPsr4[$first][$search];
|
384 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
385 |
+
return $file;
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
// PSR-4 fallback dirs
|
393 |
+
foreach ($this->fallbackDirsPsr4 as $dir) {
|
394 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
395 |
+
return $file;
|
396 |
+
}
|
397 |
+
}
|
398 |
+
|
399 |
+
// PSR-0 lookup
|
400 |
+
if (false !== $pos = strrpos($class, '\\')) {
|
401 |
+
// namespaced class name
|
402 |
+
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
403 |
+
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
404 |
+
} else {
|
405 |
+
// PEAR-like class name
|
406 |
+
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
407 |
+
}
|
408 |
+
|
409 |
+
if (isset($this->prefixesPsr0[$first])) {
|
410 |
+
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
411 |
+
if (0 === strpos($class, $prefix)) {
|
412 |
+
foreach ($dirs as $dir) {
|
413 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
414 |
+
return $file;
|
415 |
+
}
|
416 |
+
}
|
417 |
+
}
|
418 |
+
}
|
419 |
+
}
|
420 |
+
|
421 |
+
// PSR-0 fallback dirs
|
422 |
+
foreach ($this->fallbackDirsPsr0 as $dir) {
|
423 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
424 |
+
return $file;
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
// PSR-0 include paths.
|
429 |
+
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
430 |
+
return $file;
|
431 |
+
}
|
432 |
+
|
433 |
+
return false;
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Scope isolated include.
|
439 |
+
*
|
440 |
+
* Prevents access to $this/self from included files.
|
441 |
+
*/
|
442 |
+
function includeFile($file)
|
443 |
+
{
|
444 |
+
include $file;
|
445 |
+
}
|
vendor/composer/ClassLoader52.php
ADDED
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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Mewes, http://www.xrstf.de
|
4 |
+
*
|
5 |
+
* This file is released under the terms of the MIT license. You can find the
|
6 |
+
* complete text in the attached LICENSE file or online at:
|
7 |
+
*
|
8 |
+
* http://www.opensource.org/licenses/mit-license.php
|
9 |
+
*
|
10 |
+
* --------------------------------------------------------------------------
|
11 |
+
*
|
12 |
+
* 99% of this is copied as-is from the original Composer source code and is
|
13 |
+
* released under MIT license as well. Copyright goes to:
|
14 |
+
*
|
15 |
+
* - Fabien Potencier <fabien@symfony.com>
|
16 |
+
* - Jordi Boggiano <j.boggiano@seld.be>
|
17 |
+
*/
|
18 |
+
|
19 |
+
class xrstf_Composer52_ClassLoader {
|
20 |
+
private $prefixes = array();
|
21 |
+
private $fallbackDirs = array();
|
22 |
+
private $useIncludePath = false;
|
23 |
+
private $classMap = array();
|
24 |
+
private $classMapAuthoratative = false;
|
25 |
+
private $allowUnderscore = false;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @param boolean $flag true to allow class names with a leading underscore, false to disable
|
29 |
+
*/
|
30 |
+
public function setAllowUnderscore($flag) {
|
31 |
+
$this->allowUnderscore = (boolean) $flag;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
public function getPrefixes() {
|
38 |
+
return $this->prefixes;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Turns off searching the prefix and fallback directories for classes
|
43 |
+
* that have not been registered with the class map.
|
44 |
+
*
|
45 |
+
* @param bool $classMapAuthoratative
|
46 |
+
*/
|
47 |
+
public function setClassMapAuthoritative($classMapAuthoratative) {
|
48 |
+
$this->classMapAuthoratative = $classMapAuthoratative;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Should class lookup fail if not found in the current class map?
|
53 |
+
*
|
54 |
+
* @return bool
|
55 |
+
*/
|
56 |
+
public function getClassMapAuthoratative() {
|
57 |
+
return $this->classMapAuthoratative;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @return array
|
62 |
+
*/
|
63 |
+
public function getFallbackDirs() {
|
64 |
+
return $this->fallbackDirs;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @return array
|
69 |
+
*/
|
70 |
+
public function getClassMap() {
|
71 |
+
return $this->classMap;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @param array $classMap class to filename map
|
76 |
+
*/
|
77 |
+
public function addClassMap(array $classMap) {
|
78 |
+
if ($this->classMap) {
|
79 |
+
$this->classMap = array_merge($this->classMap, $classMap);
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
$this->classMap = $classMap;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Registers a set of classes, merging with any others previously set.
|
88 |
+
*
|
89 |
+
* @param string $prefix the classes prefix
|
90 |
+
* @param array|string $paths the location(s) of the classes
|
91 |
+
* @param bool $prepend prepend the location(s)
|
92 |
+
*/
|
93 |
+
public function add($prefix, $paths, $prepend = false) {
|
94 |
+
if (!$prefix) {
|
95 |
+
if ($prepend) {
|
96 |
+
$this->fallbackDirs = array_merge(
|
97 |
+
(array) $paths,
|
98 |
+
$this->fallbackDirs
|
99 |
+
);
|
100 |
+
}
|
101 |
+
else {
|
102 |
+
$this->fallbackDirs = array_merge(
|
103 |
+
$this->fallbackDirs,
|
104 |
+
(array) $paths
|
105 |
+
);
|
106 |
+
}
|
107 |
+
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
|
111 |
+
if (!isset($this->prefixes[$prefix])) {
|
112 |
+
$this->prefixes[$prefix] = (array) $paths;
|
113 |
+
return;
|
114 |
+
}
|
115 |
+
|
116 |
+
if ($prepend) {
|
117 |
+
$this->prefixes[$prefix] = array_merge(
|
118 |
+
(array) $paths,
|
119 |
+
$this->prefixes[$prefix]
|
120 |
+
);
|
121 |
+
}
|
122 |
+
else {
|
123 |
+
$this->prefixes[$prefix] = array_merge(
|
124 |
+
$this->prefixes[$prefix],
|
125 |
+
(array) $paths
|
126 |
+
);
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Registers a set of classes, replacing any others previously set.
|
132 |
+
*
|
133 |
+
* @param string $prefix the classes prefix
|
134 |
+
* @param array|string $paths the location(s) of the classes
|
135 |
+
*/
|
136 |
+
public function set($prefix, $paths) {
|
137 |
+
if (!$prefix) {
|
138 |
+
$this->fallbackDirs = (array) $paths;
|
139 |
+
return;
|
140 |
+
}
|
141 |
+
|
142 |
+
$this->prefixes[$prefix] = (array) $paths;
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Turns on searching the include path for class files.
|
147 |
+
*
|
148 |
+
* @param bool $useIncludePath
|
149 |
+
*/
|
150 |
+
public function setUseIncludePath($useIncludePath) {
|
151 |
+
$this->useIncludePath = $useIncludePath;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Can be used to check if the autoloader uses the include path to check
|
156 |
+
* for classes.
|
157 |
+
*
|
158 |
+
* @return bool
|
159 |
+
*/
|
160 |
+
public function getUseIncludePath() {
|
161 |
+
return $this->useIncludePath;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Registers this instance as an autoloader.
|
166 |
+
*/
|
167 |
+
public function register() {
|
168 |
+
spl_autoload_register(array($this, 'loadClass'), true);
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Unregisters this instance as an autoloader.
|
173 |
+
*/
|
174 |
+
public function unregister() {
|
175 |
+
spl_autoload_unregister(array($this, 'loadClass'));
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Loads the given class or interface.
|
180 |
+
*
|
181 |
+
* @param string $class the name of the class
|
182 |
+
* @return bool|null true, if loaded
|
183 |
+
*/
|
184 |
+
public function loadClass($class) {
|
185 |
+
if ($file = $this->findFile($class)) {
|
186 |
+
include $file;
|
187 |
+
return true;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Finds the path to the file where the class is defined.
|
193 |
+
*
|
194 |
+
* @param string $class the name of the class
|
195 |
+
* @return string|null the path, if found
|
196 |
+
*/
|
197 |
+
public function findFile($class) {
|
198 |
+
if ('\\' === $class[0]) {
|
199 |
+
$class = substr($class, 1);
|
200 |
+
}
|
201 |
+
|
202 |
+
if (isset($this->classMap[$class])) {
|
203 |
+
return $this->classMap[$class];
|
204 |
+
}
|
205 |
+
elseif ($this->classMapAuthoratative) {
|
206 |
+
return false;
|
207 |
+
}
|
208 |
+
|
209 |
+
$classPath = $this->getClassPath($class);
|
210 |
+
|
211 |
+
foreach ($this->prefixes as $prefix => $dirs) {
|
212 |
+
if (0 === strpos($class, $prefix)) {
|
213 |
+
foreach ($dirs as $dir) {
|
214 |
+
if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
|
215 |
+
return $dir.DIRECTORY_SEPARATOR.$classPath;
|
216 |
+
}
|
217 |
+
}
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
foreach ($this->fallbackDirs as $dir) {
|
222 |
+
if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
|
223 |
+
return $dir.DIRECTORY_SEPARATOR.$classPath;
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
if ($this->useIncludePath && $file = self::resolveIncludePath($classPath)) {
|
228 |
+
return $file;
|
229 |
+
}
|
230 |
+
|
231 |
+
return $this->classMap[$class] = false;
|
232 |
+
}
|
233 |
+
|
234 |
+
private function getClassPath($class) {
|
235 |
+
if (false !== $pos = strrpos($class, '\\')) {
|
236 |
+
// namespaced class name
|
237 |
+
$classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR;
|
238 |
+
$className = substr($class, $pos + 1);
|
239 |
+
}
|
240 |
+
else {
|
241 |
+
// PEAR-like class name
|
242 |
+
$classPath = null;
|
243 |
+
$className = $class;
|
244 |
+
}
|
245 |
+
|
246 |
+
$className = str_replace('_', DIRECTORY_SEPARATOR, $className);
|
247 |
+
|
248 |
+
// restore the prefix
|
249 |
+
if ($this->allowUnderscore && DIRECTORY_SEPARATOR === $className[0]) {
|
250 |
+
$className[0] = '_';
|
251 |
+
}
|
252 |
+
|
253 |
+
$classPath .= $className.'.php';
|
254 |
+
|
255 |
+
return $classPath;
|
256 |
+
}
|
257 |
+
|
258 |
+
public static function resolveIncludePath($classPath) {
|
259 |
+
$paths = explode(PATH_SEPARATOR, get_include_path());
|
260 |
+
|
261 |
+
foreach ($paths as $path) {
|
262 |
+
$path = rtrim($path, '/\\');
|
263 |
+
|
264 |
+
if ($file = file_exists($path.DIRECTORY_SEPARATOR.$file)) {
|
265 |
+
return $file;
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
return false;
|
270 |
+
}
|
271 |
+
}
|
vendor/composer/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Copyright (c) Nils Adermann, Jordi Boggiano
|
3 |
+
|
4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
+
of this software and associated documentation files (the "Software"), to deal
|
6 |
+
in the Software without restriction, including without limitation the rights
|
7 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
9 |
+
to do so, subject to the following conditions:
|
10 |
+
|
11 |
+
The above copyright notice and this permission notice shall be included in all
|
12 |
+
copies or substantial portions of the Software.
|
13 |
+
|
14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20 |
+
THE SOFTWARE.
|
21 |
+
|
vendor/composer/autoload_classmap.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_classmap.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'AC_Yoast_SEO_ACF_Content_Analysis' => $baseDir . '/inc/class-ac-yoast-acf-content-analysis.php',
|
10 |
+
'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
|
11 |
+
'Composer\\Installers\\AimeosInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
|
12 |
+
'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
|
13 |
+
'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
|
14 |
+
'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
|
15 |
+
'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
|
16 |
+
'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
|
17 |
+
'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
|
18 |
+
'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
|
19 |
+
'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
|
20 |
+
'Composer\\Installers\\ClanCatsFrameworkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
|
21 |
+
'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
|
22 |
+
'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
|
23 |
+
'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
|
24 |
+
'Composer\\Installers\\CraftInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
|
25 |
+
'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
|
26 |
+
'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
|
27 |
+
'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
|
28 |
+
'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
|
29 |
+
'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
|
30 |
+
'Composer\\Installers\\ElggInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
|
31 |
+
'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
|
32 |
+
'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
|
33 |
+
'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
|
34 |
+
'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
|
35 |
+
'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
|
36 |
+
'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
|
37 |
+
'Composer\\Installers\\HuradInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
|
38 |
+
'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
|
39 |
+
'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
|
40 |
+
'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
|
41 |
+
'Composer\\Installers\\JoomlaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
|
42 |
+
'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
|
43 |
+
'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
|
44 |
+
'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
|
45 |
+
'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
|
46 |
+
'Composer\\Installers\\LanManagementSystemInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
|
47 |
+
'Composer\\Installers\\LaravelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
|
48 |
+
'Composer\\Installers\\LavaLiteInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
|
49 |
+
'Composer\\Installers\\LithiumInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
|
50 |
+
'Composer\\Installers\\MODULEWorkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
|
51 |
+
'Composer\\Installers\\MODXEvoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
|
52 |
+
'Composer\\Installers\\MagentoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
|
53 |
+
'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
|
54 |
+
'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
|
55 |
+
'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
|
56 |
+
'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
|
57 |
+
'Composer\\Installers\\MicroweberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
|
58 |
+
'Composer\\Installers\\MoodleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
|
59 |
+
'Composer\\Installers\\OctoberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
|
60 |
+
'Composer\\Installers\\OntoWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
|
61 |
+
'Composer\\Installers\\OsclassInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
|
62 |
+
'Composer\\Installers\\OxidInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
|
63 |
+
'Composer\\Installers\\PPIInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
|
64 |
+
'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
|
65 |
+
'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
|
66 |
+
'Composer\\Installers\\PimcoreInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
|
67 |
+
'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
|
68 |
+
'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
|
69 |
+
'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
|
70 |
+
'Composer\\Installers\\PortoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
|
71 |
+
'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
|
72 |
+
'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
|
73 |
+
'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
|
74 |
+
'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
|
75 |
+
'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
|
76 |
+
'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
|
77 |
+
'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
|
78 |
+
'Composer\\Installers\\ShopwareInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
|
79 |
+
'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
|
80 |
+
'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
|
81 |
+
'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
|
82 |
+
'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
|
83 |
+
'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
|
84 |
+
'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
|
85 |
+
'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
|
86 |
+
'Composer\\Installers\\UserFrostingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
|
87 |
+
'Composer\\Installers\\VanillaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
|
88 |
+
'Composer\\Installers\\VgmcpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
|
89 |
+
'Composer\\Installers\\WHMCSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
|
90 |
+
'Composer\\Installers\\WolfCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
|
91 |
+
'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
|
92 |
+
'Composer\\Installers\\YawikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
|
93 |
+
'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
|
94 |
+
'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
|
95 |
+
'Yoast_ACF_Analysis_Assets' => $baseDir . '/inc/class-yoast-acf-analysis-assets.php',
|
96 |
+
'Yoast_ACF_Analysis_Configuration' => $baseDir . '/inc/configuration/class-yoast-acf-analysis-configuration.php',
|
97 |
+
'Yoast_ACF_Analysis_Dependency' => $baseDir . '/inc/dependencies/interface-yoast-acf-analysis-depencency.php',
|
98 |
+
'Yoast_ACF_Analysis_Dependency_ACF' => $baseDir . '/inc/dependencies/class-yoast-acf-analysis-dependency-afc.php',
|
99 |
+
'Yoast_ACF_Analysis_Dependency_Yoast_SEO' => $baseDir . '/inc/dependencies/class-yoast-acf-analysis-dependency-yoast-seo.php',
|
100 |
+
'Yoast_ACF_Analysis_Facade' => $baseDir . '/inc/class-yoast-acf-analysis-facade.php',
|
101 |
+
'Yoast_ACF_Analysis_Registry' => $baseDir . '/inc/class-yoast-acf-analysis-registry.php',
|
102 |
+
'Yoast_ACF_Analysis_Requirements' => $baseDir . '/inc/class-yoast-acf-analysis-requirements.php',
|
103 |
+
'Yoast_ACF_Analysis_String_Store' => $baseDir . '/inc/configuration/class-yoast-acf-analysis-string-store.php',
|
104 |
+
'xrstf\\Composer52\\AutoloadGenerator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
|
105 |
+
'xrstf\\Composer52\\Generator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/Generator.php',
|
106 |
+
);
|
vendor/composer/autoload_namespaces.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_namespaces.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'xrstf\\Composer52' => array($vendorDir . '/xrstf/composer-php52/lib'),
|
10 |
+
);
|
vendor/composer/autoload_psr4.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_psr4.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
|
10 |
+
);
|
vendor/composer/autoload_real.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_real.php @generated by Composer
|
4 |
+
|
5 |
+
class ComposerAutoloaderInit8a764063ff1a9e4efff80091766c8d97
|
6 |
+
{
|
7 |
+
private static $loader;
|
8 |
+
|
9 |
+
public static function loadClassLoader($class)
|
10 |
+
{
|
11 |
+
if ('Composer\Autoload\ClassLoader' === $class) {
|
12 |
+
require __DIR__ . '/ClassLoader.php';
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
public static function getLoader()
|
17 |
+
{
|
18 |
+
if (null !== self::$loader) {
|
19 |
+
return self::$loader;
|
20 |
+
}
|
21 |
+
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit8a764063ff1a9e4efff80091766c8d97', 'loadClassLoader'), true, true);
|
23 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit8a764063ff1a9e4efff80091766c8d97', 'loadClassLoader'));
|
25 |
+
|
26 |
+
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
+
if ($useStaticLoader) {
|
28 |
+
require_once __DIR__ . '/autoload_static.php';
|
29 |
+
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit8a764063ff1a9e4efff80091766c8d97::getInitializer($loader));
|
31 |
+
} else {
|
32 |
+
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
+
foreach ($map as $namespace => $path) {
|
34 |
+
$loader->set($namespace, $path);
|
35 |
+
}
|
36 |
+
|
37 |
+
$map = require __DIR__ . '/autoload_psr4.php';
|
38 |
+
foreach ($map as $namespace => $path) {
|
39 |
+
$loader->setPsr4($namespace, $path);
|
40 |
+
}
|
41 |
+
|
42 |
+
$classMap = require __DIR__ . '/autoload_classmap.php';
|
43 |
+
if ($classMap) {
|
44 |
+
$loader->addClassMap($classMap);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
$loader->register(true);
|
49 |
+
|
50 |
+
return $loader;
|
51 |
+
}
|
52 |
+
}
|
vendor/composer/autoload_real_52.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
+
|
5 |
+
class ComposerAutoloaderInitcb36f0f2d2acd7bbb1390c61386f16aa {
|
6 |
+
private static $loader;
|
7 |
+
|
8 |
+
public static function loadClassLoader($class) {
|
9 |
+
if ('xrstf_Composer52_ClassLoader' === $class) {
|
10 |
+
require dirname(__FILE__).'/ClassLoader52.php';
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @return xrstf_Composer52_ClassLoader
|
16 |
+
*/
|
17 |
+
public static function getLoader() {
|
18 |
+
if (null !== self::$loader) {
|
19 |
+
return self::$loader;
|
20 |
+
}
|
21 |
+
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitcb36f0f2d2acd7bbb1390c61386f16aa', 'loadClassLoader'), true /*, true */);
|
23 |
+
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitcb36f0f2d2acd7bbb1390c61386f16aa', 'loadClassLoader'));
|
25 |
+
|
26 |
+
$vendorDir = dirname(dirname(__FILE__));
|
27 |
+
$baseDir = dirname($vendorDir);
|
28 |
+
$dir = dirname(__FILE__);
|
29 |
+
|
30 |
+
$map = require $dir.'/autoload_namespaces.php';
|
31 |
+
foreach ($map as $namespace => $path) {
|
32 |
+
$loader->add($namespace, $path);
|
33 |
+
}
|
34 |
+
|
35 |
+
$classMap = require $dir.'/autoload_classmap.php';
|
36 |
+
if ($classMap) {
|
37 |
+
$loader->addClassMap($classMap);
|
38 |
+
}
|
39 |
+
|
40 |
+
$loader->register(true);
|
41 |
+
|
42 |
+
return $loader;
|
43 |
+
}
|
44 |
+
}
|
vendor/xrstf/composer-php52/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright (c) 2013 Christoph Mewes
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
+
of this software and associated documentation files (the "Software"), to deal
|
5 |
+
in the Software without restriction, including without limitation the rights
|
6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
8 |
+
to do so, subject to the following conditions:
|
9 |
+
|
10 |
+
The above copyright notice and this permission notice shall be included in all
|
11 |
+
copies or substantial portions of the Software.
|
12 |
+
|
13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19 |
+
THE SOFTWARE.
|
vendor/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php
ADDED
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright (c) 2013, Christoph Mewes, http://www.xrstf.de
|
4 |
+
*
|
5 |
+
* This file is released under the terms of the MIT license. You can find the
|
6 |
+
* complete text in the attached LICENSE file or online at:
|
7 |
+
*
|
8 |
+
* http://www.opensource.org/licenses/mit-license.php
|
9 |
+
*
|
10 |
+
* --------------------------------------------------------------------------
|
11 |
+
*
|
12 |
+
* 99% of this is copied as-is from the original Composer source code and is
|
13 |
+
* released under MIT license as well. Copyright goes to:
|
14 |
+
*
|
15 |
+
* - Igor Wiedler <igor@wiedler.ch>
|
16 |
+
* - Jordi Boggiano <j.boggiano@seld.be>
|
17 |
+
*/
|
18 |
+
|
19 |
+
namespace xrstf\Composer52;
|
20 |
+
|
21 |
+
use Composer\Autoload\AutoloadGenerator as BaseGenerator;
|
22 |
+
use Composer\Autoload\ClassMapGenerator;
|
23 |
+
use Composer\Config;
|
24 |
+
use Composer\Installer\InstallationManager;
|
25 |
+
use Composer\Package\AliasPackage;
|
26 |
+
use Composer\Package\PackageInterface;
|
27 |
+
use Composer\Repository\InstalledRepositoryInterface;
|
28 |
+
use Composer\Util\Filesystem;
|
29 |
+
|
30 |
+
class AutoloadGenerator extends BaseGenerator {
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @var bool
|
34 |
+
*/
|
35 |
+
private $classMapAuthoritative = false;
|
36 |
+
|
37 |
+
public function __construct() {
|
38 |
+
// do nothing (but keep this constructor so we can build an instance without the need for an event dispatcher)
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Whether or not generated autoloader considers the class map
|
43 |
+
* authoritative.
|
44 |
+
*
|
45 |
+
* @param bool $classMapAuthoritative
|
46 |
+
*/
|
47 |
+
public function setClassMapAuthoritative($classMapAuthoritative)
|
48 |
+
{
|
49 |
+
$this->classMapAuthoritative = (boolean) $classMapAuthoritative;
|
50 |
+
}
|
51 |
+
|
52 |
+
public function dump(Config $config, InstalledRepositoryInterface $localRepo, PackageInterface $mainPackage, InstallationManager $installationManager, $targetDir, $scanPsr0Packages = false, $suffix = '') {
|
53 |
+
if ($this->classMapAuthoritative) {
|
54 |
+
// Force scanPsr0Packages when classmap is authoritative
|
55 |
+
$scanPsr0Packages = true;
|
56 |
+
}
|
57 |
+
|
58 |
+
$filesystem = new Filesystem();
|
59 |
+
$filesystem->ensureDirectoryExists($config->get('vendor-dir'));
|
60 |
+
|
61 |
+
$cwd = getcwd();
|
62 |
+
$basePath = $filesystem->normalizePath($cwd);
|
63 |
+
$vendorPath = $filesystem->normalizePath(realpath($config->get('vendor-dir')));
|
64 |
+
$targetDir = $vendorPath.'/'.$targetDir;
|
65 |
+
$filesystem->ensureDirectoryExists($targetDir);
|
66 |
+
|
67 |
+
$useGlobalIncludePath = (bool) $config->get('use-include-path');
|
68 |
+
$prependAutoloader = $config->get('prepend-autoloader') === false ? 'false' : 'true';
|
69 |
+
$classMapAuthoritative = $config->get('classmap-authoritative');
|
70 |
+
|
71 |
+
$vendorPathCode = $filesystem->findShortestPathCode(realpath($targetDir), $vendorPath, true);
|
72 |
+
$vendorPathToTargetDirCode = $filesystem->findShortestPathCode($vendorPath, realpath($targetDir), true);
|
73 |
+
|
74 |
+
$appBaseDirCode = $filesystem->findShortestPathCode($vendorPath, $basePath, true);
|
75 |
+
$appBaseDirCode = str_replace('__DIR__', '$vendorDir', $appBaseDirCode);
|
76 |
+
|
77 |
+
// add 5.2 compat
|
78 |
+
$vendorPathCode = str_replace('__DIR__', 'dirname(__FILE__)', $vendorPathCode);
|
79 |
+
$vendorPathToTargetDirCode = str_replace('__DIR__', 'dirname(__FILE__)', $vendorPathToTargetDirCode);
|
80 |
+
|
81 |
+
$packageMap = $this->buildPackageMap($installationManager, $mainPackage, $localRepo->getCanonicalPackages());
|
82 |
+
$autoloads = $this->parseAutoloads($packageMap, $mainPackage);
|
83 |
+
|
84 |
+
// add custom psr-0 autoloading if the root package has a target dir
|
85 |
+
$targetDirLoader = null;
|
86 |
+
$mainAutoload = $mainPackage->getAutoload();
|
87 |
+
if ($mainPackage->getTargetDir() && !empty($mainAutoload['psr-0'])) {
|
88 |
+
$levels = count(explode('/', $filesystem->normalizePath($mainPackage->getTargetDir())));
|
89 |
+
$prefixes = implode(', ', array_map(function ($prefix) {
|
90 |
+
return var_export($prefix, true);
|
91 |
+
}, array_keys($mainAutoload['psr-0'])));
|
92 |
+
|
93 |
+
$baseDirFromTargetDirCode = $filesystem->findShortestPathCode($targetDir, $basePath, true);
|
94 |
+
|
95 |
+
$targetDirLoader = <<<EOF
|
96 |
+
|
97 |
+
public static function autoload(\$class) {
|
98 |
+
\$dir = $baseDirFromTargetDirCode.'/';
|
99 |
+
\$prefixes = array($prefixes);
|
100 |
+
|
101 |
+
foreach (\$prefixes as \$prefix) {
|
102 |
+
if (0 !== strpos(\$class, \$prefix)) {
|
103 |
+
continue;
|
104 |
+
}
|
105 |
+
|
106 |
+
\$path = explode(DIRECTORY_SEPARATOR, self::getClassPath(\$class));
|
107 |
+
\$path = \$dir.implode('/', array_slice(\$path, $levels));
|
108 |
+
|
109 |
+
if (!\$path = self::resolveIncludePath(\$path)) {
|
110 |
+
return false;
|
111 |
+
}
|
112 |
+
|
113 |
+
require \$path;
|
114 |
+
return true;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
EOF;
|
119 |
+
}
|
120 |
+
|
121 |
+
$filesCode = "";
|
122 |
+
$autoloads['files'] = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($autoloads['files']));
|
123 |
+
foreach ($autoloads['files'] as $functionFile) {
|
124 |
+
// don't include file if it is using PHP 5.3+ syntax
|
125 |
+
// https://bitbucket.org/xrstf/composer-php52/issue/4
|
126 |
+
if ($this->isPHP53($functionFile)) {
|
127 |
+
$filesCode .= '// require '.$this->getPathCode($filesystem, $basePath, $vendorPath, $functionFile)."; // disabled because of PHP 5.3 syntax\n";
|
128 |
+
}
|
129 |
+
else {
|
130 |
+
$filesCode .= ' require '.$this->getPathCode($filesystem, $basePath, $vendorPath, $functionFile).";\n";
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
if (!$suffix) {
|
135 |
+
$suffix = md5(uniqid('', true));
|
136 |
+
}
|
137 |
+
|
138 |
+
$includePathFile = $this->getIncludePathsFile($packageMap, $filesystem, $basePath, $vendorPath, $vendorPathCode, $appBaseDirCode);
|
139 |
+
|
140 |
+
file_put_contents($vendorPath.'/autoload_52.php', $this->getAutoloadFile($vendorPathToTargetDirCode, $suffix));
|
141 |
+
file_put_contents($targetDir.'/autoload_real_52.php', $this->getAutoloadRealFile(true, (bool) $includePathFile, $targetDirLoader, $filesCode, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader));
|
142 |
+
|
143 |
+
// use stream_copy_to_stream instead of copy
|
144 |
+
// to work around https://bugs.php.net/bug.php?id=64634
|
145 |
+
$sourceLoader = fopen(__DIR__.'/ClassLoader.php', 'r');
|
146 |
+
$targetLoader = fopen($targetDir.'/ClassLoader52.php', 'w+');
|
147 |
+
stream_copy_to_stream($sourceLoader, $targetLoader);
|
148 |
+
fclose($sourceLoader);
|
149 |
+
fclose($targetLoader);
|
150 |
+
unset($sourceLoader, $targetLoader);
|
151 |
+
}
|
152 |
+
|
153 |
+
protected function isPHP53($file) {
|
154 |
+
$tokens = token_get_all(file_get_contents($file));
|
155 |
+
$php53 = array(T_DIR, T_GOTO, T_NAMESPACE, T_NS_C, T_NS_SEPARATOR, T_USE);
|
156 |
+
|
157 |
+
// PHP 5.4+
|
158 |
+
if (defined('T_TRAIT')) {
|
159 |
+
$php53[] = T_TRAIT;
|
160 |
+
$php53[] = T_TRAIT_C;
|
161 |
+
$php53[] = T_TRAIT_C;
|
162 |
+
}
|
163 |
+
|
164 |
+
// PHP 5.5+
|
165 |
+
if (defined('T_FINALLY')) {
|
166 |
+
$php53[] = T_FINALLY;
|
167 |
+
$php53[] = T_YIELD;
|
168 |
+
}
|
169 |
+
|
170 |
+
foreach ($tokens as $token) {
|
171 |
+
if (is_array($token) && in_array($token[0], $php53)) {
|
172 |
+
return true;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
return false;
|
177 |
+
}
|
178 |
+
|
179 |
+
protected function getIncludePathsFile(array $packageMap, Filesystem $filesystem, $basePath, $vendorPath, $vendorPathCode, $appBaseDirCode) {
|
180 |
+
$includePaths = array();
|
181 |
+
|
182 |
+
foreach ($packageMap as $item) {
|
183 |
+
list($package, $installPath) = $item;
|
184 |
+
|
185 |
+
if (null !== $package->getTargetDir() && strlen($package->getTargetDir()) > 0) {
|
186 |
+
$installPath = substr($installPath, 0, -strlen('/'.$package->getTargetDir()));
|
187 |
+
}
|
188 |
+
|
189 |
+
foreach ($package->getIncludePaths() as $includePath) {
|
190 |
+
$includePath = trim($includePath, '/');
|
191 |
+
$includePaths[] = empty($installPath) ? $includePath : $installPath.'/'.$includePath;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
if (!$includePaths) {
|
196 |
+
return;
|
197 |
+
}
|
198 |
+
|
199 |
+
$includePathsFile = <<<EOF
|
200 |
+
<?php
|
201 |
+
|
202 |
+
// include_paths_52.php generated by xrstf/composer-php52
|
203 |
+
|
204 |
+
\$vendorDir = $vendorPathCode;
|
205 |
+
\$baseDir = $appBaseDirCode;
|
206 |
+
|
207 |
+
return array(
|
208 |
+
|
209 |
+
EOF;
|
210 |
+
|
211 |
+
foreach ($includePaths as $path) {
|
212 |
+
$includePathsFile .= "\t" . $this->getPathCode($filesystem, $basePath, $vendorPath, $path) . ",\n";
|
213 |
+
}
|
214 |
+
|
215 |
+
return $includePathsFile . ");\n";
|
216 |
+
}
|
217 |
+
|
218 |
+
protected function getAutoloadFile($vendorPathToTargetDirCode, $suffix) {
|
219 |
+
return <<<AUTOLOAD
|
220 |
+
<?php
|
221 |
+
|
222 |
+
// autoload_52.php generated by xrstf/composer-php52
|
223 |
+
|
224 |
+
require_once $vendorPathToTargetDirCode.'/autoload_real_52.php';
|
225 |
+
|
226 |
+
return ComposerAutoloaderInit$suffix::getLoader();
|
227 |
+
|
228 |
+
AUTOLOAD;
|
229 |
+
}
|
230 |
+
|
231 |
+
protected function getAutoloadRealFile($useClassMap, $useIncludePath, $targetDirLoader, $filesCode, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $staticPhpVersion = 70000) {
|
232 |
+
// TODO the class ComposerAutoloaderInit should be revert to a closure
|
233 |
+
// when APC has been fixed:
|
234 |
+
// - https://github.com/composer/composer/issues/959
|
235 |
+
// - https://bugs.php.net/bug.php?id=52144
|
236 |
+
// - https://bugs.php.net/bug.php?id=61576
|
237 |
+
// - https://bugs.php.net/bug.php?id=59298
|
238 |
+
|
239 |
+
if ($filesCode) {
|
240 |
+
$filesCode = "\n\n".rtrim($filesCode);
|
241 |
+
}
|
242 |
+
|
243 |
+
$file = <<<HEADER
|
244 |
+
<?php
|
245 |
+
|
246 |
+
// autoload_real_52.php generated by xrstf/composer-php52
|
247 |
+
|
248 |
+
class ComposerAutoloaderInit$suffix {
|
249 |
+
private static \$loader;
|
250 |
+
|
251 |
+
public static function loadClassLoader(\$class) {
|
252 |
+
if ('xrstf_Composer52_ClassLoader' === \$class) {
|
253 |
+
require dirname(__FILE__).'/ClassLoader52.php';
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* @return xrstf_Composer52_ClassLoader
|
259 |
+
*/
|
260 |
+
public static function getLoader() {
|
261 |
+
if (null !== self::\$loader) {
|
262 |
+
return self::\$loader;
|
263 |
+
}
|
264 |
+
|
265 |
+
spl_autoload_register(array('ComposerAutoloaderInit$suffix', 'loadClassLoader'), true /*, true */);
|
266 |
+
self::\$loader = \$loader = new xrstf_Composer52_ClassLoader();
|
267 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit$suffix', 'loadClassLoader'));
|
268 |
+
|
269 |
+
\$vendorDir = $vendorPathCode;
|
270 |
+
\$baseDir = $appBaseDirCode;
|
271 |
+
\$dir = dirname(__FILE__);
|
272 |
+
|
273 |
+
|
274 |
+
HEADER;
|
275 |
+
|
276 |
+
if ($useIncludePath) {
|
277 |
+
$file .= <<<'INCLUDE_PATH'
|
278 |
+
$includePaths = require $dir.'/include_paths.php';
|
279 |
+
array_push($includePaths, get_include_path());
|
280 |
+
set_include_path(implode(PATH_SEPARATOR, $includePaths));
|
281 |
+
|
282 |
+
|
283 |
+
INCLUDE_PATH;
|
284 |
+
}
|
285 |
+
|
286 |
+
$file .= <<<'PSR0'
|
287 |
+
$map = require $dir.'/autoload_namespaces.php';
|
288 |
+
foreach ($map as $namespace => $path) {
|
289 |
+
$loader->add($namespace, $path);
|
290 |
+
}
|
291 |
+
|
292 |
+
|
293 |
+
PSR0;
|
294 |
+
|
295 |
+
if ($useClassMap) {
|
296 |
+
$file .= <<<'CLASSMAP'
|
297 |
+
$classMap = require $dir.'/autoload_classmap.php';
|
298 |
+
if ($classMap) {
|
299 |
+
$loader->addClassMap($classMap);
|
300 |
+
}
|
301 |
+
|
302 |
+
|
303 |
+
CLASSMAP;
|
304 |
+
}
|
305 |
+
|
306 |
+
if ($this->classMapAuthoritative) {
|
307 |
+
$file .= <<<'CLASSMAPAUTHORITATIVE'
|
308 |
+
$loader->setClassMapAuthoritative(true);
|
309 |
+
|
310 |
+
CLASSMAPAUTHORITATIVE;
|
311 |
+
}
|
312 |
+
|
313 |
+
if ($useGlobalIncludePath) {
|
314 |
+
$file .= <<<'INCLUDEPATH'
|
315 |
+
$loader->setUseIncludePath(true);
|
316 |
+
|
317 |
+
|
318 |
+
INCLUDEPATH;
|
319 |
+
}
|
320 |
+
|
321 |
+
if ($targetDirLoader) {
|
322 |
+
$file .= <<<REGISTER_AUTOLOAD
|
323 |
+
spl_autoload_register(array('ComposerAutoloaderInit$suffix', 'autoload'), true);
|
324 |
+
|
325 |
+
|
326 |
+
REGISTER_AUTOLOAD;
|
327 |
+
|
328 |
+
}
|
329 |
+
|
330 |
+
$file .= <<<METHOD_FOOTER
|
331 |
+
\$loader->register($prependAutoloader);{$filesCode}
|
332 |
+
|
333 |
+
return \$loader;
|
334 |
+
}
|
335 |
+
|
336 |
+
METHOD_FOOTER;
|
337 |
+
|
338 |
+
$file .= $targetDirLoader;
|
339 |
+
|
340 |
+
return $file . <<<FOOTER
|
341 |
+
}
|
342 |
+
|
343 |
+
FOOTER;
|
344 |
+
|
345 |
+
}
|
346 |
+
}
|
vendor/xrstf/composer-php52/lib/xrstf/Composer52/ClassLoader.php
ADDED
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright (c) 2013, Christoph Mewes, http://www.xrstf.de
|
4 |
+
*
|
5 |
+
* This file is released under the terms of the MIT license. You can find the
|
6 |
+
* complete text in the attached LICENSE file or online at:
|
7 |
+
*
|
8 |
+
* http://www.opensource.org/licenses/mit-license.php
|
9 |
+
*
|
10 |
+
* --------------------------------------------------------------------------
|
11 |
+
*
|
12 |
+
* 99% of this is copied as-is from the original Composer source code and is
|
13 |
+
* released under MIT license as well. Copyright goes to:
|
14 |
+
*
|
15 |
+
* - Fabien Potencier <fabien@symfony.com>
|
16 |
+
* - Jordi Boggiano <j.boggiano@seld.be>
|
17 |
+
*/
|
18 |
+
|
19 |
+
class xrstf_Composer52_ClassLoader {
|
20 |
+
private $prefixes = array();
|
21 |
+
private $fallbackDirs = array();
|
22 |
+
private $useIncludePath = false;
|
23 |
+
private $classMap = array();
|
24 |
+
private $classMapAuthoratative = false;
|
25 |
+
private $allowUnderscore = false;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @param boolean $flag true to allow class names with a leading underscore, false to disable
|
29 |
+
*/
|
30 |
+
public function setAllowUnderscore($flag) {
|
31 |
+
$this->allowUnderscore = (boolean) $flag;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
public function getPrefixes() {
|
38 |
+
return $this->prefixes;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Turns off searching the prefix and fallback directories for classes
|
43 |
+
* that have not been registered with the class map.
|
44 |
+
*
|
45 |
+
* @param bool $classMapAuthoratative
|
46 |
+
*/
|
47 |
+
public function setClassMapAuthoritative($classMapAuthoratative) {
|
48 |
+
$this->classMapAuthoratative = $classMapAuthoratative;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Should class lookup fail if not found in the current class map?
|
53 |
+
*
|
54 |
+
* @return bool
|
55 |
+
*/
|
56 |
+
public function getClassMapAuthoratative() {
|
57 |
+
return $this->classMapAuthoratative;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @return array
|
62 |
+
*/
|
63 |
+
public function getFallbackDirs() {
|
64 |
+
return $this->fallbackDirs;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @return array
|
69 |
+
*/
|
70 |
+
public function getClassMap() {
|
71 |
+
return $this->classMap;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @param array $classMap class to filename map
|
76 |
+
*/
|
77 |
+
public function addClassMap(array $classMap) {
|
78 |
+
if ($this->classMap) {
|
79 |
+
$this->classMap = array_merge($this->classMap, $classMap);
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
$this->classMap = $classMap;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Registers a set of classes, merging with any others previously set.
|
88 |
+
*
|
89 |
+
* @param string $prefix the classes prefix
|
90 |
+
* @param array|string $paths the location(s) of the classes
|
91 |
+
* @param bool $prepend prepend the location(s)
|
92 |
+
*/
|
93 |
+
public function add($prefix, $paths, $prepend = false) {
|
94 |
+
if (!$prefix) {
|
95 |
+
if ($prepend) {
|
96 |
+
$this->fallbackDirs = array_merge(
|
97 |
+
(array) $paths,
|
98 |
+
$this->fallbackDirs
|
99 |
+
);
|
100 |
+
}
|
101 |
+
else {
|
102 |
+
$this->fallbackDirs = array_merge(
|
103 |
+
$this->fallbackDirs,
|
104 |
+
(array) $paths
|
105 |
+
);
|
106 |
+
}
|
107 |
+
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
|
111 |
+
if (!isset($this->prefixes[$prefix])) {
|
112 |
+
$this->prefixes[$prefix] = (array) $paths;
|
113 |
+
return;
|
114 |
+
}
|
115 |
+
|
116 |
+
if ($prepend) {
|
117 |
+
$this->prefixes[$prefix] = array_merge(
|
118 |
+
(array) $paths,
|
119 |
+
$this->prefixes[$prefix]
|
120 |
+
);
|
121 |
+
}
|
122 |
+
else {
|
123 |
+
$this->prefixes[$prefix] = array_merge(
|
124 |
+
$this->prefixes[$prefix],
|
125 |
+
(array) $paths
|
126 |
+
);
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Registers a set of classes, replacing any others previously set.
|
132 |
+
*
|
133 |
+
* @param string $prefix the classes prefix
|
134 |
+
* @param array|string $paths the location(s) of the classes
|
135 |
+
*/
|
136 |
+
public function set($prefix, $paths) {
|
137 |
+
if (!$prefix) {
|
138 |
+
$this->fallbackDirs = (array) $paths;
|
139 |
+
return;
|
140 |
+
}
|
141 |
+
|
142 |
+
$this->prefixes[$prefix] = (array) $paths;
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Turns on searching the include path for class files.
|
147 |
+
*
|
148 |
+
* @param bool $useIncludePath
|
149 |
+
*/
|
150 |
+
public function setUseIncludePath($useIncludePath) {
|
151 |
+
$this->useIncludePath = $useIncludePath;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Can be used to check if the autoloader uses the include path to check
|
156 |
+
* for classes.
|
157 |
+
*
|
158 |
+
* @return bool
|
159 |
+
*/
|
160 |
+
public function getUseIncludePath() {
|
161 |
+
return $this->useIncludePath;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Registers this instance as an autoloader.
|
166 |
+
*/
|
167 |
+
public function register() {
|
168 |
+
spl_autoload_register(array($this, 'loadClass'), true);
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Unregisters this instance as an autoloader.
|
173 |
+
*/
|
174 |
+
public function unregister() {
|
175 |
+
spl_autoload_unregister(array($this, 'loadClass'));
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Loads the given class or interface.
|
180 |
+
*
|
181 |
+
* @param string $class the name of the class
|
182 |
+
* @return bool|null true, if loaded
|
183 |
+
*/
|
184 |
+
public function loadClass($class) {
|
185 |
+
if ($file = $this->findFile($class)) {
|
186 |
+
include $file;
|
187 |
+
return true;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Finds the path to the file where the class is defined.
|
193 |
+
*
|
194 |
+
* @param string $class the name of the class
|
195 |
+
* @return string|null the path, if found
|
196 |
+
*/
|
197 |
+
public function findFile($class) {
|
198 |
+
if ('\\' === $class[0]) {
|
199 |
+
$class = substr($class, 1);
|
200 |
+
}
|
201 |
+
|
202 |
+
if (isset($this->classMap[$class])) {
|
203 |
+
return $this->classMap[$class];
|
204 |
+
}
|
205 |
+
elseif ($this->classMapAuthoratative) {
|
206 |
+
return false;
|
207 |
+
}
|
208 |
+
|
209 |
+
$classPath = $this->getClassPath($class);
|
210 |
+
|
211 |
+
foreach ($this->prefixes as $prefix => $dirs) {
|
212 |
+
if (0 === strpos($class, $prefix)) {
|
213 |
+
foreach ($dirs as $dir) {
|
214 |
+
if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
|
215 |
+
return $dir.DIRECTORY_SEPARATOR.$classPath;
|
216 |
+
}
|
217 |
+
}
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
foreach ($this->fallbackDirs as $dir) {
|
222 |
+
if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
|
223 |
+
return $dir.DIRECTORY_SEPARATOR.$classPath;
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
if ($this->useIncludePath && $file = self::resolveIncludePath($classPath)) {
|
228 |
+
return $file;
|
229 |
+
}
|
230 |
+
|
231 |
+
return $this->classMap[$class] = false;
|
232 |
+
}
|
233 |
+
|
234 |
+
private function getClassPath($class) {
|
235 |
+
if (false !== $pos = strrpos($class, '\\')) {
|
236 |
+
// namespaced class name
|
237 |
+
$classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR;
|
238 |
+
$className = substr($class, $pos + 1);
|
239 |
+
}
|
240 |
+
else {
|
241 |
+
// PEAR-like class name
|
242 |
+
$classPath = null;
|
243 |
+
$className = $class;
|
244 |
+
}
|
245 |
+
|
246 |
+
$className = str_replace('_', DIRECTORY_SEPARATOR, $className);
|
247 |
+
|
248 |
+
// restore the prefix
|
249 |
+
if ($this->allowUnderscore && DIRECTORY_SEPARATOR === $className[0]) {
|
250 |
+
$className[0] = '_';
|
251 |
+
}
|
252 |
+
|
253 |
+
$classPath .= $className.'.php';
|
254 |
+
|
255 |
+
return $classPath;
|
256 |
+
}
|
257 |
+
|
258 |
+
public static function resolveIncludePath($classPath) {
|
259 |
+
$paths = explode(PATH_SEPARATOR, get_include_path());
|
260 |
+
|
261 |
+
foreach ($paths as $path) {
|
262 |
+
$path = rtrim($path, '/\\');
|
263 |
+
|
264 |
+
if ($file = file_exists($path.DIRECTORY_SEPARATOR.$file)) {
|
265 |
+
return $file;
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
return false;
|
270 |
+
}
|
271 |
+
}
|
vendor/xrstf/composer-php52/lib/xrstf/Composer52/Generator.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright (c) 2013, Christoph Mewes, http://www.xrstf.de
|
4 |
+
*
|
5 |
+
* This file is released under the terms of the MIT license. You can find the
|
6 |
+
* complete text in the attached LICENSE file or online at:
|
7 |
+
*
|
8 |
+
* http://www.opensource.org/licenses/mit-license.php
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace xrstf\Composer52;
|
12 |
+
|
13 |
+
use Composer\Repository\CompositeRepository;
|
14 |
+
use Composer\Script\Event;
|
15 |
+
|
16 |
+
class Generator {
|
17 |
+
public static function onPostInstallCmd(Event $event) {
|
18 |
+
$composer = $event->getComposer();
|
19 |
+
$installationManager = $composer->getInstallationManager();
|
20 |
+
$repoManager = $composer->getRepositoryManager();
|
21 |
+
$localRepo = $repoManager->getLocalRepository();
|
22 |
+
$package = $composer->getPackage();
|
23 |
+
$config = $composer->getConfig();
|
24 |
+
|
25 |
+
// We can't gain access to the Command's input object, so we have to look
|
26 |
+
// for -o / --optimize-autoloader ourselves. Sadly, neither getopt() works
|
27 |
+
// (always returns an empty array), nor does Symfony's Console Input, as
|
28 |
+
// it expects a full definition of the current command line and we can't
|
29 |
+
// provide that.
|
30 |
+
|
31 |
+
$args = $_SERVER['argv'];
|
32 |
+
$optimize = in_array('-o', $args) || in_array('--optimize-autoloader', $args) || in_array('--optimize', $args);
|
33 |
+
|
34 |
+
$suffix = $config->get('autoloader-suffix');
|
35 |
+
|
36 |
+
$generator = new AutoloadGenerator();
|
37 |
+
$generator->dump($config, $localRepo, $package, $installationManager, 'composer', $optimize, $suffix);
|
38 |
+
}
|
39 |
+
}
|
yoast-acf-analysis.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package YoastACFAnalysis
|
4 |
+
*/
|
5 |
+
|
6 |
+
/*
|
7 |
+
Plugin Name: ACF Content Analysis for Yoast SEO
|
8 |
+
Plugin URI: https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/
|
9 |
+
Description: Ensure that Yoast SEO analyzes all Advanced Custom Fields 4 and 5 content including Flexible Content and Repeaters.
|
10 |
+
Version: 2.0.0
|
11 |
+
Author: Thomas Kräftner, ViktorFroberg, marol87, pekz0r, angrycreative, Team Yoast
|
12 |
+
Author URI: http://angrycreative.se
|
13 |
+
License: GPL v3
|
14 |
+
Text Domain: yoast-acf-analysis
|
15 |
+
Domain Path: /languages/
|
16 |
+
*/
|
17 |
+
|
18 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
19 |
+
exit;
|
20 |
+
}
|
21 |
+
|
22 |
+
if ( ! defined( 'AC_SEO_ACF_ANALYSIS_PLUGIN_PATH' ) ) {
|
23 |
+
define( 'AC_SEO_ACF_ANALYSIS_PLUGIN_SLUG', 'ac-yoast-seo-acf-content-analysis' );
|
24 |
+
define( 'AC_SEO_ACF_ANALYSIS_PLUGIN_FILE', __FILE__ );
|
25 |
+
define( 'AC_SEO_ACF_ANALYSIS_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
26 |
+
define( 'AC_SEO_ACF_ANALYSIS_PLUGIN_URL', plugins_url( '', __FILE__ ) . '/' );
|
27 |
+
define( 'AC_SEO_ACF_ANALYSIS_PLUGIN_NAME', untrailingslashit( plugin_basename( __FILE__ ) ) );
|
28 |
+
}
|
29 |
+
|
30 |
+
if ( is_file( AC_SEO_ACF_ANALYSIS_PLUGIN_PATH . '/vendor/autoload_52.php' ) ) {
|
31 |
+
require AC_SEO_ACF_ANALYSIS_PLUGIN_PATH . '/vendor/autoload_52.php';
|
32 |
+
|
33 |
+
$ac_yoast_seo_acf_analysis = new AC_Yoast_SEO_ACF_Content_Analysis();
|
34 |
+
$ac_yoast_seo_acf_analysis->init();
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Loads translations.
|
39 |
+
*/
|
40 |
+
function yoast_acf_analysis_load_textdomain() {
|
41 |
+
$plugin_path = str_replace( '\\', '/', AC_SEO_ACF_ANALYSIS_PLUGIN_PATH );
|
42 |
+
$mu_path = str_replace( '\\', '/', WPMU_PLUGIN_DIR );
|
43 |
+
|
44 |
+
if ( 0 === stripos( $plugin_path, $mu_path ) ) {
|
45 |
+
load_muplugin_textdomain( 'yoast-acf-analysis', $plugin_path . '/languages' );
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
load_plugin_textdomain( 'yoast-acf-analysis', false, $plugin_path . '/languages' );
|
50 |
+
}
|
51 |
+
add_action( 'plugins_loaded', 'yoast_acf_analysis_load_textdomain' );
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Triggers a message whenever the class is missing.
|
55 |
+
*/
|
56 |
+
if ( ! class_exists( 'AC_Yoast_SEO_ACF_Content_Analysis' ) && is_admin() ) {
|
57 |
+
/* translators: %1$s resolves to Yoast SEO: ACF Analysis */
|
58 |
+
$message = sprintf( __( '%1$s could not be loaded because of missing files.', 'yoast-acf-analysis' ), 'ACF Content Analysis for Yoast SEO' );
|
59 |
+
add_action(
|
60 |
+
'admin_notices',
|
61 |
+
create_function( '', "echo '<div class=\"error\"><p>$message</p></div>';" )
|
62 |
+
);
|
63 |
+
}
|
yoast-seo-acf-content-analysis.php
DELETED
@@ -1,168 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: ACF Content Analysis for Yoast SEO
|
4 |
-
Plugin URI: http://angrycreative.se
|
5 |
-
Description: Ensure that Yoast SEO analysize all ACF content including Flexible Content and Repeaters.
|
6 |
-
Version: 1.2.6
|
7 |
-
Author: ViktorFroberg, marol87, pekz0r, angrycreative
|
8 |
-
Author URI: http://angrycreative.se
|
9 |
-
License: GPL
|
10 |
-
*/
|
11 |
-
|
12 |
-
|
13 |
-
// If this file is called directly, abort.
|
14 |
-
if ( ! defined( 'WPINC' ) ) {
|
15 |
-
die;
|
16 |
-
}
|
17 |
-
|
18 |
-
define('AC_SEO_ACF_ANALYSIS_PLUGIN_SLUG', 'ac-yoast-seo-acf-content-analysis');
|
19 |
-
define('AC_SEO_ACF_ANALYSIS_PLUGIN_PATH', plugin_dir_path( __FILE__ ));
|
20 |
-
define('AC_SEO_ACF_ANALYSIS_PLUGIN_URL', plugins_url('', __FILE__).'/');
|
21 |
-
define('AC_SEO_ACF_ANALYSIS_PLUGIN_NAME', untrailingslashit(plugin_basename(__FILE__)));
|
22 |
-
|
23 |
-
class AC_Yoast_SEO_ACF_Content_Analysis
|
24 |
-
{
|
25 |
-
/**
|
26 |
-
* Plugin version, used for automatic updates and for cache-busting of style and script file references.
|
27 |
-
*
|
28 |
-
* @since 0.1.0
|
29 |
-
* @var string
|
30 |
-
*/
|
31 |
-
const VERSION = '1.2.6';
|
32 |
-
/**
|
33 |
-
* Unique identifier for the plugin.
|
34 |
-
* This value is used as the text domain when internationalizing strings of text. It should
|
35 |
-
* match the Text Domain file header in the main plugin file.
|
36 |
-
*
|
37 |
-
* @since 0.1.0
|
38 |
-
* @var string
|
39 |
-
*/
|
40 |
-
public $plugin_slug = 'ysacf';
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Holds the global `$pagenow` variable's value.
|
44 |
-
*
|
45 |
-
* @since 1.1.0
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
private $pagenow = '';
|
49 |
-
|
50 |
-
/**
|
51 |
-
* variable containing places where the plugin will fetch acf data
|
52 |
-
*
|
53 |
-
* @since 1.1.0
|
54 |
-
* @var array
|
55 |
-
*/
|
56 |
-
private $analysize_page_types = array(
|
57 |
-
'term.php',
|
58 |
-
'post.php',
|
59 |
-
'edit-tags.php', // will be removed in future versions of the plugin.
|
60 |
-
'post-new.php',
|
61 |
-
);
|
62 |
-
|
63 |
-
function __construct(){
|
64 |
-
|
65 |
-
add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
|
66 |
-
add_action( 'admin_print_scripts-post-new.php', array($this, 'enqueue_admin_scripts') , 999 );
|
67 |
-
add_action( 'admin_print_scripts-post.php', array($this, 'enqueue_admin_scripts'), 999 );
|
68 |
-
add_action( 'wp_ajax_' . $this->plugin_slug . '_get_fields', array($this, 'ajax_get_fields') );
|
69 |
-
if(isset($GLOBALS['pagenow'])) {
|
70 |
-
$this->pagenow = $GLOBALS['pagenow'];
|
71 |
-
}
|
72 |
-
|
73 |
-
}
|
74 |
-
function get_excluded_fields() {
|
75 |
-
return apply_filters( 'ysacf_exclude_fields', array() );
|
76 |
-
}
|
77 |
-
/**
|
78 |
-
* Filter what ACF Fields not to score
|
79 |
-
* @param field name array
|
80 |
-
*/
|
81 |
-
|
82 |
-
function get_field_data($fields) {
|
83 |
-
|
84 |
-
$data = '';
|
85 |
-
if(!empty($fields)) {
|
86 |
-
foreach($fields as $key =>$item) {
|
87 |
-
|
88 |
-
if(in_array((string)$key, $this->get_excluded_fields()) ){
|
89 |
-
continue;
|
90 |
-
} else {
|
91 |
-
switch(gettype($item)) {
|
92 |
-
case 'string':
|
93 |
-
$data = $data.' '.$item;
|
94 |
-
break;
|
95 |
-
|
96 |
-
case 'array':
|
97 |
-
if(isset($item['sizes']['thumbnail'])) {
|
98 |
-
// put all images in img tags for scoring.
|
99 |
-
$alt = '';
|
100 |
-
if(isset($item['alt'])) {
|
101 |
-
$alt = $item['alt'];
|
102 |
-
}
|
103 |
-
$title = '';
|
104 |
-
if(isset($item['title'])) {
|
105 |
-
$title = $item['title'];
|
106 |
-
}
|
107 |
-
$data = $data.' <img src="'.$item['sizes']['thumbnail'] . '" alt="' . $alt .'" title="' . $title . '"/>';
|
108 |
-
} else {
|
109 |
-
|
110 |
-
$data = $data.' '.$this->get_field_data($item);
|
111 |
-
}
|
112 |
-
|
113 |
-
break;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
|
120 |
-
return $data;
|
121 |
-
}
|
122 |
-
|
123 |
-
function ajax_get_fields() {
|
124 |
-
|
125 |
-
$pid = filter_input(INPUT_POST, 'postId', FILTER_SANITIZE_STRING);
|
126 |
-
|
127 |
-
$fields = get_fields( $pid );
|
128 |
-
|
129 |
-
wp_send_json( $this->get_field_data( $fields ) );
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Register and enqueue admin-specific JavaScript.
|
134 |
-
*
|
135 |
-
* @since 0.1.0
|
136 |
-
*/
|
137 |
-
public function enqueue_admin_scripts() {
|
138 |
-
|
139 |
-
if( in_array( $this->pagenow, $this->analysize_page_types ) ) {
|
140 |
-
|
141 |
-
// if this is a taxonomy, get the taxonomy id else get the post id
|
142 |
-
if($this->pagenow === 'term.php' || $this->pagenow === 'edit-tags.php') {
|
143 |
-
|
144 |
-
$id = filter_input(INPUT_GET, 'taxonomy', FILTER_SANITIZE_STRING) . '_' . filter_input(INPUT_GET, 'tag_ID', FILTER_SANITIZE_NUMBER_INT);
|
145 |
-
|
146 |
-
} else {
|
147 |
-
global $post;
|
148 |
-
$id = $post->ID;
|
149 |
-
}
|
150 |
-
|
151 |
-
wp_enqueue_script($this->plugin_slug, AC_SEO_ACF_ANALYSIS_PLUGIN_URL . 'yoast-seo-plugin.js', array('jquery'), self::VERSION);
|
152 |
-
|
153 |
-
wp_localize_script($this->plugin_slug, 'yoast_acf_settings', array(
|
154 |
-
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
155 |
-
'id' => $id,
|
156 |
-
'ajax_action' => $this->plugin_slug . '_get_fields'
|
157 |
-
));
|
158 |
-
}
|
159 |
-
|
160 |
-
}
|
161 |
-
|
162 |
-
}
|
163 |
-
|
164 |
-
add_action( 'plugins_loaded', 'init_ysacf' );
|
165 |
-
|
166 |
-
function init_ysacf() {
|
167 |
-
new AC_Yoast_SEO_ACF_Content_Analysis();
|
168 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yoast-seo-plugin.js
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
jQuery(window).on('YoastSEO:ready', function () {
|
2 |
-
var fieldData = "";
|
3 |
-
YoastSEO_ACF_Content_Analysis = function() {
|
4 |
-
|
5 |
-
YoastSEO.app.registerPlugin( 'ACF_Content_Analysis', {status: 'loading'} );
|
6 |
-
this.appendACFFields();
|
7 |
-
};
|
8 |
-
|
9 |
-
YoastSEO_ACF_Content_Analysis.prototype.appendACFFields = function() {
|
10 |
-
|
11 |
-
var $this = this;
|
12 |
-
jQuery.ajax({
|
13 |
-
url: yoast_acf_settings.ajax_url,
|
14 |
-
type: 'POST',
|
15 |
-
dataType: 'JSON',
|
16 |
-
data: {
|
17 |
-
postId : yoast_acf_settings.id,
|
18 |
-
action: yoast_acf_settings.ajax_action
|
19 |
-
}
|
20 |
-
})
|
21 |
-
.done(function(acf_fields) {
|
22 |
-
$this.setFieldData(acf_fields);
|
23 |
-
})
|
24 |
-
.fail(function(data) {
|
25 |
-
console.log("error");
|
26 |
-
console.log(data);
|
27 |
-
});
|
28 |
-
};
|
29 |
-
|
30 |
-
YoastSEO_ACF_Content_Analysis.prototype.setFieldData = function( data ) {
|
31 |
-
|
32 |
-
YoastSEO.app.pluginReady( 'ACF_Content_Analysis' );
|
33 |
-
fieldData = data;
|
34 |
-
this.registerModification();
|
35 |
-
|
36 |
-
};
|
37 |
-
|
38 |
-
YoastSEO_ACF_Content_Analysis.prototype.getFieldData = function( data ) {
|
39 |
-
|
40 |
-
return data + ' ' + fieldData;
|
41 |
-
|
42 |
-
};
|
43 |
-
|
44 |
-
YoastSEO_ACF_Content_Analysis.prototype.registerModification = function( data ) {
|
45 |
-
YoastSEO.app.registerModification( 'content', this.getFieldData, 'ACF_Content_Analysis', 50 );
|
46 |
-
};
|
47 |
-
|
48 |
-
new YoastSEO_ACF_Content_Analysis();
|
49 |
-
|
50 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|