Version Description
= 3.4 =
- This version introduces a major refactoring of the code responsible for the core backup engine. We made sure to write unit tests for the new code, and we have tested it on several user's sites. It fixes a lot of old bugs, and Windows users should see major improvements to reliability.
= 3.3.4 =
- WordPress 4.4 compatibility.
= 3.3.1 =
- Fixes a bug that would prevent downloading backups since 3.3.0 - please update.
= 3.2.5 =
- Security fixes related to add_query_arg
= 3.2.1 =
- Important bug fixes. Please upgrade to this version to avoid incomplete or broken backups.
= 3.1.3 =
- Fixes backwards compatibility for add-ons and avoids a Fatal Error. Please upgrade straight to this version before upgrading your add-ons.
= 3.0.4 =
- Fixes a few minor bugs. Immediate update is recommended.
= 3.0.2 =
- Important: we have dropped support for PHP 5.2, you will not be able to activate BackUpWordPress on a server running PHP versions older than PHP 5.3.29
= 3.0.1 =
- This is a critical update. Fixes a bug in the core backup library. Please update immediately.
Download this release
Release Info
Developer | xibodevelopment |
Plugin | BackUpWordPress |
Version | 3.9 |
Comparing to | |
See all releases |
Code changes from version 3.8 to 3.9
- admin/faq.php +58 -58
- backdrop/README.md +0 -114
- backdrop/hm-backdrop.php +0 -12
- backdrop/license.txt +0 -340
- backdrop/namespace.php +0 -6
- backdrop/server.php +0 -38
- backdrop/task.php +0 -71
- backupwordpress.php +3 -3
- classes/class-email-service.php +216 -216
- classes/class-plugin.php +1 -1
- languages/backupwordpress.pot +1 -1
- package-lock.json +0 -3651
- readme.txt +6 -6
- vendor/autoload.php +1 -1
- vendor/composer/ClassLoader.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +3 -3
- vendor/composer/installed.json +28 -25
- vendor/ifsnop/mysqldump-php/.gitignore +0 -4
- vendor/ifsnop/mysqldump-php/.scrutinizer.yml +0 -43
- vendor/ifsnop/mysqldump-php/.travis.yml +0 -41
- vendor/ifsnop/mysqldump-php/LICENSE +674 -0
- vendor/ifsnop/mysqldump-php/README.md +175 -113
- vendor/ifsnop/mysqldump-php/composer.json +4 -4
- vendor/ifsnop/mysqldump-php/phpunit.xml +17 -14
- vendor/ifsnop/mysqldump-php/src/Ifsnop/Mysqldump/Mysqldump.php +544 -341
- vendor/ifsnop/mysqldump-php/tests/create_users.sh +0 -24
- vendor/ifsnop/mysqldump-php/tests/delete_users.sh +0 -13
- vendor/ifsnop/mysqldump-php/tests/test.php +0 -100
- vendor/ifsnop/mysqldump-php/tests/test.sh +0 -152
- vendor/ifsnop/mysqldump-php/tests/test001.src.sql +0 -136
- vendor/ifsnop/mysqldump-php/tests/test002.src.sql +0 -14
- vendor/ifsnop/mysqldump-php/tests/test005.src.sql +0 -12
- vendor/ifsnop/mysqldump-php/tests/test006.src.sql +0 -107
- vendor/ifsnop/mysqldump-php/tests/test008.src.sql +0 -80
- vendor/ifsnop/mysqldump-php/tests/test009.src.sql +0 -57
- vendor/ifsnop/mysqldump-php/tests/test010.src.sql +0 -56
- vendor/ifsnop/mysqldump-php/tests/test011.src.sql +0 -52
- vendor/ifsnop/mysqldump-php/unit-tests/MysqldumpTest.php +48 -0
- vendor/symfony/finder/Adapter/AbstractAdapter.php +1 -1
- vendor/symfony/finder/Adapter/AbstractFindAdapter.php +9 -15
- vendor/symfony/finder/Adapter/AdapterInterface.php +0 -22
- vendor/symfony/finder/Adapter/BsdFindAdapter.php +5 -5
- vendor/symfony/finder/Adapter/GnuFindAdapter.php +5 -5
- vendor/symfony/finder/Adapter/PhpAdapter.php +1 -1
- vendor/symfony/finder/Comparator/Comparator.php +1 -1
- vendor/symfony/finder/Comparator/DateComparator.php +0 -2
- vendor/symfony/finder/Comparator/NumberComparator.php +0 -2
- vendor/symfony/finder/Exception/AdapterFailureException.php +1 -4
- vendor/symfony/finder/Exception/OperationNotPermitedException.php +1 -1
- vendor/symfony/finder/Exception/ShellCommandFailureException.php +1 -9
- vendor/symfony/finder/Expression/Expression.php +1 -1
- vendor/symfony/finder/Expression/Glob.php +1 -4
- vendor/symfony/finder/Expression/Regex.php +4 -6
- vendor/symfony/finder/Expression/ValueInterface.php +1 -1
- vendor/symfony/finder/Finder.php +56 -45
- vendor/symfony/finder/Glob.php +8 -8
- vendor/symfony/finder/Iterator/CustomFilterIterator.php +2 -4
- vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +0 -2
- vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php +0 -2
- vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +0 -2
- vendor/symfony/finder/Iterator/FilePathsIterator.php +4 -4
- vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +0 -2
- vendor/symfony/finder/Iterator/FilterIterator.php +1 -1
- vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +0 -2
- vendor/symfony/finder/Iterator/PathFilterIterator.php +1 -1
- vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +3 -5
- vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +0 -2
- vendor/symfony/finder/Iterator/SortableIterator.php +1 -3
- vendor/symfony/finder/LICENSE +1 -1
- vendor/symfony/finder/Shell/Command.php +4 -24
- vendor/symfony/finder/Shell/Shell.php +3 -3
- vendor/symfony/finder/SplFileInfo.php +3 -6
- vendor/symfony/finder/Tests/BsdFinderTest.php +11 -1
- vendor/symfony/finder/Tests/FinderTest.php +85 -47
- vendor/symfony/finder/Tests/GnuFinderTest.php +11 -1
- vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php +1 -1
- vendor/symfony/finder/Tests/Iterator/FilePathsIteratorTest.php +18 -18
- vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php +3 -3
- vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php +12 -12
- vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php +6 -6
- vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php +22 -13
- vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php +2 -2
- vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php +1 -1
- vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php +6 -6
- vendor/symfony/finder/Tests/PhpFinderTest.php +2 -2
- vendor/symfony/finder/phpunit.xml.dist +1 -1
- vendor/symfony/process/Exception/ProcessTimedOutException.php +2 -2
- vendor/symfony/process/ExecutableFinder.php +3 -5
- vendor/symfony/process/LICENSE +1 -1
- vendor/symfony/process/PhpExecutableFinder.php +11 -7
- vendor/symfony/process/PhpProcess.php +5 -7
- vendor/symfony/process/Pipes/AbstractPipes.php +18 -9
- vendor/symfony/process/Pipes/UnixPipes.php +4 -4
- vendor/symfony/process/Pipes/WindowsPipes.php +28 -37
- vendor/symfony/process/Process.php +33 -37
- vendor/symfony/process/ProcessBuilder.php +4 -8
- vendor/symfony/process/ProcessUtils.php +6 -6
- vendor/symfony/process/Tests/ExecutableFinderTest.php +38 -8
- vendor/symfony/process/Tests/PhpExecutableFinderTest.php +9 -9
- vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php +4 -4
- vendor/symfony/process/Tests/ProcessBuilderTest.php +8 -8
- vendor/symfony/process/Tests/ProcessTest.php +25 -25
- vendor/symfony/process/Tests/ProcessUtilsTest.php +1 -1
- vendor/symfony/process/phpunit.xml.dist +1 -1
- whitelist-html/README.md +0 -175
- whitelist-html/whitelist-html.php +0 -102
admin/faq.php
CHANGED
@@ -1,58 +1,58 @@
|
|
1 |
-
<?php
|
2 |
-
echo '<p><strong>' . __( 'Where does BackUpWordPress store the backup files?', 'backupwordpress' ) . '</strong></p>' .
|
3 |
-
|
4 |
-
'<p>' . __( 'Backups are stored on your server in <code>/wp-content/backups</code>, you can change the directory.', 'backupwordpress' ). '</p>' .
|
5 |
-
|
6 |
-
'<p>' . __( 'Important: By default BackUpWordPress backs up everything in your site root as well as your database, this includes any non WordPress folders that happen to be in your site root. This does mean that your backup directory can get quite large.', 'backupwordpress' ) . '</p>' .
|
7 |
-
|
8 |
-
'<p><strong>' . __( 'What if I want to back up my site to another destination?', 'backupwordpress' ) . '</strong></p>' .
|
9 |
-
|
10 |
-
'<p>' . __( 'We no longer sell or support the paid add-ons (e.g. for backups to Dropbox and Google Drive). It\'s certainly a good idea to backup to cloud storage to protect against server-wide risks. For this we recommend <a href="https://updraftplus.com/?afref=744" title="UpdraftPlus WordPress Backups" target="_blank">UpdraftPlus WordPress Backups</a> which can do things for free BackupWordPress Premium could do on a paid basis. Click here for <a href="https://updraftplus.com/backupwordpress/?afref=744" title="plugin comparison" target="_blank">full comparison</a>.', 'backupwordpress' ) . '</p>' .
|
11 |
-
|
12 |
-
'<p><strong>' . __( 'How do I restore my site from a backup?', 'backupwordpress' ) . '</strong></p>' .
|
13 |
-
|
14 |
-
'<p>' . __( 'You need to download the latest backup file either by clicking download on the backups page or via <code>FTP</code>. <code>Unzip</code> the files and upload all the files to your server overwriting your site. You can then import the database using your hosts database management tool (likely <code>phpMyAdmin</code>).', 'backupwordpress' ) . '</p>' .
|
15 |
-
|
16 |
-
'<p>' . __( 'See this guide for more details - <a href="https://bwp.hmn.md/support-center/restore-backup/" title="Go to support center" target="_blank">How to restore from backup</a>.', 'backupwordpress' ) . '</p>' .
|
17 |
-
|
18 |
-
'<p><strong>' . __( 'Does BackUpWordPress back up the backups directory?', 'backupwordpress' ) . '</strong></p>' .
|
19 |
-
|
20 |
-
'<p>' . __( 'No.', 'backupwordpress' ) . '</p>' .
|
21 |
-
|
22 |
-
'<p><strong>' . __( 'I\'m not receiving my backups by email', 'backupwordpress' ) . '</strong></p>' .
|
23 |
-
|
24 |
-
'<p>' . __( 'Most servers have a filesize limit on email attachments, it\'s generally about 10mb. If your backup file is over that limit, it won\'t be sent attached to the email. Instead, you should receive an email with a link to download the backup. If you aren\'t even receiving that, then you likely have a mail issue on your server that you\'ll need to contact your host about.', 'backupwordpress' ) . '</p>' .
|
25 |
-
|
26 |
-
'<p><strong>' . __( 'How many backups are stored by default?', 'backupwordpress' ) . '</strong></p>' .
|
27 |
-
|
28 |
-
'<p>' . __( 'BackUpWordPress stores the last 10 backups by default.', 'backupwordpress' ) . '</p>' .
|
29 |
-
|
30 |
-
'<p><strong>' . __( 'How long should a backup take?', 'backupwordpress' ) . '</strong></p>' .
|
31 |
-
|
32 |
-
'<p>' . __( 'Unless your site is very large (many gigabytes) it should only take a few minutes to perform a backup. If your back up has been running for longer than an hour, it\'s safe to assume that something has gone wrong. Try de-activating and re-activating the plugin. If it keeps happening, contact support.', 'backupwordpress' ) . '</p>' .
|
33 |
-
|
34 |
-
'<p><strong>' . __( 'What do I do if I get the wp-cron error message?', 'backupwordpress' ) . '</strong></p>' .
|
35 |
-
|
36 |
-
'<p>' . __( 'The issue is that your <code>wp-cron.php</code> is not returning a <code>200</code> response when hit with a HTTP request originating from your own server, it could be several things. In most cases, it\'s an issue with the server / site.', 'backupwordpress' ) . '</p>' .
|
37 |
-
|
38 |
-
'<p>' . __( 'There are some things you can test to confirm this is the issue.', 'backupwordpress' ) . '</p>' .
|
39 |
-
|
40 |
-
'<ul><li>' . __( 'Are scheduled posts working? (They use wp-cron as well.)', 'backupwordpress' ) . '</li>' .
|
41 |
-
|
42 |
-
'<li>' . __( 'Are you hosted on Heart Internet? (wp-cron may not be supported by Heart Internet, see below for work-around.)', 'backupwordpress' ) . '</li>' .
|
43 |
-
|
44 |
-
'<li>' . __( 'If you click manual backup, does it work?', 'backupwordpress' ) . '</li>' .
|
45 |
-
|
46 |
-
'<li>' . __( 'Try adding <code>define( \'ALTERNATE_WP_CRON\', true );</code> to your <code>wp-config.php</code>. Do automatic backups work?', 'backupwordpress' ) . '</li>' .
|
47 |
-
|
48 |
-
'<li>' . __( 'Is your site private (i.e. is it behind some kind of authentication, maintenance plugin, .htaccess)? If so, wp-cron won\'t work until you remove it. If you are and you temporarily remove the authentication, do backups start working?', 'backupwordpress' ) . '</li></ul>' .
|
49 |
-
|
50 |
-
'<p>' . __( '
|
51 |
-
|
52 |
-
'<p><strong>' . __( 'How to get BackUpWordPress working in Heart Internet', 'backupwordpress' ) . '</strong></p>' .
|
53 |
-
|
54 |
-
'<p>' . __( 'The script to be entered into the Heart Internet cPanel is: <code>/usr/bin/php5 /home/sites/yourdomain.com/public_html/wp-cron.php</code> (note the space between php5 and the location of the file). The file <code>wp-cron.php</code> <code>chmod</code> must be set to <code>711</code>.', 'backupwordpress' ) . '</p>' .
|
55 |
-
|
56 |
-
'<p><strong>' . __( 'My backups seem to be failing?', 'backupwordpress' ) . '</strong></p>' .
|
57 |
-
|
58 |
-
'<p>' . __( 'If your backups are failing, it\'s commonly caused by a lack of available resources on your server. To establish this is the case, exclude the complete (or parts of the) uploads folder and run a backup. If that succeeds, you know it\'s probably a server issue. If it does not succeed,
|
1 |
+
<?php
|
2 |
+
echo '<p><strong>' . __( 'Where does BackUpWordPress store the backup files?', 'backupwordpress' ) . '</strong></p>' .
|
3 |
+
|
4 |
+
'<p>' . __( 'Backups are stored on your server in <code>/wp-content/backups</code>, you can change the directory.', 'backupwordpress' ). '</p>' .
|
5 |
+
|
6 |
+
'<p>' . __( 'Important: By default BackUpWordPress backs up everything in your site root as well as your database, this includes any non WordPress folders that happen to be in your site root. This does mean that your backup directory can get quite large.', 'backupwordpress' ) . '</p>' .
|
7 |
+
|
8 |
+
'<p><strong>' . __( 'What if I want to back up my site to another destination?', 'backupwordpress' ) . '</strong></p>' .
|
9 |
+
|
10 |
+
'<p>' . __( 'We no longer sell or support the paid add-ons (e.g. for backups to Dropbox and Google Drive). It\'s certainly a good idea to backup to cloud storage to protect against server-wide risks. For this we recommend <a href="https://updraftplus.com/?afref=744" title="UpdraftPlus WordPress Backups" target="_blank">UpdraftPlus WordPress Backups</a> which can do things for free BackupWordPress Premium could do on a paid basis. Click here for <a href="https://updraftplus.com/backupwordpress/?afref=744" title="plugin comparison" target="_blank">full comparison</a>.', 'backupwordpress' ) . '</p>' .
|
11 |
+
|
12 |
+
'<p><strong>' . __( 'How do I restore my site from a backup?', 'backupwordpress' ) . '</strong></p>' .
|
13 |
+
|
14 |
+
'<p>' . __( 'You need to download the latest backup file either by clicking download on the backups page or via <code>FTP</code>. <code>Unzip</code> the files and upload all the files to your server overwriting your site. You can then import the database using your hosts database management tool (likely <code>phpMyAdmin</code>).', 'backupwordpress' ) . '</p>' .
|
15 |
+
|
16 |
+
'<p>' . __( 'See this guide for more details - <a href="https://bwp.hmn.md/support-center/restore-backup/" title="Go to support center" target="_blank">How to restore from backup</a>.', 'backupwordpress' ) . '</p>' .
|
17 |
+
|
18 |
+
'<p><strong>' . __( 'Does BackUpWordPress back up the backups directory?', 'backupwordpress' ) . '</strong></p>' .
|
19 |
+
|
20 |
+
'<p>' . __( 'No.', 'backupwordpress' ) . '</p>' .
|
21 |
+
|
22 |
+
'<p><strong>' . __( 'I\'m not receiving my backups by email', 'backupwordpress' ) . '</strong></p>' .
|
23 |
+
|
24 |
+
'<p>' . __( 'Most servers have a filesize limit on email attachments, it\'s generally about 10mb. If your backup file is over that limit, it won\'t be sent attached to the email. Instead, you should receive an email with a link to download the backup. If you aren\'t even receiving that, then you likely have a mail issue on your server that you\'ll need to contact your host about.', 'backupwordpress' ) . '</p>' .
|
25 |
+
|
26 |
+
'<p><strong>' . __( 'How many backups are stored by default?', 'backupwordpress' ) . '</strong></p>' .
|
27 |
+
|
28 |
+
'<p>' . __( 'BackUpWordPress stores the last 10 backups by default.', 'backupwordpress' ) . '</p>' .
|
29 |
+
|
30 |
+
'<p><strong>' . __( 'How long should a backup take?', 'backupwordpress' ) . '</strong></p>' .
|
31 |
+
|
32 |
+
'<p>' . __( 'Unless your site is very large (many gigabytes) it should only take a few minutes to perform a backup. If your back up has been running for longer than an hour, it\'s safe to assume that something has gone wrong. Try de-activating and re-activating the plugin. If it keeps happening, contact support.', 'backupwordpress' ) . '</p>' .
|
33 |
+
|
34 |
+
'<p><strong>' . __( 'What do I do if I get the wp-cron error message?', 'backupwordpress' ) . '</strong></p>' .
|
35 |
+
|
36 |
+
'<p>' . __( 'The issue is that your <code>wp-cron.php</code> is not returning a <code>200</code> response when hit with a HTTP request originating from your own server, it could be several things. In most cases, it\'s an issue with the server / site.', 'backupwordpress' ) . '</p>' .
|
37 |
+
|
38 |
+
'<p>' . __( 'There are some things you can test to confirm this is the issue.', 'backupwordpress' ) . '</p>' .
|
39 |
+
|
40 |
+
'<ul><li>' . __( 'Are scheduled posts working? (They use wp-cron as well.)', 'backupwordpress' ) . '</li>' .
|
41 |
+
|
42 |
+
'<li>' . __( 'Are you hosted on Heart Internet? (wp-cron may not be supported by Heart Internet, see below for work-around.)', 'backupwordpress' ) . '</li>' .
|
43 |
+
|
44 |
+
'<li>' . __( 'If you click manual backup, does it work?', 'backupwordpress' ) . '</li>' .
|
45 |
+
|
46 |
+
'<li>' . __( 'Try adding <code>define( \'ALTERNATE_WP_CRON\', true );</code> to your <code>wp-config.php</code>. Do automatic backups work?', 'backupwordpress' ) . '</li>' .
|
47 |
+
|
48 |
+
'<li>' . __( 'Is your site private (i.e. is it behind some kind of authentication, maintenance plugin, .htaccess)? If so, wp-cron won\'t work until you remove it. If you are and you temporarily remove the authentication, do backups start working?', 'backupwordpress' ) . '</li></ul>' .
|
49 |
+
|
50 |
+
'<p>' . __( 'For further help, please post on our <a href="http://wordpress.org/support/plugin/backupwordpress" title="support forums" target="_blank">support forums</a>', 'backupwordpress' ) . '</p>' .
|
51 |
+
|
52 |
+
'<p><strong>' . __( 'How to get BackUpWordPress working in Heart Internet', 'backupwordpress' ) . '</strong></p>' .
|
53 |
+
|
54 |
+
'<p>' . __( 'The script to be entered into the Heart Internet cPanel is: <code>/usr/bin/php5 /home/sites/yourdomain.com/public_html/wp-cron.php</code> (note the space between php5 and the location of the file). The file <code>wp-cron.php</code> <code>chmod</code> must be set to <code>711</code>.', 'backupwordpress' ) . '</p>' .
|
55 |
+
|
56 |
+
'<p><strong>' . __( 'My backups seem to be failing?', 'backupwordpress' ) . '</strong></p>' .
|
57 |
+
|
58 |
+
'<p>' . __( 'If your backups are failing, it\'s commonly caused by a lack of available resources on your server. To establish this is the case, exclude the complete (or parts of the) uploads folder and run a backup. If that succeeds, you know it\'s probably a server issue. If it does not succeed, you can seek further help on our <a href="http://wordpress.org/support/plugin/backupwordpress" title="support forums" target="_blank">support forums</a>', 'backupwordpress' ) . '</p>';
|
backdrop/README.md
DELETED
@@ -1,114 +0,0 @@
|
|
1 |
-
# Backdrop
|
2 |
-
Backdrop is a simple library that does one thing: allows you to run one-off
|
3 |
-
tasks in the background.
|
4 |
-
|
5 |
-
## How to Use
|
6 |
-
```php
|
7 |
-
function my_awesome_function( $id ) {
|
8 |
-
// Download initial data to my site. Might take a long time!
|
9 |
-
$data = wp_remote_get( 'http://example.com/' . $id );
|
10 |
-
|
11 |
-
if ( is_wp_error( $data ) ) {
|
12 |
-
return $data;
|
13 |
-
}
|
14 |
-
|
15 |
-
update_option( 'initial_data', $data );
|
16 |
-
}
|
17 |
-
|
18 |
-
add_action( 'init', function () {
|
19 |
-
if ( ! get_option( 'initial_data' ) ) {
|
20 |
-
$task = new \HM\Backdrop\Task( 'my_awesome_function', get_current_user_id() );
|
21 |
-
$task->schedule();
|
22 |
-
}
|
23 |
-
} );
|
24 |
-
```
|
25 |
-
|
26 |
-
## API
|
27 |
-
### `Task::__construct( $callback [, $...] )`
|
28 |
-
Creating a new task sets up all of the internal data for your task. Pass in your
|
29 |
-
callback followed by your arguments to the function, and Backdrop will call it
|
30 |
-
in a background process.
|
31 |
-
|
32 |
-
#### Arguments
|
33 |
-
* `$callback`: Callback method you want to use. Can be any callable type
|
34 |
-
(including object methods and static methods) **except for anonymous
|
35 |
-
functions**. Closures cannot be serialized, so they cannot be used for
|
36 |
-
Backdrop callbacks. This is an internal PHP limitation.
|
37 |
-
* `$...`: Any other arguments you'd like to pass to your callback, as variable
|
38 |
-
arguments. e.g. `new Task( 'a', 'b', 'c', 'd' )` maps to `a( 'b', 'c', 'd' )`
|
39 |
-
|
40 |
-
#### Return Value
|
41 |
-
None (constructor).
|
42 |
-
|
43 |
-
### `Task::schedule()`
|
44 |
-
Schedules your task to run. Typically runs after your page has been rendered, in
|
45 |
-
a separate process.
|
46 |
-
|
47 |
-
Backdrop de-duplicates tasks based on the arguments passed in. For example, you
|
48 |
-
can do `new Task( 'myfunc', 1 )` on every request, and only one will be run.
|
49 |
-
After this has been run, the next call will schedule again.
|
50 |
-
|
51 |
-
To avoid this, you should pass in unique identifiers as needed. Everything that
|
52 |
-
makes your task unique should be passed in and used by your function, as global
|
53 |
-
state may change.
|
54 |
-
|
55 |
-
#### Arguments
|
56 |
-
None.
|
57 |
-
|
58 |
-
#### Return Value
|
59 |
-
Either `true`, or a `WP_Error` on failure. The error object will indicate the
|
60 |
-
type of error; typically this is a `hm_backdrop_scheduled` if the task is
|
61 |
-
already scheduled to run or is currently running.
|
62 |
-
|
63 |
-
### `Task::is_scheduled()`
|
64 |
-
Checks whether your task is scheduled to run.
|
65 |
-
|
66 |
-
#### Arguments
|
67 |
-
None.
|
68 |
-
|
69 |
-
#### Return Value
|
70 |
-
Boolean indicating whether your task is scheduled to run, or is already running.
|
71 |
-
|
72 |
-
#### `Task::cancel()`
|
73 |
-
Cancels a previously scheduled task.
|
74 |
-
|
75 |
-
Note that if the task is already running, this will not cancel execution; it
|
76 |
-
simply removes it from the tasks scheduled to run.
|
77 |
-
|
78 |
-
#### Arguments
|
79 |
-
None.
|
80 |
-
|
81 |
-
#### Return Value
|
82 |
-
Either `true`, or a `WP_Error` on failure. The error object will indicate the
|
83 |
-
type of error; typically this is a `hm_backdrop_not_scheduled` if the task
|
84 |
-
hasn't been scheduled.
|
85 |
-
|
86 |
-
## Compatibility
|
87 |
-
Backdrop is compatible with PHP 5.2 and upwards.
|
88 |
-
|
89 |
-
### PHP 5.2
|
90 |
-
Use the `HM_Backdrop_Task` class (and `HM_Backdrop_Server`).
|
91 |
-
|
92 |
-
**Important note:** If subclassing `HM_Backdrop_Server` with 5.2 compatibility,
|
93 |
-
you *must* reimplement the `spawn` method, as PHP 5.2 does not include late
|
94 |
-
static bindings. This is automatically handled for 5.3+.
|
95 |
-
|
96 |
-
Here's a minimal implementation that you can use:
|
97 |
-
|
98 |
-
```
|
99 |
-
class MyBackdrop_Server extends HM_Backdrop_Server {
|
100 |
-
public static function spawn() {
|
101 |
-
return self::spawn_run( __CLASS__ );
|
102 |
-
}
|
103 |
-
}
|
104 |
-
```
|
105 |
-
|
106 |
-
### PHP 5.3+
|
107 |
-
Use the `HM\Backdrop\Task` class (and `HM\Backdrop\Server`). You can also import
|
108 |
-
the classes with the `use` keyword; for example, `use HM\Backdrop\Task` will
|
109 |
-
allow you to create tasks with `new Task`.
|
110 |
-
|
111 |
-
## License
|
112 |
-
Backdrop is licensed under the GPL version 2.
|
113 |
-
|
114 |
-
Copyright 2014 Human Made Limited
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
backdrop/hm-backdrop.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require dirname( __FILE__ ) . '/server.php';
|
4 |
-
require dirname( __FILE__ ) . '/task.php';
|
5 |
-
|
6 |
-
if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) {
|
7 |
-
require dirname( __FILE__ ) . '/namespace.php';
|
8 |
-
add_action( 'wp_ajax_nopriv_hm_backdrop_run', 'HM\Backdrop\Server::spawn' );
|
9 |
-
}
|
10 |
-
else {
|
11 |
-
add_action( 'wp_ajax_nopriv_hm_backdrop_run', 'HM_Backdrop_Server::spawn' );
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
backdrop/license.txt
DELETED
@@ -1,340 +0,0 @@
|
|
1 |
-
|
2 |
-
GNU GENERAL PUBLIC LICENSE
|
3 |
-
Version 2, June 1991
|
4 |
-
|
5 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
6 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
7 |
-
Everyone is permitted to copy and distribute verbatim copies
|
8 |
-
of this license document, but changing it is not allowed.
|
9 |
-
|
10 |
-
Preamble
|
11 |
-
|
12 |
-
The licenses for most software are designed to take away your
|
13 |
-
freedom to share and change it. By contrast, the GNU General Public
|
14 |
-
License is intended to guarantee your freedom to share and change free
|
15 |
-
software--to make sure the software is free for all its users. This
|
16 |
-
General Public License applies to most of the Free Software
|
17 |
-
Foundation's software and to any other program whose authors commit to
|
18 |
-
using it. (Some other Free Software Foundation software is covered by
|
19 |
-
the GNU Lesser General Public License instead.) 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 |
-
this service if you wish), that you receive source code or can get it
|
26 |
-
if you want it, that you can change the software or use pieces of it
|
27 |
-
in new free programs; and that you know you can do these things.
|
28 |
-
|
29 |
-
To protect your rights, we need to make restrictions that forbid
|
30 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
31 |
-
These restrictions translate to certain responsibilities for you if you
|
32 |
-
distribute copies of the software, or if you modify it.
|
33 |
-
|
34 |
-
For example, if you distribute copies of such a program, whether
|
35 |
-
gratis or for a fee, you must give the recipients all the rights that
|
36 |
-
you have. You must make sure that they, too, receive or can get the
|
37 |
-
source code. And you must show them these terms so they know their
|
38 |
-
rights.
|
39 |
-
|
40 |
-
We protect your rights with two steps: (1) copyright the software, and
|
41 |
-
(2) offer you this license which gives you legal permission to copy,
|
42 |
-
distribute and/or modify the software.
|
43 |
-
|
44 |
-
Also, for each author's protection and ours, we want to make certain
|
45 |
-
that everyone understands that there is no warranty for this free
|
46 |
-
software. If the software is modified by someone else and passed on, we
|
47 |
-
want its recipients to know that what they have is not the original, so
|
48 |
-
that any problems introduced by others will not reflect on the original
|
49 |
-
authors' reputations.
|
50 |
-
|
51 |
-
Finally, any free program is threatened constantly by software
|
52 |
-
patents. We wish to avoid the danger that redistributors of a free
|
53 |
-
program will individually obtain patent licenses, in effect making the
|
54 |
-
program proprietary. To prevent this, we have made it clear that any
|
55 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
56 |
-
|
57 |
-
The precise terms and conditions for copying, distribution and
|
58 |
-
modification follow.
|
59 |
-
|
60 |
-
GNU GENERAL PUBLIC LICENSE
|
61 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
62 |
-
|
63 |
-
0. This License applies to any program or other work which contains
|
64 |
-
a notice placed by the copyright holder saying it may be distributed
|
65 |
-
under the terms of this General Public License. The "Program", below,
|
66 |
-
refers to any such program or work, and a "work based on the Program"
|
67 |
-
means either the Program or any derivative work under copyright law:
|
68 |
-
that is to say, a work containing the Program or a portion of it,
|
69 |
-
either verbatim or with modifications and/or translated into another
|
70 |
-
language. (Hereinafter, translation is included without limitation in
|
71 |
-
the term "modification".) Each licensee is addressed as "you".
|
72 |
-
|
73 |
-
Activities other than copying, distribution and modification are not
|
74 |
-
covered by this License; they are outside its scope. The act of
|
75 |
-
running the Program is not restricted, and the output from the Program
|
76 |
-
is covered only if its contents constitute a work based on the
|
77 |
-
Program (independent of having been made by running the Program).
|
78 |
-
Whether that is true depends on what the Program does.
|
79 |
-
|
80 |
-
1. You may copy and distribute verbatim copies of the Program's
|
81 |
-
source code as you receive it, in any medium, provided that you
|
82 |
-
conspicuously and appropriately publish on each copy an appropriate
|
83 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
84 |
-
notices that refer to this License and to the absence of any warranty;
|
85 |
-
and give any other recipients of the Program a copy of this License
|
86 |
-
along with the Program.
|
87 |
-
|
88 |
-
You may charge a fee for the physical act of transferring a copy, and
|
89 |
-
you may at your option offer warranty protection in exchange for a fee.
|
90 |
-
|
91 |
-
2. You may modify your copy or copies of the Program or any portion
|
92 |
-
of it, thus forming a work based on the Program, and copy and
|
93 |
-
distribute such modifications or work under the terms of Section 1
|
94 |
-
above, provided that you also meet all of these conditions:
|
95 |
-
|
96 |
-
a) You must cause the modified files to carry prominent notices
|
97 |
-
stating that you changed the files and the date of any change.
|
98 |
-
|
99 |
-
b) You must cause any work that you distribute or publish, that in
|
100 |
-
whole or in part contains or is derived from the Program or any
|
101 |
-
part thereof, to be licensed as a whole at no charge to all third
|
102 |
-
parties under the terms of this License.
|
103 |
-
|
104 |
-
c) If the modified program normally reads commands interactively
|
105 |
-
when run, you must cause it, when started running for such
|
106 |
-
interactive use in the most ordinary way, to print or display an
|
107 |
-
announcement including an appropriate copyright notice and a
|
108 |
-
notice that there is no warranty (or else, saying that you provide
|
109 |
-
a warranty) and that users may redistribute the program under
|
110 |
-
these conditions, and telling the user how to view a copy of this
|
111 |
-
License. (Exception: if the Program itself is interactive but
|
112 |
-
does not normally print such an announcement, your work based on
|
113 |
-
the Program is not required to print an announcement.)
|
114 |
-
|
115 |
-
These requirements apply to the modified work as a whole. If
|
116 |
-
identifiable sections of that work are not derived from the Program,
|
117 |
-
and can be reasonably considered independent and separate works in
|
118 |
-
themselves, then this License, and its terms, do not apply to those
|
119 |
-
sections when you distribute them as separate works. But when you
|
120 |
-
distribute the same sections as part of a whole which is a work based
|
121 |
-
on the Program, the distribution of the whole must be on the terms of
|
122 |
-
this License, whose permissions for other licensees extend to the
|
123 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
124 |
-
|
125 |
-
Thus, it is not the intent of this section to claim rights or contest
|
126 |
-
your rights to work written entirely by you; rather, the intent is to
|
127 |
-
exercise the right to control the distribution of derivative or
|
128 |
-
collective works based on the Program.
|
129 |
-
|
130 |
-
In addition, mere aggregation of another work not based on the Program
|
131 |
-
with the Program (or with a work based on the Program) on a volume of
|
132 |
-
a storage or distribution medium does not bring the other work under
|
133 |
-
the scope of this License.
|
134 |
-
|
135 |
-
3. You may copy and distribute the Program (or a work based on it,
|
136 |
-
under Section 2) in object code or executable form under the terms of
|
137 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
138 |
-
|
139 |
-
a) Accompany it with the complete corresponding machine-readable
|
140 |
-
source code, which must be distributed under the terms of Sections
|
141 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
142 |
-
|
143 |
-
b) Accompany it with a written offer, valid for at least three
|
144 |
-
years, to give any third party, for a charge no more than your
|
145 |
-
cost of physically performing source distribution, a complete
|
146 |
-
machine-readable copy of the corresponding source code, to be
|
147 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
148 |
-
customarily used for software interchange; or,
|
149 |
-
|
150 |
-
c) Accompany it with the information you received as to the offer
|
151 |
-
to distribute corresponding source code. (This alternative is
|
152 |
-
allowed only for noncommercial distribution and only if you
|
153 |
-
received the program in object code or executable form with such
|
154 |
-
an offer, in accord with Subsection b above.)
|
155 |
-
|
156 |
-
The source code for a work means the preferred form of the work for
|
157 |
-
making modifications to it. For an executable work, complete source
|
158 |
-
code means all the source code for all modules it contains, plus any
|
159 |
-
associated interface definition files, plus the scripts used to
|
160 |
-
control compilation and installation of the executable. However, as a
|
161 |
-
special exception, the source code distributed need not include
|
162 |
-
anything that is normally distributed (in either source or binary
|
163 |
-
form) with the major components (compiler, kernel, and so on) of the
|
164 |
-
operating system on which the executable runs, unless that component
|
165 |
-
itself accompanies the executable.
|
166 |
-
|
167 |
-
If distribution of executable or object code is made by offering
|
168 |
-
access to copy from a designated place, then offering equivalent
|
169 |
-
access to copy the source code from the same place counts as
|
170 |
-
distribution of the source code, even though third parties are not
|
171 |
-
compelled to copy the source along with the object code.
|
172 |
-
|
173 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
174 |
-
except as expressly provided under this License. Any attempt
|
175 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
176 |
-
void, and will automatically terminate your rights under this License.
|
177 |
-
However, parties who have received copies, or rights, from you under
|
178 |
-
this License will not have their licenses terminated so long as such
|
179 |
-
parties remain in full compliance.
|
180 |
-
|
181 |
-
5. You are not required to accept this License, since you have not
|
182 |
-
signed it. However, nothing else grants you permission to modify or
|
183 |
-
distribute the Program or its derivative works. These actions are
|
184 |
-
prohibited by law if you do not accept this License. Therefore, by
|
185 |
-
modifying or distributing the Program (or any work based on the
|
186 |
-
Program), you indicate your acceptance of this License to do so, and
|
187 |
-
all its terms and conditions for copying, distributing or modifying
|
188 |
-
the Program or works based on it.
|
189 |
-
|
190 |
-
6. Each time you redistribute the Program (or any work based on the
|
191 |
-
Program), the recipient automatically receives a license from the
|
192 |
-
original licensor to copy, distribute or modify the Program subject to
|
193 |
-
these terms and conditions. You may not impose any further
|
194 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
195 |
-
You are not responsible for enforcing compliance by third parties to
|
196 |
-
this License.
|
197 |
-
|
198 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
199 |
-
infringement or for any other reason (not limited to patent issues),
|
200 |
-
conditions are imposed on you (whether by court order, agreement or
|
201 |
-
otherwise) that contradict the conditions of this License, they do not
|
202 |
-
excuse you from the conditions of this License. If you cannot
|
203 |
-
distribute so as to satisfy simultaneously your obligations under this
|
204 |
-
License and any other pertinent obligations, then as a consequence you
|
205 |
-
may not distribute the Program at all. For example, if a patent
|
206 |
-
license would not permit royalty-free redistribution of the Program by
|
207 |
-
all those who receive copies directly or indirectly through you, then
|
208 |
-
the only way you could satisfy both it and this License would be to
|
209 |
-
refrain entirely from distribution of the Program.
|
210 |
-
|
211 |
-
If any portion of this section is held invalid or unenforceable under
|
212 |
-
any particular circumstance, the balance of the section is intended to
|
213 |
-
apply and the section as a whole is intended to apply in other
|
214 |
-
circumstances.
|
215 |
-
|
216 |
-
It is not the purpose of this section to induce you to infringe any
|
217 |
-
patents or other property right claims or to contest validity of any
|
218 |
-
such claims; this section has the sole purpose of protecting the
|
219 |
-
integrity of the free software distribution system, which is
|
220 |
-
implemented by public license practices. Many people have made
|
221 |
-
generous contributions to the wide range of software distributed
|
222 |
-
through that system in reliance on consistent application of that
|
223 |
-
system; it is up to the author/donor to decide if he or she is willing
|
224 |
-
to distribute software through any other system and a licensee cannot
|
225 |
-
impose that choice.
|
226 |
-
|
227 |
-
This section is intended to make thoroughly clear what is believed to
|
228 |
-
be a consequence of the rest of this License.
|
229 |
-
|
230 |
-
8. If the distribution and/or use of the Program is restricted in
|
231 |
-
certain countries either by patents or by copyrighted interfaces, the
|
232 |
-
original copyright holder who places the Program under this License
|
233 |
-
may add an explicit geographical distribution limitation excluding
|
234 |
-
those countries, so that distribution is permitted only in or among
|
235 |
-
countries not thus excluded. In such case, this License incorporates
|
236 |
-
the limitation as if written in the body of this License.
|
237 |
-
|
238 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
239 |
-
of the General Public License from time to time. Such new versions will
|
240 |
-
be similar in spirit to the present version, but may differ in detail to
|
241 |
-
address new problems or concerns.
|
242 |
-
|
243 |
-
Each version is given a distinguishing version number. If the Program
|
244 |
-
specifies a version number of this License which applies to it and "any
|
245 |
-
later version", you have the option of following the terms and conditions
|
246 |
-
either of that version or of any later version published by the Free
|
247 |
-
Software Foundation. If the Program does not specify a version number of
|
248 |
-
this License, you may choose any version ever published by the Free Software
|
249 |
-
Foundation.
|
250 |
-
|
251 |
-
10. If you wish to incorporate parts of the Program into other free
|
252 |
-
programs whose distribution conditions are different, write to the author
|
253 |
-
to ask for permission. For software which is copyrighted by the Free
|
254 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
255 |
-
make exceptions for this. Our decision will be guided by the two goals
|
256 |
-
of preserving the free status of all derivatives of our free software and
|
257 |
-
of promoting the sharing and reuse of software generally.
|
258 |
-
|
259 |
-
NO WARRANTY
|
260 |
-
|
261 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
262 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
263 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
264 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
265 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
266 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
267 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
268 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
269 |
-
REPAIR OR CORRECTION.
|
270 |
-
|
271 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
272 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
273 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
274 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
275 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
276 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
277 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
278 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
279 |
-
POSSIBILITY OF SUCH DAMAGES.
|
280 |
-
|
281 |
-
END OF TERMS AND CONDITIONS
|
282 |
-
|
283 |
-
How to Apply These Terms to Your New Programs
|
284 |
-
|
285 |
-
If you develop a new program, and you want it to be of the greatest
|
286 |
-
possible use to the public, the best way to achieve this is to make it
|
287 |
-
free software which everyone can redistribute and change under these terms.
|
288 |
-
|
289 |
-
To do so, attach the following notices to the program. It is safest
|
290 |
-
to attach them to the start of each source file to most effectively
|
291 |
-
convey the exclusion of warranty; and each file should have at least
|
292 |
-
the "copyright" line and a pointer to where the full notice is found.
|
293 |
-
|
294 |
-
<one line to give the program's name and a brief idea of what it does.>
|
295 |
-
Copyright (C) <year> <name of author>
|
296 |
-
|
297 |
-
This program is free software; you can redistribute it and/or modify
|
298 |
-
it under the terms of the GNU General Public License as published by
|
299 |
-
the Free Software Foundation; either version 2 of the License, or
|
300 |
-
(at your option) any later version.
|
301 |
-
|
302 |
-
This program is distributed in the hope that it will be useful,
|
303 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
304 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
305 |
-
GNU General Public License for more details.
|
306 |
-
|
307 |
-
You should have received a copy of the GNU General Public License along
|
308 |
-
with this program; if not, write to the Free Software Foundation, Inc.,
|
309 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
310 |
-
|
311 |
-
Also add information on how to contact you by electronic and paper mail.
|
312 |
-
|
313 |
-
If the program is interactive, make it output a short notice like this
|
314 |
-
when it starts in an interactive mode:
|
315 |
-
|
316 |
-
Gnomovision version 69, Copyright (C) year name of author
|
317 |
-
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
318 |
-
This is free software, and you are welcome to redistribute it
|
319 |
-
under certain conditions; type `show c' for details.
|
320 |
-
|
321 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
322 |
-
parts of the General Public License. Of course, the commands you use may
|
323 |
-
be called something other than `show w' and `show c'; they could even be
|
324 |
-
mouse-clicks or menu items--whatever suits your program.
|
325 |
-
|
326 |
-
You should also get your employer (if you work as a programmer) or your
|
327 |
-
school, if any, to sign a "copyright disclaimer" for the program, if
|
328 |
-
necessary. Here is a sample; alter the names:
|
329 |
-
|
330 |
-
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
331 |
-
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
332 |
-
|
333 |
-
<signature of Ty Coon>, 1 April 1989
|
334 |
-
Ty Coon, President of Vice
|
335 |
-
|
336 |
-
This General Public License does not permit incorporating your program into
|
337 |
-
proprietary programs. If your program is a subroutine library, you may
|
338 |
-
consider it more useful to permit linking proprietary applications with the
|
339 |
-
library. If this is what you want to do, use the GNU Lesser General
|
340 |
-
Public License instead of this License.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
backdrop/namespace.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace HM\Backdrop;
|
4 |
-
|
5 |
-
class Server extends \HM_Backdrop_Server {}
|
6 |
-
class Task extends \HM_Backdrop_Task {}
|
|
|
|
|
|
|
|
|
|
|
|
backdrop/server.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class HM_Backdrop_Server {
|
4 |
-
public function run() {
|
5 |
-
if ( empty( $_POST['key'] ) ) {
|
6 |
-
return new WP_Error( 'hm_backdrop_no_key', __( 'No key supplied', 'hm_backdrop' ) );
|
7 |
-
}
|
8 |
-
|
9 |
-
$data = get_transient( 'hm_backdrop-' . $_POST['key'] );
|
10 |
-
if ( empty( $data ) ) {
|
11 |
-
return new WP_Error( 'hm_backdrop_invalid_key', __( 'Supplied key was not valid', 'hm_backdrop' ) );
|
12 |
-
}
|
13 |
-
|
14 |
-
$result = call_user_func_array( $data['callback'], $data['params'] );
|
15 |
-
delete_transient( 'hm_backdrop-' . $_POST['key'] );
|
16 |
-
|
17 |
-
if ( is_wp_error( $result ) ) {
|
18 |
-
return $result;
|
19 |
-
}
|
20 |
-
|
21 |
-
return true;
|
22 |
-
}
|
23 |
-
|
24 |
-
public static function spawn() {
|
25 |
-
$class = get_class();
|
26 |
-
if ( function_exists( 'get_called_class' ) ) {
|
27 |
-
$class = get_called_class();
|
28 |
-
}
|
29 |
-
|
30 |
-
return call_user_func( array( $class, 'spawn_run' ), $class );
|
31 |
-
}
|
32 |
-
|
33 |
-
protected static function spawn_run( $class ) {
|
34 |
-
$server = new $class();
|
35 |
-
$server->run();
|
36 |
-
exit;
|
37 |
-
}
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
backdrop/task.php
DELETED
@@ -1,71 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class HM_Backdrop_Task {
|
4 |
-
protected $key;
|
5 |
-
protected $callback;
|
6 |
-
protected $params = array();
|
7 |
-
|
8 |
-
public function __construct( $callback /* , $... */ ) {
|
9 |
-
$this->callback = $callback;
|
10 |
-
|
11 |
-
if ( func_num_args() > 1 ) {
|
12 |
-
$args = func_get_args();
|
13 |
-
$this->params = array_slice( $args, 1 );
|
14 |
-
}
|
15 |
-
|
16 |
-
$this->key = $this->get_unique_id();
|
17 |
-
}
|
18 |
-
|
19 |
-
public function schedule() {
|
20 |
-
|
21 |
-
if ( $this->is_scheduled() ) {
|
22 |
-
return new WP_Error( 'hm_backdrop_scheduled', __( 'Task is already scheduled to run', 'hm_backdrop' ) );
|
23 |
-
}
|
24 |
-
|
25 |
-
$data = array(
|
26 |
-
'callback' => $this->callback,
|
27 |
-
'params' => $this->params
|
28 |
-
);
|
29 |
-
set_transient( 'hm_backdrop-' . $this->key, $data, 300 );
|
30 |
-
add_action( 'shutdown', array( $this, 'spawn_server' ) );
|
31 |
-
|
32 |
-
return true;
|
33 |
-
}
|
34 |
-
|
35 |
-
public function is_scheduled() {
|
36 |
-
return (bool) $this->get_data();
|
37 |
-
}
|
38 |
-
|
39 |
-
public function cancel() {
|
40 |
-
if ( ! $this->is_scheduled() ) {
|
41 |
-
return new WP_Error( 'hm_backdrop_not_scheduled', __( 'Task is not scheduled to run', 'hm_backdrop' ) );
|
42 |
-
}
|
43 |
-
|
44 |
-
delete_transient( 'hm_backdrop-' . $this->key );
|
45 |
-
return true;
|
46 |
-
}
|
47 |
-
|
48 |
-
public function spawn_server() {
|
49 |
-
$server_url = admin_url( 'admin-ajax.php' );
|
50 |
-
$data = array(
|
51 |
-
'action' => 'hm_backdrop_run',
|
52 |
-
'key' => $this->key,
|
53 |
-
);
|
54 |
-
$args = array(
|
55 |
-
'body' => $data,
|
56 |
-
'timeout' => 0.01,
|
57 |
-
'blocking' => false,
|
58 |
-
'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
|
59 |
-
);
|
60 |
-
wp_remote_post( $server_url, $args );
|
61 |
-
return true;
|
62 |
-
}
|
63 |
-
|
64 |
-
protected function get_data() {
|
65 |
-
return get_transient( 'hm_backdrop-' . $this->key );
|
66 |
-
}
|
67 |
-
|
68 |
-
protected function get_unique_id() {
|
69 |
-
return substr( sha1( serialize( $this->callback ) . serialize( $this->params ) ), -28 );
|
70 |
-
}
|
71 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
backupwordpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: BackUpWordPress
|
4 |
Plugin URI: https://updraftplus.com/backupwordpress/?afref=744
|
5 |
Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools → Backups</strong>. On multisite, you'll find me under the Network Settings menu.
|
6 |
-
Version: 3.
|
7 |
Author: XIBO Ltd
|
8 |
Author URI: https://profiles.wordpress.org/xibodevelopment
|
9 |
License: GPL-2+
|
@@ -14,10 +14,10 @@ Network: true
|
|
14 |
*/
|
15 |
|
16 |
/*
|
17 |
-
Copyright 2011 - 2018 XIBO Ltd
|
18 |
|
19 |
This program is free software; you can redistribute it and/or modify
|
20 |
-
it under the terms of the General Public License
|
21 |
the Free Software Foundation; either version 2 of the License, or
|
22 |
(at your option) any later version.
|
23 |
|
3 |
Plugin Name: BackUpWordPress
|
4 |
Plugin URI: https://updraftplus.com/backupwordpress/?afref=744
|
5 |
Description: Simple automated backups of your WordPress powered website. Once activated you'll find me under <strong>Tools → Backups</strong>. On multisite, you'll find me under the Network Settings menu.
|
6 |
+
Version: 3.9
|
7 |
Author: XIBO Ltd
|
8 |
Author URI: https://profiles.wordpress.org/xibodevelopment
|
9 |
License: GPL-2+
|
14 |
*/
|
15 |
|
16 |
/*
|
17 |
+
Copyright 2011 - 2018 XIBO Ltd
|
18 |
|
19 |
This program is free software; you can redistribute it and/or modify
|
20 |
+
it under the terms of the GNU General Public License as published by
|
21 |
the Free Software Foundation; either version 2 of the License, or
|
22 |
(at your option) any later version.
|
23 |
|
classes/class-email-service.php
CHANGED
@@ -1,216 +1,216 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace HM\BackUpWordPress;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Email notifications for backups
|
7 |
-
*
|
8 |
-
* @extends Service
|
9 |
-
*/
|
10 |
-
class Email_Service extends Service {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Human readable name for this service
|
14 |
-
* @var string
|
15 |
-
*/
|
16 |
-
public $name = 'Email';
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Output the email form field
|
20 |
-
*
|
21 |
-
* @access public
|
22 |
-
*/
|
23 |
-
public function field() {
|
24 |
-
|
25 |
-
?>
|
26 |
-
|
27 |
-
<tr>
|
28 |
-
|
29 |
-
<th scope="row">
|
30 |
-
<label for="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>"><?php _e( 'Email notification', 'backupwordpress' ); ?></label>
|
31 |
-
</th>
|
32 |
-
|
33 |
-
<td>
|
34 |
-
<input type="text" id="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" value="<?php echo esc_attr( $this->get_field_value( 'email' ) ); ?>" placeholder="name@youremail.com" />
|
35 |
-
|
36 |
-
<p class="description"><?php printf( __( 'Receive a notification email when a backup completes. If the backup is small enough (< %s), then it will be attached to the email. Separate multiple email addresses with a comma.', 'backupwordpress' ), '<code>' . size_format( get_max_attachment_size() ) . '</code>' ); ?></p>
|
37 |
-
</td>
|
38 |
-
|
39 |
-
</tr>
|
40 |
-
|
41 |
-
<?php }
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Not used as we only need a field
|
45 |
-
*
|
46 |
-
* @see field
|
47 |
-
* @return string Empty string
|
48 |
-
*/
|
49 |
-
public function form() {
|
50 |
-
return '';
|
51 |
-
}
|
52 |
-
|
53 |
-
public static function constant() {
|
54 |
-
|
55 |
-
?>
|
56 |
-
|
57 |
-
<tr<?php if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ) { ?> class="hmbkp_active"<?php } ?>>
|
58 |
-
|
59 |
-
<td><code>HMBKP_ATTACHMENT_MAX_FILESIZE</code></td>
|
60 |
-
|
61 |
-
<td>
|
62 |
-
|
63 |
-
<?php if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ) { ?>
|
64 |
-
<p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . HMBKP_ATTACHMENT_MAX_FILESIZE . '</code>' ); ?></p>
|
65 |
-
<?php } ?>
|
66 |
-
|
67 |
-
<p><?php printf( __( 'The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s.', 'backupwordpress' ), '<code>10MB</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_ATTACHMENT_MAX_FILESIZE', '25MB' );</code></p>
|
68 |
-
|
69 |
-
</td>
|
70 |
-
|
71 |
-
</tr>
|
72 |
-
|
73 |
-
<?php }
|
74 |
-
|
75 |
-
/**
|
76 |
-
* The sentence fragment that is output as part of the schedule sentence
|
77 |
-
*
|
78 |
-
* @return string
|
79 |
-
*/
|
80 |
-
public function display() {
|
81 |
-
|
82 |
-
if ( $emails = $this->get_email_address_array() ) {
|
83 |
-
|
84 |
-
$email = '<code>' . implode( '</code>, <code>', array_map( 'esc_html', $emails ) ) . '</code>';
|
85 |
-
|
86 |
-
return sprintf( __( 'Send an email notification to %s', 'backupwordpress' ), $email );
|
87 |
-
|
88 |
-
}
|
89 |
-
|
90 |
-
return '';
|
91 |
-
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Used to determine if the service is in use or not
|
96 |
-
*/
|
97 |
-
public function is_service_active() {
|
98 |
-
return (bool) $this->get_email_address_array();
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Validate the email and return an error if validation fails
|
103 |
-
*
|
104 |
-
* @param array &$new_data Array of new data, passed by reference.
|
105 |
-
* @param array $old_data The data we are replacing.
|
106 |
-
*
|
107 |
-
* @return array|null Null on success, array of errors if validation failed.
|
108 |
-
*/
|
109 |
-
public function update( &$new_data, $old_data ) {
|
110 |
-
|
111 |
-
$errors = array();
|
112 |
-
|
113 |
-
if ( isset( $new_data['email'] ) ) {
|
114 |
-
|
115 |
-
if ( ! empty( $new_data['email'] ) ) {
|
116 |
-
|
117 |
-
foreach ( explode( ',', $new_data['email'] ) as $email ) {
|
118 |
-
|
119 |
-
$email = trim( $email );
|
120 |
-
|
121 |
-
if ( ! is_email( $email ) ) {
|
122 |
-
$errors['email'] = sprintf( __( '%s isn\'t a valid email', 'backupwordpress' ), $email );
|
123 |
-
}
|
124 |
-
}
|
125 |
-
}
|
126 |
-
|
127 |
-
if ( ! empty( $errors['email'] ) ) {
|
128 |
-
$new_data['email'] = '';
|
129 |
-
}
|
130 |
-
|
131 |
-
return $errors;
|
132 |
-
|
133 |
-
}
|
134 |
-
}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Get an array or validated email address's
|
138 |
-
* @return array An array of validated email address's
|
139 |
-
*/
|
140 |
-
private function get_email_address_array() {
|
141 |
-
$emails = array_map( 'trim', explode( ',', $this->get_field_value( 'email' ) ) );
|
142 |
-
return array_filter( array_unique( $emails ), 'is_email' );
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Fire the email notification on the hmbkp_backup_complete
|
147 |
-
*
|
148 |
-
* @see Backup::do_action
|
149 |
-
* @param string $action The action received from the backup
|
150 |
-
*/
|
151 |
-
public function action( $action, Backup $backup ) {
|
152 |
-
|
153 |
-
if ( 'hmbkp_backup_complete' === $action && $this->get_email_address_array() ) {
|
154 |
-
|
155 |
-
$file = $backup->get_backup_filepath();
|
156 |
-
|
157 |
-
$sent = false;
|
158 |
-
|
159 |
-
$download = add_query_arg( 'hmbkp_download', base64_encode( $file ), HMBKP_ADMIN_URL );
|
160 |
-
$domain = parse_url( home_url(), PHP_URL_HOST ) . parse_url( home_url(), PHP_URL_PATH );
|
161 |
-
|
162 |
-
$headers = 'From: BackUpWordPress <' . apply_filters( 'hmbkp_from_email', get_bloginfo( 'admin_email' ) ) . '>' . "\r\n";
|
163 |
-
|
164 |
-
// The backup failed, send a message saying as much
|
165 |
-
if ( ! file_exists( $file ) && ( $errors = array_merge( $backup->get_errors(), $backup->get_warnings() ) ) ) {
|
166 |
-
|
167 |
-
$error_message = '';
|
168 |
-
|
169 |
-
foreach ( $errors as $error_set ) {
|
170 |
-
$error_message .= implode( "\n - ", $error_set );
|
171 |
-
}
|
172 |
-
|
173 |
-
if ( $error_message ) {
|
174 |
-
$error_message = ' - ' . $error_message;
|
175 |
-
}
|
176 |
-
|
177 |
-
$subject = sprintf( __( 'Backup of %s Failed', 'backupwordpress' ), $domain );
|
178 |
-
|
179 |
-
$message = sprintf( __( 'BackUpWordPress was unable to backup your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'Here are the errors that we\'ve encountered:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( 'If the errors above look like Martian,
|
180 |
-
|
181 |
-
wp_mail( $this->get_email_address_array(), $subject, $message, $headers );
|
182 |
-
|
183 |
-
return;
|
184 |
-
|
185 |
-
}
|
186 |
-
|
187 |
-
$subject = sprintf( __( 'Backup of %s', 'backupwordpress' ), $domain );
|
188 |
-
|
189 |
-
// If it's larger than the max attachment size limit assume it's not going to be able to send the backup
|
190 |
-
if ( @filesize( $file ) < get_max_attachment_size() ) {
|
191 |
-
|
192 |
-
$message = sprintf( __( 'BackUpWordPress has completed a backup of your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'The backup file should be attached to this email.', 'backupwordpress' ) . "\n\n" . __( 'You can download the backup file by clicking the link below:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( "Kind Regards,\nThe Happy BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $download );
|
193 |
-
|
194 |
-
$sent = wp_mail( $this->get_email_address_array(), $subject, $message, $headers, $file );
|
195 |
-
|
196 |
-
}
|
197 |
-
|
198 |
-
// If we didn't send the email above then send just the notification
|
199 |
-
if ( ! $sent ) {
|
200 |
-
|
201 |
-
$message = sprintf( __( 'BackUpWordPress has completed a backup of your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'Unfortunately, the backup file was too large to attach to this email.', 'backupwordpress' ) . "\n\n" . __( 'You can download the backup file by clicking the link below:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( "Kind Regards,\nThe Happy BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $download );
|
202 |
-
wp_mail( $this->get_email_address_array(), $subject, $message, $headers );
|
203 |
-
|
204 |
-
}
|
205 |
-
}
|
206 |
-
}
|
207 |
-
|
208 |
-
public static function intercom_data() {
|
209 |
-
return array();
|
210 |
-
}
|
211 |
-
|
212 |
-
public static function intercom_data_html() {}
|
213 |
-
}
|
214 |
-
|
215 |
-
// Register the service
|
216 |
-
Services::register( __FILE__, 'HM\BackUpWordPress\Email_Service' );
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace HM\BackUpWordPress;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Email notifications for backups
|
7 |
+
*
|
8 |
+
* @extends Service
|
9 |
+
*/
|
10 |
+
class Email_Service extends Service {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Human readable name for this service
|
14 |
+
* @var string
|
15 |
+
*/
|
16 |
+
public $name = 'Email';
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Output the email form field
|
20 |
+
*
|
21 |
+
* @access public
|
22 |
+
*/
|
23 |
+
public function field() {
|
24 |
+
|
25 |
+
?>
|
26 |
+
|
27 |
+
<tr>
|
28 |
+
|
29 |
+
<th scope="row">
|
30 |
+
<label for="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>"><?php _e( 'Email notification', 'backupwordpress' ); ?></label>
|
31 |
+
</th>
|
32 |
+
|
33 |
+
<td>
|
34 |
+
<input type="text" id="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'email' ) ); ?>" value="<?php echo esc_attr( $this->get_field_value( 'email' ) ); ?>" placeholder="name@youremail.com" />
|
35 |
+
|
36 |
+
<p class="description"><?php printf( __( 'Receive a notification email when a backup completes. If the backup is small enough (< %s), then it will be attached to the email. Separate multiple email addresses with a comma.', 'backupwordpress' ), '<code>' . size_format( get_max_attachment_size() ) . '</code>' ); ?></p>
|
37 |
+
</td>
|
38 |
+
|
39 |
+
</tr>
|
40 |
+
|
41 |
+
<?php }
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Not used as we only need a field
|
45 |
+
*
|
46 |
+
* @see field
|
47 |
+
* @return string Empty string
|
48 |
+
*/
|
49 |
+
public function form() {
|
50 |
+
return '';
|
51 |
+
}
|
52 |
+
|
53 |
+
public static function constant() {
|
54 |
+
|
55 |
+
?>
|
56 |
+
|
57 |
+
<tr<?php if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ) { ?> class="hmbkp_active"<?php } ?>>
|
58 |
+
|
59 |
+
<td><code>HMBKP_ATTACHMENT_MAX_FILESIZE</code></td>
|
60 |
+
|
61 |
+
<td>
|
62 |
+
|
63 |
+
<?php if ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) ) { ?>
|
64 |
+
<p><?php printf( __( 'You\'ve set it to: %s', 'backupwordpress' ), '<code>' . HMBKP_ATTACHMENT_MAX_FILESIZE . '</code>' ); ?></p>
|
65 |
+
<?php } ?>
|
66 |
+
|
67 |
+
<p><?php printf( __( 'The maximum filesize of your backup that will be attached to your notification emails . Defaults to %s.', 'backupwordpress' ), '<code>10MB</code>' ); ?> <?php _e( 'e.g.', 'backupwordpress' ); ?> <code>define( 'HMBKP_ATTACHMENT_MAX_FILESIZE', '25MB' );</code></p>
|
68 |
+
|
69 |
+
</td>
|
70 |
+
|
71 |
+
</tr>
|
72 |
+
|
73 |
+
<?php }
|
74 |
+
|
75 |
+
/**
|
76 |
+
* The sentence fragment that is output as part of the schedule sentence
|
77 |
+
*
|
78 |
+
* @return string
|
79 |
+
*/
|
80 |
+
public function display() {
|
81 |
+
|
82 |
+
if ( $emails = $this->get_email_address_array() ) {
|
83 |
+
|
84 |
+
$email = '<code>' . implode( '</code>, <code>', array_map( 'esc_html', $emails ) ) . '</code>';
|
85 |
+
|
86 |
+
return sprintf( __( 'Send an email notification to %s', 'backupwordpress' ), $email );
|
87 |
+
|
88 |
+
}
|
89 |
+
|
90 |
+
return '';
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Used to determine if the service is in use or not
|
96 |
+
*/
|
97 |
+
public function is_service_active() {
|
98 |
+
return (bool) $this->get_email_address_array();
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Validate the email and return an error if validation fails
|
103 |
+
*
|
104 |
+
* @param array &$new_data Array of new data, passed by reference.
|
105 |
+
* @param array $old_data The data we are replacing.
|
106 |
+
*
|
107 |
+
* @return array|null Null on success, array of errors if validation failed.
|
108 |
+
*/
|
109 |
+
public function update( &$new_data, $old_data ) {
|
110 |
+
|
111 |
+
$errors = array();
|
112 |
+
|
113 |
+
if ( isset( $new_data['email'] ) ) {
|
114 |
+
|
115 |
+
if ( ! empty( $new_data['email'] ) ) {
|
116 |
+
|
117 |
+
foreach ( explode( ',', $new_data['email'] ) as $email ) {
|
118 |
+
|
119 |
+
$email = trim( $email );
|
120 |
+
|
121 |
+
if ( ! is_email( $email ) ) {
|
122 |
+
$errors['email'] = sprintf( __( '%s isn\'t a valid email', 'backupwordpress' ), $email );
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( ! empty( $errors['email'] ) ) {
|
128 |
+
$new_data['email'] = '';
|
129 |
+
}
|
130 |
+
|
131 |
+
return $errors;
|
132 |
+
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Get an array or validated email address's
|
138 |
+
* @return array An array of validated email address's
|
139 |
+
*/
|
140 |
+
private function get_email_address_array() {
|
141 |
+
$emails = array_map( 'trim', explode( ',', $this->get_field_value( 'email' ) ) );
|
142 |
+
return array_filter( array_unique( $emails ), 'is_email' );
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Fire the email notification on the hmbkp_backup_complete
|
147 |
+
*
|
148 |
+
* @see Backup::do_action
|
149 |
+
* @param string $action The action received from the backup
|
150 |
+
*/
|
151 |
+
public function action( $action, Backup $backup ) {
|
152 |
+
|
153 |
+
if ( 'hmbkp_backup_complete' === $action && $this->get_email_address_array() ) {
|
154 |
+
|
155 |
+
$file = $backup->get_backup_filepath();
|
156 |
+
|
157 |
+
$sent = false;
|
158 |
+
|
159 |
+
$download = add_query_arg( 'hmbkp_download', base64_encode( $file ), HMBKP_ADMIN_URL );
|
160 |
+
$domain = parse_url( home_url(), PHP_URL_HOST ) . parse_url( home_url(), PHP_URL_PATH );
|
161 |
+
|
162 |
+
$headers = 'From: BackUpWordPress <' . apply_filters( 'hmbkp_from_email', get_bloginfo( 'admin_email' ) ) . '>' . "\r\n";
|
163 |
+
|
164 |
+
// The backup failed, send a message saying as much
|
165 |
+
if ( ! file_exists( $file ) && ( $errors = array_merge( $backup->get_errors(), $backup->get_warnings() ) ) ) {
|
166 |
+
|
167 |
+
$error_message = '';
|
168 |
+
|
169 |
+
foreach ( $errors as $error_set ) {
|
170 |
+
$error_message .= implode( "\n - ", $error_set );
|
171 |
+
}
|
172 |
+
|
173 |
+
if ( $error_message ) {
|
174 |
+
$error_message = ' - ' . $error_message;
|
175 |
+
}
|
176 |
+
|
177 |
+
$subject = sprintf( __( 'Backup of %s Failed', 'backupwordpress' ), $domain );
|
178 |
+
|
179 |
+
$message = sprintf( __( 'BackUpWordPress was unable to backup your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'Here are the errors that we\'ve encountered:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( 'If the errors above look like Martian, you can find further assistance on our %3$ssupport forums%4$s ', 'backupwordpress' ) . "\n\n" . __( "Kind Regards,\nThe Apologetic BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $error_message, '<a href="http://wordpress.org/support/plugin/backupwordpress" title="support forums" target="_blank">', '</a>' );
|
180 |
+
|
181 |
+
wp_mail( $this->get_email_address_array(), $subject, $message, $headers );
|
182 |
+
|
183 |
+
return;
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
$subject = sprintf( __( 'Backup of %s', 'backupwordpress' ), $domain );
|
188 |
+
|
189 |
+
// If it's larger than the max attachment size limit assume it's not going to be able to send the backup
|
190 |
+
if ( @filesize( $file ) < get_max_attachment_size() ) {
|
191 |
+
|
192 |
+
$message = sprintf( __( 'BackUpWordPress has completed a backup of your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'The backup file should be attached to this email.', 'backupwordpress' ) . "\n\n" . __( 'You can download the backup file by clicking the link below:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( "Kind Regards,\nThe Happy BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $download );
|
193 |
+
|
194 |
+
$sent = wp_mail( $this->get_email_address_array(), $subject, $message, $headers, $file );
|
195 |
+
|
196 |
+
}
|
197 |
+
|
198 |
+
// If we didn't send the email above then send just the notification
|
199 |
+
if ( ! $sent ) {
|
200 |
+
|
201 |
+
$message = sprintf( __( 'BackUpWordPress has completed a backup of your site %1$s.', 'backupwordpress' ) . "\n\n" . __( 'Unfortunately, the backup file was too large to attach to this email.', 'backupwordpress' ) . "\n\n" . __( 'You can download the backup file by clicking the link below:', 'backupwordpress' ) . "\n\n" . '%2$s' . "\n\n" . __( "Kind Regards,\nThe Happy BackUpWordPress Backup Emailing Robot", 'backupwordpress' ), home_url(), $download );
|
202 |
+
wp_mail( $this->get_email_address_array(), $subject, $message, $headers );
|
203 |
+
|
204 |
+
}
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
public static function intercom_data() {
|
209 |
+
return array();
|
210 |
+
}
|
211 |
+
|
212 |
+
public static function intercom_data_html() {}
|
213 |
+
}
|
214 |
+
|
215 |
+
// Register the service
|
216 |
+
Services::register( __FILE__, 'HM\BackUpWordPress\Email_Service' );
|
classes/class-plugin.php
CHANGED
@@ -6,7 +6,7 @@ namespace HM\BackUpWordPress;
|
|
6 |
* Class Plugin
|
7 |
*/
|
8 |
final class Plugin {
|
9 |
-
const PLUGIN_VERSION = '3.
|
10 |
|
11 |
/**
|
12 |
* @var Plugin The singleton instance.
|
6 |
* Class Plugin
|
7 |
*/
|
8 |
final class Plugin {
|
9 |
+
const PLUGIN_VERSION = '3.9';
|
10 |
|
11 |
/**
|
12 |
* @var Plugin The singleton instance.
|
languages/backupwordpress.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
# This file is distributed under the GPL-2+.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: BackUpWordPress 3.
|
6 |
"Report-Msgid-Bugs-To: support@xibomarketing.com\n"
|
7 |
"POT-Creation-Date: 2018-10-29 10:39:44+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
2 |
# This file is distributed under the GPL-2+.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: BackUpWordPress 3.9\n"
|
6 |
"Report-Msgid-Bugs-To: support@xibomarketing.com\n"
|
7 |
"POT-Creation-Date: 2018-10-29 10:39:44+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
package-lock.json
DELETED
@@ -1,3651 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "BackUpWordPress",
|
3 |
-
"version": "3.7.1",
|
4 |
-
"lockfileVersion": 1,
|
5 |
-
"requires": true,
|
6 |
-
"dependencies": {
|
7 |
-
"abbrev": {
|
8 |
-
"version": "1.1.1",
|
9 |
-
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
10 |
-
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
11 |
-
"dev": true
|
12 |
-
},
|
13 |
-
"ajv": {
|
14 |
-
"version": "5.5.2",
|
15 |
-
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
|
16 |
-
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
|
17 |
-
"dev": true,
|
18 |
-
"optional": true,
|
19 |
-
"requires": {
|
20 |
-
"co": "^4.6.0",
|
21 |
-
"fast-deep-equal": "^1.0.0",
|
22 |
-
"fast-json-stable-stringify": "^2.0.0",
|
23 |
-
"json-schema-traverse": "^0.3.0"
|
24 |
-
}
|
25 |
-
},
|
26 |
-
"amdefine": {
|
27 |
-
"version": "1.0.1",
|
28 |
-
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
|
29 |
-
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
|
30 |
-
"dev": true
|
31 |
-
},
|
32 |
-
"ansi-regex": {
|
33 |
-
"version": "1.1.1",
|
34 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-1.1.1.tgz",
|
35 |
-
"integrity": "sha1-QchHGUZGN15qGl0Qw8oFTvn8mA0=",
|
36 |
-
"dev": true
|
37 |
-
},
|
38 |
-
"ansi-styles": {
|
39 |
-
"version": "3.2.1",
|
40 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
41 |
-
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
42 |
-
"dev": true,
|
43 |
-
"requires": {
|
44 |
-
"color-convert": "^1.9.0"
|
45 |
-
}
|
46 |
-
},
|
47 |
-
"aproba": {
|
48 |
-
"version": "1.2.0",
|
49 |
-
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
50 |
-
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
51 |
-
"dev": true
|
52 |
-
},
|
53 |
-
"archiver": {
|
54 |
-
"version": "1.3.0",
|
55 |
-
"resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz",
|
56 |
-
"integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=",
|
57 |
-
"dev": true,
|
58 |
-
"requires": {
|
59 |
-
"archiver-utils": "^1.3.0",
|
60 |
-
"async": "^2.0.0",
|
61 |
-
"buffer-crc32": "^0.2.1",
|
62 |
-
"glob": "^7.0.0",
|
63 |
-
"lodash": "^4.8.0",
|
64 |
-
"readable-stream": "^2.0.0",
|
65 |
-
"tar-stream": "^1.5.0",
|
66 |
-
"walkdir": "^0.0.11",
|
67 |
-
"zip-stream": "^1.1.0"
|
68 |
-
},
|
69 |
-
"dependencies": {
|
70 |
-
"async": {
|
71 |
-
"version": "2.6.1",
|
72 |
-
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
|
73 |
-
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
|
74 |
-
"dev": true,
|
75 |
-
"requires": {
|
76 |
-
"lodash": "^4.17.10"
|
77 |
-
}
|
78 |
-
}
|
79 |
-
}
|
80 |
-
},
|
81 |
-
"archiver-utils": {
|
82 |
-
"version": "1.3.0",
|
83 |
-
"resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz",
|
84 |
-
"integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=",
|
85 |
-
"dev": true,
|
86 |
-
"requires": {
|
87 |
-
"glob": "^7.0.0",
|
88 |
-
"graceful-fs": "^4.1.0",
|
89 |
-
"lazystream": "^1.0.0",
|
90 |
-
"lodash": "^4.8.0",
|
91 |
-
"normalize-path": "^2.0.0",
|
92 |
-
"readable-stream": "^2.0.0"
|
93 |
-
}
|
94 |
-
},
|
95 |
-
"are-we-there-yet": {
|
96 |
-
"version": "1.1.5",
|
97 |
-
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
98 |
-
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
99 |
-
"dev": true,
|
100 |
-
"requires": {
|
101 |
-
"delegates": "^1.0.0",
|
102 |
-
"readable-stream": "^2.0.6"
|
103 |
-
}
|
104 |
-
},
|
105 |
-
"argparse": {
|
106 |
-
"version": "1.0.10",
|
107 |
-
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
108 |
-
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
109 |
-
"dev": true,
|
110 |
-
"requires": {
|
111 |
-
"sprintf-js": "~1.0.2"
|
112 |
-
},
|
113 |
-
"dependencies": {
|
114 |
-
"sprintf-js": {
|
115 |
-
"version": "1.0.3",
|
116 |
-
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
117 |
-
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
118 |
-
"dev": true
|
119 |
-
}
|
120 |
-
}
|
121 |
-
},
|
122 |
-
"array-differ": {
|
123 |
-
"version": "1.0.0",
|
124 |
-
"resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
|
125 |
-
"integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=",
|
126 |
-
"dev": true
|
127 |
-
},
|
128 |
-
"array-find-index": {
|
129 |
-
"version": "1.0.2",
|
130 |
-
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
|
131 |
-
"integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
|
132 |
-
"dev": true
|
133 |
-
},
|
134 |
-
"array-union": {
|
135 |
-
"version": "1.0.2",
|
136 |
-
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
|
137 |
-
"integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
|
138 |
-
"dev": true,
|
139 |
-
"requires": {
|
140 |
-
"array-uniq": "^1.0.1"
|
141 |
-
}
|
142 |
-
},
|
143 |
-
"array-uniq": {
|
144 |
-
"version": "1.0.3",
|
145 |
-
"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
|
146 |
-
"integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
|
147 |
-
"dev": true
|
148 |
-
},
|
149 |
-
"arrify": {
|
150 |
-
"version": "1.0.1",
|
151 |
-
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
|
152 |
-
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
|
153 |
-
"dev": true
|
154 |
-
},
|
155 |
-
"asn1": {
|
156 |
-
"version": "0.2.4",
|
157 |
-
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
|
158 |
-
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
|
159 |
-
"dev": true,
|
160 |
-
"optional": true,
|
161 |
-
"requires": {
|
162 |
-
"safer-buffer": "~2.1.0"
|
163 |
-
}
|
164 |
-
},
|
165 |
-
"assert-plus": {
|
166 |
-
"version": "1.0.0",
|
167 |
-
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
168 |
-
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
|
169 |
-
"dev": true
|
170 |
-
},
|
171 |
-
"async": {
|
172 |
-
"version": "1.5.2",
|
173 |
-
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
|
174 |
-
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
|
175 |
-
"dev": true
|
176 |
-
},
|
177 |
-
"asynckit": {
|
178 |
-
"version": "0.4.0",
|
179 |
-
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
180 |
-
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
|
181 |
-
"dev": true,
|
182 |
-
"optional": true
|
183 |
-
},
|
184 |
-
"autoprefixer-core": {
|
185 |
-
"version": "5.2.1",
|
186 |
-
"resolved": "https://registry.npmjs.org/autoprefixer-core/-/autoprefixer-core-5.2.1.tgz",
|
187 |
-
"integrity": "sha1-5kDEFK5Bmq4hwa1DyOoPPbgqVm0=",
|
188 |
-
"dev": true,
|
189 |
-
"requires": {
|
190 |
-
"browserslist": "~0.4.0",
|
191 |
-
"caniuse-db": "^1.0.30000214",
|
192 |
-
"num2fraction": "^1.1.0",
|
193 |
-
"postcss": "~4.1.12"
|
194 |
-
}
|
195 |
-
},
|
196 |
-
"aws-sign2": {
|
197 |
-
"version": "0.7.0",
|
198 |
-
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
199 |
-
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
|
200 |
-
"dev": true,
|
201 |
-
"optional": true
|
202 |
-
},
|
203 |
-
"aws4": {
|
204 |
-
"version": "1.8.0",
|
205 |
-
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
|
206 |
-
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
|
207 |
-
"dev": true,
|
208 |
-
"optional": true
|
209 |
-
},
|
210 |
-
"balanced-match": {
|
211 |
-
"version": "1.0.0",
|
212 |
-
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
213 |
-
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
214 |
-
"dev": true
|
215 |
-
},
|
216 |
-
"base64-js": {
|
217 |
-
"version": "1.3.0",
|
218 |
-
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
|
219 |
-
"integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==",
|
220 |
-
"dev": true
|
221 |
-
},
|
222 |
-
"bcrypt-pbkdf": {
|
223 |
-
"version": "1.0.2",
|
224 |
-
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
|
225 |
-
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
|
226 |
-
"dev": true,
|
227 |
-
"optional": true,
|
228 |
-
"requires": {
|
229 |
-
"tweetnacl": "^0.14.3"
|
230 |
-
}
|
231 |
-
},
|
232 |
-
"bl": {
|
233 |
-
"version": "1.2.2",
|
234 |
-
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
|
235 |
-
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
|
236 |
-
"dev": true,
|
237 |
-
"requires": {
|
238 |
-
"readable-stream": "^2.3.5",
|
239 |
-
"safe-buffer": "^5.1.1"
|
240 |
-
}
|
241 |
-
},
|
242 |
-
"block-stream": {
|
243 |
-
"version": "0.0.9",
|
244 |
-
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
|
245 |
-
"integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
|
246 |
-
"dev": true,
|
247 |
-
"optional": true,
|
248 |
-
"requires": {
|
249 |
-
"inherits": "~2.0.0"
|
250 |
-
}
|
251 |
-
},
|
252 |
-
"bluebird": {
|
253 |
-
"version": "3.5.2",
|
254 |
-
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz",
|
255 |
-
"integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg==",
|
256 |
-
"dev": true
|
257 |
-
},
|
258 |
-
"brace-expansion": {
|
259 |
-
"version": "1.1.11",
|
260 |
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
261 |
-
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
262 |
-
"dev": true,
|
263 |
-
"requires": {
|
264 |
-
"balanced-match": "^1.0.0",
|
265 |
-
"concat-map": "0.0.1"
|
266 |
-
}
|
267 |
-
},
|
268 |
-
"browserslist": {
|
269 |
-
"version": "0.4.0",
|
270 |
-
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-0.4.0.tgz",
|
271 |
-
"integrity": "sha1-O9SrkZncG5FQ1NbbpNnTqrvIbdQ=",
|
272 |
-
"dev": true,
|
273 |
-
"requires": {
|
274 |
-
"caniuse-db": "^1.0.30000153"
|
275 |
-
}
|
276 |
-
},
|
277 |
-
"buffer": {
|
278 |
-
"version": "5.2.1",
|
279 |
-
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz",
|
280 |
-
"integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==",
|
281 |
-
"dev": true,
|
282 |
-
"requires": {
|
283 |
-
"base64-js": "^1.0.2",
|
284 |
-
"ieee754": "^1.1.4"
|
285 |
-
}
|
286 |
-
},
|
287 |
-
"buffer-alloc": {
|
288 |
-
"version": "1.2.0",
|
289 |
-
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
|
290 |
-
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
|
291 |
-
"dev": true,
|
292 |
-
"requires": {
|
293 |
-
"buffer-alloc-unsafe": "^1.1.0",
|
294 |
-
"buffer-fill": "^1.0.0"
|
295 |
-
}
|
296 |
-
},
|
297 |
-
"buffer-alloc-unsafe": {
|
298 |
-
"version": "1.1.0",
|
299 |
-
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
|
300 |
-
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
|
301 |
-
"dev": true
|
302 |
-
},
|
303 |
-
"buffer-crc32": {
|
304 |
-
"version": "0.2.13",
|
305 |
-
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
|
306 |
-
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
|
307 |
-
"dev": true
|
308 |
-
},
|
309 |
-
"buffer-fill": {
|
310 |
-
"version": "1.0.0",
|
311 |
-
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
|
312 |
-
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
|
313 |
-
"dev": true
|
314 |
-
},
|
315 |
-
"buffer-from": {
|
316 |
-
"version": "1.1.1",
|
317 |
-
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
318 |
-
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
319 |
-
"dev": true,
|
320 |
-
"optional": true
|
321 |
-
},
|
322 |
-
"builtin-modules": {
|
323 |
-
"version": "1.1.1",
|
324 |
-
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
325 |
-
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
|
326 |
-
"dev": true
|
327 |
-
},
|
328 |
-
"camelcase": {
|
329 |
-
"version": "2.1.1",
|
330 |
-
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
|
331 |
-
"integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=",
|
332 |
-
"dev": true
|
333 |
-
},
|
334 |
-
"camelcase-keys": {
|
335 |
-
"version": "2.1.0",
|
336 |
-
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
|
337 |
-
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
|
338 |
-
"dev": true,
|
339 |
-
"requires": {
|
340 |
-
"camelcase": "^2.0.0",
|
341 |
-
"map-obj": "^1.0.0"
|
342 |
-
}
|
343 |
-
},
|
344 |
-
"caniuse-db": {
|
345 |
-
"version": "1.0.30000884",
|
346 |
-
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000884.tgz",
|
347 |
-
"integrity": "sha512-jVcZPhqrsyohOBAoYpf87mfKIL80XtQH9B1XQ3Ac8nMUKGld+QuFtc+ZaXKAUlE9o8vYLlUAooihB30VRPu0rA==",
|
348 |
-
"dev": true
|
349 |
-
},
|
350 |
-
"caseless": {
|
351 |
-
"version": "0.12.0",
|
352 |
-
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
|
353 |
-
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
|
354 |
-
"dev": true,
|
355 |
-
"optional": true
|
356 |
-
},
|
357 |
-
"chalk": {
|
358 |
-
"version": "2.4.1",
|
359 |
-
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
|
360 |
-
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
|
361 |
-
"dev": true,
|
362 |
-
"requires": {
|
363 |
-
"ansi-styles": "^3.2.1",
|
364 |
-
"escape-string-regexp": "^1.0.5",
|
365 |
-
"supports-color": "^5.3.0"
|
366 |
-
}
|
367 |
-
},
|
368 |
-
"chownr": {
|
369 |
-
"version": "1.0.1",
|
370 |
-
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz",
|
371 |
-
"integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=",
|
372 |
-
"dev": true,
|
373 |
-
"optional": true
|
374 |
-
},
|
375 |
-
"clean-css": {
|
376 |
-
"version": "4.1.11",
|
377 |
-
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz",
|
378 |
-
"integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=",
|
379 |
-
"dev": true,
|
380 |
-
"requires": {
|
381 |
-
"source-map": "0.5.x"
|
382 |
-
},
|
383 |
-
"dependencies": {
|
384 |
-
"source-map": {
|
385 |
-
"version": "0.5.7",
|
386 |
-
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
387 |
-
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
388 |
-
"dev": true
|
389 |
-
}
|
390 |
-
}
|
391 |
-
},
|
392 |
-
"cli": {
|
393 |
-
"version": "1.0.1",
|
394 |
-
"resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz",
|
395 |
-
"integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=",
|
396 |
-
"dev": true,
|
397 |
-
"requires": {
|
398 |
-
"exit": "0.1.2",
|
399 |
-
"glob": "^7.1.1"
|
400 |
-
},
|
401 |
-
"dependencies": {
|
402 |
-
"glob": {
|
403 |
-
"version": "7.1.3",
|
404 |
-
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
405 |
-
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
406 |
-
"dev": true,
|
407 |
-
"requires": {
|
408 |
-
"fs.realpath": "^1.0.0",
|
409 |
-
"inflight": "^1.0.4",
|
410 |
-
"inherits": "2",
|
411 |
-
"minimatch": "^3.0.4",
|
412 |
-
"once": "^1.3.0",
|
413 |
-
"path-is-absolute": "^1.0.0"
|
414 |
-
}
|
415 |
-
}
|
416 |
-
}
|
417 |
-
},
|
418 |
-
"cli-color": {
|
419 |
-
"version": "0.2.3",
|
420 |
-
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-0.2.3.tgz",
|
421 |
-
"integrity": "sha1-CiXOrlpqFgK+f3fShWPDZwAnTog=",
|
422 |
-
"dev": true,
|
423 |
-
"requires": {
|
424 |
-
"es5-ext": "~0.9.2",
|
425 |
-
"memoizee": "~0.2.5"
|
426 |
-
}
|
427 |
-
},
|
428 |
-
"co": {
|
429 |
-
"version": "4.6.0",
|
430 |
-
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
|
431 |
-
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
|
432 |
-
"dev": true,
|
433 |
-
"optional": true
|
434 |
-
},
|
435 |
-
"code-point-at": {
|
436 |
-
"version": "1.1.0",
|
437 |
-
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
438 |
-
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
439 |
-
"dev": true
|
440 |
-
},
|
441 |
-
"coffeescript": {
|
442 |
-
"version": "1.10.0",
|
443 |
-
"resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz",
|
444 |
-
"integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=",
|
445 |
-
"dev": true
|
446 |
-
},
|
447 |
-
"color-convert": {
|
448 |
-
"version": "1.9.3",
|
449 |
-
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
450 |
-
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
451 |
-
"dev": true,
|
452 |
-
"requires": {
|
453 |
-
"color-name": "1.1.3"
|
454 |
-
}
|
455 |
-
},
|
456 |
-
"color-name": {
|
457 |
-
"version": "1.1.3",
|
458 |
-
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
459 |
-
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
460 |
-
"dev": true
|
461 |
-
},
|
462 |
-
"colors": {
|
463 |
-
"version": "1.1.2",
|
464 |
-
"resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
|
465 |
-
"integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
|
466 |
-
"dev": true
|
467 |
-
},
|
468 |
-
"combined-stream": {
|
469 |
-
"version": "1.0.6",
|
470 |
-
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
|
471 |
-
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
|
472 |
-
"dev": true,
|
473 |
-
"requires": {
|
474 |
-
"delayed-stream": "~1.0.0"
|
475 |
-
}
|
476 |
-
},
|
477 |
-
"commander": {
|
478 |
-
"version": "2.17.1",
|
479 |
-
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
|
480 |
-
"integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
|
481 |
-
"dev": true
|
482 |
-
},
|
483 |
-
"compress-commons": {
|
484 |
-
"version": "1.2.2",
|
485 |
-
"resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz",
|
486 |
-
"integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=",
|
487 |
-
"dev": true,
|
488 |
-
"requires": {
|
489 |
-
"buffer-crc32": "^0.2.1",
|
490 |
-
"crc32-stream": "^2.0.0",
|
491 |
-
"normalize-path": "^2.0.0",
|
492 |
-
"readable-stream": "^2.0.0"
|
493 |
-
}
|
494 |
-
},
|
495 |
-
"concat-map": {
|
496 |
-
"version": "0.0.1",
|
497 |
-
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
498 |
-
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
499 |
-
"dev": true
|
500 |
-
},
|
501 |
-
"concat-stream": {
|
502 |
-
"version": "1.6.2",
|
503 |
-
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
|
504 |
-
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
|
505 |
-
"dev": true,
|
506 |
-
"optional": true,
|
507 |
-
"requires": {
|
508 |
-
"buffer-from": "^1.0.0",
|
509 |
-
"inherits": "^2.0.3",
|
510 |
-
"readable-stream": "^2.2.2",
|
511 |
-
"typedarray": "^0.0.6"
|
512 |
-
}
|
513 |
-
},
|
514 |
-
"console-browserify": {
|
515 |
-
"version": "1.1.0",
|
516 |
-
"resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
|
517 |
-
"integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
|
518 |
-
"dev": true,
|
519 |
-
"requires": {
|
520 |
-
"date-now": "^0.1.4"
|
521 |
-
}
|
522 |
-
},
|
523 |
-
"console-control-strings": {
|
524 |
-
"version": "1.1.0",
|
525 |
-
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
526 |
-
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
527 |
-
"dev": true
|
528 |
-
},
|
529 |
-
"core-util-is": {
|
530 |
-
"version": "1.0.2",
|
531 |
-
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
532 |
-
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
533 |
-
"dev": true
|
534 |
-
},
|
535 |
-
"crc": {
|
536 |
-
"version": "3.8.0",
|
537 |
-
"resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz",
|
538 |
-
"integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==",
|
539 |
-
"dev": true,
|
540 |
-
"requires": {
|
541 |
-
"buffer": "^5.1.0"
|
542 |
-
}
|
543 |
-
},
|
544 |
-
"crc32-stream": {
|
545 |
-
"version": "2.0.0",
|
546 |
-
"resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz",
|
547 |
-
"integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=",
|
548 |
-
"dev": true,
|
549 |
-
"requires": {
|
550 |
-
"crc": "^3.4.4",
|
551 |
-
"readable-stream": "^2.0.0"
|
552 |
-
}
|
553 |
-
},
|
554 |
-
"cson": {
|
555 |
-
"version": "3.0.2",
|
556 |
-
"resolved": "https://registry.npmjs.org/cson/-/cson-3.0.2.tgz",
|
557 |
-
"integrity": "sha1-g+6Qids8JUvsHpjkmNmqzxGtzFQ=",
|
558 |
-
"dev": true,
|
559 |
-
"requires": {
|
560 |
-
"coffee-script": "^1.9.0",
|
561 |
-
"cson-parser": "^1.0.6",
|
562 |
-
"extract-opts": "^3.0.1",
|
563 |
-
"requirefresh": "^2.0.0",
|
564 |
-
"safefs": "^4.0.0"
|
565 |
-
},
|
566 |
-
"dependencies": {
|
567 |
-
"coffee-script": {
|
568 |
-
"version": "1.12.7",
|
569 |
-
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz",
|
570 |
-
"integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==",
|
571 |
-
"dev": true
|
572 |
-
}
|
573 |
-
}
|
574 |
-
},
|
575 |
-
"cson-parser": {
|
576 |
-
"version": "1.3.5",
|
577 |
-
"resolved": "https://registry.npmjs.org/cson-parser/-/cson-parser-1.3.5.tgz",
|
578 |
-
"integrity": "sha1-fsZ14DkUVTO/KmqFYHPxWZ2cLSQ=",
|
579 |
-
"dev": true,
|
580 |
-
"requires": {
|
581 |
-
"coffee-script": "^1.10.0"
|
582 |
-
},
|
583 |
-
"dependencies": {
|
584 |
-
"coffee-script": {
|
585 |
-
"version": "1.12.7",
|
586 |
-
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz",
|
587 |
-
"integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==",
|
588 |
-
"dev": true
|
589 |
-
}
|
590 |
-
}
|
591 |
-
},
|
592 |
-
"currently-unhandled": {
|
593 |
-
"version": "0.4.1",
|
594 |
-
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
|
595 |
-
"integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
|
596 |
-
"dev": true,
|
597 |
-
"requires": {
|
598 |
-
"array-find-index": "^1.0.1"
|
599 |
-
}
|
600 |
-
},
|
601 |
-
"cycle": {
|
602 |
-
"version": "1.0.3",
|
603 |
-
"resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz",
|
604 |
-
"integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=",
|
605 |
-
"dev": true,
|
606 |
-
"optional": true
|
607 |
-
},
|
608 |
-
"dashdash": {
|
609 |
-
"version": "1.14.1",
|
610 |
-
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
611 |
-
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
|
612 |
-
"dev": true,
|
613 |
-
"optional": true,
|
614 |
-
"requires": {
|
615 |
-
"assert-plus": "^1.0.0"
|
616 |
-
}
|
617 |
-
},
|
618 |
-
"date-now": {
|
619 |
-
"version": "0.1.4",
|
620 |
-
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
|
621 |
-
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
|
622 |
-
"dev": true
|
623 |
-
},
|
624 |
-
"dateformat": {
|
625 |
-
"version": "1.0.12",
|
626 |
-
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
|
627 |
-
"integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=",
|
628 |
-
"dev": true,
|
629 |
-
"requires": {
|
630 |
-
"get-stdin": "^4.0.1",
|
631 |
-
"meow": "^3.3.0"
|
632 |
-
}
|
633 |
-
},
|
634 |
-
"debug": {
|
635 |
-
"version": "2.6.9",
|
636 |
-
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
637 |
-
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
638 |
-
"dev": true,
|
639 |
-
"optional": true,
|
640 |
-
"requires": {
|
641 |
-
"ms": "2.0.0"
|
642 |
-
}
|
643 |
-
},
|
644 |
-
"decamelize": {
|
645 |
-
"version": "1.2.0",
|
646 |
-
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
647 |
-
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
|
648 |
-
"dev": true
|
649 |
-
},
|
650 |
-
"decompress-response": {
|
651 |
-
"version": "3.3.0",
|
652 |
-
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
|
653 |
-
"integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
|
654 |
-
"dev": true,
|
655 |
-
"optional": true,
|
656 |
-
"requires": {
|
657 |
-
"mimic-response": "^1.0.0"
|
658 |
-
}
|
659 |
-
},
|
660 |
-
"deep-extend": {
|
661 |
-
"version": "0.6.0",
|
662 |
-
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
663 |
-
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
664 |
-
"dev": true,
|
665 |
-
"optional": true
|
666 |
-
},
|
667 |
-
"delayed-stream": {
|
668 |
-
"version": "1.0.0",
|
669 |
-
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
670 |
-
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
|
671 |
-
"dev": true
|
672 |
-
},
|
673 |
-
"delegates": {
|
674 |
-
"version": "1.0.0",
|
675 |
-
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
676 |
-
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
|
677 |
-
"dev": true
|
678 |
-
},
|
679 |
-
"detect-libc": {
|
680 |
-
"version": "0.2.0",
|
681 |
-
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-0.2.0.tgz",
|
682 |
-
"integrity": "sha1-R/31ZzSKF+wl/L8LnkRjSKdvn7U=",
|
683 |
-
"dev": true,
|
684 |
-
"optional": true
|
685 |
-
},
|
686 |
-
"diff": {
|
687 |
-
"version": "1.3.2",
|
688 |
-
"resolved": "https://registry.npmjs.org/diff/-/diff-1.3.2.tgz",
|
689 |
-
"integrity": "sha1-/Qeh8fiRUZ2ZBaTJqJ3PWnC2YDc=",
|
690 |
-
"dev": true
|
691 |
-
},
|
692 |
-
"dom-serializer": {
|
693 |
-
"version": "0.1.0",
|
694 |
-
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
|
695 |
-
"integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
|
696 |
-
"dev": true,
|
697 |
-
"requires": {
|
698 |
-
"domelementtype": "~1.1.1",
|
699 |
-
"entities": "~1.1.1"
|
700 |
-
},
|
701 |
-
"dependencies": {
|
702 |
-
"domelementtype": {
|
703 |
-
"version": "1.1.3",
|
704 |
-
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
|
705 |
-
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
|
706 |
-
"dev": true
|
707 |
-
},
|
708 |
-
"entities": {
|
709 |
-
"version": "1.1.1",
|
710 |
-
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
|
711 |
-
"integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=",
|
712 |
-
"dev": true
|
713 |
-
}
|
714 |
-
}
|
715 |
-
},
|
716 |
-
"domelementtype": {
|
717 |
-
"version": "1.3.0",
|
718 |
-
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
|
719 |
-
"integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=",
|
720 |
-
"dev": true
|
721 |
-
},
|
722 |
-
"domhandler": {
|
723 |
-
"version": "2.3.0",
|
724 |
-
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz",
|
725 |
-
"integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=",
|
726 |
-
"dev": true,
|
727 |
-
"requires": {
|
728 |
-
"domelementtype": "1"
|
729 |
-
}
|
730 |
-
},
|
731 |
-
"domutils": {
|
732 |
-
"version": "1.5.1",
|
733 |
-
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
|
734 |
-
"integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
|
735 |
-
"dev": true,
|
736 |
-
"requires": {
|
737 |
-
"dom-serializer": "0",
|
738 |
-
"domelementtype": "1"
|
739 |
-
}
|
740 |
-
},
|
741 |
-
"duplexer": {
|
742 |
-
"version": "0.1.1",
|
743 |
-
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
|
744 |
-
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
|
745 |
-
"dev": true
|
746 |
-
},
|
747 |
-
"eachr": {
|
748 |
-
"version": "3.2.0",
|
749 |
-
"resolved": "https://registry.npmjs.org/eachr/-/eachr-3.2.0.tgz",
|
750 |
-
"integrity": "sha1-LDXkPqCGUW95l8+At6pk1VpKRIQ=",
|
751 |
-
"dev": true,
|
752 |
-
"requires": {
|
753 |
-
"editions": "^1.1.1",
|
754 |
-
"typechecker": "^4.3.0"
|
755 |
-
}
|
756 |
-
},
|
757 |
-
"ecc-jsbn": {
|
758 |
-
"version": "0.1.2",
|
759 |
-
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
|
760 |
-
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
|
761 |
-
"dev": true,
|
762 |
-
"optional": true,
|
763 |
-
"requires": {
|
764 |
-
"jsbn": "~0.1.0",
|
765 |
-
"safer-buffer": "^2.1.0"
|
766 |
-
}
|
767 |
-
},
|
768 |
-
"editions": {
|
769 |
-
"version": "1.3.4",
|
770 |
-
"resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz",
|
771 |
-
"integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==",
|
772 |
-
"dev": true
|
773 |
-
},
|
774 |
-
"encoding": {
|
775 |
-
"version": "0.1.12",
|
776 |
-
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
777 |
-
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
|
778 |
-
"dev": true,
|
779 |
-
"requires": {
|
780 |
-
"iconv-lite": "~0.4.13"
|
781 |
-
}
|
782 |
-
},
|
783 |
-
"end-of-stream": {
|
784 |
-
"version": "1.4.1",
|
785 |
-
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
|
786 |
-
"integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
|
787 |
-
"dev": true,
|
788 |
-
"requires": {
|
789 |
-
"once": "^1.4.0"
|
790 |
-
}
|
791 |
-
},
|
792 |
-
"entities": {
|
793 |
-
"version": "1.0.0",
|
794 |
-
"resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
|
795 |
-
"integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=",
|
796 |
-
"dev": true
|
797 |
-
},
|
798 |
-
"errlop": {
|
799 |
-
"version": "1.0.3",
|
800 |
-
"resolved": "https://registry.npmjs.org/errlop/-/errlop-1.0.3.tgz",
|
801 |
-
"integrity": "sha512-5VTnt0yikY4LlQEfCXVSqfE6oLj1HVM4zVSvAKMnoYjL/zrb6nqiLowZS4XlG7xENfyj7lpYWvT+wfSCr6dtlA==",
|
802 |
-
"dev": true,
|
803 |
-
"requires": {
|
804 |
-
"editions": "^1.3.4"
|
805 |
-
}
|
806 |
-
},
|
807 |
-
"error-ex": {
|
808 |
-
"version": "1.3.2",
|
809 |
-
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
|
810 |
-
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
|
811 |
-
"dev": true,
|
812 |
-
"requires": {
|
813 |
-
"is-arrayish": "^0.2.1"
|
814 |
-
}
|
815 |
-
},
|
816 |
-
"es5-ext": {
|
817 |
-
"version": "0.9.2",
|
818 |
-
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.9.2.tgz",
|
819 |
-
"integrity": "sha1-0uMJ0fIjsHGGSINaz1uII6gGH4o=",
|
820 |
-
"dev": true
|
821 |
-
},
|
822 |
-
"es6-promise": {
|
823 |
-
"version": "2.3.0",
|
824 |
-
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-2.3.0.tgz",
|
825 |
-
"integrity": "sha1-lu258v2wGZWCKyY92KratnSBgbw=",
|
826 |
-
"dev": true
|
827 |
-
},
|
828 |
-
"escape-string-regexp": {
|
829 |
-
"version": "1.0.5",
|
830 |
-
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
831 |
-
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
832 |
-
"dev": true
|
833 |
-
},
|
834 |
-
"esprima": {
|
835 |
-
"version": "2.7.3",
|
836 |
-
"resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
|
837 |
-
"integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
|
838 |
-
"dev": true
|
839 |
-
},
|
840 |
-
"event-emitter": {
|
841 |
-
"version": "0.2.2",
|
842 |
-
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.2.2.tgz",
|
843 |
-
"integrity": "sha1-yB43JOtVQHxaDV7jKZQR9wD1QpE=",
|
844 |
-
"dev": true,
|
845 |
-
"requires": {
|
846 |
-
"es5-ext": "~0.9.2"
|
847 |
-
}
|
848 |
-
},
|
849 |
-
"eventemitter2": {
|
850 |
-
"version": "0.4.14",
|
851 |
-
"resolved": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
|
852 |
-
"integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=",
|
853 |
-
"dev": true
|
854 |
-
},
|
855 |
-
"exit": {
|
856 |
-
"version": "0.1.2",
|
857 |
-
"resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
|
858 |
-
"integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=",
|
859 |
-
"dev": true
|
860 |
-
},
|
861 |
-
"expand-template": {
|
862 |
-
"version": "1.1.1",
|
863 |
-
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.1.tgz",
|
864 |
-
"integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg==",
|
865 |
-
"dev": true,
|
866 |
-
"optional": true
|
867 |
-
},
|
868 |
-
"extend": {
|
869 |
-
"version": "3.0.2",
|
870 |
-
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
871 |
-
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
|
872 |
-
"dev": true,
|
873 |
-
"optional": true
|
874 |
-
},
|
875 |
-
"extract-opts": {
|
876 |
-
"version": "3.3.1",
|
877 |
-
"resolved": "https://registry.npmjs.org/extract-opts/-/extract-opts-3.3.1.tgz",
|
878 |
-
"integrity": "sha1-WrvtyYwNUgLjJ4cn+Rktfghsa+E=",
|
879 |
-
"dev": true,
|
880 |
-
"requires": {
|
881 |
-
"eachr": "^3.2.0",
|
882 |
-
"editions": "^1.1.1",
|
883 |
-
"typechecker": "^4.3.0"
|
884 |
-
}
|
885 |
-
},
|
886 |
-
"extract-zip": {
|
887 |
-
"version": "1.6.7",
|
888 |
-
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
|
889 |
-
"integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
|
890 |
-
"dev": true,
|
891 |
-
"optional": true,
|
892 |
-
"requires": {
|
893 |
-
"concat-stream": "1.6.2",
|
894 |
-
"debug": "2.6.9",
|
895 |
-
"mkdirp": "0.5.1",
|
896 |
-
"yauzl": "2.4.1"
|
897 |
-
}
|
898 |
-
},
|
899 |
-
"extsprintf": {
|
900 |
-
"version": "1.3.0",
|
901 |
-
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
|
902 |
-
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
|
903 |
-
"dev": true
|
904 |
-
},
|
905 |
-
"eyes": {
|
906 |
-
"version": "0.1.8",
|
907 |
-
"resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz",
|
908 |
-
"integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=",
|
909 |
-
"dev": true,
|
910 |
-
"optional": true
|
911 |
-
},
|
912 |
-
"fast-deep-equal": {
|
913 |
-
"version": "1.1.0",
|
914 |
-
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
|
915 |
-
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
|
916 |
-
"dev": true,
|
917 |
-
"optional": true
|
918 |
-
},
|
919 |
-
"fast-json-stable-stringify": {
|
920 |
-
"version": "2.0.0",
|
921 |
-
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
|
922 |
-
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
|
923 |
-
"dev": true,
|
924 |
-
"optional": true
|
925 |
-
},
|
926 |
-
"fd-slicer": {
|
927 |
-
"version": "1.0.1",
|
928 |
-
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
|
929 |
-
"integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
|
930 |
-
"dev": true,
|
931 |
-
"optional": true,
|
932 |
-
"requires": {
|
933 |
-
"pend": "~1.2.0"
|
934 |
-
}
|
935 |
-
},
|
936 |
-
"figures": {
|
937 |
-
"version": "1.7.0",
|
938 |
-
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
|
939 |
-
"integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
|
940 |
-
"dev": true,
|
941 |
-
"requires": {
|
942 |
-
"escape-string-regexp": "^1.0.5",
|
943 |
-
"object-assign": "^4.1.0"
|
944 |
-
}
|
945 |
-
},
|
946 |
-
"file-sync-cmp": {
|
947 |
-
"version": "0.1.1",
|
948 |
-
"resolved": "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz",
|
949 |
-
"integrity": "sha1-peeo/7+kk7Q7kju9TKiaU7Y7YSs=",
|
950 |
-
"dev": true
|
951 |
-
},
|
952 |
-
"find-up": {
|
953 |
-
"version": "1.1.2",
|
954 |
-
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
|
955 |
-
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
|
956 |
-
"dev": true,
|
957 |
-
"requires": {
|
958 |
-
"path-exists": "^2.0.0",
|
959 |
-
"pinkie-promise": "^2.0.0"
|
960 |
-
}
|
961 |
-
},
|
962 |
-
"findup-sync": {
|
963 |
-
"version": "0.3.0",
|
964 |
-
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
|
965 |
-
"integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=",
|
966 |
-
"dev": true,
|
967 |
-
"requires": {
|
968 |
-
"glob": "~5.0.0"
|
969 |
-
},
|
970 |
-
"dependencies": {
|
971 |
-
"glob": {
|
972 |
-
"version": "5.0.15",
|
973 |
-
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
|
974 |
-
"integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
|
975 |
-
"dev": true,
|
976 |
-
"requires": {
|
977 |
-
"inflight": "^1.0.4",
|
978 |
-
"inherits": "2",
|
979 |
-
"minimatch": "2 || 3",
|
980 |
-
"once": "^1.3.0",
|
981 |
-
"path-is-absolute": "^1.0.0"
|
982 |
-
}
|
983 |
-
}
|
984 |
-
}
|
985 |
-
},
|
986 |
-
"forever-agent": {
|
987 |
-
"version": "0.6.1",
|
988 |
-
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
|
989 |
-
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
|
990 |
-
"dev": true,
|
991 |
-
"optional": true
|
992 |
-
},
|
993 |
-
"form-data": {
|
994 |
-
"version": "2.3.2",
|
995 |
-
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
|
996 |
-
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
|
997 |
-
"dev": true,
|
998 |
-
"optional": true,
|
999 |
-
"requires": {
|
1000 |
-
"asynckit": "^0.4.0",
|
1001 |
-
"combined-stream": "1.0.6",
|
1002 |
-
"mime-types": "^2.1.12"
|
1003 |
-
}
|
1004 |
-
},
|
1005 |
-
"fs-constants": {
|
1006 |
-
"version": "1.0.0",
|
1007 |
-
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
1008 |
-
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
|
1009 |
-
"dev": true
|
1010 |
-
},
|
1011 |
-
"fs-extra": {
|
1012 |
-
"version": "1.0.0",
|
1013 |
-
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz",
|
1014 |
-
"integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=",
|
1015 |
-
"dev": true,
|
1016 |
-
"optional": true,
|
1017 |
-
"requires": {
|
1018 |
-
"graceful-fs": "^4.1.2",
|
1019 |
-
"jsonfile": "^2.1.0",
|
1020 |
-
"klaw": "^1.0.0"
|
1021 |
-
}
|
1022 |
-
},
|
1023 |
-
"fs.realpath": {
|
1024 |
-
"version": "1.0.0",
|
1025 |
-
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
1026 |
-
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
1027 |
-
"dev": true
|
1028 |
-
},
|
1029 |
-
"fstream": {
|
1030 |
-
"version": "1.0.11",
|
1031 |
-
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
|
1032 |
-
"integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
|
1033 |
-
"dev": true,
|
1034 |
-
"requires": {
|
1035 |
-
"graceful-fs": "^4.1.2",
|
1036 |
-
"inherits": "~2.0.0",
|
1037 |
-
"mkdirp": ">=0.5 0",
|
1038 |
-
"rimraf": "2"
|
1039 |
-
}
|
1040 |
-
},
|
1041 |
-
"gauge": {
|
1042 |
-
"version": "2.7.4",
|
1043 |
-
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
1044 |
-
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
1045 |
-
"dev": true,
|
1046 |
-
"requires": {
|
1047 |
-
"aproba": "^1.0.3",
|
1048 |
-
"console-control-strings": "^1.0.0",
|
1049 |
-
"has-unicode": "^2.0.0",
|
1050 |
-
"object-assign": "^4.1.0",
|
1051 |
-
"signal-exit": "^3.0.0",
|
1052 |
-
"string-width": "^1.0.1",
|
1053 |
-
"strip-ansi": "^3.0.1",
|
1054 |
-
"wide-align": "^1.1.0"
|
1055 |
-
},
|
1056 |
-
"dependencies": {
|
1057 |
-
"ansi-regex": {
|
1058 |
-
"version": "2.1.1",
|
1059 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
1060 |
-
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
1061 |
-
"dev": true
|
1062 |
-
},
|
1063 |
-
"strip-ansi": {
|
1064 |
-
"version": "3.0.1",
|
1065 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
1066 |
-
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
1067 |
-
"dev": true,
|
1068 |
-
"requires": {
|
1069 |
-
"ansi-regex": "^2.0.0"
|
1070 |
-
}
|
1071 |
-
}
|
1072 |
-
}
|
1073 |
-
},
|
1074 |
-
"get-stdin": {
|
1075 |
-
"version": "4.0.1",
|
1076 |
-
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
|
1077 |
-
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
|
1078 |
-
"dev": true
|
1079 |
-
},
|
1080 |
-
"getobject": {
|
1081 |
-
"version": "0.1.0",
|
1082 |
-
"resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz",
|
1083 |
-
"integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=",
|
1084 |
-
"dev": true
|
1085 |
-
},
|
1086 |
-
"getpass": {
|
1087 |
-
"version": "0.1.7",
|
1088 |
-
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
|
1089 |
-
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
|
1090 |
-
"dev": true,
|
1091 |
-
"optional": true,
|
1092 |
-
"requires": {
|
1093 |
-
"assert-plus": "^1.0.0"
|
1094 |
-
}
|
1095 |
-
},
|
1096 |
-
"gettext-parser": {
|
1097 |
-
"version": "2.0.0",
|
1098 |
-
"resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-2.0.0.tgz",
|
1099 |
-
"integrity": "sha512-FDs/7XjNw58ToQwJFO7avZZbPecSYgw8PBYhd0An+4JtZSrSzKhEvTsVV2uqdO7VziWTOGSgLGD5YRPdsCjF7Q==",
|
1100 |
-
"dev": true,
|
1101 |
-
"requires": {
|
1102 |
-
"encoding": "^0.1.12",
|
1103 |
-
"safe-buffer": "^5.1.2"
|
1104 |
-
}
|
1105 |
-
},
|
1106 |
-
"github-from-package": {
|
1107 |
-
"version": "0.0.0",
|
1108 |
-
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
|
1109 |
-
"integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=",
|
1110 |
-
"dev": true,
|
1111 |
-
"optional": true
|
1112 |
-
},
|
1113 |
-
"glob": {
|
1114 |
-
"version": "7.0.6",
|
1115 |
-
"resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz",
|
1116 |
-
"integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=",
|
1117 |
-
"dev": true,
|
1118 |
-
"requires": {
|
1119 |
-
"fs.realpath": "^1.0.0",
|
1120 |
-
"inflight": "^1.0.4",
|
1121 |
-
"inherits": "2",
|
1122 |
-
"minimatch": "^3.0.2",
|
1123 |
-
"once": "^1.3.0",
|
1124 |
-
"path-is-absolute": "^1.0.0"
|
1125 |
-
}
|
1126 |
-
},
|
1127 |
-
"graceful-fs": {
|
1128 |
-
"version": "4.1.11",
|
1129 |
-
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
1130 |
-
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
|
1131 |
-
"dev": true
|
1132 |
-
},
|
1133 |
-
"grunt": {
|
1134 |
-
"version": "1.0.3",
|
1135 |
-
"resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz",
|
1136 |
-
"integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==",
|
1137 |
-
"dev": true,
|
1138 |
-
"requires": {
|
1139 |
-
"coffeescript": "~1.10.0",
|
1140 |
-
"dateformat": "~1.0.12",
|
1141 |
-
"eventemitter2": "~0.4.13",
|
1142 |
-
"exit": "~0.1.1",
|
1143 |
-
"findup-sync": "~0.3.0",
|
1144 |
-
"glob": "~7.0.0",
|
1145 |
-
"grunt-cli": "~1.2.0",
|
1146 |
-
"grunt-known-options": "~1.1.0",
|
1147 |
-
"grunt-legacy-log": "~2.0.0",
|
1148 |
-
"grunt-legacy-util": "~1.1.1",
|
1149 |
-
"iconv-lite": "~0.4.13",
|
1150 |
-
"js-yaml": "~3.5.2",
|
1151 |
-
"minimatch": "~3.0.2",
|
1152 |
-
"mkdirp": "~0.5.1",
|
1153 |
-
"nopt": "~3.0.6",
|
1154 |
-
"path-is-absolute": "~1.0.0",
|
1155 |
-
"rimraf": "~2.6.2"
|
1156 |
-
},
|
1157 |
-
"dependencies": {
|
1158 |
-
"grunt-cli": {
|
1159 |
-
"version": "1.2.0",
|
1160 |
-
"resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz",
|
1161 |
-
"integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=",
|
1162 |
-
"dev": true,
|
1163 |
-
"requires": {
|
1164 |
-
"findup-sync": "~0.3.0",
|
1165 |
-
"grunt-known-options": "~1.1.0",
|
1166 |
-
"nopt": "~3.0.6",
|
1167 |
-
"resolve": "~1.1.0"
|
1168 |
-
}
|
1169 |
-
}
|
1170 |
-
}
|
1171 |
-
},
|
1172 |
-
"grunt-autoprefixer": {
|
1173 |
-
"version": "3.0.4",
|
1174 |
-
"resolved": "https://registry.npmjs.org/grunt-autoprefixer/-/grunt-autoprefixer-3.0.4.tgz",
|
1175 |
-
"integrity": "sha1-/kLiR7z6ucKSoSwGLa1PNb3pAsU=",
|
1176 |
-
"dev": true,
|
1177 |
-
"requires": {
|
1178 |
-
"autoprefixer-core": "^5.1.7",
|
1179 |
-
"chalk": "~1.0.0",
|
1180 |
-
"diff": "~1.3.0",
|
1181 |
-
"postcss": "^4.1.11"
|
1182 |
-
},
|
1183 |
-
"dependencies": {
|
1184 |
-
"ansi-styles": {
|
1185 |
-
"version": "2.2.1",
|
1186 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
1187 |
-
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
1188 |
-
"dev": true
|
1189 |
-
},
|
1190 |
-
"chalk": {
|
1191 |
-
"version": "1.0.0",
|
1192 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.0.0.tgz",
|
1193 |
-
"integrity": "sha1-s89O0P9Tl8mcdbj2edsvUoMfltw=",
|
1194 |
-
"dev": true,
|
1195 |
-
"requires": {
|
1196 |
-
"ansi-styles": "^2.0.1",
|
1197 |
-
"escape-string-regexp": "^1.0.2",
|
1198 |
-
"has-ansi": "^1.0.3",
|
1199 |
-
"strip-ansi": "^2.0.1",
|
1200 |
-
"supports-color": "^1.3.0"
|
1201 |
-
}
|
1202 |
-
},
|
1203 |
-
"supports-color": {
|
1204 |
-
"version": "1.3.1",
|
1205 |
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.3.1.tgz",
|
1206 |
-
"integrity": "sha1-FXWN8J2P87SswwdTn6vicJXhBC0=",
|
1207 |
-
"dev": true
|
1208 |
-
}
|
1209 |
-
}
|
1210 |
-
},
|
1211 |
-
"grunt-bumpup": {
|
1212 |
-
"version": "0.6.3",
|
1213 |
-
"resolved": "https://registry.npmjs.org/grunt-bumpup/-/grunt-bumpup-0.6.3.tgz",
|
1214 |
-
"integrity": "sha1-dU6Wu2pTN9C5VInl3EmWuvyLtBQ=",
|
1215 |
-
"dev": true,
|
1216 |
-
"requires": {
|
1217 |
-
"moment": "^2.8.3",
|
1218 |
-
"semver": "^4.0.3"
|
1219 |
-
},
|
1220 |
-
"dependencies": {
|
1221 |
-
"semver": {
|
1222 |
-
"version": "4.3.6",
|
1223 |
-
"resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
|
1224 |
-
"integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=",
|
1225 |
-
"dev": true
|
1226 |
-
}
|
1227 |
-
}
|
1228 |
-
},
|
1229 |
-
"grunt-checktextdomain": {
|
1230 |
-
"version": "1.0.1",
|
1231 |
-
"resolved": "https://registry.npmjs.org/grunt-checktextdomain/-/grunt-checktextdomain-1.0.1.tgz",
|
1232 |
-
"integrity": "sha1-slTQHh3pEwBdTbHFMD2QI7mD4Zs=",
|
1233 |
-
"dev": true,
|
1234 |
-
"requires": {
|
1235 |
-
"chalk": "~0.2.1",
|
1236 |
-
"text-table": "~0.2.0"
|
1237 |
-
},
|
1238 |
-
"dependencies": {
|
1239 |
-
"ansi-styles": {
|
1240 |
-
"version": "0.2.0",
|
1241 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz",
|
1242 |
-
"integrity": "sha1-NZq0sV3NZLptdHNLcsNjYKmvLBk=",
|
1243 |
-
"dev": true
|
1244 |
-
},
|
1245 |
-
"chalk": {
|
1246 |
-
"version": "0.2.1",
|
1247 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-0.2.1.tgz",
|
1248 |
-
"integrity": "sha1-dhPhV1FFshOGSD9/SFql/6jL0Qw=",
|
1249 |
-
"dev": true,
|
1250 |
-
"requires": {
|
1251 |
-
"ansi-styles": "~0.2.0",
|
1252 |
-
"has-color": "~0.1.0"
|
1253 |
-
}
|
1254 |
-
}
|
1255 |
-
}
|
1256 |
-
},
|
1257 |
-
"grunt-checkwpversion": {
|
1258 |
-
"version": "0.3.0",
|
1259 |
-
"resolved": "https://registry.npmjs.org/grunt-checkwpversion/-/grunt-checkwpversion-0.3.0.tgz",
|
1260 |
-
"integrity": "sha1-o/6hDVDy6beMv7hgckwVy2G/m+E=",
|
1261 |
-
"dev": true,
|
1262 |
-
"requires": {
|
1263 |
-
"chalk": "~0.2.1"
|
1264 |
-
},
|
1265 |
-
"dependencies": {
|
1266 |
-
"ansi-styles": {
|
1267 |
-
"version": "0.2.0",
|
1268 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz",
|
1269 |
-
"integrity": "sha1-NZq0sV3NZLptdHNLcsNjYKmvLBk=",
|
1270 |
-
"dev": true
|
1271 |
-
},
|
1272 |
-
"chalk": {
|
1273 |
-
"version": "0.2.1",
|
1274 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-0.2.1.tgz",
|
1275 |
-
"integrity": "sha1-dhPhV1FFshOGSD9/SFql/6jL0Qw=",
|
1276 |
-
"dev": true,
|
1277 |
-
"requires": {
|
1278 |
-
"ansi-styles": "~0.2.0",
|
1279 |
-
"has-color": "~0.1.0"
|
1280 |
-
}
|
1281 |
-
}
|
1282 |
-
}
|
1283 |
-
},
|
1284 |
-
"grunt-contrib-clean": {
|
1285 |
-
"version": "1.1.0",
|
1286 |
-
"resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-1.1.0.tgz",
|
1287 |
-
"integrity": "sha1-Vkq/LQN4qYOhW54/MO51tzjEBjg=",
|
1288 |
-
"dev": true,
|
1289 |
-
"requires": {
|
1290 |
-
"async": "^1.5.2",
|
1291 |
-
"rimraf": "^2.5.1"
|
1292 |
-
}
|
1293 |
-
},
|
1294 |
-
"grunt-contrib-compress": {
|
1295 |
-
"version": "1.4.3",
|
1296 |
-
"resolved": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-1.4.3.tgz",
|
1297 |
-
"integrity": "sha1-Ac7/ucY39S5wgfRjdQmD0KOw+nM=",
|
1298 |
-
"dev": true,
|
1299 |
-
"requires": {
|
1300 |
-
"archiver": "^1.3.0",
|
1301 |
-
"chalk": "^1.1.1",
|
1302 |
-
"iltorb": "^1.0.13",
|
1303 |
-
"lodash": "^4.7.0",
|
1304 |
-
"pretty-bytes": "^4.0.2",
|
1305 |
-
"stream-buffers": "^2.1.0"
|
1306 |
-
},
|
1307 |
-
"dependencies": {
|
1308 |
-
"ansi-regex": {
|
1309 |
-
"version": "2.1.1",
|
1310 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
1311 |
-
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
1312 |
-
"dev": true
|
1313 |
-
},
|
1314 |
-
"ansi-styles": {
|
1315 |
-
"version": "2.2.1",
|
1316 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
1317 |
-
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
1318 |
-
"dev": true
|
1319 |
-
},
|
1320 |
-
"chalk": {
|
1321 |
-
"version": "1.1.3",
|
1322 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
1323 |
-
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
1324 |
-
"dev": true,
|
1325 |
-
"requires": {
|
1326 |
-
"ansi-styles": "^2.2.1",
|
1327 |
-
"escape-string-regexp": "^1.0.2",
|
1328 |
-
"has-ansi": "^2.0.0",
|
1329 |
-
"strip-ansi": "^3.0.0",
|
1330 |
-
"supports-color": "^2.0.0"
|
1331 |
-
}
|
1332 |
-
},
|
1333 |
-
"has-ansi": {
|
1334 |
-
"version": "2.0.0",
|
1335 |
-
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
1336 |
-
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
1337 |
-
"dev": true,
|
1338 |
-
"requires": {
|
1339 |
-
"ansi-regex": "^2.0.0"
|
1340 |
-
}
|
1341 |
-
},
|
1342 |
-
"strip-ansi": {
|
1343 |
-
"version": "3.0.1",
|
1344 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
1345 |
-
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
1346 |
-
"dev": true,
|
1347 |
-
"requires": {
|
1348 |
-
"ansi-regex": "^2.0.0"
|
1349 |
-
}
|
1350 |
-
},
|
1351 |
-
"supports-color": {
|
1352 |
-
"version": "2.0.0",
|
1353 |
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
1354 |
-
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
1355 |
-
"dev": true
|
1356 |
-
}
|
1357 |
-
}
|
1358 |
-
},
|
1359 |
-
"grunt-contrib-concat": {
|
1360 |
-
"version": "1.0.1",
|
1361 |
-
"resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-1.0.1.tgz",
|
1362 |
-
"integrity": "sha1-YVCYYwhOhx1+ht5IwBUlntl3Rb0=",
|
1363 |
-
"dev": true,
|
1364 |
-
"requires": {
|
1365 |
-
"chalk": "^1.0.0",
|
1366 |
-
"source-map": "^0.5.3"
|
1367 |
-
},
|
1368 |
-
"dependencies": {
|
1369 |
-
"ansi-regex": {
|
1370 |
-
"version": "2.1.1",
|
1371 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
1372 |
-
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
1373 |
-
"dev": true
|
1374 |
-
},
|
1375 |
-
"ansi-styles": {
|
1376 |
-
"version": "2.2.1",
|
1377 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
1378 |
-
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
1379 |
-
"dev": true
|
1380 |
-
},
|
1381 |
-
"chalk": {
|
1382 |
-
"version": "1.1.3",
|
1383 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
1384 |
-
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
1385 |
-
"dev": true,
|
1386 |
-
"requires": {
|
1387 |
-
"ansi-styles": "^2.2.1",
|
1388 |
-
"escape-string-regexp": "^1.0.2",
|
1389 |
-
"has-ansi": "^2.0.0",
|
1390 |
-
"strip-ansi": "^3.0.0",
|
1391 |
-
"supports-color": "^2.0.0"
|
1392 |
-
}
|
1393 |
-
},
|
1394 |
-
"has-ansi": {
|
1395 |
-
"version": "2.0.0",
|
1396 |
-
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
1397 |
-
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
1398 |
-
"dev": true,
|
1399 |
-
"requires": {
|
1400 |
-
"ansi-regex": "^2.0.0"
|
1401 |
-
}
|
1402 |
-
},
|
1403 |
-
"source-map": {
|
1404 |
-
"version": "0.5.7",
|
1405 |
-
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
1406 |
-
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
1407 |
-
"dev": true
|
1408 |
-
},
|
1409 |
-
"strip-ansi": {
|
1410 |
-
"version": "3.0.1",
|
1411 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
1412 |
-
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
1413 |
-
"dev": true,
|
1414 |
-
"requires": {
|
1415 |
-
"ansi-regex": "^2.0.0"
|
1416 |
-
}
|
1417 |
-
},
|
1418 |
-
"supports-color": {
|
1419 |
-
"version": "2.0.0",
|
1420 |
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
1421 |
-
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
1422 |
-
"dev": true
|
1423 |
-
}
|
1424 |
-
}
|
1425 |
-
},
|
1426 |
-
"grunt-contrib-copy": {
|
1427 |
-
"version": "1.0.0",
|
1428 |
-
"resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz",
|
1429 |
-
"integrity": "sha1-cGDGWB6QS4qw0A8HbgqPbj58NXM=",
|
1430 |
-
"dev": true,
|
1431 |
-
"requires": {
|
1432 |
-
"chalk": "^1.1.1",
|
1433 |
-
"file-sync-cmp": "^0.1.0"
|
1434 |
-
},
|
1435 |
-
"dependencies": {
|
1436 |
-
"ansi-regex": {
|
1437 |
-
"version": "2.1.1",
|
1438 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
1439 |
-
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
1440 |
-
"dev": true
|
1441 |
-
},
|
1442 |
-
"ansi-styles": {
|
1443 |
-
"version": "2.2.1",
|
1444 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
1445 |
-
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
1446 |
-
"dev": true
|
1447 |
-
},
|
1448 |
-
"chalk": {
|
1449 |
-
"version": "1.1.3",
|
1450 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
1451 |
-
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
1452 |
-
"dev": true,
|
1453 |
-
"requires": {
|
1454 |
-
"ansi-styles": "^2.2.1",
|
1455 |
-
"escape-string-regexp": "^1.0.2",
|
1456 |
-
"has-ansi": "^2.0.0",
|
1457 |
-
"strip-ansi": "^3.0.0",
|
1458 |
-
"supports-color": "^2.0.0"
|
1459 |
-
}
|
1460 |
-
},
|
1461 |
-
"has-ansi": {
|
1462 |
-
"version": "2.0.0",
|
1463 |
-
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
1464 |
-
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
1465 |
-
"dev": true,
|
1466 |
-
"requires": {
|
1467 |
-
"ansi-regex": "^2.0.0"
|
1468 |
-
}
|
1469 |
-
},
|
1470 |
-
"strip-ansi": {
|
1471 |
-
"version": "3.0.1",
|
1472 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
1473 |
-
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
1474 |
-
"dev": true,
|
1475 |
-
"requires": {
|
1476 |
-
"ansi-regex": "^2.0.0"
|
1477 |
-
}
|
1478 |
-
},
|
1479 |
-
"supports-color": {
|
1480 |
-
"version": "2.0.0",
|
1481 |
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
1482 |
-
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
1483 |
-
"dev": true
|
1484 |
-
}
|
1485 |
-
}
|
1486 |
-
},
|
1487 |
-
"grunt-contrib-cssmin": {
|
1488 |
-
"version": "2.2.1",
|
1489 |
-
"resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-2.2.1.tgz",
|
1490 |
-
"integrity": "sha512-IXNomhQ5ekVZbDbj/ik5YccoD9khU6LT2fDXqO1+/Txjq8cp0tQKjVS8i8EAbHOrSDkL7/UD6A7b+xj98gqh9w==",
|
1491 |
-
"dev": true,
|
1492 |
-
"requires": {
|
1493 |
-
"chalk": "^1.0.0",
|
1494 |
-
"clean-css": "~4.1.1",
|
1495 |
-
"maxmin": "^2.1.0"
|
1496 |
-
},
|
1497 |
-
"dependencies": {
|
1498 |
-
"ansi-regex": {
|
1499 |
-
"version": "2.1.1",
|
1500 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
1501 |
-
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
1502 |
-
"dev": true
|
1503 |
-
},
|
1504 |
-
"ansi-styles": {
|
1505 |
-
"version": "2.2.1",
|
1506 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
1507 |
-
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
1508 |
-
"dev": true
|
1509 |
-
},
|
1510 |
-
"chalk": {
|
1511 |
-
"version": "1.1.3",
|
1512 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
1513 |
-
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
1514 |
-
"dev": true,
|
1515 |
-
"requires": {
|
1516 |
-
"ansi-styles": "^2.2.1",
|
1517 |
-
"escape-string-regexp": "^1.0.2",
|
1518 |
-
"has-ansi": "^2.0.0",
|
1519 |
-
"strip-ansi": "^3.0.0",
|
1520 |
-
"supports-color": "^2.0.0"
|
1521 |
-
}
|
1522 |
-
},
|
1523 |
-
"has-ansi": {
|
1524 |
-
"version": "2.0.0",
|
1525 |
-
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
1526 |
-
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
1527 |
-
"dev": true,
|
1528 |
-
"requires": {
|
1529 |
-
"ansi-regex": "^2.0.0"
|
1530 |
-
}
|
1531 |
-
},
|
1532 |
-
"strip-ansi": {
|
1533 |
-
"version": "3.0.1",
|
1534 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
1535 |
-
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
1536 |
-
"dev": true,
|
1537 |
-
"requires": {
|
1538 |
-
"ansi-regex": "^2.0.0"
|
1539 |
-
}
|
1540 |
-
},
|
1541 |
-
"supports-color": {
|
1542 |
-
"version": "2.0.0",
|
1543 |
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
1544 |
-
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
1545 |
-
"dev": true
|
1546 |
-
}
|
1547 |
-
}
|
1548 |
-
},
|
1549 |
-
"grunt-contrib-jshint": {
|
1550 |
-
"version": "1.1.0",
|
1551 |
-
"resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-1.1.0.tgz",
|
1552 |
-
"integrity": "sha1-Np2QmyWTxA6L55lAshNAhQx5Oaw=",
|
1553 |
-
"dev": true,
|
1554 |
-
"requires": {
|
1555 |
-
"chalk": "^1.1.1",
|
1556 |
-
"hooker": "^0.2.3",
|
1557 |
-
"jshint": "~2.9.4"
|
1558 |
-
},
|
1559 |
-
"dependencies": {
|
1560 |
-
"ansi-regex": {
|
1561 |
-
"version": "2.1.1",
|
1562 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
1563 |
-
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
1564 |
-
"dev": true
|
1565 |
-
},
|
1566 |
-
"ansi-styles": {
|
1567 |
-
"version": "2.2.1",
|
1568 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
1569 |
-
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
1570 |
-
"dev": true
|
1571 |
-
},
|
1572 |
-
"chalk": {
|
1573 |
-
"version": "1.1.3",
|
1574 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
1575 |
-
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
1576 |
-
"dev": true,
|
1577 |
-
"requires": {
|
1578 |
-
"ansi-styles": "^2.2.1",
|
1579 |
-
"escape-string-regexp": "^1.0.2",
|
1580 |
-
"has-ansi": "^2.0.0",
|
1581 |
-
"strip-ansi": "^3.0.0",
|
1582 |
-
"supports-color": "^2.0.0"
|
1583 |
-
}
|
1584 |
-
},
|
1585 |
-
"has-ansi": {
|
1586 |
-
"version": "2.0.0",
|
1587 |
-
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
1588 |
-
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
1589 |
-
"dev": true,
|
1590 |
-
"requires": {
|
1591 |
-
"ansi-regex": "^2.0.0"
|
1592 |
-
}
|
1593 |
-
},
|
1594 |
-
"strip-ansi": {
|
1595 |
-
"version": "3.0.1",
|
1596 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
1597 |
-
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
1598 |
-
"dev": true,
|
1599 |
-
"requires": {
|
1600 |
-
"ansi-regex": "^2.0.0"
|
1601 |
-
}
|
1602 |
-
},
|
1603 |
-
"supports-color": {
|
1604 |
-
"version": "2.0.0",
|
1605 |
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
1606 |
-
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
1607 |
-
"dev": true
|
1608 |
-
}
|
1609 |
-
}
|
1610 |
-
},
|
1611 |
-
"grunt-contrib-uglify": {
|
1612 |
-
"version": "4.0.0",
|
1613 |
-
"resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-4.0.0.tgz",
|
1614 |
-
"integrity": "sha512-vy3Vop2KDqdiwcGOGAjyKvjHFrRD/YK4KPQWR3Yt6OdYlgFw1z7HCuk66+IJ9s7oJmp9uRQXuuSHyawKRAgiMw==",
|
1615 |
-
"dev": true,
|
1616 |
-
"requires": {
|
1617 |
-
"chalk": "^2.4.1",
|
1618 |
-
"maxmin": "^2.1.0",
|
1619 |
-
"uglify-js": "~3.4.8",
|
1620 |
-
"uri-path": "^1.0.0"
|
1621 |
-
}
|
1622 |
-
},
|
1623 |
-
"grunt-known-options": {
|
1624 |
-
"version": "1.1.1",
|
1625 |
-
"resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz",
|
1626 |
-
"integrity": "sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ==",
|
1627 |
-
"dev": true
|
1628 |
-
},
|
1629 |
-
"grunt-legacy-log": {
|
1630 |
-
"version": "2.0.0",
|
1631 |
-
"resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz",
|
1632 |
-
"integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==",
|
1633 |
-
"dev": true,
|
1634 |
-
"requires": {
|
1635 |
-
"colors": "~1.1.2",
|
1636 |
-
"grunt-legacy-log-utils": "~2.0.0",
|
1637 |
-
"hooker": "~0.2.3",
|
1638 |
-
"lodash": "~4.17.5"
|
1639 |
-
}
|
1640 |
-
},
|
1641 |
-
"grunt-legacy-log-utils": {
|
1642 |
-
"version": "2.0.1",
|
1643 |
-
"resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz",
|
1644 |
-
"integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==",
|
1645 |
-
"dev": true,
|
1646 |
-
"requires": {
|
1647 |
-
"chalk": "~2.4.1",
|
1648 |
-
"lodash": "~4.17.10"
|
1649 |
-
}
|
1650 |
-
},
|
1651 |
-
"grunt-legacy-util": {
|
1652 |
-
"version": "1.1.1",
|
1653 |
-
"resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz",
|
1654 |
-
"integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==",
|
1655 |
-
"dev": true,
|
1656 |
-
"requires": {
|
1657 |
-
"async": "~1.5.2",
|
1658 |
-
"exit": "~0.1.1",
|
1659 |
-
"getobject": "~0.1.0",
|
1660 |
-
"hooker": "~0.2.3",
|
1661 |
-
"lodash": "~4.17.10",
|
1662 |
-
"underscore.string": "~3.3.4",
|
1663 |
-
"which": "~1.3.0"
|
1664 |
-
}
|
1665 |
-
},
|
1666 |
-
"grunt-po2mo": {
|
1667 |
-
"version": "0.1.2",
|
1668 |
-
"resolved": "https://registry.npmjs.org/grunt-po2mo/-/grunt-po2mo-0.1.2.tgz",
|
1669 |
-
"integrity": "sha1-kI9zwcAAhjhazIPAdA7jYO9SdBs=",
|
1670 |
-
"dev": true,
|
1671 |
-
"requires": {
|
1672 |
-
"sync-exec": "^0.4.0"
|
1673 |
-
}
|
1674 |
-
},
|
1675 |
-
"grunt-pot": {
|
1676 |
-
"version": "0.3.0",
|
1677 |
-
"resolved": "https://registry.npmjs.org/grunt-pot/-/grunt-pot-0.3.0.tgz",
|
1678 |
-
"integrity": "sha1-vHgF1dxsXjiZjMlUupdsYZu3Xh8=",
|
1679 |
-
"dev": true
|
1680 |
-
},
|
1681 |
-
"grunt-shell": {
|
1682 |
-
"version": "2.1.0",
|
1683 |
-
"resolved": "https://registry.npmjs.org/grunt-shell/-/grunt-shell-2.1.0.tgz",
|
1684 |
-
"integrity": "sha1-Q595FZ7RHmSmUaacyKPQK+v17MI=",
|
1685 |
-
"dev": true,
|
1686 |
-
"requires": {
|
1687 |
-
"chalk": "^1.0.0",
|
1688 |
-
"npm-run-path": "^2.0.0"
|
1689 |
-
},
|
1690 |
-
"dependencies": {
|
1691 |
-
"ansi-regex": {
|
1692 |
-
"version": "2.1.1",
|
1693 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
1694 |
-
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
1695 |
-
"dev": true
|
1696 |
-
},
|
1697 |
-
"ansi-styles": {
|
1698 |
-
"version": "2.2.1",
|
1699 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
1700 |
-
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
1701 |
-
"dev": true
|
1702 |
-
},
|
1703 |
-
"chalk": {
|
1704 |
-
"version": "1.1.3",
|
1705 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
1706 |
-
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
1707 |
-
"dev": true,
|
1708 |
-
"requires": {
|
1709 |
-
"ansi-styles": "^2.2.1",
|
1710 |
-
"escape-string-regexp": "^1.0.2",
|
1711 |
-
"has-ansi": "^2.0.0",
|
1712 |
-
"strip-ansi": "^3.0.0",
|
1713 |
-
"supports-color": "^2.0.0"
|
1714 |
-
}
|
1715 |
-
},
|
1716 |
-
"has-ansi": {
|
1717 |
-
"version": "2.0.0",
|
1718 |
-
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
1719 |
-
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
1720 |
-
"dev": true,
|
1721 |
-
"requires": {
|
1722 |
-
"ansi-regex": "^2.0.0"
|
1723 |
-
}
|
1724 |
-
},
|
1725 |
-
"strip-ansi": {
|
1726 |
-
"version": "3.0.1",
|
1727 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
1728 |
-
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
1729 |
-
"dev": true,
|
1730 |
-
"requires": {
|
1731 |
-
"ansi-regex": "^2.0.0"
|
1732 |
-
}
|
1733 |
-
},
|
1734 |
-
"supports-color": {
|
1735 |
-
"version": "2.0.0",
|
1736 |
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
1737 |
-
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
1738 |
-
"dev": true
|
1739 |
-
}
|
1740 |
-
}
|
1741 |
-
},
|
1742 |
-
"grunt-text-replace": {
|
1743 |
-
"version": "0.4.0",
|
1744 |
-
"resolved": "https://registry.npmjs.org/grunt-text-replace/-/grunt-text-replace-0.4.0.tgz",
|
1745 |
-
"integrity": "sha1-252c5Z4v5J2id+nbwZXD4Rz7FsI=",
|
1746 |
-
"dev": true
|
1747 |
-
},
|
1748 |
-
"grunt-wp-deploy": {
|
1749 |
-
"version": "1.3.0",
|
1750 |
-
"resolved": "https://registry.npmjs.org/grunt-wp-deploy/-/grunt-wp-deploy-1.3.0.tgz",
|
1751 |
-
"integrity": "sha1-E9nRezJOKcqTueOkBRYNgT+p4EU=",
|
1752 |
-
"dev": true,
|
1753 |
-
"requires": {
|
1754 |
-
"inquirer": "~0.2.1"
|
1755 |
-
}
|
1756 |
-
},
|
1757 |
-
"grunt-wp-i18n": {
|
1758 |
-
"version": "1.0.2",
|
1759 |
-
"resolved": "https://registry.npmjs.org/grunt-wp-i18n/-/grunt-wp-i18n-1.0.2.tgz",
|
1760 |
-
"integrity": "sha512-s7DdR1wRYWvgeQOELL/s8AmWz0scVUq+h0yYVWvLx23kTXOBslvaD35NTvubyM+MO+k29bgND0gDDvS6sHixfg==",
|
1761 |
-
"dev": true,
|
1762 |
-
"requires": {
|
1763 |
-
"grunt": "^1.0.2",
|
1764 |
-
"node-wp-i18n": "^1.0.5"
|
1765 |
-
}
|
1766 |
-
},
|
1767 |
-
"gzip-size": {
|
1768 |
-
"version": "3.0.0",
|
1769 |
-
"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz",
|
1770 |
-
"integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=",
|
1771 |
-
"dev": true,
|
1772 |
-
"requires": {
|
1773 |
-
"duplexer": "^0.1.1"
|
1774 |
-
}
|
1775 |
-
},
|
1776 |
-
"har-schema": {
|
1777 |
-
"version": "2.0.0",
|
1778 |
-
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
|
1779 |
-
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
|
1780 |
-
"dev": true,
|
1781 |
-
"optional": true
|
1782 |
-
},
|
1783 |
-
"har-validator": {
|
1784 |
-
"version": "5.1.0",
|
1785 |
-
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz",
|
1786 |
-
"integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==",
|
1787 |
-
"dev": true,
|
1788 |
-
"optional": true,
|
1789 |
-
"requires": {
|
1790 |
-
"ajv": "^5.3.0",
|
1791 |
-
"har-schema": "^2.0.0"
|
1792 |
-
}
|
1793 |
-
},
|
1794 |
-
"has-ansi": {
|
1795 |
-
"version": "1.0.3",
|
1796 |
-
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-1.0.3.tgz",
|
1797 |
-
"integrity": "sha1-wLWxYV2eOCsP9nFp2We0JeSMpTg=",
|
1798 |
-
"dev": true,
|
1799 |
-
"requires": {
|
1800 |
-
"ansi-regex": "^1.1.0",
|
1801 |
-
"get-stdin": "^4.0.1"
|
1802 |
-
}
|
1803 |
-
},
|
1804 |
-
"has-color": {
|
1805 |
-
"version": "0.1.7",
|
1806 |
-
"resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz",
|
1807 |
-
"integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=",
|
1808 |
-
"dev": true
|
1809 |
-
},
|
1810 |
-
"has-flag": {
|
1811 |
-
"version": "3.0.0",
|
1812 |
-
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
1813 |
-
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
1814 |
-
"dev": true
|
1815 |
-
},
|
1816 |
-
"has-unicode": {
|
1817 |
-
"version": "2.0.1",
|
1818 |
-
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
1819 |
-
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
|
1820 |
-
"dev": true
|
1821 |
-
},
|
1822 |
-
"hasha": {
|
1823 |
-
"version": "2.2.0",
|
1824 |
-
"resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz",
|
1825 |
-
"integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=",
|
1826 |
-
"dev": true,
|
1827 |
-
"optional": true,
|
1828 |
-
"requires": {
|
1829 |
-
"is-stream": "^1.0.1",
|
1830 |
-
"pinkie-promise": "^2.0.0"
|
1831 |
-
}
|
1832 |
-
},
|
1833 |
-
"hooker": {
|
1834 |
-
"version": "0.2.3",
|
1835 |
-
"resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz",
|
1836 |
-
"integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=",
|
1837 |
-
"dev": true
|
1838 |
-
},
|
1839 |
-
"hosted-git-info": {
|
1840 |
-
"version": "2.7.1",
|
1841 |
-
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
|
1842 |
-
"integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
|
1843 |
-
"dev": true
|
1844 |
-
},
|
1845 |
-
"htmlparser2": {
|
1846 |
-
"version": "3.8.3",
|
1847 |
-
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
|
1848 |
-
"integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
|
1849 |
-
"dev": true,
|
1850 |
-
"requires": {
|
1851 |
-
"domelementtype": "1",
|
1852 |
-
"domhandler": "2.3",
|
1853 |
-
"domutils": "1.5",
|
1854 |
-
"entities": "1.0",
|
1855 |
-
"readable-stream": "1.1"
|
1856 |
-
},
|
1857 |
-
"dependencies": {
|
1858 |
-
"isarray": {
|
1859 |
-
"version": "0.0.1",
|
1860 |
-
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
1861 |
-
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
|
1862 |
-
"dev": true
|
1863 |
-
},
|
1864 |
-
"readable-stream": {
|
1865 |
-
"version": "1.1.14",
|
1866 |
-
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
1867 |
-
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
1868 |
-
"dev": true,
|
1869 |
-
"requires": {
|
1870 |
-
"core-util-is": "~1.0.0",
|
1871 |
-
"inherits": "~2.0.1",
|
1872 |
-
"isarray": "0.0.1",
|
1873 |
-
"string_decoder": "~0.10.x"
|
1874 |
-
}
|
1875 |
-
},
|
1876 |
-
"string_decoder": {
|
1877 |
-
"version": "0.10.31",
|
1878 |
-
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
1879 |
-
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
|
1880 |
-
"dev": true
|
1881 |
-
}
|
1882 |
-
}
|
1883 |
-
},
|
1884 |
-
"http-signature": {
|
1885 |
-
"version": "1.2.0",
|
1886 |
-
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
|
1887 |
-
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
|
1888 |
-
"dev": true,
|
1889 |
-
"optional": true,
|
1890 |
-
"requires": {
|
1891 |
-
"assert-plus": "^1.0.0",
|
1892 |
-
"jsprim": "^1.2.2",
|
1893 |
-
"sshpk": "^1.7.0"
|
1894 |
-
}
|
1895 |
-
},
|
1896 |
-
"iconv-lite": {
|
1897 |
-
"version": "0.4.24",
|
1898 |
-
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
1899 |
-
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
1900 |
-
"dev": true,
|
1901 |
-
"requires": {
|
1902 |
-
"safer-buffer": ">= 2.1.2 < 3"
|
1903 |
-
}
|
1904 |
-
},
|
1905 |
-
"ieee754": {
|
1906 |
-
"version": "1.1.12",
|
1907 |
-
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
|
1908 |
-
"integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==",
|
1909 |
-
"dev": true
|
1910 |
-
},
|
1911 |
-
"iltorb": {
|
1912 |
-
"version": "1.3.10",
|
1913 |
-
"resolved": "https://registry.npmjs.org/iltorb/-/iltorb-1.3.10.tgz",
|
1914 |
-
"integrity": "sha512-nyB4+ru1u8CQqQ6w7YjasboKN3NQTN8GH/V/eEssNRKhW6UbdxdWhB9fJ5EEdjJfezKY0qPrcwLyIcgjL8hHxA==",
|
1915 |
-
"dev": true,
|
1916 |
-
"optional": true,
|
1917 |
-
"requires": {
|
1918 |
-
"detect-libc": "^0.2.0",
|
1919 |
-
"nan": "^2.6.2",
|
1920 |
-
"node-gyp": "^3.6.2",
|
1921 |
-
"prebuild-install": "^2.3.0"
|
1922 |
-
}
|
1923 |
-
},
|
1924 |
-
"indent-string": {
|
1925 |
-
"version": "2.1.0",
|
1926 |
-
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
|
1927 |
-
"integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
|
1928 |
-
"dev": true,
|
1929 |
-
"requires": {
|
1930 |
-
"repeating": "^2.0.0"
|
1931 |
-
}
|
1932 |
-
},
|
1933 |
-
"inflight": {
|
1934 |
-
"version": "1.0.6",
|
1935 |
-
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
1936 |
-
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
1937 |
-
"dev": true,
|
1938 |
-
"requires": {
|
1939 |
-
"once": "^1.3.0",
|
1940 |
-
"wrappy": "1"
|
1941 |
-
}
|
1942 |
-
},
|
1943 |
-
"inherit": {
|
1944 |
-
"version": "2.2.7",
|
1945 |
-
"resolved": "https://registry.npmjs.org/inherit/-/inherit-2.2.7.tgz",
|
1946 |
-
"integrity": "sha512-dxJmC1j0Q32NFAjvbd6g3lXYLZ49HgzotgbSMwMkoiTXGhC9412Oc24g7A7M9cPPkw/vDsF2cSII+2zJwocUtQ==",
|
1947 |
-
"dev": true
|
1948 |
-
},
|
1949 |
-
"inherits": {
|
1950 |
-
"version": "2.0.3",
|
1951 |
-
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
1952 |
-
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
1953 |
-
"dev": true
|
1954 |
-
},
|
1955 |
-
"ini": {
|
1956 |
-
"version": "1.3.5",
|
1957 |
-
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
1958 |
-
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
|
1959 |
-
"dev": true,
|
1960 |
-
"optional": true
|
1961 |
-
},
|
1962 |
-
"inquirer": {
|
1963 |
-
"version": "0.2.5",
|
1964 |
-
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.2.5.tgz",
|
1965 |
-
"integrity": "sha1-a0mpy+A953YSIhHxdO+f4oIsCPY=",
|
1966 |
-
"dev": true,
|
1967 |
-
"requires": {
|
1968 |
-
"async": "~0.2.8",
|
1969 |
-
"cli-color": "~0.2.2",
|
1970 |
-
"lodash": "~1.2.1",
|
1971 |
-
"mute-stream": "0.0.3"
|
1972 |
-
},
|
1973 |
-
"dependencies": {
|
1974 |
-
"async": {
|
1975 |
-
"version": "0.2.10",
|
1976 |
-
"resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
|
1977 |
-
"integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=",
|
1978 |
-
"dev": true
|
1979 |
-
},
|
1980 |
-
"lodash": {
|
1981 |
-
"version": "1.2.1",
|
1982 |
-
"resolved": "http://registry.npmjs.org/lodash/-/lodash-1.2.1.tgz",
|
1983 |
-
"integrity": "sha1-7UexbkbwaytAMJto6RY8F+k+owQ=",
|
1984 |
-
"dev": true
|
1985 |
-
}
|
1986 |
-
}
|
1987 |
-
},
|
1988 |
-
"is-arrayish": {
|
1989 |
-
"version": "0.2.1",
|
1990 |
-
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
1991 |
-
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
|
1992 |
-
"dev": true
|
1993 |
-
},
|
1994 |
-
"is-builtin-module": {
|
1995 |
-
"version": "1.0.0",
|
1996 |
-
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
|
1997 |
-
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
|
1998 |
-
"dev": true,
|
1999 |
-
"requires": {
|
2000 |
-
"builtin-modules": "^1.0.0"
|
2001 |
-
}
|
2002 |
-
},
|
2003 |
-
"is-finite": {
|
2004 |
-
"version": "1.0.2",
|
2005 |
-
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
|
2006 |
-
"integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
|
2007 |
-
"dev": true,
|
2008 |
-
"requires": {
|
2009 |
-
"number-is-nan": "^1.0.0"
|
2010 |
-
}
|
2011 |
-
},
|
2012 |
-
"is-fullwidth-code-point": {
|
2013 |
-
"version": "1.0.0",
|
2014 |
-
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
2015 |
-
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
2016 |
-
"dev": true,
|
2017 |
-
"requires": {
|
2018 |
-
"number-is-nan": "^1.0.0"
|
2019 |
-
}
|
2020 |
-
},
|
2021 |
-
"is-stream": {
|
2022 |
-
"version": "1.1.0",
|
2023 |
-
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
2024 |
-
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
|
2025 |
-
"dev": true,
|
2026 |
-
"optional": true
|
2027 |
-
},
|
2028 |
-
"is-typedarray": {
|
2029 |
-
"version": "1.0.0",
|
2030 |
-
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
|
2031 |
-
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
|
2032 |
-
"dev": true,
|
2033 |
-
"optional": true
|
2034 |
-
},
|
2035 |
-
"is-utf8": {
|
2036 |
-
"version": "0.2.1",
|
2037 |
-
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
|
2038 |
-
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
|
2039 |
-
"dev": true
|
2040 |
-
},
|
2041 |
-
"isarray": {
|
2042 |
-
"version": "1.0.0",
|
2043 |
-
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
2044 |
-
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
2045 |
-
"dev": true
|
2046 |
-
},
|
2047 |
-
"isexe": {
|
2048 |
-
"version": "2.0.0",
|
2049 |
-
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
2050 |
-
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
|
2051 |
-
"dev": true
|
2052 |
-
},
|
2053 |
-
"isstream": {
|
2054 |
-
"version": "0.1.2",
|
2055 |
-
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
2056 |
-
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
|
2057 |
-
"dev": true
|
2058 |
-
},
|
2059 |
-
"jit-grunt": {
|
2060 |
-
"version": "0.10.0",
|
2061 |
-
"resolved": "https://registry.npmjs.org/jit-grunt/-/jit-grunt-0.10.0.tgz",
|
2062 |
-
"integrity": "sha1-AIw6f+Hpa9DYTiYOofoXg0V/ecI=",
|
2063 |
-
"dev": true
|
2064 |
-
},
|
2065 |
-
"js-base64": {
|
2066 |
-
"version": "2.1.9",
|
2067 |
-
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.1.9.tgz",
|
2068 |
-
"integrity": "sha1-8OgK4DmkvWVLXygfyT8EqRSn/M4=",
|
2069 |
-
"dev": true
|
2070 |
-
},
|
2071 |
-
"js-yaml": {
|
2072 |
-
"version": "3.5.5",
|
2073 |
-
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz",
|
2074 |
-
"integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=",
|
2075 |
-
"dev": true,
|
2076 |
-
"requires": {
|
2077 |
-
"argparse": "^1.0.2",
|
2078 |
-
"esprima": "^2.6.0"
|
2079 |
-
}
|
2080 |
-
},
|
2081 |
-
"jsbn": {
|
2082 |
-
"version": "0.1.1",
|
2083 |
-
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
|
2084 |
-
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
|
2085 |
-
"dev": true,
|
2086 |
-
"optional": true
|
2087 |
-
},
|
2088 |
-
"jshint": {
|
2089 |
-
"version": "2.9.6",
|
2090 |
-
"resolved": "https://registry.npmjs.org/jshint/-/jshint-2.9.6.tgz",
|
2091 |
-
"integrity": "sha512-KO9SIAKTlJQOM4lE64GQUtGBRpTOuvbrRrSZw3AhUxMNG266nX9hK2cKA4SBhXOj0irJGyNyGSLT62HGOVDEOA==",
|
2092 |
-
"dev": true,
|
2093 |
-
"requires": {
|
2094 |
-
"cli": "~1.0.0",
|
2095 |
-
"console-browserify": "1.1.x",
|
2096 |
-
"exit": "0.1.x",
|
2097 |
-
"htmlparser2": "3.8.x",
|
2098 |
-
"lodash": "~4.17.10",
|
2099 |
-
"minimatch": "~3.0.2",
|
2100 |
-
"phantom": "~4.0.1",
|
2101 |
-
"phantomjs-prebuilt": "~2.1.7",
|
2102 |
-
"shelljs": "0.3.x",
|
2103 |
-
"strip-json-comments": "1.0.x",
|
2104 |
-
"unicode-5.2.0": "^0.7.5"
|
2105 |
-
},
|
2106 |
-
"dependencies": {
|
2107 |
-
"strip-json-comments": {
|
2108 |
-
"version": "1.0.4",
|
2109 |
-
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
|
2110 |
-
"integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
|
2111 |
-
"dev": true
|
2112 |
-
}
|
2113 |
-
}
|
2114 |
-
},
|
2115 |
-
"json-schema": {
|
2116 |
-
"version": "0.2.3",
|
2117 |
-
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
|
2118 |
-
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
|
2119 |
-
"dev": true,
|
2120 |
-
"optional": true
|
2121 |
-
},
|
2122 |
-
"json-schema-traverse": {
|
2123 |
-
"version": "0.3.1",
|
2124 |
-
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
|
2125 |
-
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
|
2126 |
-
"dev": true,
|
2127 |
-
"optional": true
|
2128 |
-
},
|
2129 |
-
"json-stringify-safe": {
|
2130 |
-
"version": "5.0.1",
|
2131 |
-
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
2132 |
-
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
|
2133 |
-
"dev": true,
|
2134 |
-
"optional": true
|
2135 |
-
},
|
2136 |
-
"jsonfile": {
|
2137 |
-
"version": "2.4.0",
|
2138 |
-
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
2139 |
-
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
2140 |
-
"dev": true,
|
2141 |
-
"optional": true,
|
2142 |
-
"requires": {
|
2143 |
-
"graceful-fs": "^4.1.6"
|
2144 |
-
}
|
2145 |
-
},
|
2146 |
-
"jsprim": {
|
2147 |
-
"version": "1.4.1",
|
2148 |
-
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
2149 |
-
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
|
2150 |
-
"dev": true,
|
2151 |
-
"optional": true,
|
2152 |
-
"requires": {
|
2153 |
-
"assert-plus": "1.0.0",
|
2154 |
-
"extsprintf": "1.3.0",
|
2155 |
-
"json-schema": "0.2.3",
|
2156 |
-
"verror": "1.10.0"
|
2157 |
-
}
|
2158 |
-
},
|
2159 |
-
"kew": {
|
2160 |
-
"version": "0.7.0",
|
2161 |
-
"resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz",
|
2162 |
-
"integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=",
|
2163 |
-
"dev": true,
|
2164 |
-
"optional": true
|
2165 |
-
},
|
2166 |
-
"klaw": {
|
2167 |
-
"version": "1.3.1",
|
2168 |
-
"resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
|
2169 |
-
"integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
|
2170 |
-
"dev": true,
|
2171 |
-
"optional": true,
|
2172 |
-
"requires": {
|
2173 |
-
"graceful-fs": "^4.1.9"
|
2174 |
-
}
|
2175 |
-
},
|
2176 |
-
"lazystream": {
|
2177 |
-
"version": "1.0.0",
|
2178 |
-
"resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
|
2179 |
-
"integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=",
|
2180 |
-
"dev": true,
|
2181 |
-
"requires": {
|
2182 |
-
"readable-stream": "^2.0.5"
|
2183 |
-
}
|
2184 |
-
},
|
2185 |
-
"load-grunt-config": {
|
2186 |
-
"version": "0.19.2",
|
2187 |
-
"resolved": "https://registry.npmjs.org/load-grunt-config/-/load-grunt-config-0.19.2.tgz",
|
2188 |
-
"integrity": "sha1-UgkNSiDG5j90p2SPJJsZ57f87CQ=",
|
2189 |
-
"dev": true,
|
2190 |
-
"requires": {
|
2191 |
-
"cson": "~3.0.2",
|
2192 |
-
"glob": "~5.0.15",
|
2193 |
-
"jit-grunt": "~0.10.0",
|
2194 |
-
"js-yaml": "~3.4.3",
|
2195 |
-
"load-grunt-tasks": "~3.3.0",
|
2196 |
-
"lodash": "~3.10.1"
|
2197 |
-
},
|
2198 |
-
"dependencies": {
|
2199 |
-
"glob": {
|
2200 |
-
"version": "5.0.15",
|
2201 |
-
"resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
|
2202 |
-
"integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
|
2203 |
-
"dev": true,
|
2204 |
-
"requires": {
|
2205 |
-
"inflight": "^1.0.4",
|
2206 |
-
"inherits": "2",
|
2207 |
-
"minimatch": "2 || 3",
|
2208 |
-
"once": "^1.3.0",
|
2209 |
-
"path-is-absolute": "^1.0.0"
|
2210 |
-
}
|
2211 |
-
},
|
2212 |
-
"js-yaml": {
|
2213 |
-
"version": "3.4.6",
|
2214 |
-
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.4.6.tgz",
|
2215 |
-
"integrity": "sha1-a+GyP2JJ9T0pM3D9TRqqY84bTrA=",
|
2216 |
-
"dev": true,
|
2217 |
-
"requires": {
|
2218 |
-
"argparse": "^1.0.2",
|
2219 |
-
"esprima": "^2.6.0",
|
2220 |
-
"inherit": "^2.2.2"
|
2221 |
-
}
|
2222 |
-
},
|
2223 |
-
"load-grunt-tasks": {
|
2224 |
-
"version": "3.3.0",
|
2225 |
-
"resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-3.3.0.tgz",
|
2226 |
-
"integrity": "sha1-vliSkJRY2T3fdp60vGhRAggMYyE=",
|
2227 |
-
"dev": true,
|
2228 |
-
"requires": {
|
2229 |
-
"arrify": "^1.0.0",
|
2230 |
-
"multimatch": "^2.0.0",
|
2231 |
-
"pkg-up": "^1.0.0"
|
2232 |
-
}
|
2233 |
-
},
|
2234 |
-
"lodash": {
|
2235 |
-
"version": "3.10.1",
|
2236 |
-
"resolved": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
|
2237 |
-
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
|
2238 |
-
"dev": true
|
2239 |
-
}
|
2240 |
-
}
|
2241 |
-
},
|
2242 |
-
"load-grunt-tasks": {
|
2243 |
-
"version": "4.0.0",
|
2244 |
-
"resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-4.0.0.tgz",
|
2245 |
-
"integrity": "sha512-w5JYPHpZgMxu9XFR9N9MEzyX8E0mLhQkwQ1qVP4mb3gmuomw8Ww8J49NHMbXqyQliq2LUCqdU7/wW96IVuPCKw==",
|
2246 |
-
"dev": true,
|
2247 |
-
"requires": {
|
2248 |
-
"arrify": "^1.0.0",
|
2249 |
-
"multimatch": "^2.0.0",
|
2250 |
-
"pkg-up": "^2.0.0",
|
2251 |
-
"resolve-pkg": "^1.0.0"
|
2252 |
-
},
|
2253 |
-
"dependencies": {
|
2254 |
-
"find-up": {
|
2255 |
-
"version": "2.1.0",
|
2256 |
-
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
|
2257 |
-
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
|
2258 |
-
"dev": true,
|
2259 |
-
"requires": {
|
2260 |
-
"locate-path": "^2.0.0"
|
2261 |
-
}
|
2262 |
-
},
|
2263 |
-
"pkg-up": {
|
2264 |
-
"version": "2.0.0",
|
2265 |
-
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",
|
2266 |
-
"integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=",
|
2267 |
-
"dev": true,
|
2268 |
-
"requires": {
|
2269 |
-
"find-up": "^2.1.0"
|
2270 |
-
}
|
2271 |
-
}
|
2272 |
-
}
|
2273 |
-
},
|
2274 |
-
"load-json-file": {
|
2275 |
-
"version": "1.1.0",
|
2276 |
-
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
2277 |
-
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
2278 |
-
"dev": true,
|
2279 |
-
"requires": {
|
2280 |
-
"graceful-fs": "^4.1.2",
|
2281 |
-
"parse-json": "^2.2.0",
|
2282 |
-
"pify": "^2.0.0",
|
2283 |
-
"pinkie-promise": "^2.0.0",
|
2284 |
-
"strip-bom": "^2.0.0"
|
2285 |
-
}
|
2286 |
-
},
|
2287 |
-
"locate-path": {
|
2288 |
-
"version": "2.0.0",
|
2289 |
-
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
|
2290 |
-
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
|
2291 |
-
"dev": true,
|
2292 |
-
"requires": {
|
2293 |
-
"p-locate": "^2.0.0",
|
2294 |
-
"path-exists": "^3.0.0"
|
2295 |
-
},
|
2296 |
-
"dependencies": {
|
2297 |
-
"path-exists": {
|
2298 |
-
"version": "3.0.0",
|
2299 |
-
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
2300 |
-
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
|
2301 |
-
"dev": true
|
2302 |
-
}
|
2303 |
-
}
|
2304 |
-
},
|
2305 |
-
"lodash": {
|
2306 |
-
"version": "4.17.10",
|
2307 |
-
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
|
2308 |
-
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
|
2309 |
-
"dev": true
|
2310 |
-
},
|
2311 |
-
"loud-rejection": {
|
2312 |
-
"version": "1.6.0",
|
2313 |
-
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
|
2314 |
-
"integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
|
2315 |
-
"dev": true,
|
2316 |
-
"requires": {
|
2317 |
-
"currently-unhandled": "^0.4.1",
|
2318 |
-
"signal-exit": "^3.0.0"
|
2319 |
-
}
|
2320 |
-
},
|
2321 |
-
"map-obj": {
|
2322 |
-
"version": "1.0.1",
|
2323 |
-
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
|
2324 |
-
"integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
|
2325 |
-
"dev": true
|
2326 |
-
},
|
2327 |
-
"maxmin": {
|
2328 |
-
"version": "2.1.0",
|
2329 |
-
"resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz",
|
2330 |
-
"integrity": "sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY=",
|
2331 |
-
"dev": true,
|
2332 |
-
"requires": {
|
2333 |
-
"chalk": "^1.0.0",
|
2334 |
-
"figures": "^1.0.1",
|
2335 |
-
"gzip-size": "^3.0.0",
|
2336 |
-
"pretty-bytes": "^3.0.0"
|
2337 |
-
},
|
2338 |
-
"dependencies": {
|
2339 |
-
"ansi-regex": {
|
2340 |
-
"version": "2.1.1",
|
2341 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
2342 |
-
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
2343 |
-
"dev": true
|
2344 |
-
},
|
2345 |
-
"ansi-styles": {
|
2346 |
-
"version": "2.2.1",
|
2347 |
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
2348 |
-
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
2349 |
-
"dev": true
|
2350 |
-
},
|
2351 |
-
"chalk": {
|
2352 |
-
"version": "1.1.3",
|
2353 |
-
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
2354 |
-
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
2355 |
-
"dev": true,
|
2356 |
-
"requires": {
|
2357 |
-
"ansi-styles": "^2.2.1",
|
2358 |
-
"escape-string-regexp": "^1.0.2",
|
2359 |
-
"has-ansi": "^2.0.0",
|
2360 |
-
"strip-ansi": "^3.0.0",
|
2361 |
-
"supports-color": "^2.0.0"
|
2362 |
-
}
|
2363 |
-
},
|
2364 |
-
"has-ansi": {
|
2365 |
-
"version": "2.0.0",
|
2366 |
-
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
2367 |
-
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
2368 |
-
"dev": true,
|
2369 |
-
"requires": {
|
2370 |
-
"ansi-regex": "^2.0.0"
|
2371 |
-
}
|
2372 |
-
},
|
2373 |
-
"pretty-bytes": {
|
2374 |
-
"version": "3.0.1",
|
2375 |
-
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz",
|
2376 |
-
"integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=",
|
2377 |
-
"dev": true,
|
2378 |
-
"requires": {
|
2379 |
-
"number-is-nan": "^1.0.0"
|
2380 |
-
}
|
2381 |
-
},
|
2382 |
-
"strip-ansi": {
|
2383 |
-
"version": "3.0.1",
|
2384 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
2385 |
-
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
2386 |
-
"dev": true,
|
2387 |
-
"requires": {
|
2388 |
-
"ansi-regex": "^2.0.0"
|
2389 |
-
}
|
2390 |
-
},
|
2391 |
-
"supports-color": {
|
2392 |
-
"version": "2.0.0",
|
2393 |
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
2394 |
-
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
2395 |
-
"dev": true
|
2396 |
-
}
|
2397 |
-
}
|
2398 |
-
},
|
2399 |
-
"memoizee": {
|
2400 |
-
"version": "0.2.6",
|
2401 |
-
"resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.2.6.tgz",
|
2402 |
-
"integrity": "sha1-u0WnrQJTAILxYSZx2rNSGc0uB0E=",
|
2403 |
-
"dev": true,
|
2404 |
-
"requires": {
|
2405 |
-
"es5-ext": "~0.9.2",
|
2406 |
-
"event-emitter": "~0.2.2",
|
2407 |
-
"next-tick": "0.1.x"
|
2408 |
-
}
|
2409 |
-
},
|
2410 |
-
"meow": {
|
2411 |
-
"version": "3.7.0",
|
2412 |
-
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
2413 |
-
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
|
2414 |
-
"dev": true,
|
2415 |
-
"requires": {
|
2416 |
-
"camelcase-keys": "^2.0.0",
|
2417 |
-
"decamelize": "^1.1.2",
|
2418 |
-
"loud-rejection": "^1.0.0",
|
2419 |
-
"map-obj": "^1.0.1",
|
2420 |
-
"minimist": "^1.1.3",
|
2421 |
-
"normalize-package-data": "^2.3.4",
|
2422 |
-
"object-assign": "^4.0.1",
|
2423 |
-
"read-pkg-up": "^1.0.1",
|
2424 |
-
"redent": "^1.0.0",
|
2425 |
-
"trim-newlines": "^1.0.0"
|
2426 |
-
}
|
2427 |
-
},
|
2428 |
-
"mime-db": {
|
2429 |
-
"version": "1.36.0",
|
2430 |
-
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz",
|
2431 |
-
"integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==",
|
2432 |
-
"dev": true
|
2433 |
-
},
|
2434 |
-
"mime-types": {
|
2435 |
-
"version": "2.1.20",
|
2436 |
-
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz",
|
2437 |
-
"integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==",
|
2438 |
-
"dev": true,
|
2439 |
-
"requires": {
|
2440 |
-
"mime-db": "~1.36.0"
|
2441 |
-
}
|
2442 |
-
},
|
2443 |
-
"mimic-response": {
|
2444 |
-
"version": "1.0.1",
|
2445 |
-
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
|
2446 |
-
"integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
|
2447 |
-
"dev": true,
|
2448 |
-
"optional": true
|
2449 |
-
},
|
2450 |
-
"minimatch": {
|
2451 |
-
"version": "3.0.4",
|
2452 |
-
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
2453 |
-
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
2454 |
-
"dev": true,
|
2455 |
-
"requires": {
|
2456 |
-
"brace-expansion": "^1.1.7"
|
2457 |
-
}
|
2458 |
-
},
|
2459 |
-
"minimist": {
|
2460 |
-
"version": "1.2.0",
|
2461 |
-
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
2462 |
-
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
2463 |
-
"dev": true
|
2464 |
-
},
|
2465 |
-
"mkdirp": {
|
2466 |
-
"version": "0.5.1",
|
2467 |
-
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
2468 |
-
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
2469 |
-
"dev": true,
|
2470 |
-
"requires": {
|
2471 |
-
"minimist": "0.0.8"
|
2472 |
-
},
|
2473 |
-
"dependencies": {
|
2474 |
-
"minimist": {
|
2475 |
-
"version": "0.0.8",
|
2476 |
-
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
2477 |
-
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
2478 |
-
"dev": true
|
2479 |
-
}
|
2480 |
-
}
|
2481 |
-
},
|
2482 |
-
"moment": {
|
2483 |
-
"version": "2.22.2",
|
2484 |
-
"resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz",
|
2485 |
-
"integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=",
|
2486 |
-
"dev": true
|
2487 |
-
},
|
2488 |
-
"ms": {
|
2489 |
-
"version": "2.0.0",
|
2490 |
-
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
2491 |
-
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
2492 |
-
"dev": true,
|
2493 |
-
"optional": true
|
2494 |
-
},
|
2495 |
-
"multimatch": {
|
2496 |
-
"version": "2.1.0",
|
2497 |
-
"resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz",
|
2498 |
-
"integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=",
|
2499 |
-
"dev": true,
|
2500 |
-
"requires": {
|
2501 |
-
"array-differ": "^1.0.0",
|
2502 |
-
"array-union": "^1.0.1",
|
2503 |
-
"arrify": "^1.0.0",
|
2504 |
-
"minimatch": "^3.0.0"
|
2505 |
-
}
|
2506 |
-
},
|
2507 |
-
"mute-stream": {
|
2508 |
-
"version": "0.0.3",
|
2509 |
-
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.3.tgz",
|
2510 |
-
"integrity": "sha1-8JwJDTM7MGP2Fcu8ynGzSYk/AVI=",
|
2511 |
-
"dev": true
|
2512 |
-
},
|
2513 |
-
"nan": {
|
2514 |
-
"version": "2.11.0",
|
2515 |
-
"resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz",
|
2516 |
-
"integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==",
|
2517 |
-
"dev": true,
|
2518 |
-
"optional": true
|
2519 |
-
},
|
2520 |
-
"next-tick": {
|
2521 |
-
"version": "0.1.0",
|
2522 |
-
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-0.1.0.tgz",
|
2523 |
-
"integrity": "sha1-GRLM6OubaX1kD7upT48A3sO5Qlk=",
|
2524 |
-
"dev": true
|
2525 |
-
},
|
2526 |
-
"node-abi": {
|
2527 |
-
"version": "2.4.3",
|
2528 |
-
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.4.3.tgz",
|
2529 |
-
"integrity": "sha512-b656V5C0628gOOA2kwcpNA/bxdlqYF9FvxJ+qqVX0ctdXNVZpS8J6xEUYir3WAKc7U0BH/NRlSpNbGsy+azjeg==",
|
2530 |
-
"dev": true,
|
2531 |
-
"optional": true,
|
2532 |
-
"requires": {
|
2533 |
-
"semver": "^5.4.1"
|
2534 |
-
}
|
2535 |
-
},
|
2536 |
-
"node-gyp": {
|
2537 |
-
"version": "3.8.0",
|
2538 |
-
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz",
|
2539 |
-
"integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
|
2540 |
-
"dev": true,
|
2541 |
-
"optional": true,
|
2542 |
-
"requires": {
|
2543 |
-
"fstream": "^1.0.0",
|
2544 |
-
"glob": "^7.0.3",
|
2545 |
-
"graceful-fs": "^4.1.2",
|
2546 |
-
"mkdirp": "^0.5.0",
|
2547 |
-
"nopt": "2 || 3",
|
2548 |
-
"npmlog": "0 || 1 || 2 || 3 || 4",
|
2549 |
-
"osenv": "0",
|
2550 |
-
"request": "^2.87.0",
|
2551 |
-
"rimraf": "2",
|
2552 |
-
"semver": "~5.3.0",
|
2553 |
-
"tar": "^2.0.0",
|
2554 |
-
"which": "1"
|
2555 |
-
},
|
2556 |
-
"dependencies": {
|
2557 |
-
"semver": {
|
2558 |
-
"version": "5.3.0",
|
2559 |
-
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
2560 |
-
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
|
2561 |
-
"dev": true,
|
2562 |
-
"optional": true
|
2563 |
-
}
|
2564 |
-
}
|
2565 |
-
},
|
2566 |
-
"node-wp-i18n": {
|
2567 |
-
"version": "1.2.1",
|
2568 |
-
"resolved": "https://registry.npmjs.org/node-wp-i18n/-/node-wp-i18n-1.2.1.tgz",
|
2569 |
-
"integrity": "sha512-Wvl98XA/GBnQFe20iAMwlsXvikVOFTVz//cbRsF8OPQf0NIkJdeWToNYww/dZl52lHtS1KUEIVRyWcol5ibHog==",
|
2570 |
-
"dev": true,
|
2571 |
-
"requires": {
|
2572 |
-
"bluebird": "^3.4.1",
|
2573 |
-
"gettext-parser": "^2.0.0",
|
2574 |
-
"glob": "^7.0.5",
|
2575 |
-
"lodash": "^4.14.2",
|
2576 |
-
"minimist": "^1.2.0",
|
2577 |
-
"mkdirp": "^0.5.1",
|
2578 |
-
"tmp": "^0.0.33"
|
2579 |
-
}
|
2580 |
-
},
|
2581 |
-
"noop-logger": {
|
2582 |
-
"version": "0.1.1",
|
2583 |
-
"resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz",
|
2584 |
-
"integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=",
|
2585 |
-
"dev": true,
|
2586 |
-
"optional": true
|
2587 |
-
},
|
2588 |
-
"nopt": {
|
2589 |
-
"version": "3.0.6",
|
2590 |
-
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
|
2591 |
-
"integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
|
2592 |
-
"dev": true,
|
2593 |
-
"requires": {
|
2594 |
-
"abbrev": "1"
|
2595 |
-
}
|
2596 |
-
},
|
2597 |
-
"normalize-package-data": {
|
2598 |
-
"version": "2.4.0",
|
2599 |
-
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
|
2600 |
-
"integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
|
2601 |
-
"dev": true,
|
2602 |
-
"requires": {
|
2603 |
-
"hosted-git-info": "^2.1.4",
|
2604 |
-
"is-builtin-module": "^1.0.0",
|
2605 |
-
"semver": "2 || 3 || 4 || 5",
|
2606 |
-
"validate-npm-package-license": "^3.0.1"
|
2607 |
-
}
|
2608 |
-
},
|
2609 |
-
"normalize-path": {
|
2610 |
-
"version": "2.1.1",
|
2611 |
-
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
|
2612 |
-
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
|
2613 |
-
"dev": true,
|
2614 |
-
"requires": {
|
2615 |
-
"remove-trailing-separator": "^1.0.1"
|
2616 |
-
}
|
2617 |
-
},
|
2618 |
-
"npm-run-path": {
|
2619 |
-
"version": "2.0.2",
|
2620 |
-
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
2621 |
-
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
|
2622 |
-
"dev": true,
|
2623 |
-
"requires": {
|
2624 |
-
"path-key": "^2.0.0"
|
2625 |
-
}
|
2626 |
-
},
|
2627 |
-
"npmlog": {
|
2628 |
-
"version": "4.1.2",
|
2629 |
-
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
2630 |
-
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
2631 |
-
"dev": true,
|
2632 |
-
"requires": {
|
2633 |
-
"are-we-there-yet": "~1.1.2",
|
2634 |
-
"console-control-strings": "~1.1.0",
|
2635 |
-
"gauge": "~2.7.3",
|
2636 |
-
"set-blocking": "~2.0.0"
|
2637 |
-
}
|
2638 |
-
},
|
2639 |
-
"num2fraction": {
|
2640 |
-
"version": "1.2.2",
|
2641 |
-
"resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
|
2642 |
-
"integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=",
|
2643 |
-
"dev": true
|
2644 |
-
},
|
2645 |
-
"number-is-nan": {
|
2646 |
-
"version": "1.0.1",
|
2647 |
-
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
2648 |
-
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
2649 |
-
"dev": true
|
2650 |
-
},
|
2651 |
-
"oauth-sign": {
|
2652 |
-
"version": "0.9.0",
|
2653 |
-
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
|
2654 |
-
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
|
2655 |
-
"dev": true,
|
2656 |
-
"optional": true
|
2657 |
-
},
|
2658 |
-
"object-assign": {
|
2659 |
-
"version": "4.1.1",
|
2660 |
-
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
2661 |
-
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
2662 |
-
"dev": true
|
2663 |
-
},
|
2664 |
-
"once": {
|
2665 |
-
"version": "1.4.0",
|
2666 |
-
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
2667 |
-
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
2668 |
-
"dev": true,
|
2669 |
-
"requires": {
|
2670 |
-
"wrappy": "1"
|
2671 |
-
}
|
2672 |
-
},
|
2673 |
-
"os-homedir": {
|
2674 |
-
"version": "1.0.2",
|
2675 |
-
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
2676 |
-
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
2677 |
-
"dev": true
|
2678 |
-
},
|
2679 |
-
"os-tmpdir": {
|
2680 |
-
"version": "1.0.2",
|
2681 |
-
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
2682 |
-
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
2683 |
-
"dev": true
|
2684 |
-
},
|
2685 |
-
"osenv": {
|
2686 |
-
"version": "0.1.5",
|
2687 |
-
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
|
2688 |
-
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
2689 |
-
"dev": true,
|
2690 |
-
"optional": true,
|
2691 |
-
"requires": {
|
2692 |
-
"os-homedir": "^1.0.0",
|
2693 |
-
"os-tmpdir": "^1.0.0"
|
2694 |
-
}
|
2695 |
-
},
|
2696 |
-
"p-limit": {
|
2697 |
-
"version": "1.3.0",
|
2698 |
-
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
|
2699 |
-
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
|
2700 |
-
"dev": true,
|
2701 |
-
"requires": {
|
2702 |
-
"p-try": "^1.0.0"
|
2703 |
-
}
|
2704 |
-
},
|
2705 |
-
"p-locate": {
|
2706 |
-
"version": "2.0.0",
|
2707 |
-
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
|
2708 |
-
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
|
2709 |
-
"dev": true,
|
2710 |
-
"requires": {
|
2711 |
-
"p-limit": "^1.1.0"
|
2712 |
-
}
|
2713 |
-
},
|
2714 |
-
"p-try": {
|
2715 |
-
"version": "1.0.0",
|
2716 |
-
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
|
2717 |
-
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
|
2718 |
-
"dev": true
|
2719 |
-
},
|
2720 |
-
"parse-json": {
|
2721 |
-
"version": "2.2.0",
|
2722 |
-
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
|
2723 |
-
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
|
2724 |
-
"dev": true,
|
2725 |
-
"requires": {
|
2726 |
-
"error-ex": "^1.2.0"
|
2727 |
-
}
|
2728 |
-
},
|
2729 |
-
"path-exists": {
|
2730 |
-
"version": "2.1.0",
|
2731 |
-
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
|
2732 |
-
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
|
2733 |
-
"dev": true,
|
2734 |
-
"requires": {
|
2735 |
-
"pinkie-promise": "^2.0.0"
|
2736 |
-
}
|
2737 |
-
},
|
2738 |
-
"path-is-absolute": {
|
2739 |
-
"version": "1.0.1",
|
2740 |
-
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
2741 |
-
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
2742 |
-
"dev": true
|
2743 |
-
},
|
2744 |
-
"path-key": {
|
2745 |
-
"version": "2.0.1",
|
2746 |
-
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
2747 |
-
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
|
2748 |
-
"dev": true
|
2749 |
-
},
|
2750 |
-
"path-type": {
|
2751 |
-
"version": "1.1.0",
|
2752 |
-
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
|
2753 |
-
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
|
2754 |
-
"dev": true,
|
2755 |
-
"requires": {
|
2756 |
-
"graceful-fs": "^4.1.2",
|
2757 |
-
"pify": "^2.0.0",
|
2758 |
-
"pinkie-promise": "^2.0.0"
|
2759 |
-
}
|
2760 |
-
},
|
2761 |
-
"pend": {
|
2762 |
-
"version": "1.2.0",
|
2763 |
-
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
2764 |
-
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
|
2765 |
-
"dev": true,
|
2766 |
-
"optional": true
|
2767 |
-
},
|
2768 |
-
"performance-now": {
|
2769 |
-
"version": "2.1.0",
|
2770 |
-
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
2771 |
-
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
|
2772 |
-
"dev": true,
|
2773 |
-
"optional": true
|
2774 |
-
},
|
2775 |
-
"phantom": {
|
2776 |
-
"version": "4.0.12",
|
2777 |
-
"resolved": "https://registry.npmjs.org/phantom/-/phantom-4.0.12.tgz",
|
2778 |
-
"integrity": "sha512-Tz82XhtPmwCk1FFPmecy7yRGZG2btpzY2KI9fcoPT7zT9det0CcMyfBFPp1S8DqzsnQnm8ZYEfdy528mwVtksA==",
|
2779 |
-
"dev": true,
|
2780 |
-
"optional": true,
|
2781 |
-
"requires": {
|
2782 |
-
"phantomjs-prebuilt": "^2.1.16",
|
2783 |
-
"split": "^1.0.1",
|
2784 |
-
"winston": "^2.4.0"
|
2785 |
-
}
|
2786 |
-
},
|
2787 |
-
"phantomjs-prebuilt": {
|
2788 |
-
"version": "2.1.16",
|
2789 |
-
"resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz",
|
2790 |
-
"integrity": "sha1-79ISpKOWbTZHaE6ouniFSb4q7+8=",
|
2791 |
-
"dev": true,
|
2792 |
-
"optional": true,
|
2793 |
-
"requires": {
|
2794 |
-
"es6-promise": "^4.0.3",
|
2795 |
-
"extract-zip": "^1.6.5",
|
2796 |
-
"fs-extra": "^1.0.0",
|
2797 |
-
"hasha": "^2.2.0",
|
2798 |
-
"kew": "^0.7.0",
|
2799 |
-
"progress": "^1.1.8",
|
2800 |
-
"request": "^2.81.0",
|
2801 |
-
"request-progress": "^2.0.1",
|
2802 |
-
"which": "^1.2.10"
|
2803 |
-
},
|
2804 |
-
"dependencies": {
|
2805 |
-
"es6-promise": {
|
2806 |
-
"version": "4.2.4",
|
2807 |
-
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
|
2808 |
-
"integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
|
2809 |
-
"dev": true,
|
2810 |
-
"optional": true
|
2811 |
-
}
|
2812 |
-
}
|
2813 |
-
},
|
2814 |
-
"pify": {
|
2815 |
-
"version": "2.3.0",
|
2816 |
-
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
2817 |
-
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
2818 |
-
"dev": true
|
2819 |
-
},
|
2820 |
-
"pinkie": {
|
2821 |
-
"version": "2.0.4",
|
2822 |
-
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
|
2823 |
-
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
|
2824 |
-
"dev": true
|
2825 |
-
},
|
2826 |
-
"pinkie-promise": {
|
2827 |
-
"version": "2.0.1",
|
2828 |
-
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
|
2829 |
-
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
|
2830 |
-
"dev": true,
|
2831 |
-
"requires": {
|
2832 |
-
"pinkie": "^2.0.0"
|
2833 |
-
}
|
2834 |
-
},
|
2835 |
-
"pkg-up": {
|
2836 |
-
"version": "1.0.0",
|
2837 |
-
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-1.0.0.tgz",
|
2838 |
-
"integrity": "sha1-Pgj7RhUlxEIWJKM7n35tCvWwWiY=",
|
2839 |
-
"dev": true,
|
2840 |
-
"requires": {
|
2841 |
-
"find-up": "^1.0.0"
|
2842 |
-
}
|
2843 |
-
},
|
2844 |
-
"postcss": {
|
2845 |
-
"version": "4.1.16",
|
2846 |
-
"resolved": "https://registry.npmjs.org/postcss/-/postcss-4.1.16.tgz",
|
2847 |
-
"integrity": "sha1-TESbTIr53zyvbTf44eV10DYXWNw=",
|
2848 |
-
"dev": true,
|
2849 |
-
"requires": {
|
2850 |
-
"es6-promise": "~2.3.0",
|
2851 |
-
"js-base64": "~2.1.8",
|
2852 |
-
"source-map": "~0.4.2"
|
2853 |
-
}
|
2854 |
-
},
|
2855 |
-
"prebuild-install": {
|
2856 |
-
"version": "2.5.3",
|
2857 |
-
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz",
|
2858 |
-
"integrity": "sha512-/rI36cN2g7vDQnKWN8Uzupi++KjyqS9iS+/fpwG4Ea8d0Pip0PQ5bshUNzVwt+/D2MRfhVAplYMMvWLqWrCF/g==",
|
2859 |
-
"dev": true,
|
2860 |
-
"optional": true,
|
2861 |
-
"requires": {
|
2862 |
-
"detect-libc": "^1.0.3",
|
2863 |
-
"expand-template": "^1.0.2",
|
2864 |
-
"github-from-package": "0.0.0",
|
2865 |
-
"minimist": "^1.2.0",
|
2866 |
-
"mkdirp": "^0.5.1",
|
2867 |
-
"node-abi": "^2.2.0",
|
2868 |
-
"noop-logger": "^0.1.1",
|
2869 |
-
"npmlog": "^4.0.1",
|
2870 |
-
"os-homedir": "^1.0.1",
|
2871 |
-
"pump": "^2.0.1",
|
2872 |
-
"rc": "^1.1.6",
|
2873 |
-
"simple-get": "^2.7.0",
|
2874 |
-
"tar-fs": "^1.13.0",
|
2875 |
-
"tunnel-agent": "^0.6.0",
|
2876 |
-
"which-pm-runs": "^1.0.0"
|
2877 |
-
},
|
2878 |
-
"dependencies": {
|
2879 |
-
"detect-libc": {
|
2880 |
-
"version": "1.0.3",
|
2881 |
-
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
2882 |
-
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
|
2883 |
-
"dev": true,
|
2884 |
-
"optional": true
|
2885 |
-
}
|
2886 |
-
}
|
2887 |
-
},
|
2888 |
-
"pretty-bytes": {
|
2889 |
-
"version": "4.0.2",
|
2890 |
-
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
|
2891 |
-
"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
|
2892 |
-
"dev": true
|
2893 |
-
},
|
2894 |
-
"process-nextick-args": {
|
2895 |
-
"version": "2.0.0",
|
2896 |
-
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
2897 |
-
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
2898 |
-
"dev": true
|
2899 |
-
},
|
2900 |
-
"progress": {
|
2901 |
-
"version": "1.1.8",
|
2902 |
-
"resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
|
2903 |
-
"integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=",
|
2904 |
-
"dev": true,
|
2905 |
-
"optional": true
|
2906 |
-
},
|
2907 |
-
"psl": {
|
2908 |
-
"version": "1.1.29",
|
2909 |
-
"resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
|
2910 |
-
"integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==",
|
2911 |
-
"dev": true,
|
2912 |
-
"optional": true
|
2913 |
-
},
|
2914 |
-
"pump": {
|
2915 |
-
"version": "2.0.1",
|
2916 |
-
"resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
|
2917 |
-
"integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
|
2918 |
-
"dev": true,
|
2919 |
-
"optional": true,
|
2920 |
-
"requires": {
|
2921 |
-
"end-of-stream": "^1.1.0",
|
2922 |
-
"once": "^1.3.1"
|
2923 |
-
}
|
2924 |
-
},
|
2925 |
-
"punycode": {
|
2926 |
-
"version": "1.4.1",
|
2927 |
-
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
|
2928 |
-
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
|
2929 |
-
"dev": true,
|
2930 |
-
"optional": true
|
2931 |
-
},
|
2932 |
-
"qs": {
|
2933 |
-
"version": "6.5.2",
|
2934 |
-
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
|
2935 |
-
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
|
2936 |
-
"dev": true,
|
2937 |
-
"optional": true
|
2938 |
-
},
|
2939 |
-
"rc": {
|
2940 |
-
"version": "1.2.8",
|
2941 |
-
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
2942 |
-
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
2943 |
-
"dev": true,
|
2944 |
-
"optional": true,
|
2945 |
-
"requires": {
|
2946 |
-
"deep-extend": "^0.6.0",
|
2947 |
-
"ini": "~1.3.0",
|
2948 |
-
"minimist": "^1.2.0",
|
2949 |
-
"strip-json-comments": "~2.0.1"
|
2950 |
-
}
|
2951 |
-
},
|
2952 |
-
"read-pkg": {
|
2953 |
-
"version": "1.1.0",
|
2954 |
-
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
|
2955 |
-
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
|
2956 |
-
"dev": true,
|
2957 |
-
"requires": {
|
2958 |
-
"load-json-file": "^1.0.0",
|
2959 |
-
"normalize-package-data": "^2.3.2",
|
2960 |
-
"path-type": "^1.0.0"
|
2961 |
-
}
|
2962 |
-
},
|
2963 |
-
"read-pkg-up": {
|
2964 |
-
"version": "1.0.1",
|
2965 |
-
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
|
2966 |
-
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
|
2967 |
-
"dev": true,
|
2968 |
-
"requires": {
|
2969 |
-
"find-up": "^1.0.0",
|
2970 |
-
"read-pkg": "^1.0.0"
|
2971 |
-
}
|
2972 |
-
},
|
2973 |
-
"readable-stream": {
|
2974 |
-
"version": "2.3.6",
|
2975 |
-
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
2976 |
-
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
2977 |
-
"dev": true,
|
2978 |
-
"requires": {
|
2979 |
-
"core-util-is": "~1.0.0",
|
2980 |
-
"inherits": "~2.0.3",
|
2981 |
-
"isarray": "~1.0.0",
|
2982 |
-
"process-nextick-args": "~2.0.0",
|
2983 |
-
"safe-buffer": "~5.1.1",
|
2984 |
-
"string_decoder": "~1.1.1",
|
2985 |
-
"util-deprecate": "~1.0.1"
|
2986 |
-
}
|
2987 |
-
},
|
2988 |
-
"redent": {
|
2989 |
-
"version": "1.0.0",
|
2990 |
-
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
|
2991 |
-
"integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
|
2992 |
-
"dev": true,
|
2993 |
-
"requires": {
|
2994 |
-
"indent-string": "^2.1.0",
|
2995 |
-
"strip-indent": "^1.0.1"
|
2996 |
-
}
|
2997 |
-
},
|
2998 |
-
"remove-trailing-separator": {
|
2999 |
-
"version": "1.1.0",
|
3000 |
-
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
|
3001 |
-
"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
|
3002 |
-
"dev": true
|
3003 |
-
},
|
3004 |
-
"repeating": {
|
3005 |
-
"version": "2.0.1",
|
3006 |
-
"resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
|
3007 |
-
"integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
|
3008 |
-
"dev": true,
|
3009 |
-
"requires": {
|
3010 |
-
"is-finite": "^1.0.0"
|
3011 |
-
}
|
3012 |
-
},
|
3013 |
-
"request": {
|
3014 |
-
"version": "2.88.0",
|
3015 |
-
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
|
3016 |
-
"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
|
3017 |
-
"dev": true,
|
3018 |
-
"optional": true,
|
3019 |
-
"requires": {
|
3020 |
-
"aws-sign2": "~0.7.0",
|
3021 |
-
"aws4": "^1.8.0",
|
3022 |
-
"caseless": "~0.12.0",
|
3023 |
-
"combined-stream": "~1.0.6",
|
3024 |
-
"extend": "~3.0.2",
|
3025 |
-
"forever-agent": "~0.6.1",
|
3026 |
-
"form-data": "~2.3.2",
|
3027 |
-
"har-validator": "~5.1.0",
|
3028 |
-
"http-signature": "~1.2.0",
|
3029 |
-
"is-typedarray": "~1.0.0",
|
3030 |
-
"isstream": "~0.1.2",
|
3031 |
-
"json-stringify-safe": "~5.0.1",
|
3032 |
-
"mime-types": "~2.1.19",
|
3033 |
-
"oauth-sign": "~0.9.0",
|
3034 |
-
"performance-now": "^2.1.0",
|
3035 |
-
"qs": "~6.5.2",
|
3036 |
-
"safe-buffer": "^5.1.2",
|
3037 |
-
"tough-cookie": "~2.4.3",
|
3038 |
-
"tunnel-agent": "^0.6.0",
|
3039 |
-
"uuid": "^3.3.2"
|
3040 |
-
}
|
3041 |
-
},
|
3042 |
-
"request-progress": {
|
3043 |
-
"version": "2.0.1",
|
3044 |
-
"resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz",
|
3045 |
-
"integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=",
|
3046 |
-
"dev": true,
|
3047 |
-
"optional": true,
|
3048 |
-
"requires": {
|
3049 |
-
"throttleit": "^1.0.0"
|
3050 |
-
}
|
3051 |
-
},
|
3052 |
-
"requirefresh": {
|
3053 |
-
"version": "2.1.0",
|
3054 |
-
"resolved": "https://registry.npmjs.org/requirefresh/-/requirefresh-2.1.0.tgz",
|
3055 |
-
"integrity": "sha1-dC3Mwg86lpGNZsbxWX3I/+vE9vU=",
|
3056 |
-
"dev": true,
|
3057 |
-
"requires": {
|
3058 |
-
"editions": "^1.1.1"
|
3059 |
-
}
|
3060 |
-
},
|
3061 |
-
"resolve": {
|
3062 |
-
"version": "1.1.7",
|
3063 |
-
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
|
3064 |
-
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
|
3065 |
-
"dev": true
|
3066 |
-
},
|
3067 |
-
"resolve-from": {
|
3068 |
-
"version": "2.0.0",
|
3069 |
-
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
|
3070 |
-
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=",
|
3071 |
-
"dev": true
|
3072 |
-
},
|
3073 |
-
"resolve-pkg": {
|
3074 |
-
"version": "1.0.0",
|
3075 |
-
"resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-1.0.0.tgz",
|
3076 |
-
"integrity": "sha1-4ZoV54rKLhJEYdySsuOUPvk0lNk=",
|
3077 |
-
"dev": true,
|
3078 |
-
"requires": {
|
3079 |
-
"resolve-from": "^2.0.0"
|
3080 |
-
}
|
3081 |
-
},
|
3082 |
-
"rimraf": {
|
3083 |
-
"version": "2.6.2",
|
3084 |
-
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
|
3085 |
-
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
|
3086 |
-
"dev": true,
|
3087 |
-
"requires": {
|
3088 |
-
"glob": "^7.0.5"
|
3089 |
-
}
|
3090 |
-
},
|
3091 |
-
"safe-buffer": {
|
3092 |
-
"version": "5.1.2",
|
3093 |
-
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
3094 |
-
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
3095 |
-
"dev": true
|
3096 |
-
},
|
3097 |
-
"safefs": {
|
3098 |
-
"version": "4.1.0",
|
3099 |
-
"resolved": "https://registry.npmjs.org/safefs/-/safefs-4.1.0.tgz",
|
3100 |
-
"integrity": "sha1-+CrrS9165R9lPrIPZyizBYyNZEU=",
|
3101 |
-
"dev": true,
|
3102 |
-
"requires": {
|
3103 |
-
"editions": "^1.1.1",
|
3104 |
-
"graceful-fs": "^4.1.4"
|
3105 |
-
}
|
3106 |
-
},
|
3107 |
-
"safer-buffer": {
|
3108 |
-
"version": "2.1.2",
|
3109 |
-
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
3110 |
-
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
3111 |
-
"dev": true
|
3112 |
-
},
|
3113 |
-
"semver": {
|
3114 |
-
"version": "5.5.1",
|
3115 |
-
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz",
|
3116 |
-
"integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==",
|
3117 |
-
"dev": true
|
3118 |
-
},
|
3119 |
-
"set-blocking": {
|
3120 |
-
"version": "2.0.0",
|
3121 |
-
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
3122 |
-
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
3123 |
-
"dev": true
|
3124 |
-
},
|
3125 |
-
"shelljs": {
|
3126 |
-
"version": "0.3.0",
|
3127 |
-
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
|
3128 |
-
"integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=",
|
3129 |
-
"dev": true
|
3130 |
-
},
|
3131 |
-
"signal-exit": {
|
3132 |
-
"version": "3.0.2",
|
3133 |
-
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
3134 |
-
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
3135 |
-
"dev": true
|
3136 |
-
},
|
3137 |
-
"simple-concat": {
|
3138 |
-
"version": "1.0.0",
|
3139 |
-
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz",
|
3140 |
-
"integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=",
|
3141 |
-
"dev": true,
|
3142 |
-
"optional": true
|
3143 |
-
},
|
3144 |
-
"simple-get": {
|
3145 |
-
"version": "2.8.1",
|
3146 |
-
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz",
|
3147 |
-
"integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==",
|
3148 |
-
"dev": true,
|
3149 |
-
"optional": true,
|
3150 |
-
"requires": {
|
3151 |
-
"decompress-response": "^3.3.0",
|
3152 |
-
"once": "^1.3.1",
|
3153 |
-
"simple-concat": "^1.0.0"
|
3154 |
-
}
|
3155 |
-
},
|
3156 |
-
"source-map": {
|
3157 |
-
"version": "0.4.4",
|
3158 |
-
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
3159 |
-
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
|
3160 |
-
"dev": true,
|
3161 |
-
"requires": {
|
3162 |
-
"amdefine": ">=0.0.4"
|
3163 |
-
}
|
3164 |
-
},
|
3165 |
-
"spdx-correct": {
|
3166 |
-
"version": "3.0.2",
|
3167 |
-
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz",
|
3168 |
-
"integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==",
|
3169 |
-
"dev": true,
|
3170 |
-
"requires": {
|
3171 |
-
"spdx-expression-parse": "^3.0.0",
|
3172 |
-
"spdx-license-ids": "^3.0.0"
|
3173 |
-
}
|
3174 |
-
},
|
3175 |
-
"spdx-exceptions": {
|
3176 |
-
"version": "2.2.0",
|
3177 |
-
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
|
3178 |
-
"integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
|
3179 |
-
"dev": true
|
3180 |
-
},
|
3181 |
-
"spdx-expression-parse": {
|
3182 |
-
"version": "3.0.0",
|
3183 |
-
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
|
3184 |
-
"integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
|
3185 |
-
"dev": true,
|
3186 |
-
"requires": {
|
3187 |
-
"spdx-exceptions": "^2.1.0",
|
3188 |
-
"spdx-license-ids": "^3.0.0"
|
3189 |
-
}
|
3190 |
-
},
|
3191 |
-
"spdx-license-ids": {
|
3192 |
-
"version": "3.0.1",
|
3193 |
-
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz",
|
3194 |
-
"integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==",
|
3195 |
-
"dev": true
|
3196 |
-
},
|
3197 |
-
"split": {
|
3198 |
-
"version": "1.0.1",
|
3199 |
-
"resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz",
|
3200 |
-
"integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==",
|
3201 |
-
"dev": true,
|
3202 |
-
"optional": true,
|
3203 |
-
"requires": {
|
3204 |
-
"through": "2"
|
3205 |
-
}
|
3206 |
-
},
|
3207 |
-
"sprintf-js": {
|
3208 |
-
"version": "1.1.1",
|
3209 |
-
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz",
|
3210 |
-
"integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=",
|
3211 |
-
"dev": true
|
3212 |
-
},
|
3213 |
-
"sshpk": {
|
3214 |
-
"version": "1.14.2",
|
3215 |
-
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
|
3216 |
-
"integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
|
3217 |
-
"dev": true,
|
3218 |
-
"optional": true,
|
3219 |
-
"requires": {
|
3220 |
-
"asn1": "~0.2.3",
|
3221 |
-
"assert-plus": "^1.0.0",
|
3222 |
-
"bcrypt-pbkdf": "^1.0.0",
|
3223 |
-
"dashdash": "^1.12.0",
|
3224 |
-
"ecc-jsbn": "~0.1.1",
|
3225 |
-
"getpass": "^0.1.1",
|
3226 |
-
"jsbn": "~0.1.0",
|
3227 |
-
"safer-buffer": "^2.0.2",
|
3228 |
-
"tweetnacl": "~0.14.0"
|
3229 |
-
}
|
3230 |
-
},
|
3231 |
-
"stack-trace": {
|
3232 |
-
"version": "0.0.10",
|
3233 |
-
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
|
3234 |
-
"integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=",
|
3235 |
-
"dev": true,
|
3236 |
-
"optional": true
|
3237 |
-
},
|
3238 |
-
"stream-buffers": {
|
3239 |
-
"version": "2.2.0",
|
3240 |
-
"resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
|
3241 |
-
"integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=",
|
3242 |
-
"dev": true
|
3243 |
-
},
|
3244 |
-
"string-width": {
|
3245 |
-
"version": "1.0.2",
|
3246 |
-
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
3247 |
-
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
3248 |
-
"dev": true,
|
3249 |
-
"requires": {
|
3250 |
-
"code-point-at": "^1.0.0",
|
3251 |
-
"is-fullwidth-code-point": "^1.0.0",
|
3252 |
-
"strip-ansi": "^3.0.0"
|
3253 |
-
},
|
3254 |
-
"dependencies": {
|
3255 |
-
"ansi-regex": {
|
3256 |
-
"version": "2.1.1",
|
3257 |
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
3258 |
-
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
3259 |
-
"dev": true
|
3260 |
-
},
|
3261 |
-
"strip-ansi": {
|
3262 |
-
"version": "3.0.1",
|
3263 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
3264 |
-
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
3265 |
-
"dev": true,
|
3266 |
-
"requires": {
|
3267 |
-
"ansi-regex": "^2.0.0"
|
3268 |
-
}
|
3269 |
-
}
|
3270 |
-
}
|
3271 |
-
},
|
3272 |
-
"string_decoder": {
|
3273 |
-
"version": "1.1.1",
|
3274 |
-
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
3275 |
-
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
3276 |
-
"dev": true,
|
3277 |
-
"requires": {
|
3278 |
-
"safe-buffer": "~5.1.0"
|
3279 |
-
}
|
3280 |
-
},
|
3281 |
-
"strip-ansi": {
|
3282 |
-
"version": "2.0.1",
|
3283 |
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz",
|
3284 |
-
"integrity": "sha1-32LBqpTtLxFOHQ8h/R1QSCt5pg4=",
|
3285 |
-
"dev": true,
|
3286 |
-
"requires": {
|
3287 |
-
"ansi-regex": "^1.0.0"
|
3288 |
-
}
|
3289 |
-
},
|
3290 |
-
"strip-bom": {
|
3291 |
-
"version": "2.0.0",
|
3292 |
-
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
|
3293 |
-
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
|
3294 |
-
"dev": true,
|
3295 |
-
"requires": {
|
3296 |
-
"is-utf8": "^0.2.0"
|
3297 |
-
}
|
3298 |
-
},
|
3299 |
-
"strip-indent": {
|
3300 |
-
"version": "1.0.1",
|
3301 |
-
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
|
3302 |
-
"integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
|
3303 |
-
"dev": true,
|
3304 |
-
"requires": {
|
3305 |
-
"get-stdin": "^4.0.1"
|
3306 |
-
}
|
3307 |
-
},
|
3308 |
-
"strip-json-comments": {
|
3309 |
-
"version": "2.0.1",
|
3310 |
-
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
3311 |
-
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
3312 |
-
"dev": true,
|
3313 |
-
"optional": true
|
3314 |
-
},
|
3315 |
-
"supports-color": {
|
3316 |
-
"version": "5.5.0",
|
3317 |
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
3318 |
-
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
3319 |
-
"dev": true,
|
3320 |
-
"requires": {
|
3321 |
-
"has-flag": "^3.0.0"
|
3322 |
-
}
|
3323 |
-
},
|
3324 |
-
"sync-exec": {
|
3325 |
-
"version": "0.4.0",
|
3326 |
-
"resolved": "https://registry.npmjs.org/sync-exec/-/sync-exec-0.4.0.tgz",
|
3327 |
-
"integrity": "sha1-N1guegT684zW5T6iBEW5n5kvaTM=",
|
3328 |
-
"dev": true
|
3329 |
-
},
|
3330 |
-
"tar": {
|
3331 |
-
"version": "2.2.1",
|
3332 |
-
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
|
3333 |
-
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
|
3334 |
-
"dev": true,
|
3335 |
-
"optional": true,
|
3336 |
-
"requires": {
|
3337 |
-
"block-stream": "*",
|
3338 |
-
"fstream": "^1.0.2",
|
3339 |
-
"inherits": "2"
|
3340 |
-
}
|
3341 |
-
},
|
3342 |
-
"tar-fs": {
|
3343 |
-
"version": "1.16.3",
|
3344 |
-
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz",
|
3345 |
-
"integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==",
|
3346 |
-
"dev": true,
|
3347 |
-
"optional": true,
|
3348 |
-
"requires": {
|
3349 |
-
"chownr": "^1.0.1",
|
3350 |
-
"mkdirp": "^0.5.1",
|
3351 |
-
"pump": "^1.0.0",
|
3352 |
-
"tar-stream": "^1.1.2"
|
3353 |
-
},
|
3354 |
-
"dependencies": {
|
3355 |
-
"pump": {
|
3356 |
-
"version": "1.0.3",
|
3357 |
-
"resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
|
3358 |
-
"integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==",
|
3359 |
-
"dev": true,
|
3360 |
-
"optional": true,
|
3361 |
-
"requires": {
|
3362 |
-
"end-of-stream": "^1.1.0",
|
3363 |
-
"once": "^1.3.1"
|
3364 |
-
}
|
3365 |
-
}
|
3366 |
-
}
|
3367 |
-
},
|
3368 |
-
"tar-stream": {
|
3369 |
-
"version": "1.6.1",
|
3370 |
-
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz",
|
3371 |
-
"integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==",
|
3372 |
-
"dev": true,
|
3373 |
-
"requires": {
|
3374 |
-
"bl": "^1.0.0",
|
3375 |
-
"buffer-alloc": "^1.1.0",
|
3376 |
-
"end-of-stream": "^1.0.0",
|
3377 |
-
"fs-constants": "^1.0.0",
|
3378 |
-
"readable-stream": "^2.3.0",
|
3379 |
-
"to-buffer": "^1.1.0",
|
3380 |
-
"xtend": "^4.0.0"
|
3381 |
-
}
|
3382 |
-
},
|
3383 |
-
"text-table": {
|
3384 |
-
"version": "0.2.0",
|
3385 |
-
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
3386 |
-
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
|
3387 |
-
"dev": true
|
3388 |
-
},
|
3389 |
-
"throttleit": {
|
3390 |
-
"version": "1.0.0",
|
3391 |
-
"resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
|
3392 |
-
"integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=",
|
3393 |
-
"dev": true,
|
3394 |
-
"optional": true
|
3395 |
-
},
|
3396 |
-
"through": {
|
3397 |
-
"version": "2.3.8",
|
3398 |
-
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
3399 |
-
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
|
3400 |
-
"dev": true,
|
3401 |
-
"optional": true
|
3402 |
-
},
|
3403 |
-
"tmp": {
|
3404 |
-
"version": "0.0.33",
|
3405 |
-
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
3406 |
-
"integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
|
3407 |
-
"dev": true,
|
3408 |
-
"requires": {
|
3409 |
-
"os-tmpdir": "~1.0.2"
|
3410 |
-
}
|
3411 |
-
},
|
3412 |
-
"to-buffer": {
|
3413 |
-
"version": "1.1.1",
|
3414 |
-
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
|
3415 |
-
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==",
|
3416 |
-
"dev": true
|
3417 |
-
},
|
3418 |
-
"tough-cookie": {
|
3419 |
-
"version": "2.4.3",
|
3420 |
-
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
|
3421 |
-
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
|
3422 |
-
"dev": true,
|
3423 |
-
"optional": true,
|
3424 |
-
"requires": {
|
3425 |
-
"psl": "^1.1.24",
|
3426 |
-
"punycode": "^1.4.1"
|
3427 |
-
}
|
3428 |
-
},
|
3429 |
-
"trim-newlines": {
|
3430 |
-
"version": "1.0.0",
|
3431 |
-
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
|
3432 |
-
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
|
3433 |
-
"dev": true
|
3434 |
-
},
|
3435 |
-
"tunnel-agent": {
|
3436 |
-
"version": "0.6.0",
|
3437 |
-
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
3438 |
-
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
|
3439 |
-
"dev": true,
|
3440 |
-
"requires": {
|
3441 |
-
"safe-buffer": "^5.0.1"
|
3442 |
-
}
|
3443 |
-
},
|
3444 |
-
"tweetnacl": {
|
3445 |
-
"version": "0.14.5",
|
3446 |
-
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
|
3447 |
-
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
|
3448 |
-
"dev": true,
|
3449 |
-
"optional": true
|
3450 |
-
},
|
3451 |
-
"typechecker": {
|
3452 |
-
"version": "4.6.0",
|
3453 |
-
"resolved": "https://registry.npmjs.org/typechecker/-/typechecker-4.6.0.tgz",
|
3454 |
-
"integrity": "sha512-83OrXpyP3LNr7aRbLkt2nkjE/d7q8su8/uRvrKxCpswqVCVGOgyaKpaz8/MTjQqBYe4eLNuJ44pNakFZKqyPMA==",
|
3455 |
-
"dev": true,
|
3456 |
-
"requires": {
|
3457 |
-
"editions": "^2.0.2"
|
3458 |
-
},
|
3459 |
-
"dependencies": {
|
3460 |
-
"editions": {
|
3461 |
-
"version": "2.0.2",
|
3462 |
-
"resolved": "https://registry.npmjs.org/editions/-/editions-2.0.2.tgz",
|
3463 |
-
"integrity": "sha512-0B8aSTWUu9+JW99zHoeogavCi+lkE5l35FK0OKe0pCobixJYoeof3ZujtqYzSsU2MskhRadY5V9oWUuyG4aJ3A==",
|
3464 |
-
"dev": true,
|
3465 |
-
"requires": {
|
3466 |
-
"errlop": "^1.0.2",
|
3467 |
-
"semver": "^5.5.0"
|
3468 |
-
}
|
3469 |
-
}
|
3470 |
-
}
|
3471 |
-
},
|
3472 |
-
"typedarray": {
|
3473 |
-
"version": "0.0.6",
|
3474 |
-
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
3475 |
-
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
|
3476 |
-
"dev": true,
|
3477 |
-
"optional": true
|
3478 |
-
},
|
3479 |
-
"uglify-js": {
|
3480 |
-
"version": "3.4.9",
|
3481 |
-
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz",
|
3482 |
-
"integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==",
|
3483 |
-
"dev": true,
|
3484 |
-
"requires": {
|
3485 |
-
"commander": "~2.17.1",
|
3486 |
-
"source-map": "~0.6.1"
|
3487 |
-
},
|
3488 |
-
"dependencies": {
|
3489 |
-
"source-map": {
|
3490 |
-
"version": "0.6.1",
|
3491 |
-
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
3492 |
-
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
3493 |
-
"dev": true
|
3494 |
-
}
|
3495 |
-
}
|
3496 |
-
},
|
3497 |
-
"underscore.string": {
|
3498 |
-
"version": "3.3.5",
|
3499 |
-
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz",
|
3500 |
-
"integrity": "sha512-g+dpmgn+XBneLmXXo+sGlW5xQEt4ErkS3mgeN2GFbremYeMBSJKr9Wf2KJplQVaiPY/f7FN6atosWYNm9ovrYg==",
|
3501 |
-
"dev": true,
|
3502 |
-
"requires": {
|
3503 |
-
"sprintf-js": "^1.0.3",
|
3504 |
-
"util-deprecate": "^1.0.2"
|
3505 |
-
}
|
3506 |
-
},
|
3507 |
-
"unicode-5.2.0": {
|
3508 |
-
"version": "0.7.5",
|
3509 |
-
"resolved": "https://registry.npmjs.org/unicode-5.2.0/-/unicode-5.2.0-0.7.5.tgz",
|
3510 |
-
"integrity": "sha512-KVGLW1Bri30x00yv4HNM8kBxoqFXr0Sbo55735nvrlsx4PYBZol3UtoWgO492fSwmsetzPEZzy73rbU8OGXJcA==",
|
3511 |
-
"dev": true
|
3512 |
-
},
|
3513 |
-
"uri-path": {
|
3514 |
-
"version": "1.0.0",
|
3515 |
-
"resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz",
|
3516 |
-
"integrity": "sha1-l0fwGDWJM8Md4PzP2C0TjmcmLjI=",
|
3517 |
-
"dev": true
|
3518 |
-
},
|
3519 |
-
"util-deprecate": {
|
3520 |
-
"version": "1.0.2",
|
3521 |
-
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
3522 |
-
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
3523 |
-
"dev": true
|
3524 |
-
},
|
3525 |
-
"uuid": {
|
3526 |
-
"version": "3.3.2",
|
3527 |
-
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
3528 |
-
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
|
3529 |
-
"dev": true,
|
3530 |
-
"optional": true
|
3531 |
-
},
|
3532 |
-
"validate-npm-package-license": {
|
3533 |
-
"version": "3.0.4",
|
3534 |
-
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
|
3535 |
-
"integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
|
3536 |
-
"dev": true,
|
3537 |
-
"requires": {
|
3538 |
-
"spdx-correct": "^3.0.0",
|
3539 |
-
"spdx-expression-parse": "^3.0.0"
|
3540 |
-
}
|
3541 |
-
},
|
3542 |
-
"verror": {
|
3543 |
-
"version": "1.10.0",
|
3544 |
-
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
3545 |
-
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
|
3546 |
-
"dev": true,
|
3547 |
-
"optional": true,
|
3548 |
-
"requires": {
|
3549 |
-
"assert-plus": "^1.0.0",
|
3550 |
-
"core-util-is": "1.0.2",
|
3551 |
-
"extsprintf": "^1.2.0"
|
3552 |
-
}
|
3553 |
-
},
|
3554 |
-
"walkdir": {
|
3555 |
-
"version": "0.0.11",
|
3556 |
-
"resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz",
|
3557 |
-
"integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=",
|
3558 |
-
"dev": true
|
3559 |
-
},
|
3560 |
-
"which": {
|
3561 |
-
"version": "1.3.1",
|
3562 |
-
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
3563 |
-
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
3564 |
-
"dev": true,
|
3565 |
-
"requires": {
|
3566 |
-
"isexe": "^2.0.0"
|
3567 |
-
}
|
3568 |
-
},
|
3569 |
-
"which-pm-runs": {
|
3570 |
-
"version": "1.0.0",
|
3571 |
-
"resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz",
|
3572 |
-
"integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
|
3573 |
-
"dev": true,
|
3574 |
-
"optional": true
|
3575 |
-
},
|
3576 |
-
"wide-align": {
|
3577 |
-
"version": "1.1.3",
|
3578 |
-
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
|
3579 |
-
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
3580 |
-
"dev": true,
|
3581 |
-
"requires": {
|
3582 |
-
"string-width": "^1.0.2 || 2"
|
3583 |
-
}
|
3584 |
-
},
|
3585 |
-
"winston": {
|
3586 |
-
"version": "2.4.4",
|
3587 |
-
"resolved": "https://registry.npmjs.org/winston/-/winston-2.4.4.tgz",
|
3588 |
-
"integrity": "sha512-NBo2Pepn4hK4V01UfcWcDlmiVTs7VTB1h7bgnB0rgP146bYhMxX0ypCz3lBOfNxCO4Zuek7yeT+y/zM1OfMw4Q==",
|
3589 |
-
"dev": true,
|
3590 |
-
"optional": true,
|
3591 |
-
"requires": {
|
3592 |
-
"async": "~1.0.0",
|
3593 |
-
"colors": "1.0.x",
|
3594 |
-
"cycle": "1.0.x",
|
3595 |
-
"eyes": "0.1.x",
|
3596 |
-
"isstream": "0.1.x",
|
3597 |
-
"stack-trace": "0.0.x"
|
3598 |
-
},
|
3599 |
-
"dependencies": {
|
3600 |
-
"async": {
|
3601 |
-
"version": "1.0.0",
|
3602 |
-
"resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz",
|
3603 |
-
"integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=",
|
3604 |
-
"dev": true,
|
3605 |
-
"optional": true
|
3606 |
-
},
|
3607 |
-
"colors": {
|
3608 |
-
"version": "1.0.3",
|
3609 |
-
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
|
3610 |
-
"integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=",
|
3611 |
-
"dev": true,
|
3612 |
-
"optional": true
|
3613 |
-
}
|
3614 |
-
}
|
3615 |
-
},
|
3616 |
-
"wrappy": {
|
3617 |
-
"version": "1.0.2",
|
3618 |
-
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
3619 |
-
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
3620 |
-
"dev": true
|
3621 |
-
},
|
3622 |
-
"xtend": {
|
3623 |
-
"version": "4.0.1",
|
3624 |
-
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
3625 |
-
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
|
3626 |
-
"dev": true
|
3627 |
-
},
|
3628 |
-
"yauzl": {
|
3629 |
-
"version": "2.4.1",
|
3630 |
-
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
|
3631 |
-
"integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
|
3632 |
-
"dev": true,
|
3633 |
-
"optional": true,
|
3634 |
-
"requires": {
|
3635 |
-
"fd-slicer": "~1.0.1"
|
3636 |
-
}
|
3637 |
-
},
|
3638 |
-
"zip-stream": {
|
3639 |
-
"version": "1.2.0",
|
3640 |
-
"resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz",
|
3641 |
-
"integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=",
|
3642 |
-
"dev": true,
|
3643 |
-
"requires": {
|
3644 |
-
"archiver-utils": "^1.3.0",
|
3645 |
-
"compress-commons": "^1.2.0",
|
3646 |
-
"lodash": "^4.8.0",
|
3647 |
-
"readable-stream": "^2.0.0"
|
3648 |
-
}
|
3649 |
-
}
|
3650 |
-
}
|
3651 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: xibodevelopment, willmot, dashaluna, pauldewouters, joehoyle, matt
|
|
3 |
Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, xibodevelopment
|
4 |
Requires at least: 3.9
|
5 |
Tested up to: 4.9.8
|
6 |
-
Stable tag: 3.
|
7 |
|
8 |
Simple automated backups of your WordPress-powered website.
|
9 |
|
@@ -95,15 +95,13 @@ There are some things you can test to confirm this is the issue.
|
|
95 |
|
96 |
* Is your site private (i.e. is it behind some kind of authentication, maintenance plugin, .htaccess)? If so, wp-cron won't work until you remove it. If you are and you temporarily remove the authentication, do backups start working?
|
97 |
|
98 |
-
Report the results to our support team for further help. To do this, email support@xibomarketing.com
|
99 |
-
|
100 |
**How to get BackUpWordPress working in Heart Internet**
|
101 |
|
102 |
The script to be entered into the Heart Internet cPanel is: `/usr/bin/php5 /home/sites/yourdomain.com/public_html/wp-cron.php` (note the space between php5 and the location of the file). The file `wp-cron.php` `chmod` must be set to `711`.
|
103 |
|
104 |
**My backups seem to be failing?**
|
105 |
|
106 |
-
If your backups are failing, it's commonly caused by a lack of available resources on your server. To establish this is the case, exclude the complete (or parts of the) uploads folder and run a backup. If that succeeds, you know it's probably a server issue. If it does not succeed,
|
107 |
|
108 |
**Further Support & Feedback**
|
109 |
|
@@ -111,8 +109,6 @@ General support questions should be posted in the <a href="http://wordpress.org/
|
|
111 |
|
112 |
For development issues, feature requests or anybody wishing to help out with development checkout <a href="https://github.com/orgs/xibodevelopment/backupwordpress/">BackUpWordPress on GitHub.</a>
|
113 |
|
114 |
-
You can also email support@xibomarketing.com for further help/support.
|
115 |
-
|
116 |
== Screenshots ==
|
117 |
|
118 |
1. Manage multiple schedules.
|
@@ -161,6 +157,10 @@ users should see major improvements to reliability.
|
|
161 |
|
162 |
== Changelog ==
|
163 |
|
|
|
|
|
|
|
|
|
164 |
### 3.8 / 2018-11-01
|
165 |
|
166 |
* GNU Wording change
|
3 |
Tags: back up, backup, backups, database, zip, db, files, archive, wp-cli, xibodevelopment
|
4 |
Requires at least: 3.9
|
5 |
Tested up to: 4.9.8
|
6 |
+
Stable tag: 3.9
|
7 |
|
8 |
Simple automated backups of your WordPress-powered website.
|
9 |
|
95 |
|
96 |
* Is your site private (i.e. is it behind some kind of authentication, maintenance plugin, .htaccess)? If so, wp-cron won't work until you remove it. If you are and you temporarily remove the authentication, do backups start working?
|
97 |
|
|
|
|
|
98 |
**How to get BackUpWordPress working in Heart Internet**
|
99 |
|
100 |
The script to be entered into the Heart Internet cPanel is: `/usr/bin/php5 /home/sites/yourdomain.com/public_html/wp-cron.php` (note the space between php5 and the location of the file). The file `wp-cron.php` `chmod` must be set to `711`.
|
101 |
|
102 |
**My backups seem to be failing?**
|
103 |
|
104 |
+
If your backups are failing, it's commonly caused by a lack of available resources on your server. To establish this is the case, exclude the complete (or parts of the) uploads folder and run a backup. If that succeeds, you know it's probably a server issue. If it does not succeed, you can find further assistance on our <a href="http://wordpress.org/support/plugin/backupwordpress" title="support forums" target="_blank">support forums</a>.
|
105 |
|
106 |
**Further Support & Feedback**
|
107 |
|
109 |
|
110 |
For development issues, feature requests or anybody wishing to help out with development checkout <a href="https://github.com/orgs/xibodevelopment/backupwordpress/">BackUpWordPress on GitHub.</a>
|
111 |
|
|
|
|
|
112 |
== Screenshots ==
|
113 |
|
114 |
1. Manage multiple schedules.
|
157 |
|
158 |
== Changelog ==
|
159 |
|
160 |
+
### 3.9 / 2019-06-10
|
161 |
+
|
162 |
+
* Readme update
|
163 |
+
|
164 |
### 3.8 / 2018-11-01
|
165 |
|
166 |
* GNU Wording change
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitec295a6d5e5af85df96f8020de01e26f::getLoader();
|
vendor/composer/ClassLoader.php
CHANGED
@@ -279,7 +279,7 @@ class ClassLoader
|
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
-
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit60153b5317b231eeb44253cb0903cafb
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
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\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitec295a6d5e5af85df96f8020de01e26f
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitec295a6d5e5af85df96f8020de01e26f', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitec295a6d5e5af85df96f8020de01e26f', '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\ComposerStaticInitec295a6d5e5af85df96f8020de01e26f::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
@@ -36,8 +36,8 @@ class ComposerStaticInit60153b5317b231eeb44253cb0903cafb
|
|
36 |
public static function getInitializer(ClassLoader $loader)
|
37 |
{
|
38 |
return \Closure::bind(function () use ($loader) {
|
39 |
-
$loader->prefixLengthsPsr4 =
|
40 |
-
$loader->prefixDirsPsr4 =
|
41 |
|
42 |
}, null, ClassLoader::class);
|
43 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitec295a6d5e5af85df96f8020de01e26f
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
36 |
public static function getInitializer(ClassLoader $loader)
|
37 |
{
|
38 |
return \Closure::bind(function () use ($loader) {
|
39 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitec295a6d5e5af85df96f8020de01e26f::$prefixLengthsPsr4;
|
40 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitec295a6d5e5af85df96f8020de01e26f::$prefixDirsPsr4;
|
41 |
|
42 |
}, null, ClassLoader::class);
|
43 |
}
|
vendor/composer/installed.json
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
[
|
2 |
{
|
3 |
"name": "ifsnop/mysqldump-php",
|
4 |
-
"version": "v2.
|
5 |
-
"version_normalized": "2.
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/ifsnop/mysqldump-php.git",
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/ifsnop/mysqldump-php/zipball/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
18 |
"php": ">=5.3.0"
|
19 |
},
|
20 |
"require-dev": {
|
21 |
-
"phpunit/phpunit": "
|
22 |
"squizlabs/php_codesniffer": "1.*"
|
23 |
},
|
24 |
-
"time": "
|
25 |
"type": "library",
|
26 |
"installation-source": "dist",
|
27 |
"autoload": {
|
@@ -31,7 +31,7 @@
|
|
31 |
},
|
32 |
"notification-url": "https://packagist.org/downloads/",
|
33 |
"license": [
|
34 |
-
"
|
35 |
],
|
36 |
"authors": [
|
37 |
{
|
@@ -40,38 +40,41 @@
|
|
40 |
"role": "Developer"
|
41 |
}
|
42 |
],
|
43 |
-
"description": "
|
44 |
"homepage": "https://github.com/ifsnop/mysqldump-php",
|
45 |
"keywords": [
|
46 |
-
"
|
47 |
"database",
|
48 |
-
"
|
49 |
-
"
|
50 |
"mysql",
|
|
|
51 |
"mysqldump",
|
52 |
"pdo",
|
53 |
-
"
|
|
|
|
|
54 |
]
|
55 |
},
|
56 |
{
|
57 |
"name": "symfony/finder",
|
58 |
-
"version": "v2.8.
|
59 |
-
"version_normalized": "2.8.
|
60 |
"source": {
|
61 |
"type": "git",
|
62 |
"url": "https://github.com/symfony/finder.git",
|
63 |
-
"reference": "
|
64 |
},
|
65 |
"dist": {
|
66 |
"type": "zip",
|
67 |
-
"url": "https://api.github.com/repos/symfony/finder/zipball/
|
68 |
-
"reference": "
|
69 |
"shasum": ""
|
70 |
},
|
71 |
"require": {
|
72 |
"php": ">=5.3.9"
|
73 |
},
|
74 |
-
"time": "
|
75 |
"type": "library",
|
76 |
"extra": {
|
77 |
"branch-alias": {
|
@@ -106,23 +109,23 @@
|
|
106 |
},
|
107 |
{
|
108 |
"name": "symfony/process",
|
109 |
-
"version": "v2.8.
|
110 |
-
"version_normalized": "2.8.
|
111 |
"source": {
|
112 |
"type": "git",
|
113 |
"url": "https://github.com/symfony/process.git",
|
114 |
-
"reference": "
|
115 |
},
|
116 |
"dist": {
|
117 |
"type": "zip",
|
118 |
-
"url": "https://api.github.com/repos/symfony/process/zipball/
|
119 |
-
"reference": "
|
120 |
"shasum": ""
|
121 |
},
|
122 |
"require": {
|
123 |
"php": ">=5.3.9"
|
124 |
},
|
125 |
-
"time": "
|
126 |
"type": "library",
|
127 |
"extra": {
|
128 |
"branch-alias": {
|
1 |
[
|
2 |
{
|
3 |
"name": "ifsnop/mysqldump-php",
|
4 |
+
"version": "v2.7",
|
5 |
+
"version_normalized": "2.7.0.0",
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/ifsnop/mysqldump-php.git",
|
9 |
+
"reference": "30f07f4f0b0fdfcd74e6e57de933248d47f2dd61"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/ifsnop/mysqldump-php/zipball/30f07f4f0b0fdfcd74e6e57de933248d47f2dd61",
|
14 |
+
"reference": "30f07f4f0b0fdfcd74e6e57de933248d47f2dd61",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
18 |
"php": ">=5.3.0"
|
19 |
},
|
20 |
"require-dev": {
|
21 |
+
"phpunit/phpunit": "4.8.36",
|
22 |
"squizlabs/php_codesniffer": "1.*"
|
23 |
},
|
24 |
+
"time": "2019-02-18T23:38:33+00:00",
|
25 |
"type": "library",
|
26 |
"installation-source": "dist",
|
27 |
"autoload": {
|
31 |
},
|
32 |
"notification-url": "https://packagist.org/downloads/",
|
33 |
"license": [
|
34 |
+
"GPL-3.0-or-later"
|
35 |
],
|
36 |
"authors": [
|
37 |
{
|
40 |
"role": "Developer"
|
41 |
}
|
42 |
],
|
43 |
+
"description": "PHP version of mysqldump cli that comes with MySQL",
|
44 |
"homepage": "https://github.com/ifsnop/mysqldump-php",
|
45 |
"keywords": [
|
46 |
+
"PHP7",
|
47 |
"database",
|
48 |
+
"hhvm",
|
49 |
+
"mariadb",
|
50 |
"mysql",
|
51 |
+
"mysql-backup",
|
52 |
"mysqldump",
|
53 |
"pdo",
|
54 |
+
"php",
|
55 |
+
"php5",
|
56 |
+
"sql"
|
57 |
]
|
58 |
},
|
59 |
{
|
60 |
"name": "symfony/finder",
|
61 |
+
"version": "v2.8.50",
|
62 |
+
"version_normalized": "2.8.50.0",
|
63 |
"source": {
|
64 |
"type": "git",
|
65 |
"url": "https://github.com/symfony/finder.git",
|
66 |
+
"reference": "1444eac52273e345d9b95129bf914639305a9ba4"
|
67 |
},
|
68 |
"dist": {
|
69 |
"type": "zip",
|
70 |
+
"url": "https://api.github.com/repos/symfony/finder/zipball/1444eac52273e345d9b95129bf914639305a9ba4",
|
71 |
+
"reference": "1444eac52273e345d9b95129bf914639305a9ba4",
|
72 |
"shasum": ""
|
73 |
},
|
74 |
"require": {
|
75 |
"php": ">=5.3.9"
|
76 |
},
|
77 |
+
"time": "2018-11-11T11:18:13+00:00",
|
78 |
"type": "library",
|
79 |
"extra": {
|
80 |
"branch-alias": {
|
109 |
},
|
110 |
{
|
111 |
"name": "symfony/process",
|
112 |
+
"version": "v2.8.50",
|
113 |
+
"version_normalized": "2.8.50.0",
|
114 |
"source": {
|
115 |
"type": "git",
|
116 |
"url": "https://github.com/symfony/process.git",
|
117 |
+
"reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8"
|
118 |
},
|
119 |
"dist": {
|
120 |
"type": "zip",
|
121 |
+
"url": "https://api.github.com/repos/symfony/process/zipball/c3591a09c78639822b0b290d44edb69bf9f05dc8",
|
122 |
+
"reference": "c3591a09c78639822b0b290d44edb69bf9f05dc8",
|
123 |
"shasum": ""
|
124 |
},
|
125 |
"require": {
|
126 |
"php": ">=5.3.9"
|
127 |
},
|
128 |
+
"time": "2018-11-11T11:18:13+00:00",
|
129 |
"type": "library",
|
130 |
"extra": {
|
131 |
"branch-alias": {
|
vendor/ifsnop/mysqldump-php/.gitignore
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
/.project
|
2 |
-
/composer.phar
|
3 |
-
/.settings
|
4 |
-
/vendor/
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/.scrutinizer.yml
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
before_commands:
|
2 |
-
- 'composer install --dev --prefer-source'
|
3 |
-
|
4 |
-
checks:
|
5 |
-
php: true
|
6 |
-
|
7 |
-
filter:
|
8 |
-
excluded_paths: [vendor/*, tests/*]
|
9 |
-
|
10 |
-
tools:
|
11 |
-
php_mess_detector:
|
12 |
-
enabled: true
|
13 |
-
config:
|
14 |
-
controversial_rules:
|
15 |
-
camel_case_method_name: false
|
16 |
-
|
17 |
-
sensiolabs_security_checker: true
|
18 |
-
|
19 |
-
# Analyzes the size and structure of a PHP project.
|
20 |
-
php_pdepend: true
|
21 |
-
php_loc:
|
22 |
-
enabled: true
|
23 |
-
|
24 |
-
# We recommend to use PHP Code Similarity Analyzer instead as it is
|
25 |
-
# robust against code modifications and provides better targets for
|
26 |
-
# refactoring.
|
27 |
-
php_cpd: false
|
28 |
-
php_sim: true
|
29 |
-
|
30 |
-
# PHP Analyzer is our own analysis tool for PHP code. It’s latest
|
31 |
-
# version is exclusively available through the hosted version on
|
32 |
-
# scrutinizer-ci.com.
|
33 |
-
php_analyzer: true
|
34 |
-
php_code_sniffer:
|
35 |
-
enabled: true
|
36 |
-
config:
|
37 |
-
standard: "PSR1"
|
38 |
-
sniffs:
|
39 |
-
generic:
|
40 |
-
naming_conventions:
|
41 |
-
camel_caps_function_name_sniff: false
|
42 |
-
files:
|
43 |
-
one_class_per_file_sniff: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/.travis.yml
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
dist: trusty
|
2 |
-
sudo: required
|
3 |
-
|
4 |
-
language: php
|
5 |
-
|
6 |
-
php:
|
7 |
-
- 7.1
|
8 |
-
- 7.0
|
9 |
-
- 5.6
|
10 |
-
- 5.5
|
11 |
-
- 5.4
|
12 |
-
# - 5.3
|
13 |
-
- hhvm
|
14 |
-
- nightly
|
15 |
-
|
16 |
-
services:
|
17 |
-
- mysql
|
18 |
-
|
19 |
-
before_script:
|
20 |
-
- curl -s http://getcomposer.org/installer | php
|
21 |
-
- php composer.phar install
|
22 |
-
- sudo service mysql stop || echo "mysql not stopped"
|
23 |
-
- echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections
|
24 |
-
- wget http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
|
25 |
-
- sudo dpkg --install mysql-apt-config_0.7.3-1_all.deb
|
26 |
-
- sudo apt-get update -q
|
27 |
-
- sudo apt-get install -q -y --force-yes -o Dpkg::Options::=--force-confnew mysql-server
|
28 |
-
- sudo mysql_upgrade
|
29 |
-
- sudo service mysql stop || echo "mysql not stopped"
|
30 |
-
- sudo mysqld_safe --skip-grant-tables &
|
31 |
-
- sleep 4
|
32 |
-
- sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
|
33 |
-
- sudo mysqladmin shutdown
|
34 |
-
- sleep 1
|
35 |
-
- sudo service mysql start
|
36 |
-
- mysql -V
|
37 |
-
- tests/create_users.sh
|
38 |
-
|
39 |
-
script:
|
40 |
-
- php src/Ifsnop/Mysqldump/Mysqldump.php
|
41 |
-
- cd tests && ./test.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/LICENSE
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
<one line to give the program's name and a brief idea of what it does.>
|
635 |
+
Copyright (C) <year> <name of author>
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
<program> Copyright (C) <year> <name of author>
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<https://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
vendor/ifsnop/mysqldump-php/README.md
CHANGED
@@ -12,6 +12,9 @@ MySQLDump - PHP
|
|
12 |
[Credits](https://github.com/ifsnop/mysqldump-php#credits)
|
13 |
|
14 |
[![Build Status](https://travis-ci.org/ifsnop/mysqldump-php.svg?branch=devel)](https://travis-ci.org/ifsnop/mysqldump-php)
|
|
|
|
|
|
|
15 |
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/ifsnop/mysqldump-php/badges/quality-score.png?s=d02891e196a3ca1298619032a538ce8ae8cafd2b)](https://scrutinizer-ci.com/g/ifsnop/mysqldump-php/)
|
16 |
[![Latest Stable Version](https://poser.pugx.org/ifsnop/mysqldump-php/v/stable.png)](https://packagist.org/packages/ifsnop/mysqldump-php)
|
17 |
|
@@ -27,35 +30,29 @@ MySQLDump-PHP is the only library that supports:
|
|
27 |
* dumps events.
|
28 |
* does extended-insert and/or complete-insert.
|
29 |
* supports virtual columns from MySQL 5.7.
|
|
|
|
|
30 |
|
31 |
## Important
|
32 |
|
33 |
-
From version 2.0, connections to database are made using the standard DSN, documented in [PDO connection string](
|
34 |
|
35 |
## Requirements
|
36 |
|
37 |
- PHP 5.3.0 or newer
|
38 |
- MySQL 4.1.0 or newer
|
39 |
-
- [PDO](
|
40 |
|
41 |
## Installing
|
42 |
|
43 |
-
Using [Composer](
|
44 |
|
45 |
```
|
46 |
-
$ composer require ifsnop/mysqldump-php
|
47 |
|
48 |
```
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
````
|
53 |
-
"require": {
|
54 |
-
"ifsnop/mysqldump-php":"2.*"
|
55 |
-
}
|
56 |
-
````
|
57 |
-
|
58 |
-
Using [Curl](http://curl.haxx.se) to always download and decompress the latest release:
|
59 |
|
60 |
```
|
61 |
$ curl --silent --location https://api.github.com/repos/ifsnop/mysqldump-php/releases | grep -i tarball_url | head -n 1 | cut -d '"' -f 4 | xargs curl --location --silent | tar xvz
|
@@ -63,9 +60,9 @@ $ curl --silent --location https://api.github.com/repos/ifsnop/mysqldump-php/rel
|
|
63 |
|
64 |
## Getting started
|
65 |
|
66 |
-
With [Autoloader](
|
67 |
|
68 |
-
```
|
69 |
<?php
|
70 |
|
71 |
use Ifsnop\Mysqldump as IMysqldump;
|
@@ -76,85 +73,128 @@ try {
|
|
76 |
} catch (\Exception $e) {
|
77 |
echo 'mysqldump-php error: ' . $e->getMessage();
|
78 |
}
|
79 |
-
|
80 |
-
?>
|
81 |
```
|
82 |
|
83 |
Plain old PHP:
|
84 |
|
85 |
-
```
|
86 |
<?php
|
87 |
|
88 |
include_once(dirname(__FILE__) . '/mysqldump-php-2.0.0/src/Ifsnop/Mysqldump/Mysqldump.php');
|
89 |
$dump = new Ifsnop\Mysqldump\Mysqldump('mysql:host=localhost;dbname=testdb', 'username', 'password');
|
90 |
$dump->start('storage/work/dump.sql');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
```
|
94 |
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
## Constructor and default parameters
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
)
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
|
|
|
|
|
|
|
|
158 |
|
159 |
## Dump Settings
|
160 |
|
@@ -169,62 +209,66 @@ Refer to the [wiki](https://github.com/ifsnop/mysqldump-php/wiki/full-example) f
|
|
169 |
- Removes the AUTO_INCREMENT option from the database definition
|
170 |
- Useful when used with no-data, so when db is recreated, it will start from 1 instead of using an old value
|
171 |
- **add-drop-database**
|
172 |
-
-
|
173 |
- **add-drop-table**
|
174 |
-
-
|
175 |
- **add-drop-triggers**
|
176 |
-
-
|
177 |
- **add-locks**
|
178 |
-
-
|
179 |
- **complete-insert**
|
180 |
-
-
|
181 |
- **databases**
|
182 |
-
-
|
183 |
- **default-character-set**
|
184 |
- utf8 (default, compatible option), utf8mb4 (for full utf8 compliance)
|
185 |
- Could be specified using the declared consts: IMysqldump\Mysqldump::UTF8 or IMysqldump\Mysqldump::UTF8MB4BZIP2
|
186 |
-
-
|
187 |
- https://mathiasbynens.be/notes/mysql-utf8mb4
|
188 |
- **disable-keys**
|
189 |
-
-
|
190 |
- **events**
|
191 |
- https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_events
|
192 |
- **extended-insert**
|
193 |
-
-
|
194 |
- **hex-blob**
|
195 |
-
-
|
|
|
|
|
196 |
- **lock-tables**
|
197 |
-
-
|
198 |
- **net_buffer_length**
|
199 |
-
-
|
200 |
- **no-autocommit**
|
201 |
- Option to disable autocommit (faster inserts, no problems with index keys)
|
202 |
-
-
|
203 |
- **no-create-info**
|
204 |
-
-
|
205 |
- **no-data**
|
206 |
-
-
|
207 |
- Do not dump data for these tables (array of table names), support regexps, `true` to ignore all tables
|
208 |
- **routines**
|
209 |
-
-
|
210 |
- **single-transaction**
|
211 |
-
-
|
212 |
- **skip-comments**
|
213 |
-
-
|
214 |
- **skip-dump-date**
|
215 |
-
-
|
216 |
- **skip-triggers**
|
217 |
-
-
|
218 |
- **skip-tz-utc**
|
219 |
-
-
|
|
|
|
|
220 |
- **where**
|
221 |
-
-
|
222 |
|
223 |
The following options are now enabled by default, and there is no way to disable them since
|
224 |
they should always be used.
|
225 |
|
226 |
- **disable-foreign-keys-check**
|
227 |
-
-
|
228 |
|
229 |
## PDO Settings
|
230 |
|
@@ -232,9 +276,9 @@ they should always be used.
|
|
232 |
- **PDO::ATTR_ERRMODE**
|
233 |
- **PDO::MYSQL_ATTR_INIT_COMMAND**
|
234 |
- **PDO::MYSQL_ATTR_USE_BUFFERED_QUERY**
|
235 |
-
-
|
236 |
-
-
|
237 |
-
-
|
238 |
|
239 |
## Errors
|
240 |
|
@@ -251,7 +295,7 @@ To dump a database, you need the following privileges :
|
|
251 |
|
252 |
Use **SHOW GRANTS FOR user@host;** to know what privileges user has. See the following link for more information:
|
253 |
|
254 |
-
[Which are the minimum privileges required to get a backup of a MySQL database schema?](
|
255 |
|
256 |
## Tests
|
257 |
|
@@ -259,27 +303,45 @@ Current code for testing is an ugly hack. Probably there are much better ways
|
|
259 |
of doing them using PHPUnit, so PR's are welcomed. The testing script creates
|
260 |
and populates a database using all possible datatypes. Then it exports it
|
261 |
using both mysqldump-php and mysqldump, and compares the output. Only if
|
262 |
-
it is identical tests are OK.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
|
264 |
-
##
|
265 |
|
266 |
-
Write more tests.
|
267 |
|
268 |
## Contributing
|
269 |
|
270 |
Format all code to PHP-FIG standards.
|
271 |
-
|
272 |
|
273 |
## License
|
274 |
|
275 |
-
This project is open-sourced software licensed under the [GPL license](
|
276 |
|
277 |
## Credits
|
278 |
|
279 |
After more than 8 years, there is barely anything left from the original source code, but:
|
280 |
|
281 |
Originally based on James Elliott's script from 2009.
|
282 |
-
|
283 |
|
284 |
Adapted and extended by Michael J. Calkins.
|
285 |
https://github.com/clouddueling
|
12 |
[Credits](https://github.com/ifsnop/mysqldump-php#credits)
|
13 |
|
14 |
[![Build Status](https://travis-ci.org/ifsnop/mysqldump-php.svg?branch=devel)](https://travis-ci.org/ifsnop/mysqldump-php)
|
15 |
+
[![Total Downloads](https://poser.pugx.org/ifsnop/mysqldump-php/downloads)](https://packagist.org/packages/ifsnop/mysqldump-php)
|
16 |
+
[![Monthly Downloads](https://poser.pugx.org/ifsnop/mysqldump-php/d/monthly)](https://packagist.org/packages/ifsnop/mysqldump-php)
|
17 |
+
[![Daily Downloads](https://poser.pugx.org/ifsnop/mysqldump-php/d/daily)](https://packagist.org/packages/ifsnop/mysqldump-php)
|
18 |
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/ifsnop/mysqldump-php/badges/quality-score.png?s=d02891e196a3ca1298619032a538ce8ae8cafd2b)](https://scrutinizer-ci.com/g/ifsnop/mysqldump-php/)
|
19 |
[![Latest Stable Version](https://poser.pugx.org/ifsnop/mysqldump-php/v/stable.png)](https://packagist.org/packages/ifsnop/mysqldump-php)
|
20 |
|
30 |
* dumps events.
|
31 |
* does extended-insert and/or complete-insert.
|
32 |
* supports virtual columns from MySQL 5.7.
|
33 |
+
* does insert-ignore, like a REPLACE but ignoring errors if a duplicate key exists.
|
34 |
+
* modifying data from database on-the-fly when dumping, using hooks.
|
35 |
|
36 |
## Important
|
37 |
|
38 |
+
From version 2.0, connections to database are made using the standard DSN, documented in [PDO connection string](https://secure.php.net/manual/en/ref.pdo-mysql.connection.php).
|
39 |
|
40 |
## Requirements
|
41 |
|
42 |
- PHP 5.3.0 or newer
|
43 |
- MySQL 4.1.0 or newer
|
44 |
+
- [PDO](https://secure.php.net/pdo)
|
45 |
|
46 |
## Installing
|
47 |
|
48 |
+
Using [Composer](https://getcomposer.org/):
|
49 |
|
50 |
```
|
51 |
+
$ composer require ifsnop/mysqldump-php
|
52 |
|
53 |
```
|
54 |
|
55 |
+
Using [Curl](https://curl.haxx.se/) to always download and decompress the latest release:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
```
|
58 |
$ curl --silent --location https://api.github.com/repos/ifsnop/mysqldump-php/releases | grep -i tarball_url | head -n 1 | cut -d '"' -f 4 | xargs curl --location --silent | tar xvz
|
60 |
|
61 |
## Getting started
|
62 |
|
63 |
+
With [Autoloader](https://www.php-fig.org/psr/psr-4/)/[Composer](https://getcomposer.org):
|
64 |
|
65 |
+
```php
|
66 |
<?php
|
67 |
|
68 |
use Ifsnop\Mysqldump as IMysqldump;
|
73 |
} catch (\Exception $e) {
|
74 |
echo 'mysqldump-php error: ' . $e->getMessage();
|
75 |
}
|
|
|
|
|
76 |
```
|
77 |
|
78 |
Plain old PHP:
|
79 |
|
80 |
+
```php
|
81 |
<?php
|
82 |
|
83 |
include_once(dirname(__FILE__) . '/mysqldump-php-2.0.0/src/Ifsnop/Mysqldump/Mysqldump.php');
|
84 |
$dump = new Ifsnop\Mysqldump\Mysqldump('mysql:host=localhost;dbname=testdb', 'username', 'password');
|
85 |
$dump->start('storage/work/dump.sql');
|
86 |
+
```
|
87 |
+
|
88 |
+
Refer to the [wiki](https://github.com/ifsnop/mysqldump-php/wiki/Full-usage-example) for some examples and a comparision between mysqldump and mysqldump-php dumps.
|
89 |
+
|
90 |
+
## Changing values when exporting
|
91 |
+
You can register a callable that will be used to transform values during the export. An example use-case for this is removing sensitive data from database dumps:
|
92 |
+
|
93 |
+
```php
|
94 |
+
$dumper = new IMysqldump\Mysqldump('mysql:host=localhost;dbname=testdb', 'username', 'password');
|
95 |
+
|
96 |
+
$dumper->setTransformColumnValueHook(function ($tableName, $colName, $colValue) {
|
97 |
+
if ($colName === 'social_security_number') {
|
98 |
+
return (string) rand(1000000, 9999999);
|
99 |
+
}
|
100 |
+
|
101 |
+
return $colValue;
|
102 |
+
});
|
103 |
+
|
104 |
+
$dumper->start('storage/work/dump.sql');
|
105 |
+
```
|
106 |
+
|
107 |
+
## Table specific export conditions
|
108 |
+
You can register table specific 'where' clauses to limit data on a per table basis. These override the default `where` dump setting:
|
109 |
|
110 |
+
```php
|
111 |
+
$dumper = new IMysqldump\Mysqldump('mysql:host=localhost;dbname=testdb', 'username', 'password');
|
112 |
+
|
113 |
+
$dumper->setTableWheres(array(
|
114 |
+
'users' => 'date_registered > NOW() - INTERVAL 3 MONTH AND deleted=0',
|
115 |
+
'logs' => 'date_logged > NOW() - INTERVAL 1 DAY',
|
116 |
+
'posts' => 'isLive=1'
|
117 |
+
));
|
118 |
```
|
119 |
|
120 |
+
## Table specific export limits
|
121 |
+
You can register table specific 'limits' to limit the returned rows on a per table basis:
|
122 |
+
|
123 |
+
```php
|
124 |
+
$dumper = new IMysqldump\Mysqldump('mysql:host=localhost;dbname=testdb', 'username', 'password');
|
125 |
+
|
126 |
+
$dumper->setTableLimits(array(
|
127 |
+
'users' => 300,
|
128 |
+
'logs' => 50,
|
129 |
+
'posts' => 10
|
130 |
+
));
|
131 |
+
```
|
132 |
|
133 |
## Constructor and default parameters
|
134 |
+
```php
|
135 |
+
/**
|
136 |
+
* Constructor of Mysqldump. Note that in the case of an SQLite database
|
137 |
+
* connection, the filename must be in the $db parameter.
|
138 |
+
*
|
139 |
+
* @param string $dsn PDO DSN connection string
|
140 |
+
* @param string $user SQL account username
|
141 |
+
* @param string $pass SQL account password
|
142 |
+
* @param array $dumpSettings SQL database settings
|
143 |
+
* @param array $pdoSettings PDO configured attributes
|
144 |
+
*/
|
145 |
+
public function __construct(
|
146 |
+
$dsn = '',
|
147 |
+
$user = '',
|
148 |
+
$pass = '',
|
149 |
+
$dumpSettings = array(),
|
150 |
+
$pdoSettings = array()
|
151 |
+
)
|
152 |
+
|
153 |
+
$dumpSettingsDefault = array(
|
154 |
+
'include-tables' => array(),
|
155 |
+
'exclude-tables' => array(),
|
156 |
+
'compress' => Mysqldump::NONE,
|
157 |
+
'init_commands' => array(),
|
158 |
+
'no-data' => array(),
|
159 |
+
'reset-auto-increment' => false,
|
160 |
+
'add-drop-database' => false,
|
161 |
+
'add-drop-table' => false,
|
162 |
+
'add-drop-trigger' => true,
|
163 |
+
'add-locks' => true,
|
164 |
+
'complete-insert' => false,
|
165 |
+
'databases' => false,
|
166 |
+
'default-character-set' => Mysqldump::UTF8,
|
167 |
+
'disable-keys' => true,
|
168 |
+
'extended-insert' => true,
|
169 |
+
'events' => false,
|
170 |
+
'hex-blob' => true, /* faster than escaped content */
|
171 |
+
'insert-ignore' => false,
|
172 |
+
'net_buffer_length' => self::MAXLINESIZE,
|
173 |
+
'no-autocommit' => true,
|
174 |
+
'no-create-info' => false,
|
175 |
+
'lock-tables' => true,
|
176 |
+
'routines' => false,
|
177 |
+
'single-transaction' => true,
|
178 |
+
'skip-triggers' => false,
|
179 |
+
'skip-tz-utc' => false,
|
180 |
+
'skip-comments' => false,
|
181 |
+
'skip-dump-date' => false,
|
182 |
+
'skip-definer' => false,
|
183 |
+
'where' => '',
|
184 |
+
/* deprecated */
|
185 |
+
'disable-foreign-keys-check' => true
|
186 |
+
);
|
187 |
+
|
188 |
+
$pdoSettingsDefaults = array(
|
189 |
+
PDO::ATTR_PERSISTENT => true,
|
190 |
+
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
191 |
+
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false
|
192 |
+
);
|
193 |
+
|
194 |
+
// missing settings in constructor will be replaced by default options
|
195 |
+
$this->_pdoSettings = self::array_replace_recursive($pdoSettingsDefault, $pdoSettings);
|
196 |
+
$this->_dumpSettings = self::array_replace_recursive($dumpSettingsDefault, $dumpSettings);
|
197 |
+
```
|
198 |
|
199 |
## Dump Settings
|
200 |
|
209 |
- Removes the AUTO_INCREMENT option from the database definition
|
210 |
- Useful when used with no-data, so when db is recreated, it will start from 1 instead of using an old value
|
211 |
- **add-drop-database**
|
212 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_add-drop-database
|
213 |
- **add-drop-table**
|
214 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_add-drop-table
|
215 |
- **add-drop-triggers**
|
216 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_add-drop-trigger
|
217 |
- **add-locks**
|
218 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_add-locks
|
219 |
- **complete-insert**
|
220 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_complete-insert
|
221 |
- **databases**
|
222 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_databases
|
223 |
- **default-character-set**
|
224 |
- utf8 (default, compatible option), utf8mb4 (for full utf8 compliance)
|
225 |
- Could be specified using the declared consts: IMysqldump\Mysqldump::UTF8 or IMysqldump\Mysqldump::UTF8MB4BZIP2
|
226 |
+
- https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
|
227 |
- https://mathiasbynens.be/notes/mysql-utf8mb4
|
228 |
- **disable-keys**
|
229 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_disable-keys
|
230 |
- **events**
|
231 |
- https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_events
|
232 |
- **extended-insert**
|
233 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_extended-insert
|
234 |
- **hex-blob**
|
235 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_hex-blob
|
236 |
+
- **insert-ignore**
|
237 |
+
- https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_insert-ignore
|
238 |
- **lock-tables**
|
239 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_lock-tables
|
240 |
- **net_buffer_length**
|
241 |
+
- https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_net_buffer_length
|
242 |
- **no-autocommit**
|
243 |
- Option to disable autocommit (faster inserts, no problems with index keys)
|
244 |
+
- https://dev.mysql.com/doc/refman/4.1/en/commit.html
|
245 |
- **no-create-info**
|
246 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_no-create-info
|
247 |
- **no-data**
|
248 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_no-data
|
249 |
- Do not dump data for these tables (array of table names), support regexps, `true` to ignore all tables
|
250 |
- **routines**
|
251 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_routines
|
252 |
- **single-transaction**
|
253 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_single-transaction
|
254 |
- **skip-comments**
|
255 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_comments
|
256 |
- **skip-dump-date**
|
257 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_dump-date
|
258 |
- **skip-triggers**
|
259 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_triggers
|
260 |
- **skip-tz-utc**
|
261 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_tz-utc
|
262 |
+
- **skip-definer**
|
263 |
+
- https://dev.mysql.com/doc/refman/5.7/en/mysqlpump.html#option_mysqlpump_skip-definer
|
264 |
- **where**
|
265 |
+
- https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_where
|
266 |
|
267 |
The following options are now enabled by default, and there is no way to disable them since
|
268 |
they should always be used.
|
269 |
|
270 |
- **disable-foreign-keys-check**
|
271 |
+
- https://dev.mysql.com/doc/refman/5.5/en/optimizing-innodb-bulk-data-loading.html
|
272 |
|
273 |
## PDO Settings
|
274 |
|
276 |
- **PDO::ATTR_ERRMODE**
|
277 |
- **PDO::MYSQL_ATTR_INIT_COMMAND**
|
278 |
- **PDO::MYSQL_ATTR_USE_BUFFERED_QUERY**
|
279 |
+
- https://secure.php.net/manual/en/ref.pdo-mysql.php
|
280 |
+
- https://stackoverflow.com/questions/13728106/unexpectedly-hitting-php-memory-limit-with-a-single-pdo-query/13729745#13729745
|
281 |
+
- https://secure.php.net/manual/en/mysqlinfo.concepts.buffering.php
|
282 |
|
283 |
## Errors
|
284 |
|
295 |
|
296 |
Use **SHOW GRANTS FOR user@host;** to know what privileges user has. See the following link for more information:
|
297 |
|
298 |
+
[Which are the minimum privileges required to get a backup of a MySQL database schema?](https://dba.stackexchange.com/questions/55546/which-are-the-minimum-privileges-required-to-get-a-backup-of-a-mysql-database-sc/55572#55572)
|
299 |
|
300 |
## Tests
|
301 |
|
303 |
of doing them using PHPUnit, so PR's are welcomed. The testing script creates
|
304 |
and populates a database using all possible datatypes. Then it exports it
|
305 |
using both mysqldump-php and mysqldump, and compares the output. Only if
|
306 |
+
it is identical tests are OK. After [this](https://github.com/ifsnop/mysqldump-php/commit/8496fbb1b26dde404804bc8865ec32044da5b813)
|
307 |
+
commit, some test are performed using phpunit.
|
308 |
+
|
309 |
+
Some tests are skipped if mysql server doesn't support them.
|
310 |
+
|
311 |
+
A couple of tests are only comparing between original sql code and
|
312 |
+
mysqldump-php generated sql, because some options are not available in
|
313 |
+
mysqldump.
|
314 |
+
|
315 |
+
## Bugs (from mysqldump, not from mysqldump-php)
|
316 |
+
|
317 |
+
After [this](https://bugs.mysql.com/bug.php?id=80150) bug report, a new
|
318 |
+
one has been introduced. _binary is appended also when hex-blob option is
|
319 |
+
used, if the value is empty.
|
320 |
+
|
321 |
+
## Backporting
|
322 |
+
|
323 |
+
mysqldump-php is not backwards compatible with php 5.2 because we it uses
|
324 |
+
namespaces. However, it could be trivially fixed if needed.
|
325 |
|
326 |
+
## Todo
|
327 |
|
328 |
+
Write more tests, test with mariadb also.
|
329 |
|
330 |
## Contributing
|
331 |
|
332 |
Format all code to PHP-FIG standards.
|
333 |
+
https://www.php-fig.org/
|
334 |
|
335 |
## License
|
336 |
|
337 |
+
This project is open-sourced software licensed under the [GPL license](https://www.gnu.org/copyleft/gpl.html)
|
338 |
|
339 |
## Credits
|
340 |
|
341 |
After more than 8 years, there is barely anything left from the original source code, but:
|
342 |
|
343 |
Originally based on James Elliott's script from 2009.
|
344 |
+
https://code.google.com/archive/p/db-mysqldump/
|
345 |
|
346 |
Adapted and extended by Michael J. Calkins.
|
347 |
https://github.com/clouddueling
|
vendor/ifsnop/mysqldump-php/composer.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
{
|
2 |
"name": "ifsnop/mysqldump-php",
|
3 |
-
"description": "
|
4 |
"type": "library",
|
5 |
-
"keywords": ["
|
6 |
"homepage": "https://github.com/ifsnop/mysqldump-php",
|
7 |
-
"license": "
|
8 |
"minimum-stability": "stable",
|
9 |
"authors": [
|
10 |
{
|
@@ -18,7 +18,7 @@
|
|
18 |
},
|
19 |
"require-dev": {
|
20 |
"squizlabs/php_codesniffer": "1.*",
|
21 |
-
"phpunit/phpunit": "
|
22 |
},
|
23 |
"autoload": {
|
24 |
"psr-4": {"Ifsnop\\": "src/Ifsnop/"}
|
1 |
{
|
2 |
"name": "ifsnop/mysqldump-php",
|
3 |
+
"description": "PHP version of mysqldump cli that comes with MySQL",
|
4 |
"type": "library",
|
5 |
+
"keywords": ["mysql", "mysqldump", "pdo", "php7", "php5", "database", "php", "sql", "hhvm", "mariadb", "mysql-backup"],
|
6 |
"homepage": "https://github.com/ifsnop/mysqldump-php",
|
7 |
+
"license": "GPL-3.0-or-later",
|
8 |
"minimum-stability": "stable",
|
9 |
"authors": [
|
10 |
{
|
18 |
},
|
19 |
"require-dev": {
|
20 |
"squizlabs/php_codesniffer": "1.*",
|
21 |
+
"phpunit/phpunit": "4.8.36"
|
22 |
},
|
23 |
"autoload": {
|
24 |
"psr-4": {"Ifsnop\\": "src/Ifsnop/"}
|
vendor/ifsnop/mysqldump-php/phpunit.xml
CHANGED
@@ -1,18 +1,21 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<phpunit
|
3 |
-
|
4 |
bootstrap="vendor/autoload.php"
|
|
|
|
|
|
|
|
|
|
|
5 |
colors="true"
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
>
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
</testsuite>
|
17 |
-
</testsuites>
|
18 |
</phpunit>
|
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 |
bootstrap="vendor/autoload.php"
|
5 |
+
backupGlobals="false"
|
6 |
+
beStrictAboutCoversAnnotation="true"
|
7 |
+
beStrictAboutOutputDuringTests="true"
|
8 |
+
beStrictAboutTestsThatDoNotTestAnything="true"
|
9 |
+
beStrictAboutTodoAnnotatedTests="true"
|
10 |
colors="true"
|
11 |
+
verbose="true">
|
12 |
+
<testsuite name="default">
|
13 |
+
<directory suffix="Test.php">unit-tests</directory>
|
14 |
+
</testsuite>
|
15 |
+
|
16 |
+
<filter>
|
17 |
+
<whitelist processUncoveredFilesFromWhitelist="true">
|
18 |
+
<directory suffix=".php">src</directory>
|
19 |
+
</whitelist>
|
20 |
+
</filter>
|
|
|
|
|
21 |
</phpunit>
|
vendor/ifsnop/mysqldump-php/src/Ifsnop/Mysqldump/Mysqldump.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
-
*
|
6 |
*
|
7 |
* @category Library
|
8 |
* @package Ifsnop\Mysqldump
|
9 |
-
* @author Michael J. Calkins <clouddueling@github.com>
|
10 |
* @author Diego Torres <ifsnop@github.com>
|
11 |
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
12 |
* @link https://github.com/ifsnop/mysqldump-php
|
@@ -20,11 +20,9 @@ use PDO;
|
|
20 |
use PDOException;
|
21 |
|
22 |
/**
|
23 |
-
*
|
24 |
*
|
25 |
* @category Library
|
26 |
-
* @package Ifsnop\Mysqldump
|
27 |
-
* @author Michael J. Calkins <clouddueling@github.com>
|
28 |
* @author Diego Torres <ifsnop@github.com>
|
29 |
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
30 |
* @link https://github.com/ifsnop/mysqldump-php
|
@@ -33,69 +31,85 @@ use PDOException;
|
|
33 |
class Mysqldump
|
34 |
{
|
35 |
|
36 |
-
// Same as mysqldump
|
37 |
const MAXLINESIZE = 1000000;
|
38 |
|
39 |
-
//
|
40 |
-
const GZIP
|
41 |
const BZIP2 = 'Bzip2';
|
42 |
-
const NONE
|
43 |
|
44 |
-
//
|
45 |
-
const UTF8
|
46 |
const UTF8MB4 = 'utf8mb4';
|
47 |
|
48 |
/**
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
public $user;
|
|
|
53 |
/**
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
public $pass;
|
|
|
58 |
/**
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
public $dsn;
|
|
|
63 |
/**
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
public $fileName = 'php://
|
68 |
|
69 |
-
// Internal stuff
|
70 |
private $tables = array();
|
71 |
private $views = array();
|
72 |
private $triggers = array();
|
73 |
private $procedures = array();
|
74 |
private $events = array();
|
75 |
private $dbHandler = null;
|
76 |
-
private $dbType;
|
77 |
private $compressManager;
|
78 |
private $typeAdapter;
|
79 |
private $dumpSettings = array();
|
80 |
private $pdoSettings = array();
|
81 |
private $version;
|
82 |
private $tableColumnTypes = array();
|
|
|
|
|
83 |
/**
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
private $dbName;
|
|
|
88 |
/**
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
private $host;
|
|
|
93 |
/**
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
private $dsnArray = array();
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
/**
|
100 |
* Constructor of Mysqldump. Note that in the case of an SQLite database
|
101 |
* connection, the filename must be in the $db parameter.
|
@@ -131,6 +145,7 @@ class Mysqldump
|
|
131 |
'extended-insert' => true,
|
132 |
'events' => false,
|
133 |
'hex-blob' => true, /* faster than escaped content */
|
|
|
134 |
'net_buffer_length' => self::MAXLINESIZE,
|
135 |
'no-autocommit' => true,
|
136 |
'no-create-info' => false,
|
@@ -141,6 +156,7 @@ class Mysqldump
|
|
141 |
'skip-tz-utc' => false,
|
142 |
'skip-comments' => false,
|
143 |
'skip-dump-date' => false,
|
|
|
144 |
'where' => '',
|
145 |
/* deprecated */
|
146 |
'disable-foreign-keys-check' => true
|
@@ -149,28 +165,32 @@ class Mysqldump
|
|
149 |
$pdoSettingsDefault = array(
|
150 |
PDO::ATTR_PERSISTENT => true,
|
151 |
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
152 |
-
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false
|
153 |
);
|
154 |
|
155 |
$this->user = $user;
|
156 |
$this->pass = $pass;
|
157 |
$this->parseDsn($dsn);
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
$this->pdoSettings = self::array_replace_recursive($pdoSettingsDefault, $pdoSettings);
|
159 |
$this->dumpSettings = self::array_replace_recursive($dumpSettingsDefault, $dumpSettings);
|
160 |
-
|
161 |
-
$this->dumpSettings['init_commands'][] = "SET NAMES " . $this->dumpSettings['default-character-set'];
|
162 |
|
163 |
if (false === $this->dumpSettings['skip-tz-utc']) {
|
164 |
$this->dumpSettings['init_commands'][] = "SET TIME_ZONE='+00:00'";
|
165 |
}
|
166 |
|
167 |
$diff = array_diff(array_keys($this->dumpSettings), array_keys($dumpSettingsDefault));
|
168 |
-
if (count($diff)>0) {
|
169 |
-
throw new Exception("Unexpected value in dumpSettings: ("
|
170 |
}
|
171 |
|
172 |
-
if (
|
173 |
-
!is_array($this->dumpSettings['exclude-tables'])
|
174 |
throw new Exception("Include-tables and exclude-tables should be arrays");
|
175 |
}
|
176 |
|
@@ -183,7 +203,6 @@ class Mysqldump
|
|
183 |
|
184 |
/**
|
185 |
* Destructor of Mysqldump. Unsets dbHandlers and database objects.
|
186 |
-
*
|
187 |
*/
|
188 |
public function __destruct()
|
189 |
{
|
@@ -192,7 +211,7 @@ class Mysqldump
|
|
192 |
|
193 |
/**
|
194 |
* Custom array_replace_recursive to be used if PHP < 5.3
|
195 |
-
* Replaces elements from passed arrays into the first array recursively
|
196 |
*
|
197 |
* @param array $array1 The array in which elements are replaced
|
198 |
* @param array $array2 The array from which elements will be extracted
|
@@ -215,6 +234,63 @@ class Mysqldump
|
|
215 |
return $array1;
|
216 |
}
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
/**
|
219 |
* Parse DSN string and extract dbname value
|
220 |
* Several examples of a DSN string
|
@@ -223,6 +299,7 @@ class Mysqldump
|
|
223 |
* mysql:unix_socket=/tmp/mysql.sock;dbname=testdb
|
224 |
*
|
225 |
* @param string $dsn dsn string to parse
|
|
|
226 |
*/
|
227 |
private function parseDsn($dsn)
|
228 |
{
|
@@ -231,7 +308,7 @@ class Mysqldump
|
|
231 |
}
|
232 |
|
233 |
$this->dsn = $dsn;
|
234 |
-
$this->dbType = strtolower(substr($dsn, 0, $pos));
|
235 |
|
236 |
if (empty($this->dbType)) {
|
237 |
throw new Exception("Missing database type from DSN string");
|
@@ -239,7 +316,7 @@ class Mysqldump
|
|
239 |
|
240 |
$dsn = substr($dsn, $pos + 1);
|
241 |
|
242 |
-
foreach(explode(";", $dsn) as $kvp) {
|
243 |
$kvpArr = explode("=", $kvp);
|
244 |
$this->dsnArray[strtolower($kvpArr[0])] = $kvpArr[1];
|
245 |
}
|
@@ -249,8 +326,7 @@ class Mysqldump
|
|
249 |
throw new Exception("Missing host from DSN string");
|
250 |
}
|
251 |
$this->host = (!empty($this->dsnArray['host'])) ?
|
252 |
-
$this->dsnArray['host'] :
|
253 |
-
$this->dsnArray['unix_socket'];
|
254 |
|
255 |
if (empty($this->dsnArray['dbname'])) {
|
256 |
throw new Exception("Missing database name from DSN string");
|
@@ -262,17 +338,17 @@ class Mysqldump
|
|
262 |
}
|
263 |
|
264 |
/**
|
265 |
-
* Connect with PDO
|
266 |
*
|
267 |
* @return null
|
268 |
*/
|
269 |
private function connect()
|
270 |
{
|
271 |
-
// Connecting with PDO
|
272 |
try {
|
273 |
switch ($this->dbType) {
|
274 |
case 'sqlite':
|
275 |
-
$this->dbHandler = @new PDO("sqlite:"
|
276 |
break;
|
277 |
case 'mysql':
|
278 |
case 'pgsql':
|
@@ -284,35 +360,36 @@ class Mysqldump
|
|
284 |
$this->pdoSettings
|
285 |
);
|
286 |
// Execute init commands once connected
|
287 |
-
foreach($this->dumpSettings['init_commands'] as $stmt) {
|
288 |
$this->dbHandler->exec($stmt);
|
289 |
}
|
290 |
// Store server version
|
291 |
$this->version = $this->dbHandler->getAttribute(PDO::ATTR_SERVER_VERSION);
|
292 |
break;
|
293 |
default:
|
294 |
-
throw new Exception("Unsupported database type ("
|
295 |
}
|
296 |
} catch (PDOException $e) {
|
297 |
throw new Exception(
|
298 |
-
"Connection to "
|
299 |
$e->getMessage()
|
300 |
);
|
301 |
}
|
302 |
|
303 |
-
if (
|
304 |
-
throw new Exception("Connection to "
|
305 |
}
|
306 |
|
307 |
$this->dbHandler->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_NATURAL);
|
308 |
-
$this->typeAdapter = TypeAdapterFactory::create($this->dbType, $this->dbHandler);
|
309 |
}
|
310 |
|
311 |
/**
|
312 |
-
*
|
313 |
*
|
314 |
* @param string $filename Name of file to write sql dump to
|
315 |
* @return null
|
|
|
316 |
*/
|
317 |
public function start($filename = '')
|
318 |
{
|
@@ -332,7 +409,7 @@ class Mysqldump
|
|
332 |
|
333 |
// Store server settings and use sanner defaults to dump
|
334 |
$this->compressManager->write(
|
335 |
-
$this->typeAdapter->backup_parameters(
|
336 |
);
|
337 |
|
338 |
if ($this->dumpSettings['databases']) {
|
@@ -346,8 +423,13 @@ class Mysqldump
|
|
346 |
}
|
347 |
}
|
348 |
|
349 |
-
// Get table, view and
|
350 |
-
|
|
|
|
|
|
|
|
|
|
|
351 |
|
352 |
if ($this->dumpSettings['databases']) {
|
353 |
$this->compressManager->write(
|
@@ -358,56 +440,58 @@ class Mysqldump
|
|
358 |
// If there still are some tables/views in include-tables array,
|
359 |
// that means that some tables or views weren't found.
|
360 |
// Give proper error and exit.
|
361 |
-
// This check will be removed once include-tables supports regexps
|
362 |
if (0 < count($this->dumpSettings['include-tables'])) {
|
363 |
$name = implode(",", $this->dumpSettings['include-tables']);
|
364 |
-
throw new Exception("Table ("
|
365 |
}
|
366 |
|
367 |
$this->exportTables();
|
368 |
-
$this->exportViews();
|
369 |
$this->exportTriggers();
|
|
|
370 |
$this->exportProcedures();
|
371 |
$this->exportEvents();
|
372 |
|
373 |
-
// Restore saved parameters
|
374 |
$this->compressManager->write(
|
375 |
-
$this->typeAdapter->restore_parameters(
|
376 |
);
|
377 |
-
// Write some stats to output file
|
378 |
$this->compressManager->write($this->getDumpFileFooter());
|
379 |
-
// Close output file
|
380 |
$this->compressManager->close();
|
|
|
|
|
381 |
}
|
382 |
|
383 |
/**
|
384 |
-
* Returns header for dump file
|
385 |
*
|
386 |
* @return string
|
387 |
*/
|
388 |
private function getDumpFileHeader()
|
389 |
{
|
390 |
$header = '';
|
391 |
-
if (
|
392 |
// Some info about software, source and time
|
393 |
-
$header = "-- mysqldump-php https://github.com/ifsnop/mysqldump-php"
|
394 |
-
"--"
|
395 |
-
"-- Host: {$this->host}\tDatabase: {$this->dbName}"
|
396 |
-
"-- ------------------------------------------------------"
|
397 |
|
398 |
-
if (
|
399 |
-
$header .= "-- Server version \t"
|
400 |
}
|
401 |
|
402 |
-
if (
|
403 |
-
$header .= "-- Date: "
|
404 |
}
|
405 |
}
|
406 |
return $header;
|
407 |
}
|
408 |
|
409 |
/**
|
410 |
-
* Returns footer for dump file
|
411 |
*
|
412 |
* @return string
|
413 |
*/
|
@@ -417,7 +501,7 @@ class Mysqldump
|
|
417 |
if (!$this->dumpSettings['skip-comments']) {
|
418 |
$footer .= '-- Dump completed';
|
419 |
if (!$this->dumpSettings['skip-dump-date']) {
|
420 |
-
$footer .= ' on: '
|
421 |
}
|
422 |
$footer .= PHP_EOL;
|
423 |
}
|
@@ -426,12 +510,12 @@ class Mysqldump
|
|
426 |
}
|
427 |
|
428 |
/**
|
429 |
-
* Reads table
|
430 |
* Fills $this->tables array so they will be dumped later.
|
431 |
*
|
432 |
* @return null
|
433 |
*/
|
434 |
-
private function
|
435 |
{
|
436 |
// Listing all tables from database
|
437 |
if (empty($this->dumpSettings['include-tables'])) {
|
@@ -452,7 +536,17 @@ class Mysqldump
|
|
452 |
}
|
453 |
}
|
454 |
}
|
|
|
|
|
455 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
// Listing all views from database
|
457 |
if (empty($this->dumpSettings['include-views'])) {
|
458 |
// include all views for now, blacklisting happens later
|
@@ -472,43 +566,75 @@ class Mysqldump
|
|
472 |
}
|
473 |
}
|
474 |
}
|
|
|
|
|
475 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
// Listing all triggers from database
|
477 |
if (false === $this->dumpSettings['skip-triggers']) {
|
478 |
foreach ($this->dbHandler->query($this->typeAdapter->show_triggers($this->dbName)) as $row) {
|
479 |
array_push($this->triggers, $row['Trigger']);
|
480 |
}
|
481 |
}
|
|
|
|
|
482 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
// Listing all procedures from database
|
484 |
if ($this->dumpSettings['routines']) {
|
485 |
foreach ($this->dbHandler->query($this->typeAdapter->show_procedures($this->dbName)) as $row) {
|
486 |
array_push($this->procedures, $row['procedure_name']);
|
487 |
}
|
488 |
}
|
|
|
|
|
489 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
// Listing all events from database
|
491 |
if ($this->dumpSettings['events']) {
|
492 |
foreach ($this->dbHandler->query($this->typeAdapter->show_events($this->dbName)) as $row) {
|
493 |
array_push($this->events, $row['event_name']);
|
494 |
}
|
495 |
}
|
|
|
496 |
}
|
497 |
|
498 |
/**
|
499 |
* Compare if $table name matches with a definition inside $arr
|
500 |
* @param $table string
|
501 |
* @param $arr array with strings or patterns
|
502 |
-
* @return
|
503 |
*/
|
504 |
-
private function matches($table, $arr)
|
|
|
505 |
$match = false;
|
506 |
|
507 |
foreach ($arr as $pattern) {
|
508 |
-
if (
|
509 |
continue;
|
510 |
}
|
511 |
-
if (
|
512 |
$match = true;
|
513 |
}
|
514 |
}
|
@@ -525,14 +651,14 @@ class Mysqldump
|
|
525 |
{
|
526 |
// Exporting tables one by one
|
527 |
foreach ($this->tables as $table) {
|
528 |
-
if (
|
529 |
continue;
|
530 |
}
|
531 |
$this->getTableStructure($table);
|
532 |
-
if (
|
533 |
$this->listValues($table);
|
534 |
-
}
|
535 |
-
|| $this->matches($table, $this->dumpSettings['no-data'])
|
536 |
continue;
|
537 |
} else {
|
538 |
$this->listValues($table);
|
@@ -550,14 +676,14 @@ class Mysqldump
|
|
550 |
if (false === $this->dumpSettings['no-create-info']) {
|
551 |
// Exporting views one by one
|
552 |
foreach ($this->views as $view) {
|
553 |
-
if (
|
554 |
continue;
|
555 |
}
|
556 |
$this->tableColumnTypes[$view] = $this->getTableColumnTypes($view);
|
557 |
$this->getViewStructureTable($view);
|
558 |
}
|
559 |
foreach ($this->views as $view) {
|
560 |
-
if (
|
561 |
continue;
|
562 |
}
|
563 |
$this->getViewStructureView($view);
|
@@ -616,9 +742,9 @@ class Mysqldump
|
|
616 |
if (!$this->dumpSettings['no-create-info']) {
|
617 |
$ret = '';
|
618 |
if (!$this->dumpSettings['skip-comments']) {
|
619 |
-
$ret = "--"
|
620 |
-
"-- Table structure for table `$tableName`"
|
621 |
-
"--"
|
622 |
}
|
623 |
$stmt = $this->typeAdapter->show_create_table($tableName);
|
624 |
foreach ($this->dbHandler->query($stmt) as $r) {
|
@@ -629,7 +755,7 @@ class Mysqldump
|
|
629 |
);
|
630 |
}
|
631 |
$this->compressManager->write(
|
632 |
-
$this->typeAdapter->create_table($r
|
633 |
);
|
634 |
break;
|
635 |
}
|
@@ -645,14 +771,15 @@ class Mysqldump
|
|
645 |
* @return array type column types detailed
|
646 |
*/
|
647 |
|
648 |
-
private function getTableColumnTypes($tableName)
|
|
|
649 |
$columnTypes = array();
|
650 |
$columns = $this->dbHandler->query(
|
651 |
$this->typeAdapter->show_columns($tableName)
|
652 |
);
|
653 |
$columns->setFetchMode(PDO::FETCH_ASSOC);
|
654 |
|
655 |
-
foreach($columns as $key => $col) {
|
656 |
$types = $this->typeAdapter->parseColumnType($col);
|
657 |
$columnTypes[$col['Field']] = array(
|
658 |
'is_numeric'=> $types['is_numeric'],
|
@@ -676,9 +803,9 @@ class Mysqldump
|
|
676 |
private function getViewStructureTable($viewName)
|
677 |
{
|
678 |
if (!$this->dumpSettings['skip-comments']) {
|
679 |
-
$ret = "--"
|
680 |
-
"-- Stand-In structure for view `${viewName}`"
|
681 |
-
"--"
|
682 |
$this->compressManager->write($ret);
|
683 |
}
|
684 |
$stmt = $this->typeAdapter->show_create_view($viewName);
|
@@ -705,15 +832,16 @@ class Mysqldump
|
|
705 |
* @param string $viewName Name of view to export
|
706 |
* @return string create statement
|
707 |
*/
|
708 |
-
function createStandInTable($viewName)
|
|
|
709 |
$ret = array();
|
710 |
-
foreach($this->tableColumnTypes[$viewName] as $k => $v) {
|
711 |
$ret[] = "`${k}` ${v['type_sql']}";
|
712 |
}
|
713 |
-
$ret = implode(PHP_EOL
|
714 |
|
715 |
-
$ret = "CREATE TABLE IF NOT EXISTS `$viewName` ("
|
716 |
-
PHP_EOL
|
717 |
|
718 |
return $ret;
|
719 |
}
|
@@ -728,9 +856,9 @@ class Mysqldump
|
|
728 |
private function getViewStructureView($viewName)
|
729 |
{
|
730 |
if (!$this->dumpSettings['skip-comments']) {
|
731 |
-
$ret = "--"
|
732 |
-
"-- View structure for view `${viewName}`"
|
733 |
-
"--"
|
734 |
$this->compressManager->write($ret);
|
735 |
}
|
736 |
$stmt = $this->typeAdapter->show_create_view($viewName);
|
@@ -780,15 +908,15 @@ class Mysqldump
|
|
780 |
private function getProcedureStructure($procedureName)
|
781 |
{
|
782 |
if (!$this->dumpSettings['skip-comments']) {
|
783 |
-
$ret = "--"
|
784 |
-
"-- Dumping routines for database '"
|
785 |
-
"--"
|
786 |
$this->compressManager->write($ret);
|
787 |
}
|
788 |
$stmt = $this->typeAdapter->show_create_procedure($procedureName);
|
789 |
foreach ($this->dbHandler->query($stmt) as $r) {
|
790 |
$this->compressManager->write(
|
791 |
-
$this->typeAdapter->create_procedure($r
|
792 |
);
|
793 |
return;
|
794 |
}
|
@@ -803,48 +931,99 @@ class Mysqldump
|
|
803 |
private function getEventStructure($eventName)
|
804 |
{
|
805 |
if (!$this->dumpSettings['skip-comments']) {
|
806 |
-
$ret = "--"
|
807 |
-
"-- Dumping events for database '"
|
808 |
-
"--"
|
809 |
$this->compressManager->write($ret);
|
810 |
}
|
811 |
$stmt = $this->typeAdapter->show_create_event($eventName);
|
812 |
foreach ($this->dbHandler->query($stmt) as $r) {
|
813 |
$this->compressManager->write(
|
814 |
-
$this->typeAdapter->create_event($r
|
815 |
);
|
816 |
return;
|
817 |
}
|
818 |
}
|
819 |
|
820 |
/**
|
821 |
-
*
|
822 |
*
|
823 |
* @param string $tableName Name of table which contains rows
|
824 |
-
* @param array $row Associative array of column names and values to be
|
|
|
825 |
*
|
826 |
-
* @return
|
827 |
*/
|
828 |
-
private function
|
829 |
{
|
830 |
$ret = array();
|
831 |
$columnTypes = $this->tableColumnTypes[$tableName];
|
832 |
foreach ($row as $colName => $colValue) {
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
843 |
} else {
|
844 |
-
|
845 |
}
|
|
|
|
|
846 |
}
|
847 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
848 |
}
|
849 |
|
850 |
/**
|
@@ -861,47 +1040,66 @@ class Mysqldump
|
|
861 |
$onlyOnce = true;
|
862 |
$lineSize = 0;
|
863 |
|
|
|
864 |
$colStmt = $this->getColumnStmt($tableName);
|
865 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
|
867 |
-
if ($
|
868 |
-
$stmt .= "
|
869 |
}
|
|
|
870 |
$resultSet = $this->dbHandler->query($stmt);
|
871 |
$resultSet->setFetchMode(PDO::FETCH_ASSOC);
|
872 |
|
|
|
|
|
|
|
873 |
foreach ($resultSet as $row) {
|
874 |
-
$
|
|
|
875 |
if ($onlyOnce || !$this->dumpSettings['extended-insert']) {
|
876 |
-
|
877 |
if ($this->dumpSettings['complete-insert']) {
|
878 |
$lineSize += $this->compressManager->write(
|
879 |
-
"INSERT INTO `$tableName` ("
|
880 |
-
implode(", ", $
|
881 |
-
") VALUES ("
|
882 |
);
|
883 |
} else {
|
884 |
$lineSize += $this->compressManager->write(
|
885 |
-
"INSERT INTO `$tableName` VALUES ("
|
886 |
);
|
887 |
}
|
888 |
$onlyOnce = false;
|
889 |
} else {
|
890 |
-
$lineSize += $this->compressManager->write(",("
|
891 |
}
|
892 |
if (($lineSize > $this->dumpSettings['net_buffer_length']) ||
|
893 |
!$this->dumpSettings['extended-insert']) {
|
894 |
$onlyOnce = true;
|
895 |
-
$lineSize = $this->compressManager->write(";"
|
896 |
}
|
897 |
}
|
898 |
$resultSet->closeCursor();
|
899 |
|
900 |
if (!$onlyOnce) {
|
901 |
-
$this->compressManager->write(";"
|
902 |
}
|
903 |
|
904 |
-
$this->endListValues($tableName);
|
905 |
}
|
906 |
|
907 |
/**
|
@@ -911,13 +1109,13 @@ class Mysqldump
|
|
911 |
*
|
912 |
* @return null
|
913 |
*/
|
914 |
-
function prepareListValues($tableName)
|
915 |
{
|
916 |
if (!$this->dumpSettings['skip-comments']) {
|
917 |
$this->compressManager->write(
|
918 |
-
"--"
|
919 |
-
"-- Dumping data for table `$tableName`"
|
920 |
-
"--"
|
921 |
);
|
922 |
}
|
923 |
|
@@ -955,11 +1153,12 @@ class Mysqldump
|
|
955 |
/**
|
956 |
* Table rows extractor, close locks and commits after dump
|
957 |
*
|
958 |
-
* @param string $tableName
|
|
|
959 |
*
|
960 |
-
* @return
|
961 |
*/
|
962 |
-
function endListValues($tableName)
|
963 |
{
|
964 |
if ($this->dumpSettings['disable-keys']) {
|
965 |
$this->compressManager->write(
|
@@ -990,25 +1189,32 @@ class Mysqldump
|
|
990 |
|
991 |
$this->compressManager->write(PHP_EOL);
|
992 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
993 |
return;
|
994 |
}
|
995 |
|
996 |
/**
|
997 |
-
* Build SQL List of all columns on current table
|
998 |
*
|
999 |
* @param string $tableName Name of table to get columns
|
1000 |
*
|
1001 |
-
* @return
|
1002 |
*/
|
1003 |
-
function getColumnStmt($tableName)
|
1004 |
{
|
1005 |
$colStmt = array();
|
1006 |
-
foreach($this->tableColumnTypes[$tableName] as $colName => $colType) {
|
1007 |
if ($colType['type'] == 'bit' && $this->dumpSettings['hex-blob']) {
|
1008 |
$colStmt[] = "LPAD(HEX(`${colName}`),2,'0') AS `${colName}`";
|
1009 |
-
}
|
1010 |
$colStmt[] = "HEX(`${colName}`) AS `${colName}`";
|
1011 |
-
}
|
1012 |
$this->dumpSettings['complete-insert'] = true;
|
1013 |
continue;
|
1014 |
} else {
|
@@ -1018,6 +1224,27 @@ class Mysqldump
|
|
1018 |
|
1019 |
return $colStmt;
|
1020 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1021 |
}
|
1022 |
|
1023 |
/**
|
@@ -1051,11 +1278,11 @@ abstract class CompressManagerFactory
|
|
1051 |
public static function create($c)
|
1052 |
{
|
1053 |
$c = ucfirst(strtolower($c));
|
1054 |
-
if (!
|
1055 |
throw new Exception("Compression method ($c) is not defined yet");
|
1056 |
}
|
1057 |
|
1058 |
-
$method =
|
1059 |
|
1060 |
return new $method;
|
1061 |
}
|
@@ -1067,7 +1294,7 @@ class CompressBzip2 extends CompressManagerFactory
|
|
1067 |
|
1068 |
public function __construct()
|
1069 |
{
|
1070 |
-
if (!
|
1071 |
throw new Exception("Compression is enabled, but bzip2 lib is not installed or configured properly");
|
1072 |
}
|
1073 |
}
|
@@ -1105,7 +1332,7 @@ class CompressGzip extends CompressManagerFactory
|
|
1105 |
|
1106 |
public function __construct()
|
1107 |
{
|
1108 |
-
if (!
|
1109 |
throw new Exception("Compression is enabled, but gzip lib is not installed or configured properly");
|
1110 |
}
|
1111 |
}
|
@@ -1195,18 +1422,27 @@ abstract class TypeAdapter
|
|
1195 |
*/
|
1196 |
abstract class TypeAdapterFactory
|
1197 |
{
|
|
|
|
|
|
|
1198 |
/**
|
1199 |
* @param string $c Type of database factory to create (Mysql, Sqlite,...)
|
1200 |
* @param PDO $dbHandler
|
1201 |
*/
|
1202 |
-
public static function create($c, $dbHandler = null)
|
1203 |
{
|
1204 |
$c = ucfirst(strtolower($c));
|
1205 |
-
if (!
|
1206 |
throw new Exception("Database type support for ($c) not yet available");
|
1207 |
}
|
1208 |
-
$method =
|
1209 |
-
return new $method($dbHandler);
|
|
|
|
|
|
|
|
|
|
|
|
|
1210 |
}
|
1211 |
|
1212 |
/**
|
@@ -1220,8 +1456,8 @@ abstract class TypeAdapterFactory
|
|
1220 |
|
1221 |
public function show_create_table($tableName)
|
1222 |
{
|
1223 |
-
return "SELECT tbl_name as 'Table', sql as 'Create Table' "
|
1224 |
-
"FROM sqlite_master "
|
1225 |
"WHERE type='table' AND tbl_name='$tableName'";
|
1226 |
}
|
1227 |
|
@@ -1229,15 +1465,15 @@ abstract class TypeAdapterFactory
|
|
1229 |
* function create_table Get table creation code from database
|
1230 |
* @todo make it do something with sqlite
|
1231 |
*/
|
1232 |
-
public function create_table($row
|
1233 |
{
|
1234 |
return "";
|
1235 |
}
|
1236 |
|
1237 |
public function show_create_view($viewName)
|
1238 |
{
|
1239 |
-
return "SELECT tbl_name as 'View', sql as 'Create View' "
|
1240 |
-
"FROM sqlite_master "
|
1241 |
"WHERE type='view' AND tbl_name='$viewName'";
|
1242 |
}
|
1243 |
|
@@ -1272,7 +1508,7 @@ abstract class TypeAdapterFactory
|
|
1272 |
* function create_procedure Modify procedure code, add delimiters, etc
|
1273 |
* @todo make it do something with sqlite
|
1274 |
*/
|
1275 |
-
public function create_procedure($procedureName
|
1276 |
{
|
1277 |
return "";
|
1278 |
}
|
@@ -1425,8 +1661,8 @@ class TypeAdapterSqlite extends TypeAdapterFactory
|
|
1425 |
|
1426 |
class TypeAdapterMysql extends TypeAdapterFactory
|
1427 |
{
|
|
|
1428 |
|
1429 |
-
private $dbHandler = null;
|
1430 |
|
1431 |
// Numerical Mysql types
|
1432 |
public $mysqlTypes = array(
|
@@ -1463,11 +1699,6 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1463 |
)
|
1464 |
);
|
1465 |
|
1466 |
-
public function __construct ($dbHandler)
|
1467 |
-
{
|
1468 |
-
$this->dbHandler = $dbHandler;
|
1469 |
-
}
|
1470 |
-
|
1471 |
public function databases()
|
1472 |
{
|
1473 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
@@ -1484,9 +1715,9 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1484 |
$ret = "";
|
1485 |
|
1486 |
$ret .= "CREATE DATABASE /*!32312 IF NOT EXISTS*/ `${databaseName}`".
|
1487 |
-
" /*!40100 DEFAULT CHARACTER SET ${characterSet} "
|
1488 |
-
" COLLATE ${collationDb} */;"
|
1489 |
-
"USE `${databaseName}`;"
|
1490 |
|
1491 |
return $ret;
|
1492 |
}
|
@@ -1516,23 +1747,23 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1516 |
return "SHOW CREATE EVENT `$eventName`";
|
1517 |
}
|
1518 |
|
1519 |
-
public function create_table(
|
1520 |
{
|
1521 |
-
if (
|
1522 |
throw new Exception("Error getting table code, unknown output");
|
1523 |
}
|
1524 |
|
1525 |
$createTable = $row['Create Table'];
|
1526 |
-
if (
|
1527 |
$match = "/AUTO_INCREMENT=[0-9]+/s";
|
1528 |
$replace = "";
|
1529 |
$createTable = preg_replace($match, $replace, $createTable);
|
1530 |
}
|
1531 |
|
1532 |
-
$ret = "/*!40101 SET @saved_cs_client = @@character_set_client */;"
|
1533 |
-
"/*!40101 SET character_set_client = "
|
1534 |
-
$createTable
|
1535 |
-
"/*!40101 SET character_set_client = @saved_cs_client */;"
|
1536 |
PHP_EOL;
|
1537 |
return $ret;
|
1538 |
}
|
@@ -1541,35 +1772,24 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1541 |
{
|
1542 |
$ret = "";
|
1543 |
if (!isset($row['Create View'])) {
|
1544 |
-
|
1545 |
}
|
1546 |
|
1547 |
-
$
|
1548 |
|
1549 |
-
$
|
1550 |
-
"CREATE ALGORITHM",
|
1551 |
-
"/*!50001 CREATE ALGORITHM",
|
1552 |
-
$triggerStmt
|
1553 |
-
);
|
1554 |
-
$triggerStmtReplaced2 = str_replace(
|
1555 |
-
" DEFINER=",
|
1556 |
-
" */" . PHP_EOL . "/*!50013 DEFINER=",
|
1557 |
-
$triggerStmtReplaced1
|
1558 |
-
);
|
1559 |
-
$triggerStmtReplaced3 = str_replace(
|
1560 |
-
" VIEW ",
|
1561 |
-
" */" . PHP_EOL . "/*!50001 VIEW ",
|
1562 |
-
$triggerStmtReplaced2
|
1563 |
-
);
|
1564 |
-
if (false === $triggerStmtReplaced1 ||
|
1565 |
-
false === $triggerStmtReplaced2 ||
|
1566 |
-
false === $triggerStmtReplaced3) {
|
1567 |
-
$triggerStmtReplaced = $triggerStmt;
|
1568 |
-
} else {
|
1569 |
-
$triggerStmtReplaced = $triggerStmtReplaced3 . " */;";
|
1570 |
-
}
|
1571 |
|
1572 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1573 |
return $ret;
|
1574 |
}
|
1575 |
|
@@ -1581,43 +1801,39 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1581 |
}
|
1582 |
|
1583 |
$triggerStmt = $row['SQL Original Statement'];
|
1584 |
-
$
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
$
|
1596 |
-
|
1597 |
-
|
1598 |
-
$ret .= "DELIMITER ;;" . PHP_EOL .
|
1599 |
-
$triggerStmtReplaced . " */ ;;" . PHP_EOL .
|
1600 |
-
"DELIMITER ;" . PHP_EOL . PHP_EOL;
|
1601 |
return $ret;
|
1602 |
}
|
1603 |
|
1604 |
-
public function create_procedure($row
|
1605 |
{
|
1606 |
$ret = "";
|
1607 |
if (!isset($row['Create Procedure'])) {
|
1608 |
-
throw new Exception("Error getting procedure code, unknown output. "
|
1609 |
"Please check 'https://bugs.mysql.com/bug.php?id=14564'");
|
1610 |
}
|
1611 |
$procedureStmt = $row['Create Procedure'];
|
1612 |
|
1613 |
-
$ret .= "/*!50003 DROP PROCEDURE IF EXISTS `"
|
1614 |
-
$row['Procedure']
|
1615 |
-
"/*!40101 SET @saved_cs_client = @@character_set_client */;"
|
1616 |
-
"/*!40101 SET character_set_client = "
|
1617 |
-
"DELIMITER ;;"
|
1618 |
-
$procedureStmt
|
1619 |
-
"DELIMITER ;"
|
1620 |
-
"/*!40101 SET character_set_client = @saved_cs_client */;"
|
1621 |
|
1622 |
return $ret;
|
1623 |
}
|
@@ -1625,50 +1841,45 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1625 |
public function create_event($row)
|
1626 |
{
|
1627 |
$ret = "";
|
1628 |
-
if (
|
1629 |
-
throw new Exception("Error getting event code, unknown output. "
|
1630 |
"Please check 'http://stackoverflow.com/questions/10853826/mysql-5-5-create-event-gives-syntax-error'");
|
1631 |
}
|
1632 |
$eventName = $row['Event'];
|
1633 |
$eventStmt = $row['Create Event'];
|
1634 |
$sqlMode = $row['sql_mode'];
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
"/*!
|
1653 |
-
"
|
1654 |
-
"/*!50003 SET
|
1655 |
-
"/*!50003 SET @
|
1656 |
-
"/*!50003 SET
|
1657 |
-
"/*!50003 SET
|
1658 |
-
"/*!50003 SET
|
1659 |
-
"
|
1660 |
-
"/*!50003 SET
|
1661 |
-
"/*!50003 SET sql_mode =
|
1662 |
-
"/*!50003 SET
|
1663 |
-
"/*!50003 SET
|
1664 |
-
|
1665 |
-
"
|
1666 |
-
"/*!
|
1667 |
-
"/*!50003 SET character_set_client = @saved_cs_client */ ;;" . PHP_EOL .
|
1668 |
-
"/*!50003 SET character_set_results = @saved_cs_results */ ;;" . PHP_EOL .
|
1669 |
-
"/*!50003 SET collation_connection = @saved_col_connection */ ;;" . PHP_EOL .
|
1670 |
-
"DELIMITER ;" . PHP_EOL .
|
1671 |
-
"/*!50106 SET TIME_ZONE= @save_time_zone */ ;" . PHP_EOL . PHP_EOL;
|
1672 |
// Commented because we are doing this in restore_parameters()
|
1673 |
// "/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;" . PHP_EOL . PHP_EOL;
|
1674 |
|
@@ -1679,8 +1890,8 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1679 |
{
|
1680 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1681 |
$args = func_get_args();
|
1682 |
-
return "SELECT TABLE_NAME AS tbl_name "
|
1683 |
-
"FROM INFORMATION_SCHEMA.TABLES "
|
1684 |
"WHERE TABLE_TYPE='BASE TABLE' AND TABLE_SCHEMA='${args[0]}'";
|
1685 |
}
|
1686 |
|
@@ -1688,8 +1899,8 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1688 |
{
|
1689 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1690 |
$args = func_get_args();
|
1691 |
-
return "SELECT TABLE_NAME AS tbl_name "
|
1692 |
-
"FROM INFORMATION_SCHEMA.TABLES "
|
1693 |
"WHERE TABLE_TYPE='VIEW' AND TABLE_SCHEMA='${args[0]}'";
|
1694 |
}
|
1695 |
|
@@ -1711,8 +1922,8 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1711 |
{
|
1712 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1713 |
$args = func_get_args();
|
1714 |
-
return "SELECT SPECIFIC_NAME AS procedure_name "
|
1715 |
-
"FROM INFORMATION_SCHEMA.ROUTINES "
|
1716 |
"WHERE ROUTINE_TYPE='PROCEDURE' AND ROUTINE_SCHEMA='${args[0]}'";
|
1717 |
}
|
1718 |
|
@@ -1726,8 +1937,8 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1726 |
{
|
1727 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1728 |
$args = func_get_args();
|
1729 |
-
return "SELECT EVENT_NAME AS event_name "
|
1730 |
-
"FROM INFORMATION_SCHEMA.EVENTS "
|
1731 |
"WHERE EVENT_SCHEMA='${args[0]}'";
|
1732 |
}
|
1733 |
|
@@ -1751,7 +1962,6 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1751 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1752 |
$args = func_get_args();
|
1753 |
return $this->dbHandler->exec("LOCK TABLES `${args[0]}` READ LOCAL");
|
1754 |
-
|
1755 |
}
|
1756 |
|
1757 |
public function unlock_table()
|
@@ -1763,19 +1973,19 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1763 |
{
|
1764 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1765 |
$args = func_get_args();
|
1766 |
-
return "LOCK TABLES `${args[0]}` WRITE;"
|
1767 |
}
|
1768 |
|
1769 |
public function end_add_lock_table()
|
1770 |
{
|
1771 |
-
return "UNLOCK TABLES;"
|
1772 |
}
|
1773 |
|
1774 |
public function start_add_disable_keys()
|
1775 |
{
|
1776 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1777 |
$args = func_get_args();
|
1778 |
-
return "/*!40000 ALTER TABLE `${args[0]}` DISABLE KEYS */;"
|
1779 |
PHP_EOL;
|
1780 |
}
|
1781 |
|
@@ -1783,57 +1993,57 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1783 |
{
|
1784 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1785 |
$args = func_get_args();
|
1786 |
-
return "/*!40000 ALTER TABLE `${args[0]}` ENABLE KEYS */;"
|
1787 |
PHP_EOL;
|
1788 |
}
|
1789 |
|
1790 |
public function start_disable_autocommit()
|
1791 |
{
|
1792 |
-
return "SET autocommit=0;"
|
1793 |
}
|
1794 |
|
1795 |
public function end_disable_autocommit()
|
1796 |
{
|
1797 |
-
return "COMMIT;"
|
1798 |
}
|
1799 |
|
1800 |
public function add_drop_database()
|
1801 |
{
|
1802 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1803 |
$args = func_get_args();
|
1804 |
-
return "/*!40000 DROP DATABASE IF EXISTS `${args[0]}`*/;"
|
1805 |
-
PHP_EOL
|
1806 |
}
|
1807 |
|
1808 |
public function add_drop_trigger()
|
1809 |
{
|
1810 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1811 |
$args = func_get_args();
|
1812 |
-
return "DROP TRIGGER IF EXISTS `${args[0]}`;"
|
1813 |
}
|
1814 |
|
1815 |
public function drop_table()
|
1816 |
{
|
1817 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1818 |
$args = func_get_args();
|
1819 |
-
return "DROP TABLE IF EXISTS `${args[0]}`;"
|
1820 |
}
|
1821 |
|
1822 |
public function drop_view()
|
1823 |
{
|
1824 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1825 |
$args = func_get_args();
|
1826 |
-
return "DROP TABLE IF EXISTS `${args[0]}`;"
|
1827 |
-
"/*!50001 DROP VIEW IF EXISTS `${args[0]}`*/;"
|
1828 |
}
|
1829 |
|
1830 |
public function getDatabaseHeader()
|
1831 |
{
|
1832 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1833 |
$args = func_get_args();
|
1834 |
-
return "--"
|
1835 |
-
"-- Current Database: `${args[0]}`"
|
1836 |
-
"--"
|
1837 |
}
|
1838 |
|
1839 |
/**
|
@@ -1848,65 +2058,58 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1848 |
$colInfo = array();
|
1849 |
$colParts = explode(" ", $colType['Type']);
|
1850 |
|
1851 |
-
if($fparen = strpos($colParts[0], "("))
|
1852 |
-
{
|
1853 |
$colInfo['type'] = substr($colParts[0], 0, $fparen);
|
1854 |
-
$colInfo['length']
|
1855 |
-
$colInfo['attributes'] = isset($colParts[1]) ? $colParts[1] :
|
1856 |
-
}
|
1857 |
-
else
|
1858 |
-
{
|
1859 |
$colInfo['type'] = $colParts[0];
|
1860 |
}
|
1861 |
$colInfo['is_numeric'] = in_array($colInfo['type'], $this->mysqlTypes['numerical']);
|
1862 |
$colInfo['is_blob'] = in_array($colInfo['type'], $this->mysqlTypes['blob']);
|
1863 |
-
// for virtual 'Extra'
|
1864 |
-
|
|
|
|
|
1865 |
|
1866 |
return $colInfo;
|
1867 |
}
|
1868 |
|
1869 |
public function backup_parameters()
|
1870 |
{
|
1871 |
-
$
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
"/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;" . PHP_EOL .
|
1876 |
-
"/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;" . PHP_EOL .
|
1877 |
-
"/*!40101 SET NAMES " . $dumpSettings['default-character-set'] . " */;" . PHP_EOL;
|
1878 |
|
1879 |
-
if (false === $dumpSettings['skip-tz-utc']) {
|
1880 |
-
$ret .= "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;"
|
1881 |
-
"/*!40103 SET TIME_ZONE='+00:00' */;"
|
1882 |
}
|
1883 |
|
1884 |
-
$ret .= "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;"
|
1885 |
-
"/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;"
|
1886 |
-
"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;"
|
1887 |
-
"/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;"
|
1888 |
|
1889 |
return $ret;
|
1890 |
}
|
1891 |
|
1892 |
public function restore_parameters()
|
1893 |
{
|
1894 |
-
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1895 |
-
$args = func_get_args();
|
1896 |
-
$dumpSettings = $args[0];
|
1897 |
$ret = "";
|
1898 |
|
1899 |
-
if (false === $dumpSettings['skip-tz-utc']) {
|
1900 |
-
$ret .= "/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;"
|
1901 |
}
|
1902 |
|
1903 |
-
$ret .= "/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;"
|
1904 |
-
"/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;"
|
1905 |
-
"/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;"
|
1906 |
-
"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;"
|
1907 |
-
"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;"
|
1908 |
-
"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;"
|
1909 |
-
"/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;"
|
1910 |
|
1911 |
return $ret;
|
1912 |
}
|
@@ -1921,7 +2124,7 @@ class TypeAdapterMysql extends TypeAdapterFactory
|
|
1921 |
*/
|
1922 |
private function check_parameters($num_args, $expected_num_args, $method_name)
|
1923 |
{
|
1924 |
-
if (
|
1925 |
throw new Exception("Unexpected parameter passed to $method_name");
|
1926 |
}
|
1927 |
return;
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
+
* PHP version of mysqldump cli that comes with MySQL.
|
5 |
*
|
6 |
+
* Tags: mysql mysqldump pdo php7 php5 database php sql hhvm mariadb mysql-backup.
|
7 |
*
|
8 |
* @category Library
|
9 |
* @package Ifsnop\Mysqldump
|
|
|
10 |
* @author Diego Torres <ifsnop@github.com>
|
11 |
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
12 |
* @link https://github.com/ifsnop/mysqldump-php
|
20 |
use PDOException;
|
21 |
|
22 |
/**
|
23 |
+
* Class Mysqldump.
|
24 |
*
|
25 |
* @category Library
|
|
|
|
|
26 |
* @author Diego Torres <ifsnop@github.com>
|
27 |
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
28 |
* @link https://github.com/ifsnop/mysqldump-php
|
31 |
class Mysqldump
|
32 |
{
|
33 |
|
34 |
+
// Same as mysqldump.
|
35 |
const MAXLINESIZE = 1000000;
|
36 |
|
37 |
+
// List of available compression methods as constants.
|
38 |
+
const GZIP = 'Gzip';
|
39 |
const BZIP2 = 'Bzip2';
|
40 |
+
const NONE = 'None';
|
41 |
|
42 |
+
// List of available connection strings.
|
43 |
+
const UTF8 = 'utf8';
|
44 |
const UTF8MB4 = 'utf8mb4';
|
45 |
|
46 |
/**
|
47 |
+
* Database username.
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
public $user;
|
51 |
+
|
52 |
/**
|
53 |
+
* Database password.
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
public $pass;
|
57 |
+
|
58 |
/**
|
59 |
+
* Connection string for PDO.
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
public $dsn;
|
63 |
+
|
64 |
/**
|
65 |
+
* Destination filename, defaults to stdout.
|
66 |
+
* @var string
|
67 |
+
*/
|
68 |
+
public $fileName = 'php://stdout';
|
69 |
|
70 |
+
// Internal stuff.
|
71 |
private $tables = array();
|
72 |
private $views = array();
|
73 |
private $triggers = array();
|
74 |
private $procedures = array();
|
75 |
private $events = array();
|
76 |
private $dbHandler = null;
|
77 |
+
private $dbType = "";
|
78 |
private $compressManager;
|
79 |
private $typeAdapter;
|
80 |
private $dumpSettings = array();
|
81 |
private $pdoSettings = array();
|
82 |
private $version;
|
83 |
private $tableColumnTypes = array();
|
84 |
+
private $transformColumnValueCallable;
|
85 |
+
|
86 |
/**
|
87 |
+
* Database name, parsed from dsn.
|
88 |
+
* @var string
|
89 |
+
*/
|
90 |
private $dbName;
|
91 |
+
|
92 |
/**
|
93 |
+
* Host name, parsed from dsn.
|
94 |
+
* @var string
|
95 |
+
*/
|
96 |
private $host;
|
97 |
+
|
98 |
/**
|
99 |
+
* Dsn string parsed as an array.
|
100 |
+
* @var array
|
101 |
+
*/
|
102 |
private $dsnArray = array();
|
103 |
|
104 |
+
/**
|
105 |
+
* Keyed on table name, with the value as the conditions.
|
106 |
+
* e.g. - 'users' => 'date_registered > NOW() - INTERVAL 6 MONTH'
|
107 |
+
*
|
108 |
+
* @var array
|
109 |
+
*/
|
110 |
+
private $tableWheres = array();
|
111 |
+
private $tableLimits = array();
|
112 |
+
|
113 |
/**
|
114 |
* Constructor of Mysqldump. Note that in the case of an SQLite database
|
115 |
* connection, the filename must be in the $db parameter.
|
145 |
'extended-insert' => true,
|
146 |
'events' => false,
|
147 |
'hex-blob' => true, /* faster than escaped content */
|
148 |
+
'insert-ignore' => false,
|
149 |
'net_buffer_length' => self::MAXLINESIZE,
|
150 |
'no-autocommit' => true,
|
151 |
'no-create-info' => false,
|
156 |
'skip-tz-utc' => false,
|
157 |
'skip-comments' => false,
|
158 |
'skip-dump-date' => false,
|
159 |
+
'skip-definer' => false,
|
160 |
'where' => '',
|
161 |
/* deprecated */
|
162 |
'disable-foreign-keys-check' => true
|
165 |
$pdoSettingsDefault = array(
|
166 |
PDO::ATTR_PERSISTENT => true,
|
167 |
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
|
|
168 |
);
|
169 |
|
170 |
$this->user = $user;
|
171 |
$this->pass = $pass;
|
172 |
$this->parseDsn($dsn);
|
173 |
+
|
174 |
+
// This drops MYSQL dependency, only use the constant if it's defined.
|
175 |
+
if ("mysql" === $this->dbType) {
|
176 |
+
$pdoSettingsDefault[PDO::MYSQL_ATTR_USE_BUFFERED_QUERY] = false;
|
177 |
+
}
|
178 |
+
|
179 |
$this->pdoSettings = self::array_replace_recursive($pdoSettingsDefault, $pdoSettings);
|
180 |
$this->dumpSettings = self::array_replace_recursive($dumpSettingsDefault, $dumpSettings);
|
181 |
+
$this->dumpSettings['init_commands'][] = "SET NAMES ".$this->dumpSettings['default-character-set'];
|
|
|
182 |
|
183 |
if (false === $this->dumpSettings['skip-tz-utc']) {
|
184 |
$this->dumpSettings['init_commands'][] = "SET TIME_ZONE='+00:00'";
|
185 |
}
|
186 |
|
187 |
$diff = array_diff(array_keys($this->dumpSettings), array_keys($dumpSettingsDefault));
|
188 |
+
if (count($diff) > 0) {
|
189 |
+
throw new Exception("Unexpected value in dumpSettings: (".implode(",", $diff).")");
|
190 |
}
|
191 |
|
192 |
+
if (!is_array($this->dumpSettings['include-tables']) ||
|
193 |
+
!is_array($this->dumpSettings['exclude-tables'])) {
|
194 |
throw new Exception("Include-tables and exclude-tables should be arrays");
|
195 |
}
|
196 |
|
203 |
|
204 |
/**
|
205 |
* Destructor of Mysqldump. Unsets dbHandlers and database objects.
|
|
|
206 |
*/
|
207 |
public function __destruct()
|
208 |
{
|
211 |
|
212 |
/**
|
213 |
* Custom array_replace_recursive to be used if PHP < 5.3
|
214 |
+
* Replaces elements from passed arrays into the first array recursively.
|
215 |
*
|
216 |
* @param array $array1 The array in which elements are replaced
|
217 |
* @param array $array2 The array from which elements will be extracted
|
234 |
return $array1;
|
235 |
}
|
236 |
|
237 |
+
/**
|
238 |
+
* Keyed by table name, with the value as the conditions:
|
239 |
+
* e.g. 'users' => 'date_registered > NOW() - INTERVAL 6 MONTH AND deleted=0'
|
240 |
+
*
|
241 |
+
* @param array $tableWheres
|
242 |
+
*/
|
243 |
+
public function setTableWheres(array $tableWheres)
|
244 |
+
{
|
245 |
+
$this->tableWheres = $tableWheres;
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* @param $tableName
|
250 |
+
*
|
251 |
+
* @return boolean|mixed
|
252 |
+
*/
|
253 |
+
public function getTableWhere($tableName)
|
254 |
+
{
|
255 |
+
if (!empty($this->tableWheres[$tableName])) {
|
256 |
+
return $this->tableWheres[$tableName];
|
257 |
+
} elseif ($this->dumpSettings['where']) {
|
258 |
+
return $this->dumpSettings['where'];
|
259 |
+
}
|
260 |
+
|
261 |
+
return false;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Keyed by table name, with the value as the numeric limit:
|
266 |
+
* e.g. 'users' => 3000
|
267 |
+
*
|
268 |
+
* @param array $tableLimits
|
269 |
+
*/
|
270 |
+
public function setTableLimits(array $tableLimits)
|
271 |
+
{
|
272 |
+
$this->tableLimits = $tableLimits;
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Returns the LIMIT for the table. Must be numeric to be returned.
|
277 |
+
* @param $tableName
|
278 |
+
* @return boolean
|
279 |
+
*/
|
280 |
+
public function getTableLimit($tableName)
|
281 |
+
{
|
282 |
+
if (empty($this->tableLimits[$tableName])) {
|
283 |
+
return false;
|
284 |
+
}
|
285 |
+
|
286 |
+
$limit = $this->tableLimits[$tableName];
|
287 |
+
if (!is_numeric($limit)) {
|
288 |
+
return false;
|
289 |
+
}
|
290 |
+
|
291 |
+
return $limit;
|
292 |
+
}
|
293 |
+
|
294 |
/**
|
295 |
* Parse DSN string and extract dbname value
|
296 |
* Several examples of a DSN string
|
299 |
* mysql:unix_socket=/tmp/mysql.sock;dbname=testdb
|
300 |
*
|
301 |
* @param string $dsn dsn string to parse
|
302 |
+
* @return boolean
|
303 |
*/
|
304 |
private function parseDsn($dsn)
|
305 |
{
|
308 |
}
|
309 |
|
310 |
$this->dsn = $dsn;
|
311 |
+
$this->dbType = strtolower(substr($dsn, 0, $pos)); // always returns a string
|
312 |
|
313 |
if (empty($this->dbType)) {
|
314 |
throw new Exception("Missing database type from DSN string");
|
316 |
|
317 |
$dsn = substr($dsn, $pos + 1);
|
318 |
|
319 |
+
foreach (explode(";", $dsn) as $kvp) {
|
320 |
$kvpArr = explode("=", $kvp);
|
321 |
$this->dsnArray[strtolower($kvpArr[0])] = $kvpArr[1];
|
322 |
}
|
326 |
throw new Exception("Missing host from DSN string");
|
327 |
}
|
328 |
$this->host = (!empty($this->dsnArray['host'])) ?
|
329 |
+
$this->dsnArray['host'] : $this->dsnArray['unix_socket'];
|
|
|
330 |
|
331 |
if (empty($this->dsnArray['dbname'])) {
|
332 |
throw new Exception("Missing database name from DSN string");
|
338 |
}
|
339 |
|
340 |
/**
|
341 |
+
* Connect with PDO.
|
342 |
*
|
343 |
* @return null
|
344 |
*/
|
345 |
private function connect()
|
346 |
{
|
347 |
+
// Connecting with PDO.
|
348 |
try {
|
349 |
switch ($this->dbType) {
|
350 |
case 'sqlite':
|
351 |
+
$this->dbHandler = @new PDO("sqlite:".$this->dbName, null, null, $this->pdoSettings);
|
352 |
break;
|
353 |
case 'mysql':
|
354 |
case 'pgsql':
|
360 |
$this->pdoSettings
|
361 |
);
|
362 |
// Execute init commands once connected
|
363 |
+
foreach ($this->dumpSettings['init_commands'] as $stmt) {
|
364 |
$this->dbHandler->exec($stmt);
|
365 |
}
|
366 |
// Store server version
|
367 |
$this->version = $this->dbHandler->getAttribute(PDO::ATTR_SERVER_VERSION);
|
368 |
break;
|
369 |
default:
|
370 |
+
throw new Exception("Unsupported database type (".$this->dbType.")");
|
371 |
}
|
372 |
} catch (PDOException $e) {
|
373 |
throw new Exception(
|
374 |
+
"Connection to ".$this->dbType." failed with message: ".
|
375 |
$e->getMessage()
|
376 |
);
|
377 |
}
|
378 |
|
379 |
+
if (is_null($this->dbHandler)) {
|
380 |
+
throw new Exception("Connection to ".$this->dbType."failed");
|
381 |
}
|
382 |
|
383 |
$this->dbHandler->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_NATURAL);
|
384 |
+
$this->typeAdapter = TypeAdapterFactory::create($this->dbType, $this->dbHandler, $this->dumpSettings);
|
385 |
}
|
386 |
|
387 |
/**
|
388 |
+
* Primary function, triggers dumping.
|
389 |
*
|
390 |
* @param string $filename Name of file to write sql dump to
|
391 |
* @return null
|
392 |
+
* @throws \Exception
|
393 |
*/
|
394 |
public function start($filename = '')
|
395 |
{
|
409 |
|
410 |
// Store server settings and use sanner defaults to dump
|
411 |
$this->compressManager->write(
|
412 |
+
$this->typeAdapter->backup_parameters()
|
413 |
);
|
414 |
|
415 |
if ($this->dumpSettings['databases']) {
|
423 |
}
|
424 |
}
|
425 |
|
426 |
+
// Get table, view, trigger, procedures and events structures from
|
427 |
+
// database.
|
428 |
+
$this->getDatabaseStructureTables();
|
429 |
+
$this->getDatabaseStructureViews();
|
430 |
+
$this->getDatabaseStructureTriggers();
|
431 |
+
$this->getDatabaseStructureProcedures();
|
432 |
+
$this->getDatabaseStructureEvents();
|
433 |
|
434 |
if ($this->dumpSettings['databases']) {
|
435 |
$this->compressManager->write(
|
440 |
// If there still are some tables/views in include-tables array,
|
441 |
// that means that some tables or views weren't found.
|
442 |
// Give proper error and exit.
|
443 |
+
// This check will be removed once include-tables supports regexps.
|
444 |
if (0 < count($this->dumpSettings['include-tables'])) {
|
445 |
$name = implode(",", $this->dumpSettings['include-tables']);
|
446 |
+
throw new Exception("Table (".$name.") not found in database");
|
447 |
}
|
448 |
|
449 |
$this->exportTables();
|
|
|
450 |
$this->exportTriggers();
|
451 |
+
$this->exportViews();
|
452 |
$this->exportProcedures();
|
453 |
$this->exportEvents();
|
454 |
|
455 |
+
// Restore saved parameters.
|
456 |
$this->compressManager->write(
|
457 |
+
$this->typeAdapter->restore_parameters()
|
458 |
);
|
459 |
+
// Write some stats to output file.
|
460 |
$this->compressManager->write($this->getDumpFileFooter());
|
461 |
+
// Close output file.
|
462 |
$this->compressManager->close();
|
463 |
+
|
464 |
+
return;
|
465 |
}
|
466 |
|
467 |
/**
|
468 |
+
* Returns header for dump file.
|
469 |
*
|
470 |
* @return string
|
471 |
*/
|
472 |
private function getDumpFileHeader()
|
473 |
{
|
474 |
$header = '';
|
475 |
+
if (!$this->dumpSettings['skip-comments']) {
|
476 |
// Some info about software, source and time
|
477 |
+
$header = "-- mysqldump-php https://github.com/ifsnop/mysqldump-php".PHP_EOL.
|
478 |
+
"--".PHP_EOL.
|
479 |
+
"-- Host: {$this->host}\tDatabase: {$this->dbName}".PHP_EOL.
|
480 |
+
"-- ------------------------------------------------------".PHP_EOL;
|
481 |
|
482 |
+
if (!empty($this->version)) {
|
483 |
+
$header .= "-- Server version \t".$this->version.PHP_EOL;
|
484 |
}
|
485 |
|
486 |
+
if (!$this->dumpSettings['skip-dump-date']) {
|
487 |
+
$header .= "-- Date: ".date('r').PHP_EOL.PHP_EOL;
|
488 |
}
|
489 |
}
|
490 |
return $header;
|
491 |
}
|
492 |
|
493 |
/**
|
494 |
+
* Returns footer for dump file.
|
495 |
*
|
496 |
* @return string
|
497 |
*/
|
501 |
if (!$this->dumpSettings['skip-comments']) {
|
502 |
$footer .= '-- Dump completed';
|
503 |
if (!$this->dumpSettings['skip-dump-date']) {
|
504 |
+
$footer .= ' on: '.date('r');
|
505 |
}
|
506 |
$footer .= PHP_EOL;
|
507 |
}
|
510 |
}
|
511 |
|
512 |
/**
|
513 |
+
* Reads table names from database.
|
514 |
* Fills $this->tables array so they will be dumped later.
|
515 |
*
|
516 |
* @return null
|
517 |
*/
|
518 |
+
private function getDatabaseStructureTables()
|
519 |
{
|
520 |
// Listing all tables from database
|
521 |
if (empty($this->dumpSettings['include-tables'])) {
|
536 |
}
|
537 |
}
|
538 |
}
|
539 |
+
return;
|
540 |
+
}
|
541 |
|
542 |
+
/**
|
543 |
+
* Reads view names from database.
|
544 |
+
* Fills $this->tables array so they will be dumped later.
|
545 |
+
*
|
546 |
+
* @return null
|
547 |
+
*/
|
548 |
+
private function getDatabaseStructureViews()
|
549 |
+
{
|
550 |
// Listing all views from database
|
551 |
if (empty($this->dumpSettings['include-views'])) {
|
552 |
// include all views for now, blacklisting happens later
|
566 |
}
|
567 |
}
|
568 |
}
|
569 |
+
return;
|
570 |
+
}
|
571 |
|
572 |
+
/**
|
573 |
+
* Reads trigger names from database.
|
574 |
+
* Fills $this->tables array so they will be dumped later.
|
575 |
+
*
|
576 |
+
* @return null
|
577 |
+
*/
|
578 |
+
private function getDatabaseStructureTriggers()
|
579 |
+
{
|
580 |
// Listing all triggers from database
|
581 |
if (false === $this->dumpSettings['skip-triggers']) {
|
582 |
foreach ($this->dbHandler->query($this->typeAdapter->show_triggers($this->dbName)) as $row) {
|
583 |
array_push($this->triggers, $row['Trigger']);
|
584 |
}
|
585 |
}
|
586 |
+
return;
|
587 |
+
}
|
588 |
|
589 |
+
/**
|
590 |
+
* Reads procedure names from database.
|
591 |
+
* Fills $this->tables array so they will be dumped later.
|
592 |
+
*
|
593 |
+
* @return null
|
594 |
+
*/
|
595 |
+
private function getDatabaseStructureProcedures()
|
596 |
+
{
|
597 |
// Listing all procedures from database
|
598 |
if ($this->dumpSettings['routines']) {
|
599 |
foreach ($this->dbHandler->query($this->typeAdapter->show_procedures($this->dbName)) as $row) {
|
600 |
array_push($this->procedures, $row['procedure_name']);
|
601 |
}
|
602 |
}
|
603 |
+
return;
|
604 |
+
}
|
605 |
|
606 |
+
/**
|
607 |
+
* Reads event names from database.
|
608 |
+
* Fills $this->tables array so they will be dumped later.
|
609 |
+
*
|
610 |
+
* @return null
|
611 |
+
*/
|
612 |
+
private function getDatabaseStructureEvents()
|
613 |
+
{
|
614 |
// Listing all events from database
|
615 |
if ($this->dumpSettings['events']) {
|
616 |
foreach ($this->dbHandler->query($this->typeAdapter->show_events($this->dbName)) as $row) {
|
617 |
array_push($this->events, $row['event_name']);
|
618 |
}
|
619 |
}
|
620 |
+
return;
|
621 |
}
|
622 |
|
623 |
/**
|
624 |
* Compare if $table name matches with a definition inside $arr
|
625 |
* @param $table string
|
626 |
* @param $arr array with strings or patterns
|
627 |
+
* @return boolean
|
628 |
*/
|
629 |
+
private function matches($table, $arr)
|
630 |
+
{
|
631 |
$match = false;
|
632 |
|
633 |
foreach ($arr as $pattern) {
|
634 |
+
if ('/' != $pattern[0]) {
|
635 |
continue;
|
636 |
}
|
637 |
+
if (1 == preg_match($pattern, $table)) {
|
638 |
$match = true;
|
639 |
}
|
640 |
}
|
651 |
{
|
652 |
// Exporting tables one by one
|
653 |
foreach ($this->tables as $table) {
|
654 |
+
if ($this->matches($table, $this->dumpSettings['exclude-tables'])) {
|
655 |
continue;
|
656 |
}
|
657 |
$this->getTableStructure($table);
|
658 |
+
if (false === $this->dumpSettings['no-data']) { // don't break compatibility with old trigger
|
659 |
$this->listValues($table);
|
660 |
+
} elseif (true === $this->dumpSettings['no-data']
|
661 |
+
|| $this->matches($table, $this->dumpSettings['no-data'])) {
|
662 |
continue;
|
663 |
} else {
|
664 |
$this->listValues($table);
|
676 |
if (false === $this->dumpSettings['no-create-info']) {
|
677 |
// Exporting views one by one
|
678 |
foreach ($this->views as $view) {
|
679 |
+
if ($this->matches($view, $this->dumpSettings['exclude-tables'])) {
|
680 |
continue;
|
681 |
}
|
682 |
$this->tableColumnTypes[$view] = $this->getTableColumnTypes($view);
|
683 |
$this->getViewStructureTable($view);
|
684 |
}
|
685 |
foreach ($this->views as $view) {
|
686 |
+
if ($this->matches($view, $this->dumpSettings['exclude-tables'])) {
|
687 |
continue;
|
688 |
}
|
689 |
$this->getViewStructureView($view);
|
742 |
if (!$this->dumpSettings['no-create-info']) {
|
743 |
$ret = '';
|
744 |
if (!$this->dumpSettings['skip-comments']) {
|
745 |
+
$ret = "--".PHP_EOL.
|
746 |
+
"-- Table structure for table `$tableName`".PHP_EOL.
|
747 |
+
"--".PHP_EOL.PHP_EOL;
|
748 |
}
|
749 |
$stmt = $this->typeAdapter->show_create_table($tableName);
|
750 |
foreach ($this->dbHandler->query($stmt) as $r) {
|
755 |
);
|
756 |
}
|
757 |
$this->compressManager->write(
|
758 |
+
$this->typeAdapter->create_table($r)
|
759 |
);
|
760 |
break;
|
761 |
}
|
771 |
* @return array type column types detailed
|
772 |
*/
|
773 |
|
774 |
+
private function getTableColumnTypes($tableName)
|
775 |
+
{
|
776 |
$columnTypes = array();
|
777 |
$columns = $this->dbHandler->query(
|
778 |
$this->typeAdapter->show_columns($tableName)
|
779 |
);
|
780 |
$columns->setFetchMode(PDO::FETCH_ASSOC);
|
781 |
|
782 |
+
foreach ($columns as $key => $col) {
|
783 |
$types = $this->typeAdapter->parseColumnType($col);
|
784 |
$columnTypes[$col['Field']] = array(
|
785 |
'is_numeric'=> $types['is_numeric'],
|
803 |
private function getViewStructureTable($viewName)
|
804 |
{
|
805 |
if (!$this->dumpSettings['skip-comments']) {
|
806 |
+
$ret = "--".PHP_EOL.
|
807 |
+
"-- Stand-In structure for view `${viewName}`".PHP_EOL.
|
808 |
+
"--".PHP_EOL.PHP_EOL;
|
809 |
$this->compressManager->write($ret);
|
810 |
}
|
811 |
$stmt = $this->typeAdapter->show_create_view($viewName);
|
832 |
* @param string $viewName Name of view to export
|
833 |
* @return string create statement
|
834 |
*/
|
835 |
+
public function createStandInTable($viewName)
|
836 |
+
{
|
837 |
$ret = array();
|
838 |
+
foreach ($this->tableColumnTypes[$viewName] as $k => $v) {
|
839 |
$ret[] = "`${k}` ${v['type_sql']}";
|
840 |
}
|
841 |
+
$ret = implode(PHP_EOL.",", $ret);
|
842 |
|
843 |
+
$ret = "CREATE TABLE IF NOT EXISTS `$viewName` (".
|
844 |
+
PHP_EOL.$ret.PHP_EOL.");".PHP_EOL;
|
845 |
|
846 |
return $ret;
|
847 |
}
|
856 |
private function getViewStructureView($viewName)
|
857 |
{
|
858 |
if (!$this->dumpSettings['skip-comments']) {
|
859 |
+
$ret = "--".PHP_EOL.
|
860 |
+
"-- View structure for view `${viewName}`".PHP_EOL.
|
861 |
+
"--".PHP_EOL.PHP_EOL;
|
862 |
$this->compressManager->write($ret);
|
863 |
}
|
864 |
$stmt = $this->typeAdapter->show_create_view($viewName);
|
908 |
private function getProcedureStructure($procedureName)
|
909 |
{
|
910 |
if (!$this->dumpSettings['skip-comments']) {
|
911 |
+
$ret = "--".PHP_EOL.
|
912 |
+
"-- Dumping routines for database '".$this->dbName."'".PHP_EOL.
|
913 |
+
"--".PHP_EOL.PHP_EOL;
|
914 |
$this->compressManager->write($ret);
|
915 |
}
|
916 |
$stmt = $this->typeAdapter->show_create_procedure($procedureName);
|
917 |
foreach ($this->dbHandler->query($stmt) as $r) {
|
918 |
$this->compressManager->write(
|
919 |
+
$this->typeAdapter->create_procedure($r)
|
920 |
);
|
921 |
return;
|
922 |
}
|
931 |
private function getEventStructure($eventName)
|
932 |
{
|
933 |
if (!$this->dumpSettings['skip-comments']) {
|
934 |
+
$ret = "--".PHP_EOL.
|
935 |
+
"-- Dumping events for database '".$this->dbName."'".PHP_EOL.
|
936 |
+
"--".PHP_EOL.PHP_EOL;
|
937 |
$this->compressManager->write($ret);
|
938 |
}
|
939 |
$stmt = $this->typeAdapter->show_create_event($eventName);
|
940 |
foreach ($this->dbHandler->query($stmt) as $r) {
|
941 |
$this->compressManager->write(
|
942 |
+
$this->typeAdapter->create_event($r)
|
943 |
);
|
944 |
return;
|
945 |
}
|
946 |
}
|
947 |
|
948 |
/**
|
949 |
+
* Prepare values for output
|
950 |
*
|
951 |
* @param string $tableName Name of table which contains rows
|
952 |
+
* @param array $row Associative array of column names and values to be
|
953 |
+
* quoted
|
954 |
*
|
955 |
+
* @return array
|
956 |
*/
|
957 |
+
private function prepareColumnValues($tableName, $row)
|
958 |
{
|
959 |
$ret = array();
|
960 |
$columnTypes = $this->tableColumnTypes[$tableName];
|
961 |
foreach ($row as $colName => $colValue) {
|
962 |
+
$colValue = $this->hookTransformColumnValue($tableName, $colName, $colValue, $row);
|
963 |
+
$ret[] = $this->escape($colValue, $columnTypes[$colName]);
|
964 |
+
}
|
965 |
+
|
966 |
+
return $ret;
|
967 |
+
}
|
968 |
+
|
969 |
+
/**
|
970 |
+
* Escape values with quotes when needed
|
971 |
+
*
|
972 |
+
* @param string $tableName Name of table which contains rows
|
973 |
+
* @param array $row Associative array of column names and values to be quoted
|
974 |
+
*
|
975 |
+
* @return string
|
976 |
+
*/
|
977 |
+
private function escape($colValue, $colType)
|
978 |
+
{
|
979 |
+
if (is_null($colValue)) {
|
980 |
+
return "NULL";
|
981 |
+
} elseif ($this->dumpSettings['hex-blob'] && $colType['is_blob']) {
|
982 |
+
if ($colType['type'] == 'bit' || !empty($colValue)) {
|
983 |
+
return "0x${colValue}";
|
984 |
} else {
|
985 |
+
return "''";
|
986 |
}
|
987 |
+
} elseif ($colType['is_numeric']) {
|
988 |
+
return $colValue;
|
989 |
}
|
990 |
+
|
991 |
+
return $this->dbHandler->quote($colValue);
|
992 |
+
}
|
993 |
+
|
994 |
+
/**
|
995 |
+
* Set a callable that will will be used to transform column values.
|
996 |
+
*
|
997 |
+
* @param callable $callable
|
998 |
+
*
|
999 |
+
* @return void
|
1000 |
+
*/
|
1001 |
+
public function setTransformColumnValueHook($callable)
|
1002 |
+
{
|
1003 |
+
$this->transformColumnValueCallable = $callable;
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
/**
|
1007 |
+
* Give extending classes an opportunity to transform column values
|
1008 |
+
*
|
1009 |
+
* @param string $tableName Name of table which contains rows
|
1010 |
+
* @param string $colName Name of the column in question
|
1011 |
+
* @param string $colValue Value of the column in question
|
1012 |
+
*
|
1013 |
+
* @return string
|
1014 |
+
*/
|
1015 |
+
protected function hookTransformColumnValue($tableName, $colName, $colValue, $row)
|
1016 |
+
{
|
1017 |
+
if (!$this->transformColumnValueCallable) {
|
1018 |
+
return $colValue;
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
return call_user_func_array($this->transformColumnValueCallable, array(
|
1022 |
+
$tableName,
|
1023 |
+
$colName,
|
1024 |
+
$colValue,
|
1025 |
+
$row
|
1026 |
+
));
|
1027 |
}
|
1028 |
|
1029 |
/**
|
1040 |
$onlyOnce = true;
|
1041 |
$lineSize = 0;
|
1042 |
|
1043 |
+
// colStmt is used to form a query to obtain row values
|
1044 |
$colStmt = $this->getColumnStmt($tableName);
|
1045 |
+
// colNames is used to get the name of the columns when using complete-insert
|
1046 |
+
if ($this->dumpSettings['complete-insert']) {
|
1047 |
+
$colNames = $this->getColumnNames($tableName);
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
$stmt = "SELECT ".implode(",", $colStmt)." FROM `$tableName`";
|
1051 |
+
|
1052 |
+
// Table specific conditions override the default 'where'
|
1053 |
+
$condition = $this->getTableWhere($tableName);
|
1054 |
+
|
1055 |
+
if ($condition) {
|
1056 |
+
$stmt .= " WHERE {$condition}";
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
$limit = $this->getTableLimit($tableName);
|
1060 |
|
1061 |
+
if ($limit) {
|
1062 |
+
$stmt .= " LIMIT {$limit}";
|
1063 |
}
|
1064 |
+
|
1065 |
$resultSet = $this->dbHandler->query($stmt);
|
1066 |
$resultSet->setFetchMode(PDO::FETCH_ASSOC);
|
1067 |
|
1068 |
+
$ignore = $this->dumpSettings['insert-ignore'] ? ' IGNORE' : '';
|
1069 |
+
|
1070 |
+
$count = 0;
|
1071 |
foreach ($resultSet as $row) {
|
1072 |
+
$count++;
|
1073 |
+
$vals = $this->prepareColumnValues($tableName, $row);
|
1074 |
if ($onlyOnce || !$this->dumpSettings['extended-insert']) {
|
|
|
1075 |
if ($this->dumpSettings['complete-insert']) {
|
1076 |
$lineSize += $this->compressManager->write(
|
1077 |
+
"INSERT$ignore INTO `$tableName` (".
|
1078 |
+
implode(", ", $colNames).
|
1079 |
+
") VALUES (".implode(",", $vals).")"
|
1080 |
);
|
1081 |
} else {
|
1082 |
$lineSize += $this->compressManager->write(
|
1083 |
+
"INSERT$ignore INTO `$tableName` VALUES (".implode(",", $vals).")"
|
1084 |
);
|
1085 |
}
|
1086 |
$onlyOnce = false;
|
1087 |
} else {
|
1088 |
+
$lineSize += $this->compressManager->write(",(".implode(",", $vals).")");
|
1089 |
}
|
1090 |
if (($lineSize > $this->dumpSettings['net_buffer_length']) ||
|
1091 |
!$this->dumpSettings['extended-insert']) {
|
1092 |
$onlyOnce = true;
|
1093 |
+
$lineSize = $this->compressManager->write(";".PHP_EOL);
|
1094 |
}
|
1095 |
}
|
1096 |
$resultSet->closeCursor();
|
1097 |
|
1098 |
if (!$onlyOnce) {
|
1099 |
+
$this->compressManager->write(";".PHP_EOL);
|
1100 |
}
|
1101 |
|
1102 |
+
$this->endListValues($tableName, $count);
|
1103 |
}
|
1104 |
|
1105 |
/**
|
1109 |
*
|
1110 |
* @return null
|
1111 |
*/
|
1112 |
+
public function prepareListValues($tableName)
|
1113 |
{
|
1114 |
if (!$this->dumpSettings['skip-comments']) {
|
1115 |
$this->compressManager->write(
|
1116 |
+
"--".PHP_EOL.
|
1117 |
+
"-- Dumping data for table `$tableName`".PHP_EOL.
|
1118 |
+
"--".PHP_EOL.PHP_EOL
|
1119 |
);
|
1120 |
}
|
1121 |
|
1153 |
/**
|
1154 |
* Table rows extractor, close locks and commits after dump
|
1155 |
*
|
1156 |
+
* @param string $tableName Name of table to export.
|
1157 |
+
* @param integer $count Number of rows inserted.
|
1158 |
*
|
1159 |
+
* @return void
|
1160 |
*/
|
1161 |
+
public function endListValues($tableName, $count = 0)
|
1162 |
{
|
1163 |
if ($this->dumpSettings['disable-keys']) {
|
1164 |
$this->compressManager->write(
|
1189 |
|
1190 |
$this->compressManager->write(PHP_EOL);
|
1191 |
|
1192 |
+
if (!$this->dumpSettings['skip-comments']) {
|
1193 |
+
$this->compressManager->write(
|
1194 |
+
"-- Dumped table `".$tableName."` with $count row(s)".PHP_EOL.
|
1195 |
+
'--'.PHP_EOL.PHP_EOL
|
1196 |
+
);
|
1197 |
+
}
|
1198 |
+
|
1199 |
return;
|
1200 |
}
|
1201 |
|
1202 |
/**
|
1203 |
+
* Build SQL List of all columns on current table which will be used for selecting
|
1204 |
*
|
1205 |
* @param string $tableName Name of table to get columns
|
1206 |
*
|
1207 |
+
* @return array SQL sentence with columns for select
|
1208 |
*/
|
1209 |
+
public function getColumnStmt($tableName)
|
1210 |
{
|
1211 |
$colStmt = array();
|
1212 |
+
foreach ($this->tableColumnTypes[$tableName] as $colName => $colType) {
|
1213 |
if ($colType['type'] == 'bit' && $this->dumpSettings['hex-blob']) {
|
1214 |
$colStmt[] = "LPAD(HEX(`${colName}`),2,'0') AS `${colName}`";
|
1215 |
+
} elseif ($colType['is_blob'] && $this->dumpSettings['hex-blob']) {
|
1216 |
$colStmt[] = "HEX(`${colName}`) AS `${colName}`";
|
1217 |
+
} elseif ($colType['is_virtual']) {
|
1218 |
$this->dumpSettings['complete-insert'] = true;
|
1219 |
continue;
|
1220 |
} else {
|
1224 |
|
1225 |
return $colStmt;
|
1226 |
}
|
1227 |
+
|
1228 |
+
/**
|
1229 |
+
* Build SQL List of all columns on current table which will be used for inserting
|
1230 |
+
*
|
1231 |
+
* @param string $tableName Name of table to get columns
|
1232 |
+
*
|
1233 |
+
* @return array columns for sql sentence for insert
|
1234 |
+
*/
|
1235 |
+
public function getColumnNames($tableName)
|
1236 |
+
{
|
1237 |
+
$colNames = array();
|
1238 |
+
foreach ($this->tableColumnTypes[$tableName] as $colName => $colType) {
|
1239 |
+
if ($colType['is_virtual']) {
|
1240 |
+
$this->dumpSettings['complete-insert'] = true;
|
1241 |
+
continue;
|
1242 |
+
} else {
|
1243 |
+
$colNames[] = "`${colName}`";
|
1244 |
+
}
|
1245 |
+
}
|
1246 |
+
return $colNames;
|
1247 |
+
}
|
1248 |
}
|
1249 |
|
1250 |
/**
|
1278 |
public static function create($c)
|
1279 |
{
|
1280 |
$c = ucfirst(strtolower($c));
|
1281 |
+
if (!CompressMethod::isValid($c)) {
|
1282 |
throw new Exception("Compression method ($c) is not defined yet");
|
1283 |
}
|
1284 |
|
1285 |
+
$method = __NAMESPACE__."\\"."Compress".$c;
|
1286 |
|
1287 |
return new $method;
|
1288 |
}
|
1294 |
|
1295 |
public function __construct()
|
1296 |
{
|
1297 |
+
if (!function_exists("bzopen")) {
|
1298 |
throw new Exception("Compression is enabled, but bzip2 lib is not installed or configured properly");
|
1299 |
}
|
1300 |
}
|
1332 |
|
1333 |
public function __construct()
|
1334 |
{
|
1335 |
+
if (!function_exists("gzopen")) {
|
1336 |
throw new Exception("Compression is enabled, but gzip lib is not installed or configured properly");
|
1337 |
}
|
1338 |
}
|
1422 |
*/
|
1423 |
abstract class TypeAdapterFactory
|
1424 |
{
|
1425 |
+
protected $dbHandler = null;
|
1426 |
+
protected $dumpSettings = array();
|
1427 |
+
|
1428 |
/**
|
1429 |
* @param string $c Type of database factory to create (Mysql, Sqlite,...)
|
1430 |
* @param PDO $dbHandler
|
1431 |
*/
|
1432 |
+
public static function create($c, $dbHandler = null, $dumpSettings = array())
|
1433 |
{
|
1434 |
$c = ucfirst(strtolower($c));
|
1435 |
+
if (!TypeAdapter::isValid($c)) {
|
1436 |
throw new Exception("Database type support for ($c) not yet available");
|
1437 |
}
|
1438 |
+
$method = __NAMESPACE__."\\"."TypeAdapter".$c;
|
1439 |
+
return new $method($dbHandler, $dumpSettings);
|
1440 |
+
}
|
1441 |
+
|
1442 |
+
public function __construct($dbHandler = null, $dumpSettings = array())
|
1443 |
+
{
|
1444 |
+
$this->dbHandler = $dbHandler;
|
1445 |
+
$this->dumpSettings = $dumpSettings;
|
1446 |
}
|
1447 |
|
1448 |
/**
|
1456 |
|
1457 |
public function show_create_table($tableName)
|
1458 |
{
|
1459 |
+
return "SELECT tbl_name as 'Table', sql as 'Create Table' ".
|
1460 |
+
"FROM sqlite_master ".
|
1461 |
"WHERE type='table' AND tbl_name='$tableName'";
|
1462 |
}
|
1463 |
|
1465 |
* function create_table Get table creation code from database
|
1466 |
* @todo make it do something with sqlite
|
1467 |
*/
|
1468 |
+
public function create_table($row)
|
1469 |
{
|
1470 |
return "";
|
1471 |
}
|
1472 |
|
1473 |
public function show_create_view($viewName)
|
1474 |
{
|
1475 |
+
return "SELECT tbl_name as 'View', sql as 'Create View' ".
|
1476 |
+
"FROM sqlite_master ".
|
1477 |
"WHERE type='view' AND tbl_name='$viewName'";
|
1478 |
}
|
1479 |
|
1508 |
* function create_procedure Modify procedure code, add delimiters, etc
|
1509 |
* @todo make it do something with sqlite
|
1510 |
*/
|
1511 |
+
public function create_procedure($procedureName)
|
1512 |
{
|
1513 |
return "";
|
1514 |
}
|
1661 |
|
1662 |
class TypeAdapterMysql extends TypeAdapterFactory
|
1663 |
{
|
1664 |
+
const DEFINER_RE = 'DEFINER=`(?:[^`]|``)*`@`(?:[^`]|``)*`';
|
1665 |
|
|
|
1666 |
|
1667 |
// Numerical Mysql types
|
1668 |
public $mysqlTypes = array(
|
1699 |
)
|
1700 |
);
|
1701 |
|
|
|
|
|
|
|
|
|
|
|
1702 |
public function databases()
|
1703 |
{
|
1704 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1715 |
$ret = "";
|
1716 |
|
1717 |
$ret .= "CREATE DATABASE /*!32312 IF NOT EXISTS*/ `${databaseName}`".
|
1718 |
+
" /*!40100 DEFAULT CHARACTER SET ${characterSet} ".
|
1719 |
+
" COLLATE ${collationDb} */;".PHP_EOL.PHP_EOL.
|
1720 |
+
"USE `${databaseName}`;".PHP_EOL.PHP_EOL;
|
1721 |
|
1722 |
return $ret;
|
1723 |
}
|
1747 |
return "SHOW CREATE EVENT `$eventName`";
|
1748 |
}
|
1749 |
|
1750 |
+
public function create_table($row)
|
1751 |
{
|
1752 |
+
if (!isset($row['Create Table'])) {
|
1753 |
throw new Exception("Error getting table code, unknown output");
|
1754 |
}
|
1755 |
|
1756 |
$createTable = $row['Create Table'];
|
1757 |
+
if ($this->dumpSettings['reset-auto-increment']) {
|
1758 |
$match = "/AUTO_INCREMENT=[0-9]+/s";
|
1759 |
$replace = "";
|
1760 |
$createTable = preg_replace($match, $replace, $createTable);
|
1761 |
}
|
1762 |
|
1763 |
+
$ret = "/*!40101 SET @saved_cs_client = @@character_set_client */;".PHP_EOL.
|
1764 |
+
"/*!40101 SET character_set_client = ".$this->dumpSettings['default-character-set']." */;".PHP_EOL.
|
1765 |
+
$createTable.";".PHP_EOL.
|
1766 |
+
"/*!40101 SET character_set_client = @saved_cs_client */;".PHP_EOL.
|
1767 |
PHP_EOL;
|
1768 |
return $ret;
|
1769 |
}
|
1772 |
{
|
1773 |
$ret = "";
|
1774 |
if (!isset($row['Create View'])) {
|
1775 |
+
throw new Exception("Error getting view structure, unknown output");
|
1776 |
}
|
1777 |
|
1778 |
+
$viewStmt = $row['Create View'];
|
1779 |
|
1780 |
+
$definerStr = $this->dumpSettings['skip-definer'] ? '' : '/*!50013 \2 */'.PHP_EOL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1781 |
|
1782 |
+
if ($viewStmtReplaced = preg_replace(
|
1783 |
+
'/^(CREATE(?:\s+ALGORITHM=(?:UNDEFINED|MERGE|TEMPTABLE))?)\s+('
|
1784 |
+
.self::DEFINER_RE.'(?:\s+SQL SECURITY DEFINER|INVOKER)?)?\s+(VIEW .+)$/',
|
1785 |
+
'/*!50001 \1 */'.PHP_EOL.$definerStr.'/*!50001 \3 */',
|
1786 |
+
$viewStmt,
|
1787 |
+
1
|
1788 |
+
)) {
|
1789 |
+
$viewStmt = $viewStmtReplaced;
|
1790 |
+
};
|
1791 |
+
|
1792 |
+
$ret .= $viewStmt.';'.PHP_EOL.PHP_EOL;
|
1793 |
return $ret;
|
1794 |
}
|
1795 |
|
1801 |
}
|
1802 |
|
1803 |
$triggerStmt = $row['SQL Original Statement'];
|
1804 |
+
$definerStr = $this->dumpSettings['skip-definer'] ? '' : '/*!50017 \2*/ ';
|
1805 |
+
if ($triggerStmtReplaced = preg_replace(
|
1806 |
+
'/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(TRIGGER\s.*)$/s',
|
1807 |
+
'/*!50003 \1*/ '.$definerStr.'/*!50003 \3 */',
|
1808 |
+
$triggerStmt,
|
1809 |
+
1
|
1810 |
+
)) {
|
1811 |
+
$triggerStmt = $triggerStmtReplaced;
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
$ret .= "DELIMITER ;;".PHP_EOL.
|
1815 |
+
$triggerStmt.";;".PHP_EOL.
|
1816 |
+
"DELIMITER ;".PHP_EOL.PHP_EOL;
|
|
|
|
|
|
|
|
|
1817 |
return $ret;
|
1818 |
}
|
1819 |
|
1820 |
+
public function create_procedure($row)
|
1821 |
{
|
1822 |
$ret = "";
|
1823 |
if (!isset($row['Create Procedure'])) {
|
1824 |
+
throw new Exception("Error getting procedure code, unknown output. ".
|
1825 |
"Please check 'https://bugs.mysql.com/bug.php?id=14564'");
|
1826 |
}
|
1827 |
$procedureStmt = $row['Create Procedure'];
|
1828 |
|
1829 |
+
$ret .= "/*!50003 DROP PROCEDURE IF EXISTS `".
|
1830 |
+
$row['Procedure']."` */;".PHP_EOL.
|
1831 |
+
"/*!40101 SET @saved_cs_client = @@character_set_client */;".PHP_EOL.
|
1832 |
+
"/*!40101 SET character_set_client = ".$this->dumpSettings['default-character-set']." */;".PHP_EOL.
|
1833 |
+
"DELIMITER ;;".PHP_EOL.
|
1834 |
+
$procedureStmt." ;;".PHP_EOL.
|
1835 |
+
"DELIMITER ;".PHP_EOL.
|
1836 |
+
"/*!40101 SET character_set_client = @saved_cs_client */;".PHP_EOL.PHP_EOL;
|
1837 |
|
1838 |
return $ret;
|
1839 |
}
|
1841 |
public function create_event($row)
|
1842 |
{
|
1843 |
$ret = "";
|
1844 |
+
if (!isset($row['Create Event'])) {
|
1845 |
+
throw new Exception("Error getting event code, unknown output. ".
|
1846 |
"Please check 'http://stackoverflow.com/questions/10853826/mysql-5-5-create-event-gives-syntax-error'");
|
1847 |
}
|
1848 |
$eventName = $row['Event'];
|
1849 |
$eventStmt = $row['Create Event'];
|
1850 |
$sqlMode = $row['sql_mode'];
|
1851 |
+
$definerStr = $this->dumpSettings['skip-definer'] ? '' : '/*!50117 \2*/ ';
|
1852 |
+
|
1853 |
+
if ($eventStmtReplaced = preg_replace(
|
1854 |
+
'/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(EVENT .*)$/',
|
1855 |
+
'/*!50106 \1*/ '.$definerStr.'/*!50106 \3 */',
|
1856 |
+
$eventStmt,
|
1857 |
+
1
|
1858 |
+
)) {
|
1859 |
+
$eventStmt = $eventStmtReplaced;
|
1860 |
+
}
|
1861 |
+
|
1862 |
+
$ret .= "/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;".PHP_EOL.
|
1863 |
+
"/*!50106 DROP EVENT IF EXISTS `".$eventName."` */;".PHP_EOL.
|
1864 |
+
"DELIMITER ;;".PHP_EOL.
|
1865 |
+
"/*!50003 SET @saved_cs_client = @@character_set_client */ ;;".PHP_EOL.
|
1866 |
+
"/*!50003 SET @saved_cs_results = @@character_set_results */ ;;".PHP_EOL.
|
1867 |
+
"/*!50003 SET @saved_col_connection = @@collation_connection */ ;;".PHP_EOL.
|
1868 |
+
"/*!50003 SET character_set_client = utf8 */ ;;".PHP_EOL.
|
1869 |
+
"/*!50003 SET character_set_results = utf8 */ ;;".PHP_EOL.
|
1870 |
+
"/*!50003 SET collation_connection = utf8_general_ci */ ;;".PHP_EOL.
|
1871 |
+
"/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;".PHP_EOL.
|
1872 |
+
"/*!50003 SET sql_mode = '".$sqlMode."' */ ;;".PHP_EOL.
|
1873 |
+
"/*!50003 SET @saved_time_zone = @@time_zone */ ;;".PHP_EOL.
|
1874 |
+
"/*!50003 SET time_zone = 'SYSTEM' */ ;;".PHP_EOL.
|
1875 |
+
$eventStmt." ;;".PHP_EOL.
|
1876 |
+
"/*!50003 SET time_zone = @saved_time_zone */ ;;".PHP_EOL.
|
1877 |
+
"/*!50003 SET sql_mode = @saved_sql_mode */ ;;".PHP_EOL.
|
1878 |
+
"/*!50003 SET character_set_client = @saved_cs_client */ ;;".PHP_EOL.
|
1879 |
+
"/*!50003 SET character_set_results = @saved_cs_results */ ;;".PHP_EOL.
|
1880 |
+
"/*!50003 SET collation_connection = @saved_col_connection */ ;;".PHP_EOL.
|
1881 |
+
"DELIMITER ;".PHP_EOL.
|
1882 |
+
"/*!50106 SET TIME_ZONE= @save_time_zone */ ;".PHP_EOL.PHP_EOL;
|
|
|
|
|
|
|
|
|
|
|
1883 |
// Commented because we are doing this in restore_parameters()
|
1884 |
// "/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;" . PHP_EOL . PHP_EOL;
|
1885 |
|
1890 |
{
|
1891 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1892 |
$args = func_get_args();
|
1893 |
+
return "SELECT TABLE_NAME AS tbl_name ".
|
1894 |
+
"FROM INFORMATION_SCHEMA.TABLES ".
|
1895 |
"WHERE TABLE_TYPE='BASE TABLE' AND TABLE_SCHEMA='${args[0]}'";
|
1896 |
}
|
1897 |
|
1899 |
{
|
1900 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1901 |
$args = func_get_args();
|
1902 |
+
return "SELECT TABLE_NAME AS tbl_name ".
|
1903 |
+
"FROM INFORMATION_SCHEMA.TABLES ".
|
1904 |
"WHERE TABLE_TYPE='VIEW' AND TABLE_SCHEMA='${args[0]}'";
|
1905 |
}
|
1906 |
|
1922 |
{
|
1923 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1924 |
$args = func_get_args();
|
1925 |
+
return "SELECT SPECIFIC_NAME AS procedure_name ".
|
1926 |
+
"FROM INFORMATION_SCHEMA.ROUTINES ".
|
1927 |
"WHERE ROUTINE_TYPE='PROCEDURE' AND ROUTINE_SCHEMA='${args[0]}'";
|
1928 |
}
|
1929 |
|
1937 |
{
|
1938 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1939 |
$args = func_get_args();
|
1940 |
+
return "SELECT EVENT_NAME AS event_name ".
|
1941 |
+
"FROM INFORMATION_SCHEMA.EVENTS ".
|
1942 |
"WHERE EVENT_SCHEMA='${args[0]}'";
|
1943 |
}
|
1944 |
|
1962 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1963 |
$args = func_get_args();
|
1964 |
return $this->dbHandler->exec("LOCK TABLES `${args[0]}` READ LOCAL");
|
|
|
1965 |
}
|
1966 |
|
1967 |
public function unlock_table()
|
1973 |
{
|
1974 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1975 |
$args = func_get_args();
|
1976 |
+
return "LOCK TABLES `${args[0]}` WRITE;".PHP_EOL;
|
1977 |
}
|
1978 |
|
1979 |
public function end_add_lock_table()
|
1980 |
{
|
1981 |
+
return "UNLOCK TABLES;".PHP_EOL;
|
1982 |
}
|
1983 |
|
1984 |
public function start_add_disable_keys()
|
1985 |
{
|
1986 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1987 |
$args = func_get_args();
|
1988 |
+
return "/*!40000 ALTER TABLE `${args[0]}` DISABLE KEYS */;".
|
1989 |
PHP_EOL;
|
1990 |
}
|
1991 |
|
1993 |
{
|
1994 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
1995 |
$args = func_get_args();
|
1996 |
+
return "/*!40000 ALTER TABLE `${args[0]}` ENABLE KEYS */;".
|
1997 |
PHP_EOL;
|
1998 |
}
|
1999 |
|
2000 |
public function start_disable_autocommit()
|
2001 |
{
|
2002 |
+
return "SET autocommit=0;".PHP_EOL;
|
2003 |
}
|
2004 |
|
2005 |
public function end_disable_autocommit()
|
2006 |
{
|
2007 |
+
return "COMMIT;".PHP_EOL;
|
2008 |
}
|
2009 |
|
2010 |
public function add_drop_database()
|
2011 |
{
|
2012 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
2013 |
$args = func_get_args();
|
2014 |
+
return "/*!40000 DROP DATABASE IF EXISTS `${args[0]}`*/;".
|
2015 |
+
PHP_EOL.PHP_EOL;
|
2016 |
}
|
2017 |
|
2018 |
public function add_drop_trigger()
|
2019 |
{
|
2020 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
2021 |
$args = func_get_args();
|
2022 |
+
return "DROP TRIGGER IF EXISTS `${args[0]}`;".PHP_EOL;
|
2023 |
}
|
2024 |
|
2025 |
public function drop_table()
|
2026 |
{
|
2027 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
2028 |
$args = func_get_args();
|
2029 |
+
return "DROP TABLE IF EXISTS `${args[0]}`;".PHP_EOL;
|
2030 |
}
|
2031 |
|
2032 |
public function drop_view()
|
2033 |
{
|
2034 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
2035 |
$args = func_get_args();
|
2036 |
+
return "DROP TABLE IF EXISTS `${args[0]}`;".PHP_EOL.
|
2037 |
+
"/*!50001 DROP VIEW IF EXISTS `${args[0]}`*/;".PHP_EOL;
|
2038 |
}
|
2039 |
|
2040 |
public function getDatabaseHeader()
|
2041 |
{
|
2042 |
$this->check_parameters(func_num_args(), $expected_num_args = 1, __METHOD__);
|
2043 |
$args = func_get_args();
|
2044 |
+
return "--".PHP_EOL.
|
2045 |
+
"-- Current Database: `${args[0]}`".PHP_EOL.
|
2046 |
+
"--".PHP_EOL.PHP_EOL;
|
2047 |
}
|
2048 |
|
2049 |
/**
|
2058 |
$colInfo = array();
|
2059 |
$colParts = explode(" ", $colType['Type']);
|
2060 |
|
2061 |
+
if ($fparen = strpos($colParts[0], "(")) {
|
|
|
2062 |
$colInfo['type'] = substr($colParts[0], 0, $fparen);
|
2063 |
+
$colInfo['length'] = str_replace(")", "", substr($colParts[0], $fparen + 1));
|
2064 |
+
$colInfo['attributes'] = isset($colParts[1]) ? $colParts[1] : null;
|
2065 |
+
} else {
|
|
|
|
|
2066 |
$colInfo['type'] = $colParts[0];
|
2067 |
}
|
2068 |
$colInfo['is_numeric'] = in_array($colInfo['type'], $this->mysqlTypes['numerical']);
|
2069 |
$colInfo['is_blob'] = in_array($colInfo['type'], $this->mysqlTypes['blob']);
|
2070 |
+
// for virtual columns that are of type 'Extra', column type
|
2071 |
+
// could by "STORED GENERATED" or "VIRTUAL GENERATED"
|
2072 |
+
// MySQL reference: https://dev.mysql.com/doc/refman/5.7/en/create-table-generated-columns.html
|
2073 |
+
$colInfo['is_virtual'] = strpos($colType['Extra'], "VIRTUAL GENERATED") !== false || strpos($colType['Extra'], "STORED GENERATED") !== false;
|
2074 |
|
2075 |
return $colInfo;
|
2076 |
}
|
2077 |
|
2078 |
public function backup_parameters()
|
2079 |
{
|
2080 |
+
$ret = "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;".PHP_EOL.
|
2081 |
+
"/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;".PHP_EOL.
|
2082 |
+
"/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;".PHP_EOL.
|
2083 |
+
"/*!40101 SET NAMES ".$this->dumpSettings['default-character-set']." */;".PHP_EOL;
|
|
|
|
|
|
|
2084 |
|
2085 |
+
if (false === $this->dumpSettings['skip-tz-utc']) {
|
2086 |
+
$ret .= "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;".PHP_EOL.
|
2087 |
+
"/*!40103 SET TIME_ZONE='+00:00' */;".PHP_EOL;
|
2088 |
}
|
2089 |
|
2090 |
+
$ret .= "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;".PHP_EOL.
|
2091 |
+
"/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;".PHP_EOL.
|
2092 |
+
"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;".PHP_EOL.
|
2093 |
+
"/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;".PHP_EOL.PHP_EOL;
|
2094 |
|
2095 |
return $ret;
|
2096 |
}
|
2097 |
|
2098 |
public function restore_parameters()
|
2099 |
{
|
|
|
|
|
|
|
2100 |
$ret = "";
|
2101 |
|
2102 |
+
if (false === $this->dumpSettings['skip-tz-utc']) {
|
2103 |
+
$ret .= "/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;".PHP_EOL;
|
2104 |
}
|
2105 |
|
2106 |
+
$ret .= "/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;".PHP_EOL.
|
2107 |
+
"/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;".PHP_EOL.
|
2108 |
+
"/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;".PHP_EOL.
|
2109 |
+
"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;".PHP_EOL.
|
2110 |
+
"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;".PHP_EOL.
|
2111 |
+
"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;".PHP_EOL.
|
2112 |
+
"/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;".PHP_EOL.PHP_EOL;
|
2113 |
|
2114 |
return $ret;
|
2115 |
}
|
2124 |
*/
|
2125 |
private function check_parameters($num_args, $expected_num_args, $method_name)
|
2126 |
{
|
2127 |
+
if ($num_args != $expected_num_args) {
|
2128 |
throw new Exception("Unexpected parameter passed to $method_name");
|
2129 |
}
|
2130 |
return;
|
vendor/ifsnop/mysqldump-php/tests/create_users.sh
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
#!/bin/bash
|
2 |
-
|
3 |
-
mysql -u root -e "CREATE USER 'travis'@'%';"
|
4 |
-
mysql -u root -e "CREATE DATABASE test001;"
|
5 |
-
mysql -u root -e "CREATE DATABASE test002;"
|
6 |
-
mysql -u root -e "CREATE DATABASE test005;"
|
7 |
-
mysql -u root -e "CREATE DATABASE test006a;"
|
8 |
-
mysql -u root -e "CREATE DATABASE test006b;"
|
9 |
-
mysql -u root -e "CREATE DATABASE test008;"
|
10 |
-
mysql -u root -e "CREATE DATABASE test009;"
|
11 |
-
mysql -u root -e "CREATE DATABASE test010;"
|
12 |
-
mysql -u root -e "CREATE DATABASE test011;"
|
13 |
-
mysql -u root -e "GRANT ALL PRIVILEGES ON test001.* TO 'travis'@'%' WITH GRANT OPTION;"
|
14 |
-
mysql -u root -e "GRANT ALL PRIVILEGES ON test002.* TO 'travis'@'%' WITH GRANT OPTION;"
|
15 |
-
mysql -u root -e "GRANT ALL PRIVILEGES ON test005.* TO 'travis'@'%' WITH GRANT OPTION;"
|
16 |
-
mysql -u root -e "GRANT ALL PRIVILEGES ON test006a.* TO 'travis'@'%' WITH GRANT OPTION;"
|
17 |
-
mysql -u root -e "GRANT ALL PRIVILEGES ON test006b.* TO 'travis'@'%' WITH GRANT OPTION;"
|
18 |
-
mysql -u root -e "GRANT ALL PRIVILEGES ON test008.* TO 'travis'@'%' WITH GRANT OPTION;"
|
19 |
-
mysql -u root -e "GRANT ALL PRIVILEGES ON test009.* TO 'travis'@'%' WITH GRANT OPTION;"
|
20 |
-
mysql -u root -e "GRANT ALL PRIVILEGES ON test010.* TO 'travis'@'%' WITH GRANT OPTION;"
|
21 |
-
mysql -u root -e "GRANT ALL PRIVILEGES ON test011.* TO 'travis'@'%' WITH GRANT OPTION;"
|
22 |
-
mysql -u root -e "GRANT SUPER,LOCK TABLES ON *.* TO 'travis'@'%';"
|
23 |
-
mysql -u root -e "GRANT SELECT ON mysql.proc to 'travis'@'%';"
|
24 |
-
mysql -u root -e "FLUSH PRIVILEGES;"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/delete_users.sh
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
#!/bin/bash
|
2 |
-
|
3 |
-
mysql -e "DROP DATABASE test001;"
|
4 |
-
mysql -e "DROP DATABASE test002;"
|
5 |
-
mysql -e "DROP DATABASE test005;"
|
6 |
-
mysql -e "DROP DATABASE test006a;"
|
7 |
-
mysql -e "DROP DATABASE test006b;"
|
8 |
-
mysql -e "DROP DATABASE test008;"
|
9 |
-
mysql -e "DROP DATABASE test009;"
|
10 |
-
|
11 |
-
mysql -e "DROP USER 'travis'";
|
12 |
-
|
13 |
-
mysql -e "FLUSH PRIVILEGES;"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test.php
DELETED
@@ -1,100 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
for($i=0;$i<128;$i++) {
|
4 |
-
echo "$i>" . bin2hex(chr($i)) . "<" . PHP_EOL;
|
5 |
-
}
|
6 |
-
*/
|
7 |
-
|
8 |
-
error_reporting(E_ALL);
|
9 |
-
|
10 |
-
include_once(dirname(__FILE__) . "/../src/Ifsnop/Mysqldump/Mysqldump.php");
|
11 |
-
|
12 |
-
use Ifsnop\Mysqldump as IMysqldump;
|
13 |
-
|
14 |
-
$dumpSettings = array(
|
15 |
-
'exclude-tables' => array('/^travis*/'),
|
16 |
-
'compress' => IMysqldump\Mysqldump::NONE,
|
17 |
-
'no-data' => false,
|
18 |
-
'add-drop-table' => true,
|
19 |
-
'single-transaction' => true,
|
20 |
-
'lock-tables' => true,
|
21 |
-
'add-locks' => true,
|
22 |
-
'extended-insert' => false,
|
23 |
-
'disable-keys' => true,
|
24 |
-
'skip-triggers' => false,
|
25 |
-
'add-drop-trigger' => true,
|
26 |
-
'routines' => true,
|
27 |
-
'databases' => false,
|
28 |
-
'add-drop-database' => false,
|
29 |
-
'hex-blob' => true,
|
30 |
-
'no-create-info' => false,
|
31 |
-
'where' => ''
|
32 |
-
);
|
33 |
-
|
34 |
-
$dump = new IMysqldump\Mysqldump(
|
35 |
-
"mysql:host=localhost;dbname=test001",
|
36 |
-
"travis",
|
37 |
-
"",
|
38 |
-
$dumpSettings);
|
39 |
-
$dump->start("mysqldump-php_test001.sql");
|
40 |
-
|
41 |
-
$dumpSettings['default-character-set'] = IMysqldump\Mysqldump::UTF8MB4;
|
42 |
-
$dumpSettings['complete-insert'] = true;
|
43 |
-
$dump = new IMysqldump\Mysqldump(
|
44 |
-
"mysql:host=localhost;dbname=test002",
|
45 |
-
"travis",
|
46 |
-
"",
|
47 |
-
$dumpSettings);
|
48 |
-
$dump->start("mysqldump-php_test002.sql");
|
49 |
-
|
50 |
-
$dumpSettings['complete-insert'] = false;
|
51 |
-
$dump = new IMysqldump\Mysqldump(
|
52 |
-
"mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=test005",
|
53 |
-
"travis",
|
54 |
-
"",
|
55 |
-
$dumpSettings);
|
56 |
-
$dump->start("mysqldump-php_test005.sql");
|
57 |
-
|
58 |
-
$dump = new IMysqldump\Mysqldump(
|
59 |
-
"mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=test006a",
|
60 |
-
"travis",
|
61 |
-
"",
|
62 |
-
array("no-data" => true, "add-drop-table" => true));
|
63 |
-
$dump->start("mysqldump-php_test006.sql");
|
64 |
-
|
65 |
-
$dump = new IMysqldump\Mysqldump(
|
66 |
-
"mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=test008",
|
67 |
-
"travis",
|
68 |
-
"",
|
69 |
-
array("no-data" => true, "add-drop-table" => true));
|
70 |
-
$dump->start("mysqldump-php_test008.sql");
|
71 |
-
|
72 |
-
$dump = new IMysqldump\Mysqldump(
|
73 |
-
"mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=test009",
|
74 |
-
"travis",
|
75 |
-
"",
|
76 |
-
array("no-data" => true, "add-drop-table" => true, "reset-auto-increment" => true, "add-drop-database" => true));
|
77 |
-
$dump->start("mysqldump-php_test009.sql");
|
78 |
-
|
79 |
-
$dump = new IMysqldump\Mysqldump(
|
80 |
-
"mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=test010",
|
81 |
-
"travis",
|
82 |
-
"",
|
83 |
-
array("events" => true));
|
84 |
-
$dump->start("mysqldump-php_test010.sql");
|
85 |
-
|
86 |
-
$dump = new IMysqldump\Mysqldump(
|
87 |
-
"mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=test011",
|
88 |
-
"travis",
|
89 |
-
"",
|
90 |
-
array('complete-insert' => false));
|
91 |
-
$dump->start("mysqldump-php_test011a.sql");
|
92 |
-
|
93 |
-
$dump = new IMysqldump\Mysqldump(
|
94 |
-
"mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=test011",
|
95 |
-
"travis",
|
96 |
-
"",
|
97 |
-
array('complete-insert' => true));
|
98 |
-
$dump->start("mysqldump-php_test011b.sql");
|
99 |
-
|
100 |
-
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test.sh
DELETED
@@ -1,152 +0,0 @@
|
|
1 |
-
#!/bin/bash
|
2 |
-
|
3 |
-
function checksum_test001() {
|
4 |
-
for i in 000 001 002 003 010 011 015 027 029 033 200; do
|
5 |
-
mysql -utravis -B -e "CHECKSUM TABLE test${i}" test001 | grep -v -i checksum
|
6 |
-
done
|
7 |
-
}
|
8 |
-
|
9 |
-
function checksum_test002() {
|
10 |
-
for i in 201; do
|
11 |
-
mysql -utravis --default-character-set=utf8mb4 -B -e "CHECKSUM TABLE test${i}" test002 | grep -v -i checksum
|
12 |
-
done
|
13 |
-
}
|
14 |
-
|
15 |
-
function checksum_test005() {
|
16 |
-
for i in 000; do
|
17 |
-
mysql -utravis -B -e "CHECKSUM TABLE test${i}" test001 | grep -v -i checksum
|
18 |
-
done
|
19 |
-
}
|
20 |
-
|
21 |
-
for i in $(seq 0 35) ; do
|
22 |
-
ret[$i]=0
|
23 |
-
done
|
24 |
-
|
25 |
-
index=0
|
26 |
-
|
27 |
-
mysql -utravis < test001.src.sql; ret[((index++))]=$?
|
28 |
-
mysql -utravis --default-character-set=utf8mb4 < test002.src.sql; ret[((index++))]=$?
|
29 |
-
mysql -utravis < test005.src.sql; ret[((index++))]=$?
|
30 |
-
mysql -utravis < test006.src.sql; ret[((index++))]=$?
|
31 |
-
mysql -utravis < test008.src.sql; ret[((index++))]=$?
|
32 |
-
mysql -utravis < test009.src.sql; ret[((index++))]=$?
|
33 |
-
mysql -utravis < test010.src.sql; ret[((index++))]=$?
|
34 |
-
mysql -utravis < test011.src.sql; ret[((index++))]=$?
|
35 |
-
|
36 |
-
checksum_test001 > test001.src.checksum
|
37 |
-
checksum_test002 > test002.src.checksum
|
38 |
-
checksum_test005 > test005.src.checksum
|
39 |
-
mysqldump -utravis test001 \
|
40 |
-
--no-autocommit \
|
41 |
-
--extended-insert=false \
|
42 |
-
--hex-blob=true \
|
43 |
-
--routines=true \
|
44 |
-
> mysqldump_test001.sql
|
45 |
-
ret[((index++))]=$?
|
46 |
-
|
47 |
-
mysqldump -utravis test002 \
|
48 |
-
--no-autocommit \
|
49 |
-
--extended-insert=false \
|
50 |
-
--complete-insert=true \
|
51 |
-
--hex-blob=true \
|
52 |
-
--default-character-set=utf8mb4 \
|
53 |
-
> mysqldump_test002.sql
|
54 |
-
ret[((index++))]=$?
|
55 |
-
|
56 |
-
mysqldump -utravis test005 \
|
57 |
-
--no-autocommit \
|
58 |
-
--extended-insert=false \
|
59 |
-
--hex-blob=true \
|
60 |
-
> mysqldump_test005.sql
|
61 |
-
ret[((index++))]=$?
|
62 |
-
|
63 |
-
php test.php
|
64 |
-
ret[((index++))]=$?
|
65 |
-
|
66 |
-
mysql -utravis test001 < mysqldump-php_test001.sql
|
67 |
-
ret[((index++))]=$?
|
68 |
-
mysql -utravis test002 < mysqldump-php_test002.sql
|
69 |
-
ret[((index++))]=$?
|
70 |
-
mysql -utravis test005 < mysqldump-php_test005.sql
|
71 |
-
ret[((index++))]=$?
|
72 |
-
mysql -utravis test006b < mysqldump-php_test006.sql
|
73 |
-
ret[((index++))]=$?
|
74 |
-
mysql -utravis test009 < mysqldump-php_test009.sql
|
75 |
-
ret[((index++))]=$?
|
76 |
-
|
77 |
-
checksum_test001 > mysqldump-php_test001.checksum
|
78 |
-
checksum_test002 > mysqldump-php_test002.checksum
|
79 |
-
checksum_test005 > mysqldump-php_test005.checksum
|
80 |
-
|
81 |
-
cat test001.src.sql | grep ^INSERT > test001.filtered.sql
|
82 |
-
cat test002.src.sql | grep ^INSERT > test002.filtered.sql
|
83 |
-
cat test005.src.sql | grep ^INSERT > test005.filtered.sql
|
84 |
-
cat test008.src.sql | grep FOREIGN > test008.filtered.sql
|
85 |
-
cat test010.src.sql | grep CREATE | grep EVENT > test010.filtered.sql
|
86 |
-
cat test011.src.sql | grep INSERT > test011.filtered.sql
|
87 |
-
cat mysqldump_test001.sql | grep ^INSERT > mysqldump_test001.filtered.sql
|
88 |
-
cat mysqldump_test002.sql | grep ^INSERT > mysqldump_test002.filtered.sql
|
89 |
-
cat mysqldump_test005.sql | grep ^INSERT > mysqldump_test005.filtered.sql
|
90 |
-
cat mysqldump-php_test001.sql | grep ^INSERT > mysqldump-php_test001.filtered.sql
|
91 |
-
cat mysqldump-php_test002.sql | grep ^INSERT > mysqldump-php_test002.filtered.sql
|
92 |
-
cat mysqldump-php_test005.sql | grep ^INSERT > mysqldump-php_test005.filtered.sql
|
93 |
-
cat mysqldump-php_test008.sql | grep FOREIGN > mysqldump-php_test008.filtered.sql
|
94 |
-
cat mysqldump-php_test010.sql | grep CREATE | grep EVENT > mysqldump-php_test010.filtered.sql
|
95 |
-
cat mysqldump-php_test011a.sql | grep INSERT > mysqldump-php_test011a.filtered.sql
|
96 |
-
cat mysqldump-php_test011b.sql | grep INSERT > mysqldump-php_test011b.filtered.sql
|
97 |
-
|
98 |
-
diff test001.filtered.sql mysqldump_test001.filtered.sql
|
99 |
-
ret[((index++))]=$?
|
100 |
-
diff test002.filtered.sql mysqldump_test002.filtered.sql
|
101 |
-
ret[((index++))]=$?
|
102 |
-
|
103 |
-
diff test001.filtered.sql mysqldump-php_test001.filtered.sql
|
104 |
-
ret[((index++))]=$?
|
105 |
-
diff test002.filtered.sql mysqldump-php_test002.filtered.sql
|
106 |
-
ret[((index++))]=$?
|
107 |
-
|
108 |
-
diff test001.src.checksum mysqldump-php_test001.checksum
|
109 |
-
ret[((index++))]=$?
|
110 |
-
diff test002.src.checksum mysqldump-php_test002.checksum
|
111 |
-
ret[((index++))]=$?
|
112 |
-
diff test005.src.checksum mysqldump-php_test005.checksum
|
113 |
-
ret[((index++))]=$?
|
114 |
-
|
115 |
-
diff mysqldump_test005.filtered.sql mysqldump-php_test005.filtered.sql
|
116 |
-
ret[((index++))]=$?
|
117 |
-
|
118 |
-
diff test008.filtered.sql mysqldump-php_test008.filtered.sql
|
119 |
-
ret[((index++))]=$?
|
120 |
-
|
121 |
-
#test reset-auto-increment
|
122 |
-
test009=`cat mysqldump-php_test009.sql | grep -i ENGINE | grep AUTO_INCREMENT`
|
123 |
-
if [[ -z $test009 ]]; then ret[((index++))]=0; else ret[((index++))]=1; fi
|
124 |
-
|
125 |
-
# test backup events
|
126 |
-
diff test010.filtered.sql mysqldump-php_test010.filtered.sql
|
127 |
-
ret[((index++))]=$?
|
128 |
-
|
129 |
-
# test virtual column support, with simple inserts forced to complete (a) and complete inserts (b)
|
130 |
-
diff test011.filtered.sql mysqldump-php_test011a.filtered.sql
|
131 |
-
ret[((index++))]=$?
|
132 |
-
diff test011.filtered.sql mysqldump-php_test011b.filtered.sql
|
133 |
-
ret[((index++))]=$?
|
134 |
-
|
135 |
-
rm *.checksum 2> /dev/null
|
136 |
-
rm *.filtered.sql 2> /dev/null
|
137 |
-
rm mysqldump* 2> /dev/null
|
138 |
-
|
139 |
-
echo "Done $index tests"
|
140 |
-
|
141 |
-
retvalue=0
|
142 |
-
for i in $(seq 0 35) ; do
|
143 |
-
if [[ ${ret[$i]} -ne 0 ]]; then
|
144 |
-
echo "test $i returned ${ret[$i]}"
|
145 |
-
retvalue=${ret[$i]}
|
146 |
-
fi
|
147 |
-
# total=$((${ret[$i]} + $total))
|
148 |
-
done
|
149 |
-
|
150 |
-
echo "Exiting with code $retvalue"
|
151 |
-
|
152 |
-
exit $retvalue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test001.src.sql
DELETED
@@ -1,136 +0,0 @@
|
|
1 |
-
DROP DATABASE IF EXISTS `test001`;
|
2 |
-
CREATE DATABASE `test001`;
|
3 |
-
USE `test001`;
|
4 |
-
|
5 |
-
DROP TABLE IF EXISTS `test000`;
|
6 |
-
CREATE TABLE `test000` (
|
7 |
-
`id` int,
|
8 |
-
`col01` bit(6) DEFAULT NULL,
|
9 |
-
`col02` tinyint(4) DEFAULT NULL,
|
10 |
-
`col03` tinyint(4) UNSIGNED DEFAULT NULL,
|
11 |
-
`col10` bigint DEFAULT NULL,
|
12 |
-
`col11` bigint UNSIGNED DEFAULT NULL,
|
13 |
-
`col15` double DEFAULT NULL,
|
14 |
-
`col27` varchar(6) DEFAULT NULL
|
15 |
-
);
|
16 |
-
INSERT INTO `test000` VALUES (1,0x21,-128,255,-9223372036854775808,18446744073709551615,-2.2250738585072014e-308,'0abcde');
|
17 |
-
|
18 |
-
DROP TABLE IF EXISTS `test001`;
|
19 |
-
CREATE TABLE `test001` (
|
20 |
-
`id` int,
|
21 |
-
`col` bit(1) DEFAULT NULL
|
22 |
-
);
|
23 |
-
INSERT INTO `test001` VALUES (1,NULL);
|
24 |
-
INSERT INTO `test001` VALUES (2,0x00);
|
25 |
-
INSERT INTO `test001` VALUES (3,0x01);
|
26 |
-
|
27 |
-
DROP TABLE IF EXISTS `test002`;
|
28 |
-
CREATE TABLE `test002` (
|
29 |
-
`id` int,
|
30 |
-
`col` tinyint(4) DEFAULT NULL
|
31 |
-
);
|
32 |
-
INSERT INTO `test002` VALUES (1,NULL);
|
33 |
-
INSERT INTO `test002` VALUES (2,-128);
|
34 |
-
INSERT INTO `test002` VALUES (3,0);
|
35 |
-
INSERT INTO `test002` VALUES (4,127);
|
36 |
-
|
37 |
-
DROP TABLE IF EXISTS `test003`;
|
38 |
-
CREATE TABLE `test003` (
|
39 |
-
`id` int,
|
40 |
-
`col` tinyint(4) UNSIGNED DEFAULT NULL
|
41 |
-
);
|
42 |
-
INSERT INTO `test003` VALUES (1,NULL);
|
43 |
-
INSERT INTO `test003` VALUES (2,0);
|
44 |
-
INSERT INTO `test003` VALUES (3,255);
|
45 |
-
|
46 |
-
DROP TABLE IF EXISTS `test010`;
|
47 |
-
CREATE TABLE `test010` (
|
48 |
-
`id` int,
|
49 |
-
`col` bigint DEFAULT NULL
|
50 |
-
);
|
51 |
-
INSERT INTO `test010` VALUES (1,NULL);
|
52 |
-
INSERT INTO `test010` VALUES (2,-9223372036854775808);
|
53 |
-
INSERT INTO `test010` VALUES (3,0);
|
54 |
-
INSERT INTO `test010` VALUES (4,9223372036854775807);
|
55 |
-
|
56 |
-
DROP TABLE IF EXISTS `test011`;
|
57 |
-
CREATE TABLE `test011` (
|
58 |
-
`id` int,
|
59 |
-
`col` bigint UNSIGNED DEFAULT NULL
|
60 |
-
);
|
61 |
-
INSERT INTO `test011` VALUES (1,NULL);
|
62 |
-
INSERT INTO `test011` VALUES (3,0);
|
63 |
-
INSERT INTO `test011` VALUES (4,18446744073709551615);
|
64 |
-
|
65 |
-
|
66 |
-
DROP TABLE IF EXISTS `test015`;
|
67 |
-
CREATE TABLE `test015` (
|
68 |
-
`id` int,
|
69 |
-
`col` double DEFAULT NULL
|
70 |
-
);
|
71 |
-
INSERT INTO `test015` VALUES (1,NULL);
|
72 |
-
INSERT INTO `test015` VALUES (2,-1.7976931348623157e308);
|
73 |
-
INSERT INTO `test015` VALUES (3,-2.2250738585072014e-308);
|
74 |
-
INSERT INTO `test015` VALUES (4,0);
|
75 |
-
INSERT INTO `test015` VALUES (5,2.2250738585072014e-308);
|
76 |
-
INSERT INTO `test015` VALUES (6,1.7976931348623157e308);
|
77 |
-
|
78 |
-
|
79 |
-
DROP TABLE IF EXISTS `test027`;
|
80 |
-
CREATE TABLE `test027` (
|
81 |
-
`id` int,
|
82 |
-
`col` varchar(6) DEFAULT NULL
|
83 |
-
);
|
84 |
-
INSERT INTO `test027` VALUES (1,NULL);
|
85 |
-
INSERT INTO `test027` VALUES (2,'');
|
86 |
-
INSERT INTO `test027` VALUES (3,'0');
|
87 |
-
INSERT INTO `test027` VALUES (4,'2e308');
|
88 |
-
INSERT INTO `test027` VALUES (5,'999.99');
|
89 |
-
INSERT INTO `test027` VALUES (6,'-2e-30');
|
90 |
-
INSERT INTO `test027` VALUES (7,'-99.99');
|
91 |
-
INSERT INTO `test027` VALUES (8,'0');
|
92 |
-
INSERT INTO `test027` VALUES (9,'0abcde');
|
93 |
-
INSERT INTO `test027` VALUES (10,'123');
|
94 |
-
|
95 |
-
DROP TABLE IF EXISTS `test029`;
|
96 |
-
CREATE TABLE `test029` (
|
97 |
-
`id` int,
|
98 |
-
`col` blob NOT NULL
|
99 |
-
);
|
100 |
-
INSERT INTO `test029` VALUES (1,0x00010203040506070809909192939495969798A9);
|
101 |
-
INSERT INTO `test029` VALUES (2,'');
|
102 |
-
|
103 |
-
DROP TABLE IF EXISTS `test033`;
|
104 |
-
CREATE TABLE `test033` (
|
105 |
-
`id` int,
|
106 |
-
`col` text NOT NULL
|
107 |
-
);
|
108 |
-
INSERT INTO `test033` VALUES (1,'test test test');
|
109 |
-
|
110 |
-
|
111 |
-
DROP VIEW IF EXISTS `test100`;
|
112 |
-
CREATE ALGORITHM=UNDEFINED DEFINER=`travis`@`localhost` SQL SECURITY DEFINER VIEW `test100` AS select `test000`.`id` AS `id`,`test000`.`col01` AS `col01`,`test000`.`col02` AS `col02`,`test000`.`col03` AS `col03`,`test000`.`col10` AS `col10`,`test000`.`col11` AS `col11`,`test000`.`col15` AS `col15`,`test000`.`col27` AS `col27` from `test000`;
|
113 |
-
|
114 |
-
DROP VIEW IF EXISTS `test127`;
|
115 |
-
CREATE ALGORITHM=UNDEFINED DEFINER=`travis`@`localhost` SQL SECURITY DEFINER VIEW `test127` AS select `test027`.`id` AS `id`,`test027`.`col` AS `col` from `test027`;
|
116 |
-
|
117 |
-
|
118 |
-
DROP TABLE IF EXISTS `test200`;
|
119 |
-
CREATE TABLE `test200` (
|
120 |
-
`id` int,
|
121 |
-
`col` tinyint(4) DEFAULT NULL
|
122 |
-
);
|
123 |
-
|
124 |
-
CREATE TRIGGER before_test200_insert
|
125 |
-
BEFORE insert ON `test200`
|
126 |
-
FOR EACH ROW set NEW.col = NEW.col + 1;
|
127 |
-
|
128 |
-
-- INSERT INTO `test200` VALUES (1,1); -- trigger tests
|
129 |
-
|
130 |
-
/*!50003 DROP PROCEDURE IF EXISTS `GetAllFromTest000` */;
|
131 |
-
DELIMITER //
|
132 |
-
CREATE PROCEDURE GetAllFromTest000()
|
133 |
-
BEGIN
|
134 |
-
SELECT * FROM test000;
|
135 |
-
END //
|
136 |
-
DELIMITER ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test002.src.sql
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
DROP DATABASE IF EXISTS `test002`;
|
2 |
-
CREATE DATABASE `test002`;
|
3 |
-
USE `test002`;
|
4 |
-
|
5 |
-
DROP TABLE IF EXISTS `test201`;
|
6 |
-
CREATE TABLE `test201` (
|
7 |
-
`col` text COLLATE utf8mb4_unicode_ci
|
8 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
9 |
-
|
10 |
-
INSERT INTO `test201` (`col`) VALUES ('áéíóú');
|
11 |
-
INSERT INTO `test201` (`col`) VALUES ('🎲');
|
12 |
-
INSERT INTO `test201` (`col`) VALUES ('🎭');
|
13 |
-
INSERT INTO `test201` (`col`) VALUES ('💩');
|
14 |
-
INSERT INTO `test201` (`col`) VALUES ('🐈');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test005.src.sql
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
DROP DATABASE IF EXISTS `test005`;
|
2 |
-
CREATE DATABASE `test005`;
|
3 |
-
USE `test005`;
|
4 |
-
|
5 |
-
SET TIME_ZONE='+07:00';
|
6 |
-
DROP TABLE IF EXISTS `test000`;
|
7 |
-
CREATE TABLE `test000`(
|
8 |
-
`id` int,
|
9 |
-
`col` TIMESTAMP NOT NULL
|
10 |
-
);
|
11 |
-
INSERT INTO `test000` VALUES (1,'2014-01-01 00:00:00');
|
12 |
-
SET TIME_ZONE='+00:00';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test006.src.sql
DELETED
@@ -1,107 +0,0 @@
|
|
1 |
-
-- phpMyAdmin SQL Dump
|
2 |
-
-- version 4.4.0
|
3 |
-
-- http://www.phpmyadmin.net
|
4 |
-
--
|
5 |
-
-- Servidor: localhost
|
6 |
-
-- Tiempo de generación: 31-08-2015 a las 19:26:58
|
7 |
-
-- Versión del servidor: 5.5.42
|
8 |
-
-- Versión de PHP: 5.6.7
|
9 |
-
|
10 |
-
DROP DATABASE IF EXISTS `test006a`;
|
11 |
-
CREATE DATABASE `test006a`;
|
12 |
-
|
13 |
-
DROP DATABASE IF EXISTS `test006b`;
|
14 |
-
CREATE DATABASE `test006b`;
|
15 |
-
|
16 |
-
USE `test006a`;
|
17 |
-
|
18 |
-
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
19 |
-
SET time_zone = "+00:00";
|
20 |
-
|
21 |
-
|
22 |
-
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
23 |
-
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
24 |
-
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
25 |
-
/*!40101 SET NAMES utf8 */;
|
26 |
-
|
27 |
-
--
|
28 |
-
-- Base de datos: `my_test_db`
|
29 |
-
--
|
30 |
-
|
31 |
-
-- --------------------------------------------------------
|
32 |
-
|
33 |
-
--
|
34 |
-
-- Estructura de tabla para la tabla `my_table`
|
35 |
-
--
|
36 |
-
|
37 |
-
CREATE TABLE IF NOT EXISTS `my_table` (
|
38 |
-
`id` int(11) NOT NULL,
|
39 |
-
`name` varchar(300) DEFAULT NULL,
|
40 |
-
`lastname` varchar(300) DEFAULT NULL,
|
41 |
-
`username` varchar(300) DEFAULT NULL
|
42 |
-
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
43 |
-
|
44 |
-
-- --------------------------------------------------------
|
45 |
-
|
46 |
-
--
|
47 |
-
-- Estructura Stand-in para la vista `my_view`
|
48 |
-
--
|
49 |
-
CREATE TABLE IF NOT EXISTS `my_view` (
|
50 |
-
`id` int(11)
|
51 |
-
,`name` varchar(300)
|
52 |
-
,`lastname` varchar(300)
|
53 |
-
,`username` varchar(300)
|
54 |
-
);
|
55 |
-
|
56 |
-
-- --------------------------------------------------------
|
57 |
-
|
58 |
-
--
|
59 |
-
-- Estructura Stand-in para la vista `view_of_my_table`
|
60 |
-
--
|
61 |
-
CREATE TABLE IF NOT EXISTS `view_of_my_table` (
|
62 |
-
`id` int(11)
|
63 |
-
,`name` varchar(300)
|
64 |
-
,`lastname` varchar(300)
|
65 |
-
,`username` varchar(300)
|
66 |
-
);
|
67 |
-
|
68 |
-
-- --------------------------------------------------------
|
69 |
-
|
70 |
-
--
|
71 |
-
-- Estructura para la vista `my_view`
|
72 |
-
--
|
73 |
-
DROP TABLE IF EXISTS `my_view`;
|
74 |
-
|
75 |
-
CREATE ALGORITHM=UNDEFINED DEFINER=`travis`@`localhost` SQL SECURITY DEFINER VIEW `my_view` AS select `view_of_my_table`.`id` AS `id`,`view_of_my_table`.`name` AS `name`,`view_of_my_table`.`lastname` AS `lastname`,`view_of_my_table`.`username` AS `username` from `view_of_my_table`;
|
76 |
-
|
77 |
-
-- --------------------------------------------------------
|
78 |
-
|
79 |
-
--
|
80 |
-
-- Estructura para la vista `view_of_my_table`
|
81 |
-
--
|
82 |
-
DROP TABLE IF EXISTS `view_of_my_table`;
|
83 |
-
|
84 |
-
CREATE ALGORITHM=UNDEFINED DEFINER=`travis`@`localhost` SQL SECURITY DEFINER VIEW `view_of_my_table` AS select `my_table`.`id` AS `id`,`my_table`.`name` AS `name`,`my_table`.`lastname` AS `lastname`,`my_table`.`username` AS `username` from `my_table`;
|
85 |
-
|
86 |
-
--
|
87 |
-
-- Índices para tablas volcadas
|
88 |
-
--
|
89 |
-
|
90 |
-
--
|
91 |
-
-- Indices de la tabla `my_table`
|
92 |
-
--
|
93 |
-
ALTER TABLE `my_table`
|
94 |
-
ADD PRIMARY KEY (`id`);
|
95 |
-
|
96 |
-
--
|
97 |
-
-- AUTO_INCREMENT de las tablas volcadas
|
98 |
-
--
|
99 |
-
|
100 |
-
--
|
101 |
-
-- AUTO_INCREMENT de la tabla `my_table`
|
102 |
-
--
|
103 |
-
ALTER TABLE `my_table`
|
104 |
-
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
105 |
-
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
106 |
-
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
107 |
-
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test008.src.sql
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
DROP DATABASE IF EXISTS `test008`;
|
2 |
-
CREATE DATABASE `test008`;
|
3 |
-
USE `test008`;
|
4 |
-
|
5 |
-
-- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (x86_64)
|
6 |
-
--
|
7 |
-
-- Host: 192.168.0.34 Database: test007
|
8 |
-
-- ------------------------------------------------------
|
9 |
-
-- Server version 5.5.43-0+deb7u1-log
|
10 |
-
|
11 |
-
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
12 |
-
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
13 |
-
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
14 |
-
/*!40101 SET NAMES utf8 */;
|
15 |
-
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
16 |
-
/*!40103 SET TIME_ZONE='+00:00' */;
|
17 |
-
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
18 |
-
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
19 |
-
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
20 |
-
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
21 |
-
|
22 |
-
--
|
23 |
-
-- Table structure for table `fields`
|
24 |
-
--
|
25 |
-
|
26 |
-
DROP TABLE IF EXISTS `fields`;
|
27 |
-
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
28 |
-
/*!40101 SET character_set_client = utf8 */;
|
29 |
-
CREATE TABLE `fields` (
|
30 |
-
`id` int(11) NOT NULL,
|
31 |
-
`name` varchar(128) NOT NULL,
|
32 |
-
`form_id` int(11) NOT NULL,
|
33 |
-
PRIMARY KEY (`id`),
|
34 |
-
KEY `form_id` (`form_id`),
|
35 |
-
CONSTRAINT `fields to forms` FOREIGN KEY (`form_id`) REFERENCES `forms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
36 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
37 |
-
/*!40101 SET character_set_client = @saved_cs_client */;
|
38 |
-
|
39 |
-
--
|
40 |
-
-- Dumping data for table `fields`
|
41 |
-
--
|
42 |
-
|
43 |
-
LOCK TABLES `fields` WRITE;
|
44 |
-
/*!40000 ALTER TABLE `fields` DISABLE KEYS */;
|
45 |
-
/*!40000 ALTER TABLE `fields` ENABLE KEYS */;
|
46 |
-
UNLOCK TABLES;
|
47 |
-
|
48 |
-
--
|
49 |
-
-- Table structure for table `forms`
|
50 |
-
--
|
51 |
-
|
52 |
-
DROP TABLE IF EXISTS `forms`;
|
53 |
-
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
54 |
-
/*!40101 SET character_set_client = utf8 */;
|
55 |
-
CREATE TABLE `forms` (
|
56 |
-
`id` int(11) NOT NULL,
|
57 |
-
`name` varchar(128) NOT NULL,
|
58 |
-
PRIMARY KEY (`id`)
|
59 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
60 |
-
/*!40101 SET character_set_client = @saved_cs_client */;
|
61 |
-
|
62 |
-
--
|
63 |
-
-- Dumping data for table `forms`
|
64 |
-
--
|
65 |
-
|
66 |
-
LOCK TABLES `forms` WRITE;
|
67 |
-
/*!40000 ALTER TABLE `forms` DISABLE KEYS */;
|
68 |
-
/*!40000 ALTER TABLE `forms` ENABLE KEYS */;
|
69 |
-
UNLOCK TABLES;
|
70 |
-
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
71 |
-
|
72 |
-
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
73 |
-
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
74 |
-
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
75 |
-
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
76 |
-
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
77 |
-
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
78 |
-
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
79 |
-
|
80 |
-
-- Dump completed on 2016-12-27 22:39:51
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test009.src.sql
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
DROP DATABASE IF EXISTS `test009`;
|
2 |
-
CREATE DATABASE `test009`;
|
3 |
-
USE `test009`;
|
4 |
-
|
5 |
-
-- MySQL dump 10.15 Distrib 10.0.28-MariaDB, for debian-linux-gnu (x86_64)
|
6 |
-
--
|
7 |
-
-- Host: localhost Database: localhost
|
8 |
-
-- ------------------------------------------------------
|
9 |
-
-- Server version 10.0.28-MariaDB-0ubuntu0.16.04.1
|
10 |
-
|
11 |
-
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
12 |
-
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
13 |
-
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
14 |
-
/*!40101 SET NAMES utf8 */;
|
15 |
-
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
16 |
-
/*!40103 SET TIME_ZONE='+00:00' */;
|
17 |
-
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
18 |
-
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
19 |
-
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
20 |
-
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
21 |
-
|
22 |
-
--
|
23 |
-
-- Table structure for table `increments`
|
24 |
-
--
|
25 |
-
|
26 |
-
DROP TABLE IF EXISTS `increments`;
|
27 |
-
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
28 |
-
/*!40101 SET character_set_client = utf8 */;
|
29 |
-
CREATE TABLE `increments` (
|
30 |
-
`id` int(11) NOT NULL AUTO_INCREMENT,
|
31 |
-
PRIMARY KEY (`id`)
|
32 |
-
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
|
33 |
-
/*!40101 SET character_set_client = @saved_cs_client */;
|
34 |
-
|
35 |
-
--
|
36 |
-
-- Dumping data for table `increments`
|
37 |
-
--
|
38 |
-
|
39 |
-
LOCK TABLES `increments` WRITE;
|
40 |
-
/*!40000 ALTER TABLE `increments` DISABLE KEYS */;
|
41 |
-
INSERT INTO `increments` VALUES (1);
|
42 |
-
INSERT INTO `increments` VALUES (2);
|
43 |
-
INSERT INTO `increments` VALUES (3);
|
44 |
-
INSERT INTO `increments` VALUES (4);
|
45 |
-
/*!40000 ALTER TABLE `increments` ENABLE KEYS */;
|
46 |
-
UNLOCK TABLES;
|
47 |
-
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
48 |
-
|
49 |
-
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
50 |
-
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
51 |
-
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
52 |
-
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
53 |
-
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
54 |
-
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
55 |
-
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
56 |
-
|
57 |
-
-- Dump completed on 2017-03-02 13:23:17
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test010.src.sql
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
DROP DATABASE IF EXISTS `test010`;
|
2 |
-
CREATE DATABASE `test010`;
|
3 |
-
USE `test010`;
|
4 |
-
|
5 |
-
-- MySQL dump 10.13 Distrib 5.7.17, for Linux (x86_64)
|
6 |
-
--
|
7 |
-
-- Host: localhost Database: test010
|
8 |
-
-- ------------------------------------------------------
|
9 |
-
-- Server version 5.7.17
|
10 |
-
|
11 |
-
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
12 |
-
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
13 |
-
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
14 |
-
/*!40101 SET NAMES utf8 */;
|
15 |
-
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
16 |
-
/*!40103 SET TIME_ZONE='+00:00' */;
|
17 |
-
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
18 |
-
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
19 |
-
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
20 |
-
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
21 |
-
|
22 |
-
--
|
23 |
-
-- Dumping events for database 'test010'
|
24 |
-
--
|
25 |
-
/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;
|
26 |
-
/*!50106 DROP EVENT IF EXISTS `e_test010` */;
|
27 |
-
DELIMITER ;;
|
28 |
-
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
|
29 |
-
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
|
30 |
-
/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
|
31 |
-
/*!50003 SET character_set_client = utf8 */ ;;
|
32 |
-
/*!50003 SET character_set_results = utf8 */ ;;
|
33 |
-
/*!50003 SET collation_connection = utf8_general_ci */ ;;
|
34 |
-
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
|
35 |
-
/*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;;
|
36 |
-
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
|
37 |
-
/*!50003 SET time_zone = 'SYSTEM' */ ;;
|
38 |
-
/*!50106 CREATE*/ /*!50117 DEFINER=`travis`@`%`*/ /*!50106 EVENT `e_test010` ON SCHEDULE AT '2030-01-01 23:59:00' ON COMPLETION NOT PRESERVE ENABLE DO INSERT INTO test010.test VALUES (NOW()) */ ;;
|
39 |
-
/*!50003 SET time_zone = @saved_time_zone */ ;;
|
40 |
-
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
|
41 |
-
/*!50003 SET character_set_client = @saved_cs_client */ ;;
|
42 |
-
/*!50003 SET character_set_results = @saved_cs_results */ ;;
|
43 |
-
/*!50003 SET collation_connection = @saved_col_connection */ ;;
|
44 |
-
DELIMITER ;
|
45 |
-
/*!50106 SET TIME_ZONE= @save_time_zone */ ;
|
46 |
-
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
47 |
-
|
48 |
-
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
49 |
-
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
50 |
-
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
51 |
-
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
52 |
-
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
53 |
-
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
54 |
-
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
55 |
-
|
56 |
-
-- Dump completed on 2017-03-20 21:52:21
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/tests/test011.src.sql
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
DROP DATABASE IF EXISTS `test011`;
|
2 |
-
CREATE DATABASE `test011`;
|
3 |
-
USE `test011`;
|
4 |
-
|
5 |
-
-- MySQL dump 10.13 Distrib 5.7.15, for Linux (x86_64)
|
6 |
-
--
|
7 |
-
-- Host: localhost Database: test
|
8 |
-
-- ------------------------------------------------------
|
9 |
-
-- Server version 5.7.15
|
10 |
-
|
11 |
-
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
12 |
-
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
13 |
-
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
14 |
-
/*!40101 SET NAMES utf8 */;
|
15 |
-
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
16 |
-
/*!40103 SET TIME_ZONE='+00:00' */;
|
17 |
-
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
18 |
-
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
19 |
-
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
20 |
-
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
21 |
-
|
22 |
-
--
|
23 |
-
-- Table structure for table `test011`
|
24 |
-
--
|
25 |
-
|
26 |
-
DROP TABLE IF EXISTS `test011`;
|
27 |
-
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
28 |
-
/*!40101 SET character_set_client = utf8 */;
|
29 |
-
CREATE TABLE `test011` (
|
30 |
-
`id` int(11) NOT NULL,
|
31 |
-
`hash` char(32) CHARACTER SET ascii COLLATE ascii_bin GENERATED ALWAYS AS (md5(`id`)) STORED NOT NULL
|
32 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
33 |
-
/*!40101 SET character_set_client = @saved_cs_client */;
|
34 |
-
|
35 |
-
--
|
36 |
-
-- Dumping data for table `test011`
|
37 |
-
--
|
38 |
-
|
39 |
-
LOCK TABLES `test011` WRITE;
|
40 |
-
/*!40000 ALTER TABLE `test011` DISABLE KEYS */;
|
41 |
-
INSERT INTO `test011` (`id`) VALUES (159413),(294775);
|
42 |
-
/*!40000 ALTER TABLE `test011` ENABLE KEYS */;
|
43 |
-
UNLOCK TABLES;
|
44 |
-
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
45 |
-
|
46 |
-
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
47 |
-
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
48 |
-
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
49 |
-
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
50 |
-
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
51 |
-
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
52 |
-
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/ifsnop/mysqldump-php/unit-tests/MysqldumpTest.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use Ifsnop\Mysqldump\Mysqldump;
|
4 |
+
|
5 |
+
class MysqldumpTest extends PHPUnit_Framework_TestCase
|
6 |
+
{
|
7 |
+
|
8 |
+
/** @test */
|
9 |
+
public function tableSpecificWhereConditionsWork()
|
10 |
+
{
|
11 |
+
$dump = new Mysqldump('mysql:host=localhost;dbname=test', 'testing', 'testing', array(
|
12 |
+
'where' => 'defaultWhere'
|
13 |
+
));
|
14 |
+
|
15 |
+
$dump->setTableWheres(array(
|
16 |
+
'users' => 'date_registered > NOW() - INTERVAL 3 MONTH AND is_deleted=0',
|
17 |
+
'logs' => 'date_registered > NOW() - INTERVAL 1 DAY',
|
18 |
+
'posts' => 'active=1'
|
19 |
+
));
|
20 |
+
|
21 |
+
$this->assertEquals(
|
22 |
+
'date_registered > NOW() - INTERVAL 3 MONTH AND is_deleted=0',
|
23 |
+
$dump->getTableWhere('users')
|
24 |
+
);
|
25 |
+
|
26 |
+
$this->assertEquals(
|
27 |
+
'defaultWhere',
|
28 |
+
$dump->getTableWhere('non_overriden_table')
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
/** @test */
|
33 |
+
public function tableSpecificLimitsWork()
|
34 |
+
{
|
35 |
+
$dump = new Mysqldump('mysql:host=localhost;dbname=test', 'testing', 'testing');
|
36 |
+
|
37 |
+
$dump->setTableLimits(array(
|
38 |
+
'users' => 200,
|
39 |
+
'logs' => 500,
|
40 |
+
'table_with_invalid_limit' => '41923, 42992'
|
41 |
+
));
|
42 |
+
|
43 |
+
$this->assertEquals(200, $dump->getTableLimit('users'));
|
44 |
+
$this->assertEquals(500, $dump->getTableLimit('logs'));
|
45 |
+
$this->assertFalse($dump->getTableLimit('table_with_invalid_limit'));
|
46 |
+
$this->assertFalse($dump->getTableLimit('table_name_with_no_limit'));
|
47 |
+
}
|
48 |
+
}
|
vendor/symfony/finder/Adapter/AbstractAdapter.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\AbstractAdapter class is deprecated since
|
15 |
|
16 |
/**
|
17 |
* Interface for finder engine implementations.
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\AbstractAdapter class is deprecated since Symfony 2.8 and will be removed in 3.0. Use directly the Finder class instead.', E_USER_DEPRECATED);
|
15 |
|
16 |
/**
|
17 |
* Interface for finder engine implementations.
|
vendor/symfony/finder/Adapter/AbstractFindAdapter.php
CHANGED
@@ -11,15 +11,15 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\AbstractFindAdapter class is deprecated since
|
15 |
|
|
|
|
|
16 |
use Symfony\Component\Finder\Exception\AccessDeniedException;
|
17 |
-
use Symfony\Component\Finder\Iterator;
|
18 |
-
use Symfony\Component\Finder\Shell\Shell;
|
19 |
use Symfony\Component\Finder\Expression\Expression;
|
|
|
20 |
use Symfony\Component\Finder\Shell\Command;
|
21 |
-
use Symfony\Component\Finder\
|
22 |
-
use Symfony\Component\Finder\Comparator\DateComparator;
|
23 |
|
24 |
/**
|
25 |
* Shell engine implementation using GNU find command.
|
@@ -30,14 +30,8 @@ use Symfony\Component\Finder\Comparator\DateComparator;
|
|
30 |
*/
|
31 |
abstract class AbstractFindAdapter extends AbstractAdapter
|
32 |
{
|
33 |
-
/**
|
34 |
-
* @var Shell
|
35 |
-
*/
|
36 |
protected $shell;
|
37 |
|
38 |
-
/**
|
39 |
-
* Constructor.
|
40 |
-
*/
|
41 |
public function __construct()
|
42 |
{
|
43 |
$this->shell = new Shell();
|
@@ -83,7 +77,7 @@ abstract class AbstractFindAdapter extends AbstractAdapter
|
|
83 |
$this->buildDatesFiltering($find, $this->dates);
|
84 |
|
85 |
$useGrep = $this->shell->testCommand('grep') && $this->shell->testCommand('xargs');
|
86 |
-
$useSort = is_int($this->sort) && $this->shell->testCommand('sort') && $this->shell->testCommand('cut');
|
87 |
|
88 |
if ($useGrep && ($this->contains || $this->notContains)) {
|
89 |
$grep = $command->ins('grep');
|
@@ -155,7 +149,7 @@ abstract class AbstractFindAdapter extends AbstractAdapter
|
|
155 |
*/
|
156 |
private function buildNamesFiltering(Command $command, array $names, $not = false)
|
157 |
{
|
158 |
-
if (0 === count($names)) {
|
159 |
return;
|
160 |
}
|
161 |
|
@@ -203,7 +197,7 @@ abstract class AbstractFindAdapter extends AbstractAdapter
|
|
203 |
*/
|
204 |
private function buildPathsFiltering(Command $command, $dir, array $paths, $not = false)
|
205 |
{
|
206 |
-
if (0 === count($paths)) {
|
207 |
return;
|
208 |
}
|
209 |
|
@@ -220,7 +214,7 @@ abstract class AbstractFindAdapter extends AbstractAdapter
|
|
220 |
// Fixes 'not search' regex problems.
|
221 |
if ($expr->isRegex()) {
|
222 |
$regex = $expr->getRegex();
|
223 |
-
$regex->prepend($regex->hasStartFlag() ? preg_quote($dir)
|
224 |
} else {
|
225 |
$expr->prepend('*')->append('*');
|
226 |
}
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\AbstractFindAdapter class is deprecated since Symfony 2.8 and will be removed in 3.0. Use directly the Finder class instead.', E_USER_DEPRECATED);
|
15 |
|
16 |
+
use Symfony\Component\Finder\Comparator\DateComparator;
|
17 |
+
use Symfony\Component\Finder\Comparator\NumberComparator;
|
18 |
use Symfony\Component\Finder\Exception\AccessDeniedException;
|
|
|
|
|
19 |
use Symfony\Component\Finder\Expression\Expression;
|
20 |
+
use Symfony\Component\Finder\Iterator;
|
21 |
use Symfony\Component\Finder\Shell\Command;
|
22 |
+
use Symfony\Component\Finder\Shell\Shell;
|
|
|
23 |
|
24 |
/**
|
25 |
* Shell engine implementation using GNU find command.
|
30 |
*/
|
31 |
abstract class AbstractFindAdapter extends AbstractAdapter
|
32 |
{
|
|
|
|
|
|
|
33 |
protected $shell;
|
34 |
|
|
|
|
|
|
|
35 |
public function __construct()
|
36 |
{
|
37 |
$this->shell = new Shell();
|
77 |
$this->buildDatesFiltering($find, $this->dates);
|
78 |
|
79 |
$useGrep = $this->shell->testCommand('grep') && $this->shell->testCommand('xargs');
|
80 |
+
$useSort = \is_int($this->sort) && $this->shell->testCommand('sort') && $this->shell->testCommand('cut');
|
81 |
|
82 |
if ($useGrep && ($this->contains || $this->notContains)) {
|
83 |
$grep = $command->ins('grep');
|
149 |
*/
|
150 |
private function buildNamesFiltering(Command $command, array $names, $not = false)
|
151 |
{
|
152 |
+
if (0 === \count($names)) {
|
153 |
return;
|
154 |
}
|
155 |
|
197 |
*/
|
198 |
private function buildPathsFiltering(Command $command, $dir, array $paths, $not = false)
|
199 |
{
|
200 |
+
if (0 === \count($paths)) {
|
201 |
return;
|
202 |
}
|
203 |
|
214 |
// Fixes 'not search' regex problems.
|
215 |
if ($expr->isRegex()) {
|
216 |
$regex = $expr->getRegex();
|
217 |
+
$regex->prepend($regex->hasStartFlag() ? preg_quote($dir).\DIRECTORY_SEPARATOR : '.*')->setEndJoker(!$regex->hasEndFlag());
|
218 |
} else {
|
219 |
$expr->prepend('*')->append('*');
|
220 |
}
|
vendor/symfony/finder/Adapter/AdapterInterface.php
CHANGED
@@ -33,64 +33,46 @@ interface AdapterInterface
|
|
33 |
public function setMode($mode);
|
34 |
|
35 |
/**
|
36 |
-
* @param array $exclude
|
37 |
-
*
|
38 |
* @return $this
|
39 |
*/
|
40 |
public function setExclude(array $exclude);
|
41 |
|
42 |
/**
|
43 |
-
* @param array $depths
|
44 |
-
*
|
45 |
* @return $this
|
46 |
*/
|
47 |
public function setDepths(array $depths);
|
48 |
|
49 |
/**
|
50 |
-
* @param array $names
|
51 |
-
*
|
52 |
* @return $this
|
53 |
*/
|
54 |
public function setNames(array $names);
|
55 |
|
56 |
/**
|
57 |
-
* @param array $notNames
|
58 |
-
*
|
59 |
* @return $this
|
60 |
*/
|
61 |
public function setNotNames(array $notNames);
|
62 |
|
63 |
/**
|
64 |
-
* @param array $contains
|
65 |
-
*
|
66 |
* @return $this
|
67 |
*/
|
68 |
public function setContains(array $contains);
|
69 |
|
70 |
/**
|
71 |
-
* @param array $notContains
|
72 |
-
*
|
73 |
* @return $this
|
74 |
*/
|
75 |
public function setNotContains(array $notContains);
|
76 |
|
77 |
/**
|
78 |
-
* @param array $sizes
|
79 |
-
*
|
80 |
* @return $this
|
81 |
*/
|
82 |
public function setSizes(array $sizes);
|
83 |
|
84 |
/**
|
85 |
-
* @param array $dates
|
86 |
-
*
|
87 |
* @return $this
|
88 |
*/
|
89 |
public function setDates(array $dates);
|
90 |
|
91 |
/**
|
92 |
-
* @param array $filters
|
93 |
-
*
|
94 |
* @return $this
|
95 |
*/
|
96 |
public function setFilters(array $filters);
|
@@ -103,15 +85,11 @@ interface AdapterInterface
|
|
103 |
public function setSort($sort);
|
104 |
|
105 |
/**
|
106 |
-
* @param array $paths
|
107 |
-
*
|
108 |
* @return $this
|
109 |
*/
|
110 |
public function setPath(array $paths);
|
111 |
|
112 |
/**
|
113 |
-
* @param array $notPaths
|
114 |
-
*
|
115 |
* @return $this
|
116 |
*/
|
117 |
public function setNotPath(array $notPaths);
|
33 |
public function setMode($mode);
|
34 |
|
35 |
/**
|
|
|
|
|
36 |
* @return $this
|
37 |
*/
|
38 |
public function setExclude(array $exclude);
|
39 |
|
40 |
/**
|
|
|
|
|
41 |
* @return $this
|
42 |
*/
|
43 |
public function setDepths(array $depths);
|
44 |
|
45 |
/**
|
|
|
|
|
46 |
* @return $this
|
47 |
*/
|
48 |
public function setNames(array $names);
|
49 |
|
50 |
/**
|
|
|
|
|
51 |
* @return $this
|
52 |
*/
|
53 |
public function setNotNames(array $notNames);
|
54 |
|
55 |
/**
|
|
|
|
|
56 |
* @return $this
|
57 |
*/
|
58 |
public function setContains(array $contains);
|
59 |
|
60 |
/**
|
|
|
|
|
61 |
* @return $this
|
62 |
*/
|
63 |
public function setNotContains(array $notContains);
|
64 |
|
65 |
/**
|
|
|
|
|
66 |
* @return $this
|
67 |
*/
|
68 |
public function setSizes(array $sizes);
|
69 |
|
70 |
/**
|
|
|
|
|
71 |
* @return $this
|
72 |
*/
|
73 |
public function setDates(array $dates);
|
74 |
|
75 |
/**
|
|
|
|
|
76 |
* @return $this
|
77 |
*/
|
78 |
public function setFilters(array $filters);
|
85 |
public function setSort($sort);
|
86 |
|
87 |
/**
|
|
|
|
|
88 |
* @return $this
|
89 |
*/
|
90 |
public function setPath(array $paths);
|
91 |
|
92 |
/**
|
|
|
|
|
93 |
* @return $this
|
94 |
*/
|
95 |
public function setNotPath(array $notPaths);
|
vendor/symfony/finder/Adapter/BsdFindAdapter.php
CHANGED
@@ -11,12 +11,12 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\BsdFindAdapter class is deprecated since
|
15 |
|
16 |
-
use Symfony\Component\Finder\Shell\Shell;
|
17 |
-
use Symfony\Component\Finder\Shell\Command;
|
18 |
-
use Symfony\Component\Finder\Iterator\SortableIterator;
|
19 |
use Symfony\Component\Finder\Expression\Expression;
|
|
|
|
|
|
|
20 |
|
21 |
/**
|
22 |
* Shell engine implementation using BSD find command.
|
@@ -40,7 +40,7 @@ class BsdFindAdapter extends AbstractFindAdapter
|
|
40 |
*/
|
41 |
protected function canBeUsed()
|
42 |
{
|
43 |
-
return in_array($this->shell->getType(), array(Shell::TYPE_BSD, Shell::TYPE_DARWIN)) && parent::canBeUsed();
|
44 |
}
|
45 |
|
46 |
/**
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\BsdFindAdapter class is deprecated since Symfony 2.8 and will be removed in 3.0. Use directly the Finder class instead.', E_USER_DEPRECATED);
|
15 |
|
|
|
|
|
|
|
16 |
use Symfony\Component\Finder\Expression\Expression;
|
17 |
+
use Symfony\Component\Finder\Iterator\SortableIterator;
|
18 |
+
use Symfony\Component\Finder\Shell\Command;
|
19 |
+
use Symfony\Component\Finder\Shell\Shell;
|
20 |
|
21 |
/**
|
22 |
* Shell engine implementation using BSD find command.
|
40 |
*/
|
41 |
protected function canBeUsed()
|
42 |
{
|
43 |
+
return \in_array($this->shell->getType(), array(Shell::TYPE_BSD, Shell::TYPE_DARWIN)) && parent::canBeUsed();
|
44 |
}
|
45 |
|
46 |
/**
|
vendor/symfony/finder/Adapter/GnuFindAdapter.php
CHANGED
@@ -11,12 +11,12 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\GnuFindAdapter class is deprecated since
|
15 |
|
16 |
-
use Symfony\Component\Finder\Shell\Shell;
|
17 |
-
use Symfony\Component\Finder\Shell\Command;
|
18 |
-
use Symfony\Component\Finder\Iterator\SortableIterator;
|
19 |
use Symfony\Component\Finder\Expression\Expression;
|
|
|
|
|
|
|
20 |
|
21 |
/**
|
22 |
* Shell engine implementation using GNU find command.
|
@@ -76,7 +76,7 @@ class GnuFindAdapter extends AbstractFindAdapter
|
|
76 |
*/
|
77 |
protected function canBeUsed()
|
78 |
{
|
79 |
-
return $this->shell->getType()
|
80 |
}
|
81 |
|
82 |
/**
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\GnuFindAdapter class is deprecated since Symfony 2.8 and will be removed in 3.0. Use directly the Finder class instead.', E_USER_DEPRECATED);
|
15 |
|
|
|
|
|
|
|
16 |
use Symfony\Component\Finder\Expression\Expression;
|
17 |
+
use Symfony\Component\Finder\Iterator\SortableIterator;
|
18 |
+
use Symfony\Component\Finder\Shell\Command;
|
19 |
+
use Symfony\Component\Finder\Shell\Shell;
|
20 |
|
21 |
/**
|
22 |
* Shell engine implementation using GNU find command.
|
76 |
*/
|
77 |
protected function canBeUsed()
|
78 |
{
|
79 |
+
return Shell::TYPE_UNIX === $this->shell->getType() && parent::canBeUsed();
|
80 |
}
|
81 |
|
82 |
/**
|
vendor/symfony/finder/Adapter/PhpAdapter.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\PhpAdapter class is deprecated since
|
15 |
|
16 |
use Symfony\Component\Finder\Iterator;
|
17 |
|
11 |
|
12 |
namespace Symfony\Component\Finder\Adapter;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\PhpAdapter class is deprecated since Symfony 2.8 and will be removed in 3.0. Use directly the Finder class instead.', E_USER_DEPRECATED);
|
15 |
|
16 |
use Symfony\Component\Finder\Iterator;
|
17 |
|
vendor/symfony/finder/Comparator/Comparator.php
CHANGED
@@ -64,7 +64,7 @@ class Comparator
|
|
64 |
$operator = '==';
|
65 |
}
|
66 |
|
67 |
-
if (
|
68 |
throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator));
|
69 |
}
|
70 |
|
64 |
$operator = '==';
|
65 |
}
|
66 |
|
67 |
+
if (!\in_array($operator, array('>', '<', '>=', '<=', '==', '!='))) {
|
68 |
throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator));
|
69 |
}
|
70 |
|
vendor/symfony/finder/Comparator/DateComparator.php
CHANGED
@@ -19,8 +19,6 @@ namespace Symfony\Component\Finder\Comparator;
|
|
19 |
class DateComparator extends Comparator
|
20 |
{
|
21 |
/**
|
22 |
-
* Constructor.
|
23 |
-
*
|
24 |
* @param string $test A comparison string
|
25 |
*
|
26 |
* @throws \InvalidArgumentException If the test is not understood
|
19 |
class DateComparator extends Comparator
|
20 |
{
|
21 |
/**
|
|
|
|
|
22 |
* @param string $test A comparison string
|
23 |
*
|
24 |
* @throws \InvalidArgumentException If the test is not understood
|
vendor/symfony/finder/Comparator/NumberComparator.php
CHANGED
@@ -35,8 +35,6 @@ namespace Symfony\Component\Finder\Comparator;
|
|
35 |
class NumberComparator extends Comparator
|
36 |
{
|
37 |
/**
|
38 |
-
* Constructor.
|
39 |
-
*
|
40 |
* @param string|int $test A comparison string or an integer
|
41 |
*
|
42 |
* @throws \InvalidArgumentException If the test is not understood
|
35 |
class NumberComparator extends Comparator
|
36 |
{
|
37 |
/**
|
|
|
|
|
38 |
* @param string|int $test A comparison string or an integer
|
39 |
*
|
40 |
* @throws \InvalidArgumentException If the test is not understood
|
vendor/symfony/finder/Exception/AdapterFailureException.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Exception;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\AdapterFailureException class is deprecated since
|
15 |
|
16 |
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
17 |
|
@@ -24,9 +24,6 @@ use Symfony\Component\Finder\Adapter\AdapterInterface;
|
|
24 |
*/
|
25 |
class AdapterFailureException extends \RuntimeException implements ExceptionInterface
|
26 |
{
|
27 |
-
/**
|
28 |
-
* @var \Symfony\Component\Finder\Adapter\AdapterInterface
|
29 |
-
*/
|
30 |
private $adapter;
|
31 |
|
32 |
/**
|
11 |
|
12 |
namespace Symfony\Component\Finder\Exception;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\AdapterFailureException class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
17 |
|
24 |
*/
|
25 |
class AdapterFailureException extends \RuntimeException implements ExceptionInterface
|
26 |
{
|
|
|
|
|
|
|
27 |
private $adapter;
|
28 |
|
29 |
/**
|
vendor/symfony/finder/Exception/OperationNotPermitedException.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Exception;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\OperationNotPermitedException class is deprecated since
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
11 |
|
12 |
namespace Symfony\Component\Finder\Exception;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\OperationNotPermitedException class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
vendor/symfony/finder/Exception/ShellCommandFailureException.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Exception;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\ShellCommandFailureException class is deprecated since
|
15 |
|
16 |
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
17 |
use Symfony\Component\Finder\Shell\Command;
|
@@ -23,16 +23,8 @@ use Symfony\Component\Finder\Shell\Command;
|
|
23 |
*/
|
24 |
class ShellCommandFailureException extends AdapterFailureException
|
25 |
{
|
26 |
-
/**
|
27 |
-
* @var Command
|
28 |
-
*/
|
29 |
private $command;
|
30 |
|
31 |
-
/**
|
32 |
-
* @param AdapterInterface $adapter
|
33 |
-
* @param Command $command
|
34 |
-
* @param \Exception|null $previous
|
35 |
-
*/
|
36 |
public function __construct(AdapterInterface $adapter, Command $command, \Exception $previous = null)
|
37 |
{
|
38 |
$this->command = $command;
|
11 |
|
12 |
namespace Symfony\Component\Finder\Exception;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\ShellCommandFailureException class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
17 |
use Symfony\Component\Finder\Shell\Command;
|
23 |
*/
|
24 |
class ShellCommandFailureException extends AdapterFailureException
|
25 |
{
|
|
|
|
|
|
|
26 |
private $command;
|
27 |
|
|
|
|
|
|
|
|
|
|
|
28 |
public function __construct(AdapterInterface $adapter, Command $command, \Exception $previous = null)
|
29 |
{
|
30 |
$this->command = $command;
|
vendor/symfony/finder/Expression/Expression.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Expression;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\Expression class is deprecated since
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
11 |
|
12 |
namespace Symfony\Component\Finder\Expression;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\Expression class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
vendor/symfony/finder/Expression/Glob.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Expression;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\Glob class is deprecated since
|
15 |
|
16 |
use Symfony\Component\Finder\Glob as FinderGlob;
|
17 |
|
@@ -20,9 +20,6 @@ use Symfony\Component\Finder\Glob as FinderGlob;
|
|
20 |
*/
|
21 |
class Glob implements ValueInterface
|
22 |
{
|
23 |
-
/**
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
private $pattern;
|
27 |
|
28 |
/**
|
11 |
|
12 |
namespace Symfony\Component\Finder\Expression;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\Glob class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
use Symfony\Component\Finder\Glob as FinderGlob;
|
17 |
|
20 |
*/
|
21 |
class Glob implements ValueInterface
|
22 |
{
|
|
|
|
|
|
|
23 |
private $pattern;
|
24 |
|
25 |
/**
|
vendor/symfony/finder/Expression/Regex.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Expression;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\Regex class is deprecated since
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
@@ -30,7 +30,7 @@ class Regex implements ValueInterface
|
|
30 |
private $pattern;
|
31 |
|
32 |
/**
|
33 |
-
* @var
|
34 |
*/
|
35 |
private $options;
|
36 |
|
@@ -69,8 +69,8 @@ class Regex implements ValueInterface
|
|
69 |
|
70 |
if (
|
71 |
($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start))
|
72 |
-
|| (
|
73 |
-
|| (
|
74 |
) {
|
75 |
return new self(substr($m[1], 1, -1), $m[2], $end);
|
76 |
}
|
@@ -279,8 +279,6 @@ class Regex implements ValueInterface
|
|
279 |
}
|
280 |
|
281 |
/**
|
282 |
-
* @param array $replacement
|
283 |
-
*
|
284 |
* @return $this
|
285 |
*/
|
286 |
public function replaceJokers($replacement)
|
11 |
|
12 |
namespace Symfony\Component\Finder\Expression;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\Regex class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
30 |
private $pattern;
|
31 |
|
32 |
/**
|
33 |
+
* @var string
|
34 |
*/
|
35 |
private $options;
|
36 |
|
69 |
|
70 |
if (
|
71 |
($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start))
|
72 |
+
|| ('{' === $start && '}' === $end)
|
73 |
+
|| ('(' === $start && ')' === $end)
|
74 |
) {
|
75 |
return new self(substr($m[1], 1, -1), $m[2], $end);
|
76 |
}
|
279 |
}
|
280 |
|
281 |
/**
|
|
|
|
|
282 |
* @return $this
|
283 |
*/
|
284 |
public function replaceJokers($replacement)
|
vendor/symfony/finder/Expression/ValueInterface.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Expression;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\ValueInterface interface is deprecated since
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
11 |
|
12 |
namespace Symfony\Component\Finder\Expression;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\ValueInterface interface is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
vendor/symfony/finder/Finder.php
CHANGED
@@ -12,8 +12,8 @@
|
|
12 |
namespace Symfony\Component\Finder;
|
13 |
|
14 |
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
15 |
-
use Symfony\Component\Finder\Adapter\GnuFindAdapter;
|
16 |
use Symfony\Component\Finder\Adapter\BsdFindAdapter;
|
|
|
17 |
use Symfony\Component\Finder\Adapter\PhpAdapter;
|
18 |
use Symfony\Component\Finder\Comparator\DateComparator;
|
19 |
use Symfony\Component\Finder\Comparator\NumberComparator;
|
@@ -36,7 +36,7 @@ use Symfony\Component\Finder\Iterator\SortableIterator;
|
|
36 |
*
|
37 |
* All methods return the current Finder object to allow easy chaining:
|
38 |
*
|
39 |
-
*
|
40 |
*
|
41 |
* @author Fabien Potencier <fabien@symfony.com>
|
42 |
*/
|
@@ -67,9 +67,6 @@ class Finder implements \IteratorAggregate, \Countable
|
|
67 |
|
68 |
private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg');
|
69 |
|
70 |
-
/**
|
71 |
-
* Constructor.
|
72 |
-
*/
|
73 |
public function __construct()
|
74 |
{
|
75 |
$this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES;
|
@@ -97,7 +94,7 @@ class Finder implements \IteratorAggregate, \Countable
|
|
97 |
*/
|
98 |
public function addAdapter(AdapterInterface $adapter, $priority = 0)
|
99 |
{
|
100 |
-
@trigger_error('The '.__METHOD__.' method is deprecated since
|
101 |
|
102 |
$this->initDefaultAdapters();
|
103 |
|
@@ -119,7 +116,7 @@ class Finder implements \IteratorAggregate, \Countable
|
|
119 |
*/
|
120 |
public function useBestAdapter()
|
121 |
{
|
122 |
-
@trigger_error('The '.__METHOD__.' method is deprecated since
|
123 |
|
124 |
$this->initDefaultAdapters();
|
125 |
|
@@ -141,7 +138,7 @@ class Finder implements \IteratorAggregate, \Countable
|
|
141 |
*/
|
142 |
public function setAdapter($name)
|
143 |
{
|
144 |
-
@trigger_error('The '.__METHOD__.' method is deprecated since
|
145 |
|
146 |
$this->initDefaultAdapters();
|
147 |
|
@@ -164,7 +161,7 @@ class Finder implements \IteratorAggregate, \Countable
|
|
164 |
*/
|
165 |
public function removeAdapters()
|
166 |
{
|
167 |
-
@trigger_error('The '.__METHOD__.' method is deprecated since
|
168 |
|
169 |
$this->adapters = array();
|
170 |
|
@@ -180,7 +177,7 @@ class Finder implements \IteratorAggregate, \Countable
|
|
180 |
*/
|
181 |
public function getAdapters()
|
182 |
{
|
183 |
-
@trigger_error('The '.__METHOD__.' method is deprecated since
|
184 |
|
185 |
$this->initDefaultAdapters();
|
186 |
|
@@ -218,8 +215,8 @@ class Finder implements \IteratorAggregate, \Countable
|
|
218 |
*
|
219 |
* Usage:
|
220 |
*
|
221 |
-
*
|
222 |
-
*
|
223 |
*
|
224 |
* @param string|int $level The depth level expression
|
225 |
*
|
@@ -240,10 +237,10 @@ class Finder implements \IteratorAggregate, \Countable
|
|
240 |
*
|
241 |
* The date must be something that strtotime() is able to parse:
|
242 |
*
|
243 |
-
*
|
244 |
-
*
|
245 |
-
*
|
246 |
-
*
|
247 |
*
|
248 |
* @param string $date A date range string
|
249 |
*
|
@@ -265,9 +262,9 @@ class Finder implements \IteratorAggregate, \Countable
|
|
265 |
*
|
266 |
* You can use patterns (delimited with / sign), globs or simple strings.
|
267 |
*
|
268 |
-
*
|
269 |
-
*
|
270 |
-
*
|
271 |
*
|
272 |
* @param string $pattern A pattern (a regexp, a glob, or a string)
|
273 |
*
|
@@ -303,8 +300,8 @@ class Finder implements \IteratorAggregate, \Countable
|
|
303 |
*
|
304 |
* Strings or PCRE patterns can be used:
|
305 |
*
|
306 |
-
*
|
307 |
-
*
|
308 |
*
|
309 |
* @param string $pattern A pattern (string or regexp)
|
310 |
*
|
@@ -324,8 +321,8 @@ class Finder implements \IteratorAggregate, \Countable
|
|
324 |
*
|
325 |
* Strings or PCRE patterns can be used:
|
326 |
*
|
327 |
-
*
|
328 |
-
*
|
329 |
*
|
330 |
* @param string $pattern A pattern (string or regexp)
|
331 |
*
|
@@ -345,8 +342,8 @@ class Finder implements \IteratorAggregate, \Countable
|
|
345 |
*
|
346 |
* You can use patterns (delimited with / sign) or simple strings.
|
347 |
*
|
348 |
-
*
|
349 |
-
*
|
350 |
*
|
351 |
* Use only / as dirname separator.
|
352 |
*
|
@@ -368,8 +365,8 @@ class Finder implements \IteratorAggregate, \Countable
|
|
368 |
*
|
369 |
* You can use patterns (delimited with / sign) or simple strings.
|
370 |
*
|
371 |
-
*
|
372 |
-
*
|
373 |
*
|
374 |
* Use only / as dirname separator.
|
375 |
*
|
@@ -389,9 +386,9 @@ class Finder implements \IteratorAggregate, \Countable
|
|
389 |
/**
|
390 |
* Adds tests for file sizes.
|
391 |
*
|
392 |
-
*
|
393 |
-
*
|
394 |
-
*
|
395 |
*
|
396 |
* @param string|int $size A size range string or an integer
|
397 |
*
|
@@ -410,6 +407,10 @@ class Finder implements \IteratorAggregate, \Countable
|
|
410 |
/**
|
411 |
* Excludes directories.
|
412 |
*
|
|
|
|
|
|
|
|
|
413 |
* @param string|array $dirs A directory path or an array of directories
|
414 |
*
|
415 |
* @return $this
|
@@ -426,6 +427,8 @@ class Finder implements \IteratorAggregate, \Countable
|
|
426 |
/**
|
427 |
* Excludes "hidden" directories and files (starting with a dot).
|
428 |
*
|
|
|
|
|
429 |
* @param bool $ignoreDotFiles Whether to exclude "hidden" files or not
|
430 |
*
|
431 |
* @return $this
|
@@ -446,6 +449,8 @@ class Finder implements \IteratorAggregate, \Countable
|
|
446 |
/**
|
447 |
* Forces the finder to ignore version control directories.
|
448 |
*
|
|
|
|
|
449 |
* @param bool $ignoreVCS Whether to exclude VCS files or not
|
450 |
*
|
451 |
* @return $this
|
@@ -486,8 +491,6 @@ class Finder implements \IteratorAggregate, \Countable
|
|
486 |
*
|
487 |
* This can be slow as all the matching files and directories must be retrieved for comparison.
|
488 |
*
|
489 |
-
* @param \Closure $closure An anonymous function
|
490 |
-
*
|
491 |
* @return $this
|
492 |
*
|
493 |
* @see SortableIterator
|
@@ -593,8 +596,6 @@ class Finder implements \IteratorAggregate, \Countable
|
|
593 |
* The anonymous function receives a \SplFileInfo and must return false
|
594 |
* to remove files.
|
595 |
*
|
596 |
-
* @param \Closure $closure An anonymous function
|
597 |
-
*
|
598 |
* @return $this
|
599 |
*
|
600 |
* @see CustomFilterIterator
|
@@ -649,9 +650,9 @@ class Finder implements \IteratorAggregate, \Countable
|
|
649 |
|
650 |
foreach ((array) $dirs as $dir) {
|
651 |
if (is_dir($dir)) {
|
652 |
-
$resolvedDirs[] = $dir;
|
653 |
-
} elseif ($glob = glob($dir, (defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) {
|
654 |
-
$resolvedDirs = array_merge($resolvedDirs, $glob);
|
655 |
} else {
|
656 |
throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));
|
657 |
}
|
@@ -673,11 +674,11 @@ class Finder implements \IteratorAggregate, \Countable
|
|
673 |
*/
|
674 |
public function getIterator()
|
675 |
{
|
676 |
-
if (0 === count($this->dirs) && 0 === count($this->iterators)) {
|
677 |
throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
|
678 |
}
|
679 |
|
680 |
-
if (1 === count($this->dirs) && 0 === count($this->iterators)) {
|
681 |
return $this->searchInDirectory($this->dirs[0]);
|
682 |
}
|
683 |
|
@@ -698,11 +699,11 @@ class Finder implements \IteratorAggregate, \Countable
|
|
698 |
*
|
699 |
* The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array.
|
700 |
*
|
701 |
-
* @param
|
702 |
*
|
703 |
* @return $this
|
704 |
*
|
705 |
-
* @throws \InvalidArgumentException
|
706 |
*/
|
707 |
public function append($iterator)
|
708 |
{
|
@@ -710,7 +711,7 @@ class Finder implements \IteratorAggregate, \Countable
|
|
710 |
$this->iterators[] = $iterator->getIterator();
|
711 |
} elseif ($iterator instanceof \Iterator) {
|
712 |
$this->iterators[] = $iterator;
|
713 |
-
} elseif ($iterator instanceof \Traversable || is_array($iterator)) {
|
714 |
$it = new \ArrayIterator();
|
715 |
foreach ($iterator as $file) {
|
716 |
$it->append($file instanceof \SplFileInfo ? $file : new \SplFileInfo($file));
|
@@ -750,7 +751,7 @@ class Finder implements \IteratorAggregate, \Countable
|
|
750 |
}
|
751 |
|
752 |
/**
|
753 |
-
* @param $dir
|
754 |
*
|
755 |
* @return \Iterator
|
756 |
*/
|
@@ -854,8 +855,6 @@ class Finder implements \IteratorAggregate, \Countable
|
|
854 |
}
|
855 |
|
856 |
/**
|
857 |
-
* @param AdapterInterface $adapter
|
858 |
-
*
|
859 |
* @return AdapterInterface
|
860 |
*/
|
861 |
private function buildAdapter(AdapterInterface $adapter)
|
@@ -902,4 +901,16 @@ class Finder implements \IteratorAggregate, \Countable
|
|
902 |
;
|
903 |
}
|
904 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
905 |
}
|
12 |
namespace Symfony\Component\Finder;
|
13 |
|
14 |
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
|
|
15 |
use Symfony\Component\Finder\Adapter\BsdFindAdapter;
|
16 |
+
use Symfony\Component\Finder\Adapter\GnuFindAdapter;
|
17 |
use Symfony\Component\Finder\Adapter\PhpAdapter;
|
18 |
use Symfony\Component\Finder\Comparator\DateComparator;
|
19 |
use Symfony\Component\Finder\Comparator\NumberComparator;
|
36 |
*
|
37 |
* All methods return the current Finder object to allow easy chaining:
|
38 |
*
|
39 |
+
* $finder = Finder::create()->files()->name('*.php')->in(__DIR__);
|
40 |
*
|
41 |
* @author Fabien Potencier <fabien@symfony.com>
|
42 |
*/
|
67 |
|
68 |
private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg');
|
69 |
|
|
|
|
|
|
|
70 |
public function __construct()
|
71 |
{
|
72 |
$this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES;
|
94 |
*/
|
95 |
public function addAdapter(AdapterInterface $adapter, $priority = 0)
|
96 |
{
|
97 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
98 |
|
99 |
$this->initDefaultAdapters();
|
100 |
|
116 |
*/
|
117 |
public function useBestAdapter()
|
118 |
{
|
119 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
120 |
|
121 |
$this->initDefaultAdapters();
|
122 |
|
138 |
*/
|
139 |
public function setAdapter($name)
|
140 |
{
|
141 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
142 |
|
143 |
$this->initDefaultAdapters();
|
144 |
|
161 |
*/
|
162 |
public function removeAdapters()
|
163 |
{
|
164 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
165 |
|
166 |
$this->adapters = array();
|
167 |
|
177 |
*/
|
178 |
public function getAdapters()
|
179 |
{
|
180 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
181 |
|
182 |
$this->initDefaultAdapters();
|
183 |
|
215 |
*
|
216 |
* Usage:
|
217 |
*
|
218 |
+
* $finder->depth('> 1') // the Finder will start matching at level 1.
|
219 |
+
* $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point.
|
220 |
*
|
221 |
* @param string|int $level The depth level expression
|
222 |
*
|
237 |
*
|
238 |
* The date must be something that strtotime() is able to parse:
|
239 |
*
|
240 |
+
* $finder->date('since yesterday');
|
241 |
+
* $finder->date('until 2 days ago');
|
242 |
+
* $finder->date('> now - 2 hours');
|
243 |
+
* $finder->date('>= 2005-10-15');
|
244 |
*
|
245 |
* @param string $date A date range string
|
246 |
*
|
262 |
*
|
263 |
* You can use patterns (delimited with / sign), globs or simple strings.
|
264 |
*
|
265 |
+
* $finder->name('*.php')
|
266 |
+
* $finder->name('/\.php$/') // same as above
|
267 |
+
* $finder->name('test.php')
|
268 |
*
|
269 |
* @param string $pattern A pattern (a regexp, a glob, or a string)
|
270 |
*
|
300 |
*
|
301 |
* Strings or PCRE patterns can be used:
|
302 |
*
|
303 |
+
* $finder->contains('Lorem ipsum')
|
304 |
+
* $finder->contains('/Lorem ipsum/i')
|
305 |
*
|
306 |
* @param string $pattern A pattern (string or regexp)
|
307 |
*
|
321 |
*
|
322 |
* Strings or PCRE patterns can be used:
|
323 |
*
|
324 |
+
* $finder->notContains('Lorem ipsum')
|
325 |
+
* $finder->notContains('/Lorem ipsum/i')
|
326 |
*
|
327 |
* @param string $pattern A pattern (string or regexp)
|
328 |
*
|
342 |
*
|
343 |
* You can use patterns (delimited with / sign) or simple strings.
|
344 |
*
|
345 |
+
* $finder->path('some/special/dir')
|
346 |
+
* $finder->path('/some\/special\/dir/') // same as above
|
347 |
*
|
348 |
* Use only / as dirname separator.
|
349 |
*
|
365 |
*
|
366 |
* You can use patterns (delimited with / sign) or simple strings.
|
367 |
*
|
368 |
+
* $finder->notPath('some/special/dir')
|
369 |
+
* $finder->notPath('/some\/special\/dir/') // same as above
|
370 |
*
|
371 |
* Use only / as dirname separator.
|
372 |
*
|
386 |
/**
|
387 |
* Adds tests for file sizes.
|
388 |
*
|
389 |
+
* $finder->size('> 10K');
|
390 |
+
* $finder->size('<= 1Ki');
|
391 |
+
* $finder->size(4);
|
392 |
*
|
393 |
* @param string|int $size A size range string or an integer
|
394 |
*
|
407 |
/**
|
408 |
* Excludes directories.
|
409 |
*
|
410 |
+
* Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
|
411 |
+
*
|
412 |
+
* $finder->in(__DIR__)->exclude('ruby');
|
413 |
+
*
|
414 |
* @param string|array $dirs A directory path or an array of directories
|
415 |
*
|
416 |
* @return $this
|
427 |
/**
|
428 |
* Excludes "hidden" directories and files (starting with a dot).
|
429 |
*
|
430 |
+
* This option is enabled by default.
|
431 |
+
*
|
432 |
* @param bool $ignoreDotFiles Whether to exclude "hidden" files or not
|
433 |
*
|
434 |
* @return $this
|
449 |
/**
|
450 |
* Forces the finder to ignore version control directories.
|
451 |
*
|
452 |
+
* This option is enabled by default.
|
453 |
+
*
|
454 |
* @param bool $ignoreVCS Whether to exclude VCS files or not
|
455 |
*
|
456 |
* @return $this
|
491 |
*
|
492 |
* This can be slow as all the matching files and directories must be retrieved for comparison.
|
493 |
*
|
|
|
|
|
494 |
* @return $this
|
495 |
*
|
496 |
* @see SortableIterator
|
596 |
* The anonymous function receives a \SplFileInfo and must return false
|
597 |
* to remove files.
|
598 |
*
|
|
|
|
|
599 |
* @return $this
|
600 |
*
|
601 |
* @see CustomFilterIterator
|
650 |
|
651 |
foreach ((array) $dirs as $dir) {
|
652 |
if (is_dir($dir)) {
|
653 |
+
$resolvedDirs[] = $this->normalizeDir($dir);
|
654 |
+
} elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) {
|
655 |
+
$resolvedDirs = array_merge($resolvedDirs, array_map(array($this, 'normalizeDir'), $glob));
|
656 |
} else {
|
657 |
throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));
|
658 |
}
|
674 |
*/
|
675 |
public function getIterator()
|
676 |
{
|
677 |
+
if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
|
678 |
throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
|
679 |
}
|
680 |
|
681 |
+
if (1 === \count($this->dirs) && 0 === \count($this->iterators)) {
|
682 |
return $this->searchInDirectory($this->dirs[0]);
|
683 |
}
|
684 |
|
699 |
*
|
700 |
* The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array.
|
701 |
*
|
702 |
+
* @param iterable $iterator
|
703 |
*
|
704 |
* @return $this
|
705 |
*
|
706 |
+
* @throws \InvalidArgumentException when the given argument is not iterable
|
707 |
*/
|
708 |
public function append($iterator)
|
709 |
{
|
711 |
$this->iterators[] = $iterator->getIterator();
|
712 |
} elseif ($iterator instanceof \Iterator) {
|
713 |
$this->iterators[] = $iterator;
|
714 |
+
} elseif ($iterator instanceof \Traversable || \is_array($iterator)) {
|
715 |
$it = new \ArrayIterator();
|
716 |
foreach ($iterator as $file) {
|
717 |
$it->append($file instanceof \SplFileInfo ? $file : new \SplFileInfo($file));
|
751 |
}
|
752 |
|
753 |
/**
|
754 |
+
* @param string $dir
|
755 |
*
|
756 |
* @return \Iterator
|
757 |
*/
|
855 |
}
|
856 |
|
857 |
/**
|
|
|
|
|
858 |
* @return AdapterInterface
|
859 |
*/
|
860 |
private function buildAdapter(AdapterInterface $adapter)
|
901 |
;
|
902 |
}
|
903 |
}
|
904 |
+
|
905 |
+
/**
|
906 |
+
* Normalizes given directory names by removing trailing slashes.
|
907 |
+
*
|
908 |
+
* @param string $dir
|
909 |
+
*
|
910 |
+
* @return string
|
911 |
+
*/
|
912 |
+
private function normalizeDir($dir)
|
913 |
+
{
|
914 |
+
return rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
|
915 |
+
}
|
916 |
}
|
vendor/symfony/finder/Glob.php
CHANGED
@@ -14,14 +14,14 @@ namespace Symfony\Component\Finder;
|
|
14 |
/**
|
15 |
* Glob matches globbing patterns against text.
|
16 |
*
|
17 |
-
*
|
18 |
*
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
24 |
-
*
|
25 |
*
|
26 |
* Glob implements glob(3) style matching that can be used to match
|
27 |
* against text, rather than fetching names from a filesystem.
|
@@ -51,7 +51,7 @@ class Glob
|
|
51 |
$escaping = false;
|
52 |
$inCurlies = 0;
|
53 |
$regex = '';
|
54 |
-
$sizeGlob = strlen($glob);
|
55 |
for ($i = 0; $i < $sizeGlob; ++$i) {
|
56 |
$car = $glob[$i];
|
57 |
if ($firstByte) {
|
14 |
/**
|
15 |
* Glob matches globbing patterns against text.
|
16 |
*
|
17 |
+
* if match_glob("foo.*", "foo.bar") echo "matched\n";
|
18 |
*
|
19 |
+
* // prints foo.bar and foo.baz
|
20 |
+
* $regex = glob_to_regex("foo.*");
|
21 |
+
* for (array('foo.bar', 'foo.baz', 'foo', 'bar') as $t)
|
22 |
+
* {
|
23 |
+
* if (/$regex/) echo "matched: $car\n";
|
24 |
+
* }
|
25 |
*
|
26 |
* Glob implements glob(3) style matching that can be used to match
|
27 |
* against text, rather than fetching names from a filesystem.
|
51 |
$escaping = false;
|
52 |
$inCurlies = 0;
|
53 |
$regex = '';
|
54 |
+
$sizeGlob = \strlen($glob);
|
55 |
for ($i = 0; $i < $sizeGlob; ++$i) {
|
56 |
$car = $glob[$i];
|
57 |
if ($firstByte) {
|
vendor/symfony/finder/Iterator/CustomFilterIterator.php
CHANGED
@@ -24,8 +24,6 @@ class CustomFilterIterator extends FilterIterator
|
|
24 |
private $filters = array();
|
25 |
|
26 |
/**
|
27 |
-
* Constructor.
|
28 |
-
*
|
29 |
* @param \Iterator $iterator The Iterator to filter
|
30 |
* @param callable[] $filters An array of PHP callbacks
|
31 |
*
|
@@ -34,7 +32,7 @@ class CustomFilterIterator extends FilterIterator
|
|
34 |
public function __construct(\Iterator $iterator, array $filters)
|
35 |
{
|
36 |
foreach ($filters as $filter) {
|
37 |
-
if (
|
38 |
throw new \InvalidArgumentException('Invalid PHP callback.');
|
39 |
}
|
40 |
}
|
@@ -53,7 +51,7 @@ class CustomFilterIterator extends FilterIterator
|
|
53 |
$fileinfo = $this->current();
|
54 |
|
55 |
foreach ($this->filters as $filter) {
|
56 |
-
if (false === call_user_func($filter, $fileinfo)) {
|
57 |
return false;
|
58 |
}
|
59 |
}
|
24 |
private $filters = array();
|
25 |
|
26 |
/**
|
|
|
|
|
27 |
* @param \Iterator $iterator The Iterator to filter
|
28 |
* @param callable[] $filters An array of PHP callbacks
|
29 |
*
|
32 |
public function __construct(\Iterator $iterator, array $filters)
|
33 |
{
|
34 |
foreach ($filters as $filter) {
|
35 |
+
if (!\is_callable($filter)) {
|
36 |
throw new \InvalidArgumentException('Invalid PHP callback.');
|
37 |
}
|
38 |
}
|
51 |
$fileinfo = $this->current();
|
52 |
|
53 |
foreach ($this->filters as $filter) {
|
54 |
+
if (false === \call_user_func($filter, $fileinfo)) {
|
55 |
return false;
|
56 |
}
|
57 |
}
|
vendor/symfony/finder/Iterator/DateRangeFilterIterator.php
CHANGED
@@ -23,8 +23,6 @@ class DateRangeFilterIterator extends FilterIterator
|
|
23 |
private $comparators = array();
|
24 |
|
25 |
/**
|
26 |
-
* Constructor.
|
27 |
-
*
|
28 |
* @param \Iterator $iterator The Iterator to filter
|
29 |
* @param DateComparator[] $comparators An array of DateComparator instances
|
30 |
*/
|
23 |
private $comparators = array();
|
24 |
|
25 |
/**
|
|
|
|
|
26 |
* @param \Iterator $iterator The Iterator to filter
|
27 |
* @param DateComparator[] $comparators An array of DateComparator instances
|
28 |
*/
|
vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php
CHANGED
@@ -21,8 +21,6 @@ class DepthRangeFilterIterator extends FilterIterator
|
|
21 |
private $minDepth = 0;
|
22 |
|
23 |
/**
|
24 |
-
* Constructor.
|
25 |
-
*
|
26 |
* @param \RecursiveIteratorIterator $iterator The Iterator to filter
|
27 |
* @param int $minDepth The min depth
|
28 |
* @param int $maxDepth The max depth
|
21 |
private $minDepth = 0;
|
22 |
|
23 |
/**
|
|
|
|
|
24 |
* @param \RecursiveIteratorIterator $iterator The Iterator to filter
|
25 |
* @param int $minDepth The min depth
|
26 |
* @param int $maxDepth The max depth
|
vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php
CHANGED
@@ -24,8 +24,6 @@ class ExcludeDirectoryFilterIterator extends FilterIterator implements \Recursiv
|
|
24 |
private $excludedPattern;
|
25 |
|
26 |
/**
|
27 |
-
* Constructor.
|
28 |
-
*
|
29 |
* @param \Iterator $iterator The Iterator to filter
|
30 |
* @param array $directories An array of directories to exclude
|
31 |
*/
|
24 |
private $excludedPattern;
|
25 |
|
26 |
/**
|
|
|
|
|
27 |
* @param \Iterator $iterator The Iterator to filter
|
28 |
* @param array $directories An array of directories to exclude
|
29 |
*/
|
vendor/symfony/finder/Iterator/FilePathsIterator.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Iterator;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\FilePathsIterator class is deprecated since
|
15 |
|
16 |
use Symfony\Component\Finder\SplFileInfo;
|
17 |
|
@@ -56,7 +56,7 @@ class FilePathsIterator extends \ArrayIterator
|
|
56 |
public function __construct(array $paths, $baseDir)
|
57 |
{
|
58 |
$this->baseDir = $baseDir;
|
59 |
-
$this->baseDirLength = strlen($baseDir);
|
60 |
|
61 |
parent::__construct($paths);
|
62 |
}
|
@@ -69,7 +69,7 @@ class FilePathsIterator extends \ArrayIterator
|
|
69 |
*/
|
70 |
public function __call($name, array $arguments)
|
71 |
{
|
72 |
-
return call_user_func_array(array($this->current(), $name), $arguments);
|
73 |
}
|
74 |
|
75 |
/**
|
@@ -124,7 +124,7 @@ class FilePathsIterator extends \ArrayIterator
|
|
124 |
|
125 |
if ($this->baseDir === substr($absolutePath, 0, $this->baseDirLength)) {
|
126 |
$this->subPathname = ltrim(substr($absolutePath, $this->baseDirLength), '/\\');
|
127 |
-
$dir = dirname($this->subPathname);
|
128 |
$this->subPath = '.' === $dir ? '' : $dir;
|
129 |
} else {
|
130 |
$this->subPath = $this->subPathname = '';
|
11 |
|
12 |
namespace Symfony\Component\Finder\Iterator;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\FilePathsIterator class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
use Symfony\Component\Finder\SplFileInfo;
|
17 |
|
56 |
public function __construct(array $paths, $baseDir)
|
57 |
{
|
58 |
$this->baseDir = $baseDir;
|
59 |
+
$this->baseDirLength = \strlen($baseDir);
|
60 |
|
61 |
parent::__construct($paths);
|
62 |
}
|
69 |
*/
|
70 |
public function __call($name, array $arguments)
|
71 |
{
|
72 |
+
return \call_user_func_array(array($this->current(), $name), $arguments);
|
73 |
}
|
74 |
|
75 |
/**
|
124 |
|
125 |
if ($this->baseDir === substr($absolutePath, 0, $this->baseDirLength)) {
|
126 |
$this->subPathname = ltrim(substr($absolutePath, $this->baseDirLength), '/\\');
|
127 |
+
$dir = \dirname($this->subPathname);
|
128 |
$this->subPath = '.' === $dir ? '' : $dir;
|
129 |
} else {
|
130 |
$this->subPath = $this->subPathname = '';
|
vendor/symfony/finder/Iterator/FileTypeFilterIterator.php
CHANGED
@@ -24,8 +24,6 @@ class FileTypeFilterIterator extends FilterIterator
|
|
24 |
private $mode;
|
25 |
|
26 |
/**
|
27 |
-
* Constructor.
|
28 |
-
*
|
29 |
* @param \Iterator $iterator The Iterator to filter
|
30 |
* @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
|
31 |
*/
|
24 |
private $mode;
|
25 |
|
26 |
/**
|
|
|
|
|
27 |
* @param \Iterator $iterator The Iterator to filter
|
28 |
* @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
|
29 |
*/
|
vendor/symfony/finder/Iterator/FilterIterator.php
CHANGED
@@ -29,7 +29,7 @@ abstract class FilterIterator extends \FilterIterator
|
|
29 |
*/
|
30 |
public function rewind()
|
31 |
{
|
32 |
-
if (PHP_VERSION_ID > 50607 || (PHP_VERSION_ID > 50523 && PHP_VERSION_ID < 50600)) {
|
33 |
parent::rewind();
|
34 |
|
35 |
return;
|
29 |
*/
|
30 |
public function rewind()
|
31 |
{
|
32 |
+
if (\PHP_VERSION_ID > 50607 || (\PHP_VERSION_ID > 50523 && \PHP_VERSION_ID < 50600)) {
|
33 |
parent::rewind();
|
34 |
|
35 |
return;
|
vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
CHANGED
@@ -22,8 +22,6 @@ abstract class MultiplePcreFilterIterator extends FilterIterator
|
|
22 |
protected $noMatchRegexps = array();
|
23 |
|
24 |
/**
|
25 |
-
* Constructor.
|
26 |
-
*
|
27 |
* @param \Iterator $iterator The Iterator to filter
|
28 |
* @param array $matchPatterns An array of patterns that need to match
|
29 |
* @param array $noMatchPatterns An array of patterns that need to not match
|
22 |
protected $noMatchRegexps = array();
|
23 |
|
24 |
/**
|
|
|
|
|
25 |
* @param \Iterator $iterator The Iterator to filter
|
26 |
* @param array $matchPatterns An array of patterns that need to match
|
27 |
* @param array $noMatchPatterns An array of patterns that need to not match
|
vendor/symfony/finder/Iterator/PathFilterIterator.php
CHANGED
@@ -28,7 +28,7 @@ class PathFilterIterator extends MultiplePcreFilterIterator
|
|
28 |
{
|
29 |
$filename = $this->current()->getRelativePathname();
|
30 |
|
31 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
32 |
$filename = str_replace('\\', '/', $filename);
|
33 |
}
|
34 |
|
28 |
{
|
29 |
$filename = $this->current()->getRelativePathname();
|
30 |
|
31 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
32 |
$filename = str_replace('\\', '/', $filename);
|
33 |
}
|
34 |
|
vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php
CHANGED
@@ -37,8 +37,6 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
|
|
37 |
private $directorySeparator = '/';
|
38 |
|
39 |
/**
|
40 |
-
* Constructor.
|
41 |
-
*
|
42 |
* @param string $path
|
43 |
* @param int $flags
|
44 |
* @param bool $ignoreUnreadableDirs
|
@@ -54,8 +52,8 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
|
|
54 |
parent::__construct($path, $flags);
|
55 |
$this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
|
56 |
$this->rootPath = (string) $path;
|
57 |
-
if ('/' !== DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
|
58 |
-
$this->directorySeparator = DIRECTORY_SEPARATOR;
|
59 |
}
|
60 |
}
|
61 |
|
@@ -119,7 +117,7 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
|
|
119 |
}
|
120 |
|
121 |
// @see https://bugs.php.net/68557
|
122 |
-
if (PHP_VERSION_ID < 50523 || PHP_VERSION_ID >= 50600 && PHP_VERSION_ID < 50607) {
|
123 |
parent::next();
|
124 |
}
|
125 |
|
37 |
private $directorySeparator = '/';
|
38 |
|
39 |
/**
|
|
|
|
|
40 |
* @param string $path
|
41 |
* @param int $flags
|
42 |
* @param bool $ignoreUnreadableDirs
|
52 |
parent::__construct($path, $flags);
|
53 |
$this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
|
54 |
$this->rootPath = (string) $path;
|
55 |
+
if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
|
56 |
+
$this->directorySeparator = \DIRECTORY_SEPARATOR;
|
57 |
}
|
58 |
}
|
59 |
|
117 |
}
|
118 |
|
119 |
// @see https://bugs.php.net/68557
|
120 |
+
if (\PHP_VERSION_ID < 50523 || \PHP_VERSION_ID >= 50600 && \PHP_VERSION_ID < 50607) {
|
121 |
parent::next();
|
122 |
}
|
123 |
|
vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php
CHANGED
@@ -23,8 +23,6 @@ class SizeRangeFilterIterator extends FilterIterator
|
|
23 |
private $comparators = array();
|
24 |
|
25 |
/**
|
26 |
-
* Constructor.
|
27 |
-
*
|
28 |
* @param \Iterator $iterator The Iterator to filter
|
29 |
* @param NumberComparator[] $comparators An array of NumberComparator instances
|
30 |
*/
|
23 |
private $comparators = array();
|
24 |
|
25 |
/**
|
|
|
|
|
26 |
* @param \Iterator $iterator The Iterator to filter
|
27 |
* @param NumberComparator[] $comparators An array of NumberComparator instances
|
28 |
*/
|
vendor/symfony/finder/Iterator/SortableIterator.php
CHANGED
@@ -28,8 +28,6 @@ class SortableIterator implements \IteratorAggregate
|
|
28 |
private $sort;
|
29 |
|
30 |
/**
|
31 |
-
* Constructor.
|
32 |
-
*
|
33 |
* @param \Traversable $iterator The Iterator to filter
|
34 |
* @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
|
35 |
*
|
@@ -65,7 +63,7 @@ class SortableIterator implements \IteratorAggregate
|
|
65 |
$this->sort = function ($a, $b) {
|
66 |
return $a->getMTime() - $b->getMTime();
|
67 |
};
|
68 |
-
} elseif (is_callable($sort)) {
|
69 |
$this->sort = $sort;
|
70 |
} else {
|
71 |
throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
|
28 |
private $sort;
|
29 |
|
30 |
/**
|
|
|
|
|
31 |
* @param \Traversable $iterator The Iterator to filter
|
32 |
* @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
|
33 |
*
|
63 |
$this->sort = function ($a, $b) {
|
64 |
return $a->getMTime() - $b->getMTime();
|
65 |
};
|
66 |
+
} elseif (\is_callable($sort)) {
|
67 |
$this->sort = $sort;
|
68 |
} else {
|
69 |
throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
|
vendor/symfony/finder/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
Copyright (c) 2004-
|
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
|
1 |
+
Copyright (c) 2004-2018 Fabien Potencier
|
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
|
vendor/symfony/finder/Shell/Command.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Shell;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\Command class is deprecated since
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
@@ -20,19 +20,8 @@ namespace Symfony\Component\Finder\Shell;
|
|
20 |
*/
|
21 |
class Command
|
22 |
{
|
23 |
-
/**
|
24 |
-
* @var Command|null
|
25 |
-
*/
|
26 |
private $parent;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @var array
|
30 |
-
*/
|
31 |
private $bits = array();
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @var array
|
35 |
-
*/
|
36 |
private $labels = array();
|
37 |
|
38 |
/**
|
@@ -40,11 +29,6 @@ class Command
|
|
40 |
*/
|
41 |
private $errorHandler;
|
42 |
|
43 |
-
/**
|
44 |
-
* Constructor.
|
45 |
-
*
|
46 |
-
* @param Command|null $parent Parent command
|
47 |
-
*/
|
48 |
public function __construct(Command $parent = null)
|
49 |
{
|
50 |
$this->parent = $parent;
|
@@ -63,8 +47,6 @@ class Command
|
|
63 |
/**
|
64 |
* Creates a new Command instance.
|
65 |
*
|
66 |
-
* @param Command|null $parent Parent command
|
67 |
-
*
|
68 |
* @return self
|
69 |
*/
|
70 |
public static function create(Command $parent = null)
|
@@ -122,7 +104,7 @@ class Command
|
|
122 |
array_unshift($this->bits, $bit);
|
123 |
|
124 |
foreach ($this->labels as $label => $index) {
|
125 |
-
|
126 |
}
|
127 |
|
128 |
return $this;
|
@@ -172,7 +154,7 @@ class Command
|
|
172 |
}
|
173 |
|
174 |
$this->bits[] = self::create($this);
|
175 |
-
$this->labels[$label] = count($this->bits) - 1;
|
176 |
|
177 |
return $this->bits[$this->labels[$label]];
|
178 |
}
|
@@ -218,12 +200,10 @@ class Command
|
|
218 |
*/
|
219 |
public function length()
|
220 |
{
|
221 |
-
return count($this->bits);
|
222 |
}
|
223 |
|
224 |
/**
|
225 |
-
* @param \Closure $errorHandler
|
226 |
-
*
|
227 |
* @return $this
|
228 |
*/
|
229 |
public function setErrorHandler(\Closure $errorHandler)
|
11 |
|
12 |
namespace Symfony\Component\Finder\Shell;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\Command class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
20 |
*/
|
21 |
class Command
|
22 |
{
|
|
|
|
|
|
|
23 |
private $parent;
|
|
|
|
|
|
|
|
|
24 |
private $bits = array();
|
|
|
|
|
|
|
|
|
25 |
private $labels = array();
|
26 |
|
27 |
/**
|
29 |
*/
|
30 |
private $errorHandler;
|
31 |
|
|
|
|
|
|
|
|
|
|
|
32 |
public function __construct(Command $parent = null)
|
33 |
{
|
34 |
$this->parent = $parent;
|
47 |
/**
|
48 |
* Creates a new Command instance.
|
49 |
*
|
|
|
|
|
50 |
* @return self
|
51 |
*/
|
52 |
public static function create(Command $parent = null)
|
104 |
array_unshift($this->bits, $bit);
|
105 |
|
106 |
foreach ($this->labels as $label => $index) {
|
107 |
+
++$this->labels[$label];
|
108 |
}
|
109 |
|
110 |
return $this;
|
154 |
}
|
155 |
|
156 |
$this->bits[] = self::create($this);
|
157 |
+
$this->labels[$label] = \count($this->bits) - 1;
|
158 |
|
159 |
return $this->bits[$this->labels[$label]];
|
160 |
}
|
200 |
*/
|
201 |
public function length()
|
202 |
{
|
203 |
+
return \count($this->bits);
|
204 |
}
|
205 |
|
206 |
/**
|
|
|
|
|
207 |
* @return $this
|
208 |
*/
|
209 |
public function setErrorHandler(\Closure $errorHandler)
|
vendor/symfony/finder/Shell/Shell.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Shell;
|
13 |
|
14 |
-
@trigger_error('The '.__NAMESPACE__.'\Shell class is deprecated since
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
@@ -54,7 +54,7 @@ class Shell
|
|
54 |
*/
|
55 |
public function testCommand($command)
|
56 |
{
|
57 |
-
if (
|
58 |
return false;
|
59 |
}
|
60 |
|
@@ -68,7 +68,7 @@ class Shell
|
|
68 |
|
69 |
exec($testCommand.$command, $output, $code);
|
70 |
|
71 |
-
return 0 === $code && count($output) > 0;
|
72 |
}
|
73 |
|
74 |
/**
|
11 |
|
12 |
namespace Symfony\Component\Finder\Shell;
|
13 |
|
14 |
+
@trigger_error('The '.__NAMESPACE__.'\Shell class is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
15 |
|
16 |
/**
|
17 |
* @author Jean-François Simon <contact@jfsimon.fr>
|
54 |
*/
|
55 |
public function testCommand($command)
|
56 |
{
|
57 |
+
if (!\function_exists('exec')) {
|
58 |
return false;
|
59 |
}
|
60 |
|
68 |
|
69 |
exec($testCommand.$command, $output, $code);
|
70 |
|
71 |
+
return 0 === $code && \count($output) > 0;
|
72 |
}
|
73 |
|
74 |
/**
|
vendor/symfony/finder/SplFileInfo.php
CHANGED
@@ -22,8 +22,6 @@ class SplFileInfo extends \SplFileInfo
|
|
22 |
private $relativePathname;
|
23 |
|
24 |
/**
|
25 |
-
* Constructor.
|
26 |
-
*
|
27 |
* @param string $file The file name
|
28 |
* @param string $relativePath The relative path
|
29 |
* @param string $relativePathname The relative path name
|
@@ -68,12 +66,11 @@ class SplFileInfo extends \SplFileInfo
|
|
68 |
*/
|
69 |
public function getContents()
|
70 |
{
|
71 |
-
$
|
72 |
$content = file_get_contents($this->getPathname());
|
73 |
-
|
74 |
if (false === $content) {
|
75 |
-
|
76 |
-
throw new \RuntimeException($error['message']);
|
77 |
}
|
78 |
|
79 |
return $content;
|
22 |
private $relativePathname;
|
23 |
|
24 |
/**
|
|
|
|
|
25 |
* @param string $file The file name
|
26 |
* @param string $relativePath The relative path
|
27 |
* @param string $relativePathname The relative path name
|
66 |
*/
|
67 |
public function getContents()
|
68 |
{
|
69 |
+
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
|
70 |
$content = file_get_contents($this->getPathname());
|
71 |
+
restore_error_handler();
|
72 |
if (false === $content) {
|
73 |
+
throw new \RuntimeException($error);
|
|
|
74 |
}
|
75 |
|
76 |
return $content;
|
vendor/symfony/finder/Tests/BsdFinderTest.php
CHANGED
@@ -19,12 +19,22 @@ use Symfony\Component\Finder\Finder;
|
|
19 |
*/
|
20 |
class BsdFinderTest extends FinderTest
|
21 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
protected function buildFinder()
|
23 |
{
|
24 |
$adapter = new BsdFindAdapter();
|
25 |
|
26 |
if (!$adapter->isSupported()) {
|
27 |
-
$this->markTestSkipped(get_class($adapter).' is not supported.');
|
28 |
}
|
29 |
|
30 |
return Finder::create()
|
19 |
*/
|
20 |
class BsdFinderTest extends FinderTest
|
21 |
{
|
22 |
+
public function testSymlinksNotResolved()
|
23 |
+
{
|
24 |
+
$this->markTestSkipped('Symlinks are always resolved using the BsdFinderAdapter.');
|
25 |
+
}
|
26 |
+
|
27 |
+
public function testBackPathNotNormalized()
|
28 |
+
{
|
29 |
+
$this->markTestSkipped('Paths are always normalized using the BsdFinderAdapter.');
|
30 |
+
}
|
31 |
+
|
32 |
protected function buildFinder()
|
33 |
{
|
34 |
$adapter = new BsdFindAdapter();
|
35 |
|
36 |
if (!$adapter->isSupported()) {
|
37 |
+
$this->markTestSkipped(\get_class($adapter).' is not supported.');
|
38 |
}
|
39 |
|
40 |
return Finder::create()
|
vendor/symfony/finder/Tests/FinderTest.php
CHANGED
@@ -12,7 +12,6 @@
|
|
12 |
namespace Symfony\Component\Finder\Tests;
|
13 |
|
14 |
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
15 |
-
use Symfony\Component\Finder\Adapter\GnuFindAdapter;
|
16 |
use Symfony\Component\Finder\Adapter\PhpAdapter;
|
17 |
use Symfony\Component\Finder\Finder;
|
18 |
|
@@ -49,6 +48,45 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
49 |
$this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator());
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
public function testDepth()
|
53 |
{
|
54 |
$finder = $this->buildFinder();
|
@@ -229,7 +267,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
229 |
|
230 |
public function testFollowLinks()
|
231 |
{
|
232 |
-
if ('\\' == DIRECTORY_SEPARATOR) {
|
233 |
$this->markTestSkipped('symlinks are not supported on Windows');
|
234 |
}
|
235 |
|
@@ -244,12 +282,12 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
244 |
$iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();
|
245 |
|
246 |
$expected = array(
|
247 |
-
self::$tmpDir
|
248 |
-
__DIR__
|
249 |
-
__DIR__
|
250 |
-
__DIR__
|
251 |
-
__DIR__
|
252 |
-
__DIR__
|
253 |
);
|
254 |
|
255 |
$this->assertIterator($expected, $iterator);
|
@@ -267,7 +305,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
267 |
public function testInWithGlob()
|
268 |
{
|
269 |
$finder = $this->buildFinder();
|
270 |
-
$finder->in(array(__DIR__.'/Fixtures/*/B/C', __DIR__.'/Fixtures/*/*/B/C'))->getIterator();
|
271 |
|
272 |
$this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder);
|
273 |
}
|
@@ -351,7 +389,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
351 |
$paths[] = $file->getRelativePathname();
|
352 |
}
|
353 |
|
354 |
-
$ref = array('test.php', 'toto', 'test.py', 'foo', 'foo'
|
355 |
|
356 |
sort($paths);
|
357 |
sort($ref);
|
@@ -362,7 +400,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
362 |
public function testAppendWithAFinder()
|
363 |
{
|
364 |
$finder = $this->buildFinder();
|
365 |
-
$finder->files()->in(self::$tmpDir
|
366 |
|
367 |
$finder1 = $this->buildFinder();
|
368 |
$finder1->directories()->in(self::$tmpDir);
|
@@ -375,7 +413,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
375 |
public function testAppendWithAnArray()
|
376 |
{
|
377 |
$finder = $this->buildFinder();
|
378 |
-
$finder->files()->in(self::$tmpDir
|
379 |
|
380 |
$finder->append($this->toAbsolute(array('foo', 'toto')));
|
381 |
|
@@ -390,7 +428,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
390 |
public function testAppendDoesNotRequireIn()
|
391 |
{
|
392 |
$finder = $this->buildFinder();
|
393 |
-
$finder->in(self::$tmpDir
|
394 |
|
395 |
$finder1 = Finder::create()->append($finder);
|
396 |
|
@@ -411,7 +449,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
411 |
|
412 |
public function testCountFiles()
|
413 |
{
|
414 |
-
$files = Finder::create()->files()->in(__DIR__
|
415 |
$i = 0;
|
416 |
|
417 |
foreach ($files as $file) {
|
@@ -427,7 +465,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
427 |
public function testCountWithoutIn()
|
428 |
{
|
429 |
$finder = Finder::create()->files();
|
430 |
-
count($finder);
|
431 |
}
|
432 |
|
433 |
/**
|
@@ -436,7 +474,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
436 |
public function testContains($matchPatterns, $noMatchPatterns, $expected)
|
437 |
{
|
438 |
$finder = $this->buildFinder();
|
439 |
-
$finder->in(__DIR__
|
440 |
->name('*.txt')->sortByName()
|
441 |
->contains($matchPatterns)
|
442 |
->notContains($noMatchPatterns);
|
@@ -499,15 +537,15 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
499 |
{
|
500 |
$locations = array(
|
501 |
__DIR__.'/Fixtures/one',
|
502 |
-
self::$tmpDir
|
503 |
);
|
504 |
|
505 |
$finder = $this->buildFinder();
|
506 |
$finder->in($locations)->depth('< 10')->name('*.neon');
|
507 |
|
508 |
$expected = array(
|
509 |
-
__DIR__.'/Fixtures/one'
|
510 |
-
__DIR__.'/Fixtures/one'
|
511 |
);
|
512 |
|
513 |
$this->assertIterator($expected, $finder);
|
@@ -528,10 +566,10 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
528 |
public function testRegexSpecialCharsLocationWithPathRestrictionContainingStartFlag()
|
529 |
{
|
530 |
$finder = $this->buildFinder();
|
531 |
-
$finder->in(__DIR__
|
532 |
->path('/^dir/');
|
533 |
|
534 |
-
$expected = array('r+e.gex[c]a(r)s'
|
535 |
$this->assertIterator($this->toAbsoluteFixtures($expected), $finder);
|
536 |
}
|
537 |
|
@@ -606,7 +644,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
606 |
public function testPath($matchPatterns, $noMatchPatterns, array $expected)
|
607 |
{
|
608 |
$finder = $this->buildFinder();
|
609 |
-
$finder->in(__DIR__
|
610 |
->path($matchPatterns)
|
611 |
->notPath($noMatchPatterns);
|
612 |
|
@@ -620,15 +658,15 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
620 |
{
|
621 |
// test that by default, PhpAdapter is selected
|
622 |
$adapters = Finder::create()->getAdapters();
|
623 |
-
$this->
|
624 |
|
625 |
// test another adapter selection
|
626 |
$adapters = Finder::create()->setAdapter('gnu_find')->getAdapters();
|
627 |
-
$this->
|
628 |
|
629 |
// test that useBestAdapter method removes selection
|
630 |
$adapters = Finder::create()->useBestAdapter()->getAdapters();
|
631 |
-
$this->
|
632 |
}
|
633 |
|
634 |
public function getTestPathData()
|
@@ -636,41 +674,41 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
636 |
return array(
|
637 |
array('', '', array()),
|
638 |
array('/^A\/B\/C/', '/C$/',
|
639 |
-
array('A'
|
640 |
),
|
641 |
array('/^A\/B/', 'foobar',
|
642 |
array(
|
643 |
-
'A'
|
644 |
-
'A'
|
645 |
-
'A'
|
646 |
-
'A'
|
647 |
),
|
648 |
),
|
649 |
array('A/B/C', 'foobar',
|
650 |
array(
|
651 |
-
'A'
|
652 |
-
'A'
|
653 |
-
'copy'
|
654 |
-
'copy'
|
655 |
),
|
656 |
),
|
657 |
array('A/B', 'foobar',
|
658 |
array(
|
659 |
//dirs
|
660 |
-
'A'
|
661 |
-
'A'
|
662 |
-
'copy'
|
663 |
-
'copy'
|
664 |
//files
|
665 |
-
'A'
|
666 |
-
'A'
|
667 |
-
'copy'
|
668 |
-
'copy'
|
669 |
),
|
670 |
),
|
671 |
array('/^with space\//', 'foobar',
|
672 |
array(
|
673 |
-
'with space'
|
674 |
),
|
675 |
),
|
676 |
);
|
@@ -678,7 +716,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
678 |
|
679 |
public function testAccessDeniedException()
|
680 |
{
|
681 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
682 |
$this->markTestSkipped('chmod is not supported on Windows');
|
683 |
}
|
684 |
|
@@ -686,7 +724,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
686 |
$finder->files()->in(self::$tmpDir);
|
687 |
|
688 |
// make 'foo' directory non-readable
|
689 |
-
$testDir = self::$tmpDir
|
690 |
chmod($testDir, 0333);
|
691 |
|
692 |
if (false === $couldRead = is_readable($testDir)) {
|
@@ -718,7 +756,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
718 |
|
719 |
public function testIgnoredAccessDeniedException()
|
720 |
{
|
721 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
722 |
$this->markTestSkipped('chmod is not supported on Windows');
|
723 |
}
|
724 |
|
@@ -726,7 +764,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|
726 |
$finder->files()->ignoreUnreadableDirs()->in(self::$tmpDir);
|
727 |
|
728 |
// make 'foo' directory non-readable
|
729 |
-
$testDir = self::$tmpDir
|
730 |
chmod($testDir, 0333);
|
731 |
|
732 |
if (false === ($couldRead = is_readable($testDir))) {
|
12 |
namespace Symfony\Component\Finder\Tests;
|
13 |
|
14 |
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
|
|
15 |
use Symfony\Component\Finder\Adapter\PhpAdapter;
|
16 |
use Symfony\Component\Finder\Finder;
|
17 |
|
48 |
$this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator());
|
49 |
}
|
50 |
|
51 |
+
public function testRemoveTrailingSlash()
|
52 |
+
{
|
53 |
+
$finder = $this->buildFinder();
|
54 |
+
|
55 |
+
$expected = $this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar'));
|
56 |
+
$in = self::$tmpDir.'//';
|
57 |
+
|
58 |
+
$this->assertIterator($expected, $finder->in($in)->files()->getIterator());
|
59 |
+
}
|
60 |
+
|
61 |
+
public function testSymlinksNotResolved()
|
62 |
+
{
|
63 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
64 |
+
$this->markTestSkipped('symlinks are not supported on Windows');
|
65 |
+
}
|
66 |
+
|
67 |
+
$finder = $this->buildFinder();
|
68 |
+
|
69 |
+
symlink($this->toAbsolute('foo'), $this->toAbsolute('baz'));
|
70 |
+
$expected = $this->toAbsolute(array('baz/bar.tmp'));
|
71 |
+
$in = self::$tmpDir.'/baz/';
|
72 |
+
try {
|
73 |
+
$this->assertIterator($expected, $finder->in($in)->files()->getIterator());
|
74 |
+
unlink($this->toAbsolute('baz'));
|
75 |
+
} catch (\Exception $e) {
|
76 |
+
unlink($this->toAbsolute('baz'));
|
77 |
+
throw $e;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
public function testBackPathNotNormalized()
|
82 |
+
{
|
83 |
+
$finder = $this->buildFinder();
|
84 |
+
|
85 |
+
$expected = $this->toAbsolute(array('foo/../foo/bar.tmp'));
|
86 |
+
$in = self::$tmpDir.'/foo/../foo/';
|
87 |
+
$this->assertIterator($expected, $finder->in($in)->files()->getIterator());
|
88 |
+
}
|
89 |
+
|
90 |
public function testDepth()
|
91 |
{
|
92 |
$finder = $this->buildFinder();
|
267 |
|
268 |
public function testFollowLinks()
|
269 |
{
|
270 |
+
if ('\\' == \DIRECTORY_SEPARATOR) {
|
271 |
$this->markTestSkipped('symlinks are not supported on Windows');
|
272 |
}
|
273 |
|
282 |
$iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();
|
283 |
|
284 |
$expected = array(
|
285 |
+
self::$tmpDir.\DIRECTORY_SEPARATOR.'test.php',
|
286 |
+
__DIR__.\DIRECTORY_SEPARATOR.'BsdFinderTest.php',
|
287 |
+
__DIR__.\DIRECTORY_SEPARATOR.'FinderTest.php',
|
288 |
+
__DIR__.\DIRECTORY_SEPARATOR.'GnuFinderTest.php',
|
289 |
+
__DIR__.\DIRECTORY_SEPARATOR.'PhpFinderTest.php',
|
290 |
+
__DIR__.\DIRECTORY_SEPARATOR.'GlobTest.php',
|
291 |
);
|
292 |
|
293 |
$this->assertIterator($expected, $iterator);
|
305 |
public function testInWithGlob()
|
306 |
{
|
307 |
$finder = $this->buildFinder();
|
308 |
+
$finder->in(array(__DIR__.'/Fixtures/*/B/C/', __DIR__.'/Fixtures/*/*/B/C/'))->getIterator();
|
309 |
|
310 |
$this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder);
|
311 |
}
|
389 |
$paths[] = $file->getRelativePathname();
|
390 |
}
|
391 |
|
392 |
+
$ref = array('test.php', 'toto', 'test.py', 'foo', 'foo'.\DIRECTORY_SEPARATOR.'bar.tmp', 'foo bar');
|
393 |
|
394 |
sort($paths);
|
395 |
sort($ref);
|
400 |
public function testAppendWithAFinder()
|
401 |
{
|
402 |
$finder = $this->buildFinder();
|
403 |
+
$finder->files()->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo');
|
404 |
|
405 |
$finder1 = $this->buildFinder();
|
406 |
$finder1->directories()->in(self::$tmpDir);
|
413 |
public function testAppendWithAnArray()
|
414 |
{
|
415 |
$finder = $this->buildFinder();
|
416 |
+
$finder->files()->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo');
|
417 |
|
418 |
$finder->append($this->toAbsolute(array('foo', 'toto')));
|
419 |
|
428 |
public function testAppendDoesNotRequireIn()
|
429 |
{
|
430 |
$finder = $this->buildFinder();
|
431 |
+
$finder->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo');
|
432 |
|
433 |
$finder1 = Finder::create()->append($finder);
|
434 |
|
449 |
|
450 |
public function testCountFiles()
|
451 |
{
|
452 |
+
$files = Finder::create()->files()->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures');
|
453 |
$i = 0;
|
454 |
|
455 |
foreach ($files as $file) {
|
465 |
public function testCountWithoutIn()
|
466 |
{
|
467 |
$finder = Finder::create()->files();
|
468 |
+
\count($finder);
|
469 |
}
|
470 |
|
471 |
/**
|
474 |
public function testContains($matchPatterns, $noMatchPatterns, $expected)
|
475 |
{
|
476 |
$finder = $this->buildFinder();
|
477 |
+
$finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures')
|
478 |
->name('*.txt')->sortByName()
|
479 |
->contains($matchPatterns)
|
480 |
->notContains($noMatchPatterns);
|
537 |
{
|
538 |
$locations = array(
|
539 |
__DIR__.'/Fixtures/one',
|
540 |
+
self::$tmpDir.\DIRECTORY_SEPARATOR.'toto',
|
541 |
);
|
542 |
|
543 |
$finder = $this->buildFinder();
|
544 |
$finder->in($locations)->depth('< 10')->name('*.neon');
|
545 |
|
546 |
$expected = array(
|
547 |
+
__DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'c.neon',
|
548 |
+
__DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'d.neon',
|
549 |
);
|
550 |
|
551 |
$this->assertIterator($expected, $finder);
|
566 |
public function testRegexSpecialCharsLocationWithPathRestrictionContainingStartFlag()
|
567 |
{
|
568 |
$finder = $this->buildFinder();
|
569 |
+
$finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'r+e.gex[c]a(r)s')
|
570 |
->path('/^dir/');
|
571 |
|
572 |
+
$expected = array('r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir', 'r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'bar.dat');
|
573 |
$this->assertIterator($this->toAbsoluteFixtures($expected), $finder);
|
574 |
}
|
575 |
|
644 |
public function testPath($matchPatterns, $noMatchPatterns, array $expected)
|
645 |
{
|
646 |
$finder = $this->buildFinder();
|
647 |
+
$finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures')
|
648 |
->path($matchPatterns)
|
649 |
->notPath($noMatchPatterns);
|
650 |
|
658 |
{
|
659 |
// test that by default, PhpAdapter is selected
|
660 |
$adapters = Finder::create()->getAdapters();
|
661 |
+
$this->assertInstanceOf('Symfony\Component\Finder\Adapter\PhpAdapter', $adapters[0]);
|
662 |
|
663 |
// test another adapter selection
|
664 |
$adapters = Finder::create()->setAdapter('gnu_find')->getAdapters();
|
665 |
+
$this->assertInstanceOf('Symfony\Component\Finder\Adapter\GnuFindAdapter', $adapters[0]);
|
666 |
|
667 |
// test that useBestAdapter method removes selection
|
668 |
$adapters = Finder::create()->useBestAdapter()->getAdapters();
|
669 |
+
$this->assertNotInstanceOf('Symfony\Component\Finder\Adapter\PhpAdapter', $adapters[0]);
|
670 |
}
|
671 |
|
672 |
public function getTestPathData()
|
674 |
return array(
|
675 |
array('', '', array()),
|
676 |
array('/^A\/B\/C/', '/C$/',
|
677 |
+
array('A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat'),
|
678 |
),
|
679 |
array('/^A\/B/', 'foobar',
|
680 |
array(
|
681 |
+
'A'.\DIRECTORY_SEPARATOR.'B',
|
682 |
+
'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
|
683 |
+
'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat',
|
684 |
+
'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
|
685 |
),
|
686 |
),
|
687 |
array('A/B/C', 'foobar',
|
688 |
array(
|
689 |
+
'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
|
690 |
+
'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
|
691 |
+
'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
|
692 |
+
'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat.copy',
|
693 |
),
|
694 |
),
|
695 |
array('A/B', 'foobar',
|
696 |
array(
|
697 |
//dirs
|
698 |
+
'A'.\DIRECTORY_SEPARATOR.'B',
|
699 |
+
'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
|
700 |
+
'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B',
|
701 |
+
'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C',
|
702 |
//files
|
703 |
+
'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat',
|
704 |
+
'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
|
705 |
+
'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat.copy',
|
706 |
+
'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat.copy',
|
707 |
),
|
708 |
),
|
709 |
array('/^with space\//', 'foobar',
|
710 |
array(
|
711 |
+
'with space'.\DIRECTORY_SEPARATOR.'foo.txt',
|
712 |
),
|
713 |
),
|
714 |
);
|
716 |
|
717 |
public function testAccessDeniedException()
|
718 |
{
|
719 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
720 |
$this->markTestSkipped('chmod is not supported on Windows');
|
721 |
}
|
722 |
|
724 |
$finder->files()->in(self::$tmpDir);
|
725 |
|
726 |
// make 'foo' directory non-readable
|
727 |
+
$testDir = self::$tmpDir.\DIRECTORY_SEPARATOR.'foo';
|
728 |
chmod($testDir, 0333);
|
729 |
|
730 |
if (false === $couldRead = is_readable($testDir)) {
|
756 |
|
757 |
public function testIgnoredAccessDeniedException()
|
758 |
{
|
759 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
760 |
$this->markTestSkipped('chmod is not supported on Windows');
|
761 |
}
|
762 |
|
764 |
$finder->files()->ignoreUnreadableDirs()->in(self::$tmpDir);
|
765 |
|
766 |
// make 'foo' directory non-readable
|
767 |
+
$testDir = self::$tmpDir.\DIRECTORY_SEPARATOR.'foo';
|
768 |
chmod($testDir, 0333);
|
769 |
|
770 |
if (false === ($couldRead = is_readable($testDir))) {
|
vendor/symfony/finder/Tests/GnuFinderTest.php
CHANGED
@@ -19,12 +19,22 @@ use Symfony\Component\Finder\Finder;
|
|
19 |
*/
|
20 |
class GnuFinderTest extends FinderTest
|
21 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
protected function buildFinder()
|
23 |
{
|
24 |
$adapter = new GnuFindAdapter();
|
25 |
|
26 |
if (!$adapter->isSupported()) {
|
27 |
-
$this->markTestSkipped(get_class($adapter).' is not supported.');
|
28 |
}
|
29 |
|
30 |
return Finder::create()
|
19 |
*/
|
20 |
class GnuFinderTest extends FinderTest
|
21 |
{
|
22 |
+
public function testSymlinksNotResolved()
|
23 |
+
{
|
24 |
+
$this->markTestSkipped('Symlinks are always resolved using the GnuFinderAdapter.');
|
25 |
+
}
|
26 |
+
|
27 |
+
public function testBackPathNotNormalized()
|
28 |
+
{
|
29 |
+
$this->markTestSkipped('Paths are always normalized using the GnuFinderAdapter.');
|
30 |
+
}
|
31 |
+
|
32 |
protected function buildFinder()
|
33 |
{
|
34 |
$adapter = new GnuFindAdapter();
|
35 |
|
36 |
if (!$adapter->isSupported()) {
|
37 |
+
$this->markTestSkipped(\get_class($adapter).' is not supported.');
|
38 |
}
|
39 |
|
40 |
return Finder::create()
|
vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php
CHANGED
@@ -11,8 +11,8 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Tests\Iterator;
|
13 |
|
14 |
-
use Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
|
15 |
use Symfony\Component\Finder\Comparator\DateComparator;
|
|
|
16 |
|
17 |
class DateRangeFilterIteratorTest extends RealIteratorTestCase
|
18 |
{
|
11 |
|
12 |
namespace Symfony\Component\Finder\Tests\Iterator;
|
13 |
|
|
|
14 |
use Symfony\Component\Finder\Comparator\DateComparator;
|
15 |
+
use Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
|
16 |
|
17 |
class DateRangeFilterIteratorTest extends RealIteratorTestCase
|
18 |
{
|
vendor/symfony/finder/Tests/Iterator/FilePathsIteratorTest.php
CHANGED
@@ -41,30 +41,30 @@ class FilePathsIteratorTest extends RealIteratorTestCase
|
|
41 |
$tmpDir,
|
42 |
array(
|
43 |
// paths
|
44 |
-
$tmpDir
|
45 |
-
$tmpDir
|
46 |
-
$tmpDir
|
47 |
-
$tmpDir
|
48 |
-
$tmpDir
|
49 |
-
$tmpDir
|
50 |
),
|
51 |
array(
|
52 |
// subPaths
|
53 |
-
$tmpDir
|
54 |
-
$tmpDir
|
55 |
-
$tmpDir
|
56 |
-
$tmpDir
|
57 |
-
$tmpDir
|
58 |
-
$tmpDir
|
59 |
),
|
60 |
array(
|
61 |
// subPathnames
|
62 |
-
$tmpDir
|
63 |
-
$tmpDir
|
64 |
-
$tmpDir
|
65 |
-
$tmpDir
|
66 |
-
$tmpDir
|
67 |
-
$tmpDir
|
68 |
),
|
69 |
),
|
70 |
);
|
41 |
$tmpDir,
|
42 |
array(
|
43 |
// paths
|
44 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'.git' => $tmpDir.\DIRECTORY_SEPARATOR.'.git',
|
45 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'test.py' => $tmpDir.\DIRECTORY_SEPARATOR.'test.py',
|
46 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'foo' => $tmpDir.\DIRECTORY_SEPARATOR.'foo',
|
47 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'bar.tmp' => $tmpDir.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'bar.tmp',
|
48 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'test.php' => $tmpDir.\DIRECTORY_SEPARATOR.'test.php',
|
49 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'toto' => $tmpDir.\DIRECTORY_SEPARATOR.'toto',
|
50 |
),
|
51 |
array(
|
52 |
// subPaths
|
53 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'.git' => '',
|
54 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'test.py' => '',
|
55 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'foo' => '',
|
56 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'bar.tmp' => 'foo',
|
57 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'test.php' => '',
|
58 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'toto' => '',
|
59 |
),
|
60 |
array(
|
61 |
// subPathnames
|
62 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'.git' => '.git',
|
63 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'test.py' => 'test.py',
|
64 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'foo' => 'foo',
|
65 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'bar.tmp' => 'foo'.\DIRECTORY_SEPARATOR.'bar.tmp',
|
66 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'test.php' => 'test.php',
|
67 |
+
$tmpDir.\DIRECTORY_SEPARATOR.'toto' => 'toto',
|
68 |
),
|
69 |
),
|
70 |
);
|
vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php
CHANGED
@@ -19,9 +19,9 @@ abstract class IteratorTestCase extends TestCase
|
|
19 |
{
|
20 |
// set iterator_to_array $use_key to false to avoid values merge
|
21 |
// this made FinderTest::testAppendWithAnArray() fail with GnuFinderAdapter
|
22 |
-
$values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false));
|
23 |
|
24 |
-
$expected = array_map(function ($path) { return str_replace('/', DIRECTORY_SEPARATOR, $path); }, $expected);
|
25 |
|
26 |
sort($values);
|
27 |
sort($expected);
|
@@ -52,7 +52,7 @@ abstract class IteratorTestCase extends TestCase
|
|
52 |
|
53 |
foreach ($expected as $subarray) {
|
54 |
$temp = array();
|
55 |
-
while (count($values) && count($temp) < count($subarray)) {
|
56 |
$temp[] = array_shift($values);
|
57 |
}
|
58 |
sort($temp);
|
19 |
{
|
20 |
// set iterator_to_array $use_key to false to avoid values merge
|
21 |
// this made FinderTest::testAppendWithAnArray() fail with GnuFinderAdapter
|
22 |
+
$values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', \DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false));
|
23 |
|
24 |
+
$expected = array_map(function ($path) { return str_replace('/', \DIRECTORY_SEPARATOR, $path); }, $expected);
|
25 |
|
26 |
sort($values);
|
27 |
sort($expected);
|
52 |
|
53 |
foreach ($expected as $subarray) {
|
54 |
$temp = array();
|
55 |
+
while (\count($values) && \count($temp) < \count($subarray)) {
|
56 |
$temp[] = array_shift($values);
|
57 |
}
|
58 |
sort($temp);
|
vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php
CHANGED
@@ -13,9 +13,9 @@ namespace Symfony\Component\Finder\Tests\Iterator;
|
|
13 |
|
14 |
class MockSplFileInfo extends \SplFileInfo
|
15 |
{
|
16 |
-
const
|
17 |
-
const
|
18 |
-
const
|
19 |
|
20 |
private $contents = null;
|
21 |
private $mode = null;
|
@@ -25,16 +25,16 @@ class MockSplFileInfo extends \SplFileInfo
|
|
25 |
|
26 |
public function __construct($param)
|
27 |
{
|
28 |
-
if (is_string($param)) {
|
29 |
parent::__construct($param);
|
30 |
-
} elseif (is_array($param)) {
|
31 |
$defaults = array(
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
);
|
39 |
$defaults = array_merge($defaults, $param);
|
40 |
parent::__construct($defaults['name']);
|
@@ -92,7 +92,7 @@ class MockSplFileInfo extends \SplFileInfo
|
|
92 |
|
93 |
public function setType($type)
|
94 |
{
|
95 |
-
if (is_string($type)) {
|
96 |
switch ($type) {
|
97 |
case 'directory':
|
98 |
case 'd':
|
13 |
|
14 |
class MockSplFileInfo extends \SplFileInfo
|
15 |
{
|
16 |
+
const TYPE_DIRECTORY = 1;
|
17 |
+
const TYPE_FILE = 2;
|
18 |
+
const TYPE_UNKNOWN = 3;
|
19 |
|
20 |
private $contents = null;
|
21 |
private $mode = null;
|
25 |
|
26 |
public function __construct($param)
|
27 |
{
|
28 |
+
if (\is_string($param)) {
|
29 |
parent::__construct($param);
|
30 |
+
} elseif (\is_array($param)) {
|
31 |
$defaults = array(
|
32 |
+
'name' => 'file.txt',
|
33 |
+
'contents' => null,
|
34 |
+
'mode' => null,
|
35 |
+
'type' => null,
|
36 |
+
'relativePath' => null,
|
37 |
+
'relativePathname' => null,
|
38 |
);
|
39 |
$defaults = array_merge($defaults, $param);
|
40 |
parent::__construct($defaults['name']);
|
92 |
|
93 |
public function setType($type)
|
94 |
{
|
95 |
+
if (\is_string($type)) {
|
96 |
switch ($type) {
|
97 |
case 'directory':
|
98 |
case 'd':
|
vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php
CHANGED
@@ -31,37 +31,37 @@ class PathFilterIteratorTest extends IteratorTestCase
|
|
31 |
//PATH: A/B/C/abc.dat
|
32 |
$inner[] = new MockSplFileInfo(array(
|
33 |
'name' => 'abc.dat',
|
34 |
-
'relativePathname' => 'A'
|
35 |
));
|
36 |
|
37 |
//PATH: A/B/ab.dat
|
38 |
$inner[] = new MockSplFileInfo(array(
|
39 |
'name' => 'ab.dat',
|
40 |
-
'relativePathname' => 'A'
|
41 |
));
|
42 |
|
43 |
//PATH: A/a.dat
|
44 |
$inner[] = new MockSplFileInfo(array(
|
45 |
'name' => 'a.dat',
|
46 |
-
'relativePathname' => 'A'
|
47 |
));
|
48 |
|
49 |
//PATH: copy/A/B/C/abc.dat.copy
|
50 |
$inner[] = new MockSplFileInfo(array(
|
51 |
'name' => 'abc.dat.copy',
|
52 |
-
'relativePathname' => 'copy'
|
53 |
));
|
54 |
|
55 |
//PATH: copy/A/B/ab.dat.copy
|
56 |
$inner[] = new MockSplFileInfo(array(
|
57 |
'name' => 'ab.dat.copy',
|
58 |
-
'relativePathname' => 'copy'
|
59 |
));
|
60 |
|
61 |
//PATH: copy/A/a.dat.copy
|
62 |
$inner[] = new MockSplFileInfo(array(
|
63 |
'name' => 'a.dat.copy',
|
64 |
-
'relativePathname' => 'copy'
|
65 |
));
|
66 |
|
67 |
return array(
|
31 |
//PATH: A/B/C/abc.dat
|
32 |
$inner[] = new MockSplFileInfo(array(
|
33 |
'name' => 'abc.dat',
|
34 |
+
'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
|
35 |
));
|
36 |
|
37 |
//PATH: A/B/ab.dat
|
38 |
$inner[] = new MockSplFileInfo(array(
|
39 |
'name' => 'ab.dat',
|
40 |
+
'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat',
|
41 |
));
|
42 |
|
43 |
//PATH: A/a.dat
|
44 |
$inner[] = new MockSplFileInfo(array(
|
45 |
'name' => 'a.dat',
|
46 |
+
'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'a.dat',
|
47 |
));
|
48 |
|
49 |
//PATH: copy/A/B/C/abc.dat.copy
|
50 |
$inner[] = new MockSplFileInfo(array(
|
51 |
'name' => 'abc.dat.copy',
|
52 |
+
'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat',
|
53 |
));
|
54 |
|
55 |
//PATH: copy/A/B/ab.dat.copy
|
56 |
$inner[] = new MockSplFileInfo(array(
|
57 |
'name' => 'ab.dat.copy',
|
58 |
+
'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat',
|
59 |
));
|
60 |
|
61 |
//PATH: copy/A/a.dat.copy
|
62 |
$inner[] = new MockSplFileInfo(array(
|
63 |
'name' => 'a.dat.copy',
|
64 |
+
'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'a.dat',
|
65 |
));
|
66 |
|
67 |
return array(
|
vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php
CHANGED
@@ -18,7 +18,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase
|
|
18 |
|
19 |
public static function setUpBeforeClass()
|
20 |
{
|
21 |
-
self::$tmpDir = realpath(sys_get_temp_dir())
|
22 |
|
23 |
self::$files = array(
|
24 |
'.git/',
|
@@ -44,7 +44,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase
|
|
44 |
}
|
45 |
|
46 |
foreach (self::$files as $file) {
|
47 |
-
if (DIRECTORY_SEPARATOR === $file[strlen($file) - 1]) {
|
48 |
mkdir($file);
|
49 |
} else {
|
50 |
touch($file);
|
@@ -60,11 +60,20 @@ abstract class RealIteratorTestCase extends IteratorTestCase
|
|
60 |
|
61 |
public static function tearDownAfterClass()
|
62 |
{
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
} else {
|
67 |
-
@unlink($
|
68 |
}
|
69 |
}
|
70 |
}
|
@@ -75,24 +84,24 @@ abstract class RealIteratorTestCase extends IteratorTestCase
|
|
75 |
* Without the call to setUpBeforeClass() property can be null.
|
76 |
*/
|
77 |
if (!self::$tmpDir) {
|
78 |
-
self::$tmpDir = realpath(sys_get_temp_dir())
|
79 |
}
|
80 |
|
81 |
-
if (is_array($files)) {
|
82 |
$f = array();
|
83 |
foreach ($files as $file) {
|
84 |
-
if (is_array($file)) {
|
85 |
$f[] = self::toAbsolute($file);
|
86 |
} else {
|
87 |
-
$f[] = self::$tmpDir
|
88 |
}
|
89 |
}
|
90 |
|
91 |
return $f;
|
92 |
}
|
93 |
|
94 |
-
if (is_string($files)) {
|
95 |
-
return self::$tmpDir
|
96 |
}
|
97 |
|
98 |
return self::$tmpDir;
|
@@ -102,7 +111,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase
|
|
102 |
{
|
103 |
$f = array();
|
104 |
foreach ($files as $file) {
|
105 |
-
$f[] = realpath(__DIR__
|
106 |
}
|
107 |
|
108 |
return $f;
|
18 |
|
19 |
public static function setUpBeforeClass()
|
20 |
{
|
21 |
+
self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder';
|
22 |
|
23 |
self::$files = array(
|
24 |
'.git/',
|
44 |
}
|
45 |
|
46 |
foreach (self::$files as $file) {
|
47 |
+
if (\DIRECTORY_SEPARATOR === $file[\strlen($file) - 1]) {
|
48 |
mkdir($file);
|
49 |
} else {
|
50 |
touch($file);
|
60 |
|
61 |
public static function tearDownAfterClass()
|
62 |
{
|
63 |
+
$paths = new \RecursiveIteratorIterator(
|
64 |
+
new \RecursiveDirectoryIterator(self::$tmpDir, \RecursiveDirectoryIterator::SKIP_DOTS),
|
65 |
+
\RecursiveIteratorIterator::CHILD_FIRST
|
66 |
+
);
|
67 |
+
|
68 |
+
foreach ($paths as $path) {
|
69 |
+
if ($path->isDir()) {
|
70 |
+
if ($path->isLink()) {
|
71 |
+
@unlink($path);
|
72 |
+
} else {
|
73 |
+
@rmdir($path);
|
74 |
+
}
|
75 |
} else {
|
76 |
+
@unlink($path);
|
77 |
}
|
78 |
}
|
79 |
}
|
84 |
* Without the call to setUpBeforeClass() property can be null.
|
85 |
*/
|
86 |
if (!self::$tmpDir) {
|
87 |
+
self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder';
|
88 |
}
|
89 |
|
90 |
+
if (\is_array($files)) {
|
91 |
$f = array();
|
92 |
foreach ($files as $file) {
|
93 |
+
if (\is_array($file)) {
|
94 |
$f[] = self::toAbsolute($file);
|
95 |
} else {
|
96 |
+
$f[] = self::$tmpDir.\DIRECTORY_SEPARATOR.str_replace('/', \DIRECTORY_SEPARATOR, $file);
|
97 |
}
|
98 |
}
|
99 |
|
100 |
return $f;
|
101 |
}
|
102 |
|
103 |
+
if (\is_string($files)) {
|
104 |
+
return self::$tmpDir.\DIRECTORY_SEPARATOR.str_replace('/', \DIRECTORY_SEPARATOR, $files);
|
105 |
}
|
106 |
|
107 |
return self::$tmpDir;
|
111 |
{
|
112 |
$f = array();
|
113 |
foreach ($files as $file) {
|
114 |
+
$f[] = realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.$file);
|
115 |
}
|
116 |
|
117 |
return $f;
|
vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php
CHANGED
@@ -43,8 +43,8 @@ class RecursiveDirectoryIteratorTest extends IteratorTestCase
|
|
43 |
}
|
44 |
|
45 |
$contains = array(
|
46 |
-
'ftp://speedtest.tele2.net'
|
47 |
-
'ftp://speedtest.tele2.net'
|
48 |
);
|
49 |
$actual = array();
|
50 |
|
43 |
}
|
44 |
|
45 |
$contains = array(
|
46 |
+
'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'1000GB.zip',
|
47 |
+
'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'100GB.zip',
|
48 |
);
|
49 |
$actual = array();
|
50 |
|
vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php
CHANGED
@@ -11,8 +11,8 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Finder\Tests\Iterator;
|
13 |
|
14 |
-
use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
|
15 |
use Symfony\Component\Finder\Comparator\NumberComparator;
|
|
|
16 |
|
17 |
class SizeRangeFilterIteratorTest extends RealIteratorTestCase
|
18 |
{
|
11 |
|
12 |
namespace Symfony\Component\Finder\Tests\Iterator;
|
13 |
|
|
|
14 |
use Symfony\Component\Finder\Comparator\NumberComparator;
|
15 |
+
use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
|
16 |
|
17 |
class SizeRangeFilterIteratorTest extends RealIteratorTestCase
|
18 |
{
|
vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php
CHANGED
@@ -30,10 +30,10 @@ class SortableIteratorTest extends RealIteratorTestCase
|
|
30 |
*/
|
31 |
public function testAccept($mode, $expected)
|
32 |
{
|
33 |
-
if (
|
34 |
switch ($mode) {
|
35 |
case SortableIterator::SORT_BY_ACCESSED_TIME:
|
36 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
37 |
touch(self::toAbsolute('.git'));
|
38 |
} else {
|
39 |
file_get_contents(self::toAbsolute('.git'));
|
@@ -58,11 +58,11 @@ class SortableIteratorTest extends RealIteratorTestCase
|
|
58 |
|
59 |
$iterator = new SortableIterator($inner, $mode);
|
60 |
|
61 |
-
if (
|
62 |
-
||
|
63 |
-
||
|
64 |
) {
|
65 |
-
if ('\\' === DIRECTORY_SEPARATOR && SortableIterator::SORT_BY_MODIFIED_TIME !== $mode) {
|
66 |
$this->markTestSkipped('Sorting by atime or ctime is not supported on Windows');
|
67 |
}
|
68 |
$this->assertOrderedIteratorForGroups($expected, $iterator);
|
30 |
*/
|
31 |
public function testAccept($mode, $expected)
|
32 |
{
|
33 |
+
if (!\is_callable($mode)) {
|
34 |
switch ($mode) {
|
35 |
case SortableIterator::SORT_BY_ACCESSED_TIME:
|
36 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
37 |
touch(self::toAbsolute('.git'));
|
38 |
} else {
|
39 |
file_get_contents(self::toAbsolute('.git'));
|
58 |
|
59 |
$iterator = new SortableIterator($inner, $mode);
|
60 |
|
61 |
+
if (SortableIterator::SORT_BY_ACCESSED_TIME === $mode
|
62 |
+
|| SortableIterator::SORT_BY_CHANGED_TIME === $mode
|
63 |
+
|| SortableIterator::SORT_BY_MODIFIED_TIME === $mode
|
64 |
) {
|
65 |
+
if ('\\' === \DIRECTORY_SEPARATOR && SortableIterator::SORT_BY_MODIFIED_TIME !== $mode) {
|
66 |
$this->markTestSkipped('Sorting by atime or ctime is not supported on Windows');
|
67 |
}
|
68 |
$this->assertOrderedIteratorForGroups($expected, $iterator);
|
vendor/symfony/finder/Tests/PhpFinderTest.php
CHANGED
@@ -24,11 +24,11 @@ class PhpFinderTest extends FinderTest
|
|
24 |
$adapterReflector = new \ReflectionMethod('Symfony\Component\Finder\Adapter\PhpAdapter', 'searchInDirectory');
|
25 |
$finderReflector = new \ReflectionMethod('Symfony\Component\Finder\Finder', 'searchInDirectory');
|
26 |
|
27 |
-
$adapterSource = array_slice(file($adapterReflector->getFileName()), $adapterReflector->getStartLine() + 1, $adapterReflector->getEndLine() - $adapterReflector->getStartLine() - 1);
|
28 |
$adapterSource = implode('', $adapterSource);
|
29 |
$adapterSource = str_replace(array('$this->minDepth', '$this->maxDepth'), array('$minDepth', '$maxDepth'), $adapterSource);
|
30 |
|
31 |
-
$finderSource = array_slice(file($finderReflector->getFileName()), $finderReflector->getStartLine() + 1, $finderReflector->getEndLine() - $finderReflector->getStartLine() - 1);
|
32 |
$finderSource = implode('', $finderSource);
|
33 |
|
34 |
$this->assertStringEndsWith($adapterSource, $finderSource);
|
24 |
$adapterReflector = new \ReflectionMethod('Symfony\Component\Finder\Adapter\PhpAdapter', 'searchInDirectory');
|
25 |
$finderReflector = new \ReflectionMethod('Symfony\Component\Finder\Finder', 'searchInDirectory');
|
26 |
|
27 |
+
$adapterSource = \array_slice(file($adapterReflector->getFileName()), $adapterReflector->getStartLine() + 1, $adapterReflector->getEndLine() - $adapterReflector->getStartLine() - 1);
|
28 |
$adapterSource = implode('', $adapterSource);
|
29 |
$adapterSource = str_replace(array('$this->minDepth', '$this->maxDepth'), array('$minDepth', '$maxDepth'), $adapterSource);
|
30 |
|
31 |
+
$finderSource = \array_slice(file($finderReflector->getFileName()), $finderReflector->getStartLine() + 1, $finderReflector->getEndLine() - $finderReflector->getStartLine() - 1);
|
32 |
$finderSource = implode('', $finderSource);
|
33 |
|
34 |
$this->assertStringEndsWith($adapterSource, $finderSource);
|
vendor/symfony/finder/phpunit.xml.dist
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
3 |
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4 |
-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/
|
5 |
backupGlobals="false"
|
6 |
colors="true"
|
7 |
bootstrap="vendor/autoload.php"
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
3 |
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4 |
+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
|
5 |
backupGlobals="false"
|
6 |
colors="true"
|
7 |
bootstrap="vendor/autoload.php"
|
vendor/symfony/process/Exception/ProcessTimedOutException.php
CHANGED
@@ -45,12 +45,12 @@ class ProcessTimedOutException extends RuntimeException
|
|
45 |
|
46 |
public function isGeneralTimeout()
|
47 |
{
|
48 |
-
return $this->timeoutType
|
49 |
}
|
50 |
|
51 |
public function isIdleTimeout()
|
52 |
{
|
53 |
-
return $this->timeoutType
|
54 |
}
|
55 |
|
56 |
public function getExceededTimeout()
|
45 |
|
46 |
public function isGeneralTimeout()
|
47 |
{
|
48 |
+
return self::TYPE_GENERAL === $this->timeoutType;
|
49 |
}
|
50 |
|
51 |
public function isIdleTimeout()
|
52 |
{
|
53 |
+
return self::TYPE_IDLE === $this->timeoutType;
|
54 |
}
|
55 |
|
56 |
public function getExceededTimeout()
|
vendor/symfony/process/ExecutableFinder.php
CHANGED
@@ -23,8 +23,6 @@ class ExecutableFinder
|
|
23 |
|
24 |
/**
|
25 |
* Replaces default suffixes of executable.
|
26 |
-
*
|
27 |
-
* @param array $suffixes
|
28 |
*/
|
29 |
public function setSuffixes(array $suffixes)
|
30 |
{
|
@@ -73,13 +71,13 @@ class ExecutableFinder
|
|
73 |
}
|
74 |
|
75 |
$suffixes = array('');
|
76 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
77 |
$pathExt = getenv('PATHEXT');
|
78 |
-
$suffixes = array_merge($
|
79 |
}
|
80 |
foreach ($suffixes as $suffix) {
|
81 |
foreach ($dirs as $dir) {
|
82 |
-
if (@is_file($file = $dir
|
83 |
return $file;
|
84 |
}
|
85 |
}
|
23 |
|
24 |
/**
|
25 |
* Replaces default suffixes of executable.
|
|
|
|
|
26 |
*/
|
27 |
public function setSuffixes(array $suffixes)
|
28 |
{
|
71 |
}
|
72 |
|
73 |
$suffixes = array('');
|
74 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
75 |
$pathExt = getenv('PATHEXT');
|
76 |
+
$suffixes = array_merge($pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes, $suffixes);
|
77 |
}
|
78 |
foreach ($suffixes as $suffix) {
|
79 |
foreach ($dirs as $dir) {
|
80 |
+
if (@is_file($file = $dir.\DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === \DIRECTORY_SEPARATOR || @is_executable($file))) {
|
81 |
return $file;
|
82 |
}
|
83 |
}
|
vendor/symfony/process/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
Copyright (c) 2004-
|
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
|
1 |
+
Copyright (c) 2004-2018 Fabien Potencier
|
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
|
vendor/symfony/process/PhpExecutableFinder.php
CHANGED
@@ -39,17 +39,17 @@ class PhpExecutableFinder
|
|
39 |
$args = $includeArgs && $args ? ' '.implode(' ', $args) : '';
|
40 |
|
41 |
// HHVM support
|
42 |
-
if (defined('HHVM_VERSION')) {
|
43 |
return (getenv('PHP_BINARY') ?: PHP_BINARY).$args;
|
44 |
}
|
45 |
|
46 |
// PHP_BINARY return the current sapi executable
|
47 |
-
if (defined('PHP_BINARY') && PHP_BINARY && in_array(PHP_SAPI, array('cli', 'cli-server', 'phpdbg')
|
48 |
return PHP_BINARY.$args;
|
49 |
}
|
50 |
|
51 |
if ($php = getenv('PHP_PATH')) {
|
52 |
-
if (
|
53 |
return false;
|
54 |
}
|
55 |
|
@@ -57,13 +57,17 @@ class PhpExecutableFinder
|
|
57 |
}
|
58 |
|
59 |
if ($php = getenv('PHP_PEAR_PHP_BIN')) {
|
60 |
-
if (is_executable($php)) {
|
61 |
return $php;
|
62 |
}
|
63 |
}
|
64 |
|
|
|
|
|
|
|
|
|
65 |
$dirs = array(PHP_BINDIR);
|
66 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
67 |
$dirs[] = 'C:\xampp\php\\';
|
68 |
}
|
69 |
|
@@ -79,9 +83,9 @@ class PhpExecutableFinder
|
|
79 |
{
|
80 |
$arguments = array();
|
81 |
|
82 |
-
if (defined('HHVM_VERSION')) {
|
83 |
$arguments[] = '--php';
|
84 |
-
} elseif ('phpdbg' === PHP_SAPI) {
|
85 |
$arguments[] = '-qrr';
|
86 |
}
|
87 |
|
39 |
$args = $includeArgs && $args ? ' '.implode(' ', $args) : '';
|
40 |
|
41 |
// HHVM support
|
42 |
+
if (\defined('HHVM_VERSION')) {
|
43 |
return (getenv('PHP_BINARY') ?: PHP_BINARY).$args;
|
44 |
}
|
45 |
|
46 |
// PHP_BINARY return the current sapi executable
|
47 |
+
if (\defined('PHP_BINARY') && PHP_BINARY && \in_array(\PHP_SAPI, array('cli', 'cli-server', 'phpdbg'), true)) {
|
48 |
return PHP_BINARY.$args;
|
49 |
}
|
50 |
|
51 |
if ($php = getenv('PHP_PATH')) {
|
52 |
+
if (!@is_executable($php)) {
|
53 |
return false;
|
54 |
}
|
55 |
|
57 |
}
|
58 |
|
59 |
if ($php = getenv('PHP_PEAR_PHP_BIN')) {
|
60 |
+
if (@is_executable($php)) {
|
61 |
return $php;
|
62 |
}
|
63 |
}
|
64 |
|
65 |
+
if (@is_executable($php = PHP_BINDIR.('\\' === \DIRECTORY_SEPARATOR ? '\\php.exe' : '/php'))) {
|
66 |
+
return $php;
|
67 |
+
}
|
68 |
+
|
69 |
$dirs = array(PHP_BINDIR);
|
70 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
71 |
$dirs[] = 'C:\xampp\php\\';
|
72 |
}
|
73 |
|
83 |
{
|
84 |
$arguments = array();
|
85 |
|
86 |
+
if (\defined('HHVM_VERSION')) {
|
87 |
$arguments[] = '--php';
|
88 |
+
} elseif ('phpdbg' === \PHP_SAPI) {
|
89 |
$arguments[] = '-qrr';
|
90 |
}
|
91 |
|
vendor/symfony/process/PhpProcess.php
CHANGED
@@ -16,17 +16,15 @@ use Symfony\Component\Process\Exception\RuntimeException;
|
|
16 |
/**
|
17 |
* PhpProcess runs a PHP script in an independent process.
|
18 |
*
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
*
|
23 |
* @author Fabien Potencier <fabien@symfony.com>
|
24 |
*/
|
25 |
class PhpProcess extends Process
|
26 |
{
|
27 |
/**
|
28 |
-
* Constructor.
|
29 |
-
*
|
30 |
* @param string $script The PHP script to run (as a string)
|
31 |
* @param string|null $cwd The working directory or null to use the working dir of the current PHP process
|
32 |
* @param array|null $env The environment variables or null to use the same environment as the current PHP process
|
@@ -39,14 +37,14 @@ class PhpProcess extends Process
|
|
39 |
if (false === $php = $executableFinder->find()) {
|
40 |
$php = null;
|
41 |
}
|
42 |
-
if ('phpdbg' === PHP_SAPI) {
|
43 |
$file = tempnam(sys_get_temp_dir(), 'dbg');
|
44 |
file_put_contents($file, $script);
|
45 |
register_shutdown_function('unlink', $file);
|
46 |
$php .= ' '.ProcessUtils::escapeArgument($file);
|
47 |
$script = null;
|
48 |
}
|
49 |
-
if ('\\' !== DIRECTORY_SEPARATOR && null !== $php) {
|
50 |
// exec is mandatory to deal with sending a signal to the process
|
51 |
// see https://github.com/symfony/symfony/issues/5030 about prepending
|
52 |
// command with exec
|
16 |
/**
|
17 |
* PhpProcess runs a PHP script in an independent process.
|
18 |
*
|
19 |
+
* $p = new PhpProcess('<?php echo "foo"; ?>');
|
20 |
+
* $p->run();
|
21 |
+
* print $p->getOutput()."\n";
|
22 |
*
|
23 |
* @author Fabien Potencier <fabien@symfony.com>
|
24 |
*/
|
25 |
class PhpProcess extends Process
|
26 |
{
|
27 |
/**
|
|
|
|
|
28 |
* @param string $script The PHP script to run (as a string)
|
29 |
* @param string|null $cwd The working directory or null to use the working dir of the current PHP process
|
30 |
* @param array|null $env The environment variables or null to use the same environment as the current PHP process
|
37 |
if (false === $php = $executableFinder->find()) {
|
38 |
$php = null;
|
39 |
}
|
40 |
+
if ('phpdbg' === \PHP_SAPI) {
|
41 |
$file = tempnam(sys_get_temp_dir(), 'dbg');
|
42 |
file_put_contents($file, $script);
|
43 |
register_shutdown_function('unlink', $file);
|
44 |
$php .= ' '.ProcessUtils::escapeArgument($file);
|
45 |
$script = null;
|
46 |
}
|
47 |
+
if ('\\' !== \DIRECTORY_SEPARATOR && null !== $php) {
|
48 |
// exec is mandatory to deal with sending a signal to the process
|
49 |
// see https://github.com/symfony/symfony/issues/5030 about prepending
|
50 |
// command with exec
|
vendor/symfony/process/Pipes/AbstractPipes.php
CHANGED
@@ -18,21 +18,21 @@ namespace Symfony\Component\Process\Pipes;
|
|
18 |
*/
|
19 |
abstract class AbstractPipes implements PipesInterface
|
20 |
{
|
21 |
-
/** @var array */
|
22 |
public $pipes = array();
|
23 |
|
24 |
-
/** @var string */
|
25 |
private $inputBuffer = '';
|
26 |
-
/** @var resource|null */
|
27 |
private $input;
|
28 |
-
/** @var bool */
|
29 |
private $blocked = true;
|
|
|
30 |
|
|
|
|
|
|
|
31 |
public function __construct($input)
|
32 |
{
|
33 |
-
if (is_resource($input)) {
|
34 |
$this->input = $input;
|
35 |
-
} elseif (is_string($input)) {
|
36 |
$this->inputBuffer = $input;
|
37 |
} else {
|
38 |
$this->inputBuffer = (string) $input;
|
@@ -57,10 +57,11 @@ abstract class AbstractPipes implements PipesInterface
|
|
57 |
*/
|
58 |
protected function hasSystemCallBeenInterrupted()
|
59 |
{
|
60 |
-
$lastError =
|
|
|
61 |
|
62 |
// stream_select returns false when the `select` system call is interrupted by an incoming signal
|
63 |
-
return
|
64 |
}
|
65 |
|
66 |
/**
|
@@ -95,7 +96,7 @@ abstract class AbstractPipes implements PipesInterface
|
|
95 |
$w = array($this->pipes[0]);
|
96 |
|
97 |
// let's have a look if something changed in streams
|
98 |
-
if (false ===
|
99 |
return;
|
100 |
}
|
101 |
|
@@ -138,4 +139,12 @@ abstract class AbstractPipes implements PipesInterface
|
|
138 |
return array($this->pipes[0]);
|
139 |
}
|
140 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
18 |
*/
|
19 |
abstract class AbstractPipes implements PipesInterface
|
20 |
{
|
|
|
21 |
public $pipes = array();
|
22 |
|
|
|
23 |
private $inputBuffer = '';
|
|
|
24 |
private $input;
|
|
|
25 |
private $blocked = true;
|
26 |
+
private $lastError;
|
27 |
|
28 |
+
/**
|
29 |
+
* @param resource|null $input
|
30 |
+
*/
|
31 |
public function __construct($input)
|
32 |
{
|
33 |
+
if (\is_resource($input)) {
|
34 |
$this->input = $input;
|
35 |
+
} elseif (\is_string($input)) {
|
36 |
$this->inputBuffer = $input;
|
37 |
} else {
|
38 |
$this->inputBuffer = (string) $input;
|
57 |
*/
|
58 |
protected function hasSystemCallBeenInterrupted()
|
59 |
{
|
60 |
+
$lastError = $this->lastError;
|
61 |
+
$this->lastError = null;
|
62 |
|
63 |
// stream_select returns false when the `select` system call is interrupted by an incoming signal
|
64 |
+
return null !== $lastError && false !== stripos($lastError, 'interrupted system call');
|
65 |
}
|
66 |
|
67 |
/**
|
96 |
$w = array($this->pipes[0]);
|
97 |
|
98 |
// let's have a look if something changed in streams
|
99 |
+
if (false === @stream_select($r, $w, $e, 0, 0)) {
|
100 |
return;
|
101 |
}
|
102 |
|
139 |
return array($this->pipes[0]);
|
140 |
}
|
141 |
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* @internal
|
145 |
+
*/
|
146 |
+
public function handleError($type, $msg)
|
147 |
+
{
|
148 |
+
$this->lastError = $msg;
|
149 |
+
}
|
150 |
}
|
vendor/symfony/process/Pipes/UnixPipes.php
CHANGED
@@ -22,11 +22,8 @@ use Symfony\Component\Process\Process;
|
|
22 |
*/
|
23 |
class UnixPipes extends AbstractPipes
|
24 |
{
|
25 |
-
/** @var bool */
|
26 |
private $ttyMode;
|
27 |
-
/** @var bool */
|
28 |
private $ptyMode;
|
29 |
-
/** @var bool */
|
30 |
private $disableOutput;
|
31 |
|
32 |
public function __construct($ttyMode, $ptyMode, $input, $disableOutput)
|
@@ -102,7 +99,9 @@ class UnixPipes extends AbstractPipes
|
|
102 |
unset($r[0]);
|
103 |
|
104 |
// let's have a look if something changed in streams
|
105 |
-
|
|
|
|
|
106 |
// if a system call has been interrupted, forget about it, let's try again
|
107 |
// otherwise, an error occurred, let's reset pipes
|
108 |
if (!$this->hasSystemCallBeenInterrupted()) {
|
@@ -111,6 +110,7 @@ class UnixPipes extends AbstractPipes
|
|
111 |
|
112 |
return $read;
|
113 |
}
|
|
|
114 |
|
115 |
foreach ($r as $pipe) {
|
116 |
// prior PHP 5.4 the array passed to stream_select is modified and
|
22 |
*/
|
23 |
class UnixPipes extends AbstractPipes
|
24 |
{
|
|
|
25 |
private $ttyMode;
|
|
|
26 |
private $ptyMode;
|
|
|
27 |
private $disableOutput;
|
28 |
|
29 |
public function __construct($ttyMode, $ptyMode, $input, $disableOutput)
|
99 |
unset($r[0]);
|
100 |
|
101 |
// let's have a look if something changed in streams
|
102 |
+
set_error_handler(array($this, 'handleError'));
|
103 |
+
if (($r || $w) && false === stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) {
|
104 |
+
restore_error_handler();
|
105 |
// if a system call has been interrupted, forget about it, let's try again
|
106 |
// otherwise, an error occurred, let's reset pipes
|
107 |
if (!$this->hasSystemCallBeenInterrupted()) {
|
110 |
|
111 |
return $read;
|
112 |
}
|
113 |
+
restore_error_handler();
|
114 |
|
115 |
foreach ($r as $pipe) {
|
116 |
// prior PHP 5.4 the array passed to stream_select is modified and
|
vendor/symfony/process/Pipes/WindowsPipes.php
CHANGED
@@ -11,8 +11,8 @@
|
|
11 |
|
12 |
namespace Symfony\Component\Process\Pipes;
|
13 |
|
14 |
-
use Symfony\Component\Process\Process;
|
15 |
use Symfony\Component\Process\Exception\RuntimeException;
|
|
|
16 |
|
17 |
/**
|
18 |
* WindowsPipes implementation uses temporary files as handles.
|
@@ -26,16 +26,13 @@ use Symfony\Component\Process\Exception\RuntimeException;
|
|
26 |
*/
|
27 |
class WindowsPipes extends AbstractPipes
|
28 |
{
|
29 |
-
/** @var array */
|
30 |
private $files = array();
|
31 |
-
/** @var array */
|
32 |
private $fileHandles = array();
|
33 |
-
|
34 |
private $readBytes = array(
|
35 |
Process::STDOUT => 0,
|
36 |
Process::STDERR => 0,
|
37 |
);
|
38 |
-
/** @var bool */
|
39 |
private $disableOutput;
|
40 |
|
41 |
public function __construct($disableOutput, $input)
|
@@ -51,31 +48,33 @@ class WindowsPipes extends AbstractPipes
|
|
51 |
Process::STDOUT => Process::OUT,
|
52 |
Process::STDERR => Process::ERR,
|
53 |
);
|
54 |
-
$tmpCheck = false;
|
55 |
$tmpDir = sys_get_temp_dir();
|
56 |
$lastError = 'unknown reason';
|
57 |
set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; });
|
58 |
for ($i = 0;; ++$i) {
|
59 |
foreach ($pipes as $pipe => $name) {
|
60 |
$file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name);
|
61 |
-
|
62 |
-
|
63 |
-
}
|
64 |
-
$h = fopen($file, 'xb');
|
65 |
-
if (!$h) {
|
66 |
-
$error = $lastError;
|
67 |
-
if ($tmpCheck || $tmpCheck = unlink(tempnam(false, 'sf_check_'))) {
|
68 |
-
continue;
|
69 |
-
}
|
70 |
restore_error_handler();
|
71 |
-
throw new RuntimeException(sprintf('A temporary file could not be opened to write the process output: %s', $
|
72 |
}
|
73 |
-
if (
|
74 |
continue 2;
|
75 |
}
|
76 |
-
if (isset($this->
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
|
|
79 |
$this->files[$pipe] = $file;
|
80 |
}
|
81 |
break;
|
@@ -89,7 +88,6 @@ class WindowsPipes extends AbstractPipes
|
|
89 |
public function __destruct()
|
90 |
{
|
91 |
$this->close();
|
92 |
-
$this->removeFiles();
|
93 |
}
|
94 |
|
95 |
/**
|
@@ -145,12 +143,15 @@ class WindowsPipes extends AbstractPipes
|
|
145 |
$data = stream_get_contents($fileHandle, -1, $this->readBytes[$type]);
|
146 |
|
147 |
if (isset($data[0])) {
|
148 |
-
$this->readBytes[$type] += strlen($data);
|
149 |
$read[$type] = $data;
|
150 |
}
|
151 |
if ($close) {
|
|
|
152 |
fclose($fileHandle);
|
153 |
-
|
|
|
|
|
154 |
}
|
155 |
}
|
156 |
|
@@ -171,10 +172,13 @@ class WindowsPipes extends AbstractPipes
|
|
171 |
public function close()
|
172 |
{
|
173 |
parent::close();
|
174 |
-
foreach ($this->fileHandles as $handle) {
|
|
|
175 |
fclose($handle);
|
|
|
|
|
176 |
}
|
177 |
-
$this->fileHandles = array();
|
178 |
}
|
179 |
|
180 |
/**
|
@@ -189,17 +193,4 @@ class WindowsPipes extends AbstractPipes
|
|
189 |
{
|
190 |
return new static($process->isOutputDisabled(), $input);
|
191 |
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Removes temporary files.
|
195 |
-
*/
|
196 |
-
private function removeFiles()
|
197 |
-
{
|
198 |
-
foreach ($this->files as $filename) {
|
199 |
-
if (file_exists($filename)) {
|
200 |
-
@unlink($filename);
|
201 |
-
}
|
202 |
-
}
|
203 |
-
$this->files = array();
|
204 |
-
}
|
205 |
}
|
11 |
|
12 |
namespace Symfony\Component\Process\Pipes;
|
13 |
|
|
|
14 |
use Symfony\Component\Process\Exception\RuntimeException;
|
15 |
+
use Symfony\Component\Process\Process;
|
16 |
|
17 |
/**
|
18 |
* WindowsPipes implementation uses temporary files as handles.
|
26 |
*/
|
27 |
class WindowsPipes extends AbstractPipes
|
28 |
{
|
|
|
29 |
private $files = array();
|
|
|
30 |
private $fileHandles = array();
|
31 |
+
private $lockHandles = array();
|
32 |
private $readBytes = array(
|
33 |
Process::STDOUT => 0,
|
34 |
Process::STDERR => 0,
|
35 |
);
|
|
|
36 |
private $disableOutput;
|
37 |
|
38 |
public function __construct($disableOutput, $input)
|
48 |
Process::STDOUT => Process::OUT,
|
49 |
Process::STDERR => Process::ERR,
|
50 |
);
|
|
|
51 |
$tmpDir = sys_get_temp_dir();
|
52 |
$lastError = 'unknown reason';
|
53 |
set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; });
|
54 |
for ($i = 0;; ++$i) {
|
55 |
foreach ($pipes as $pipe => $name) {
|
56 |
$file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name);
|
57 |
+
|
58 |
+
if (!$h = fopen($file.'.lock', 'w')) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
restore_error_handler();
|
60 |
+
throw new RuntimeException(sprintf('A temporary file could not be opened to write the process output: %s', $lastError));
|
61 |
}
|
62 |
+
if (!flock($h, LOCK_EX | LOCK_NB)) {
|
63 |
continue 2;
|
64 |
}
|
65 |
+
if (isset($this->lockHandles[$pipe])) {
|
66 |
+
flock($this->lockHandles[$pipe], LOCK_UN);
|
67 |
+
fclose($this->lockHandles[$pipe]);
|
68 |
+
}
|
69 |
+
$this->lockHandles[$pipe] = $h;
|
70 |
+
|
71 |
+
if (!fclose(fopen($file, 'w')) || !$h = fopen($file, 'r')) {
|
72 |
+
flock($this->lockHandles[$pipe], LOCK_UN);
|
73 |
+
fclose($this->lockHandles[$pipe]);
|
74 |
+
unset($this->lockHandles[$pipe]);
|
75 |
+
continue 2;
|
76 |
}
|
77 |
+
$this->fileHandles[$pipe] = $h;
|
78 |
$this->files[$pipe] = $file;
|
79 |
}
|
80 |
break;
|
88 |
public function __destruct()
|
89 |
{
|
90 |
$this->close();
|
|
|
91 |
}
|
92 |
|
93 |
/**
|
143 |
$data = stream_get_contents($fileHandle, -1, $this->readBytes[$type]);
|
144 |
|
145 |
if (isset($data[0])) {
|
146 |
+
$this->readBytes[$type] += \strlen($data);
|
147 |
$read[$type] = $data;
|
148 |
}
|
149 |
if ($close) {
|
150 |
+
ftruncate($fileHandle, 0);
|
151 |
fclose($fileHandle);
|
152 |
+
flock($this->lockHandles[$type], LOCK_UN);
|
153 |
+
fclose($this->lockHandles[$type]);
|
154 |
+
unset($this->fileHandles[$type], $this->lockHandles[$type]);
|
155 |
}
|
156 |
}
|
157 |
|
172 |
public function close()
|
173 |
{
|
174 |
parent::close();
|
175 |
+
foreach ($this->fileHandles as $type => $handle) {
|
176 |
+
ftruncate($handle, 0);
|
177 |
fclose($handle);
|
178 |
+
flock($this->lockHandles[$type], LOCK_UN);
|
179 |
+
fclose($this->lockHandles[$type]);
|
180 |
}
|
181 |
+
$this->fileHandles = $this->lockHandles = array();
|
182 |
}
|
183 |
|
184 |
/**
|
193 |
{
|
194 |
return new static($process->isOutputDisabled(), $input);
|
195 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
}
|
vendor/symfony/process/Process.php
CHANGED
@@ -80,8 +80,6 @@ class Process
|
|
80 |
* Exit codes translation table.
|
81 |
*
|
82 |
* User-defined errors must use exit codes in the 64-113 range.
|
83 |
-
*
|
84 |
-
* @var array
|
85 |
*/
|
86 |
public static $exitCodes = array(
|
87 |
0 => 'OK',
|
@@ -127,8 +125,6 @@ class Process
|
|
127 |
);
|
128 |
|
129 |
/**
|
130 |
-
* Constructor.
|
131 |
-
*
|
132 |
* @param string $commandline The command line to run
|
133 |
* @param string|null $cwd The working directory or null to use the working dir of the current PHP process
|
134 |
* @param array|null $env The environment variables or null to use the same environment as the current PHP process
|
@@ -140,7 +136,7 @@ class Process
|
|
140 |
*/
|
141 |
public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array())
|
142 |
{
|
143 |
-
if (
|
144 |
throw new RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');
|
145 |
}
|
146 |
|
@@ -151,7 +147,7 @@ class Process
|
|
151 |
// on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected
|
152 |
// @see : https://bugs.php.net/bug.php?id=51800
|
153 |
// @see : https://bugs.php.net/bug.php?id=50524
|
154 |
-
if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || '\\' === DIRECTORY_SEPARATOR)) {
|
155 |
$this->cwd = getcwd();
|
156 |
}
|
157 |
if (null !== $env) {
|
@@ -160,9 +156,9 @@ class Process
|
|
160 |
|
161 |
$this->setInput($input);
|
162 |
$this->setTimeout($timeout);
|
163 |
-
$this->useFileHandles = '\\' === DIRECTORY_SEPARATOR;
|
164 |
$this->pty = false;
|
165 |
-
$this->enhanceSigchildCompatibility = '\\' !== DIRECTORY_SEPARATOR && $this->isSigchildEnabled();
|
166 |
$this->options = array_replace(array('suppress_errors' => true, 'binary_pipes' => true), $options);
|
167 |
}
|
168 |
|
@@ -263,7 +259,7 @@ class Process
|
|
263 |
|
264 |
$commandline = $this->commandline;
|
265 |
|
266 |
-
if ('\\' === DIRECTORY_SEPARATOR && $this->enhanceWindowsCompatibility) {
|
267 |
$commandline = 'cmd /V:ON /E:ON /D /C "('.$commandline.')';
|
268 |
foreach ($this->processPipes->getFiles() as $offset => $filename) {
|
269 |
$commandline .= ' '.$offset.'>'.ProcessUtils::escapeArgument($filename);
|
@@ -288,7 +284,7 @@ class Process
|
|
288 |
|
289 |
$this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $this->env, $this->options);
|
290 |
|
291 |
-
if (
|
292 |
throw new RuntimeException('Unable to launch a new process.');
|
293 |
}
|
294 |
$this->status = self::STATUS_STARTED;
|
@@ -358,8 +354,8 @@ class Process
|
|
358 |
|
359 |
do {
|
360 |
$this->checkTimeout();
|
361 |
-
$running = '\\' === DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
|
362 |
-
$this->readPipes($running, '\\' !== DIRECTORY_SEPARATOR || !$running);
|
363 |
} while ($running);
|
364 |
|
365 |
while ($this->isRunning()) {
|
@@ -571,7 +567,7 @@ class Process
|
|
571 |
/**
|
572 |
* Returns the exit code returned by the process.
|
573 |
*
|
574 |
-
* @return null
|
575 |
*
|
576 |
* @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled
|
577 |
*/
|
@@ -592,7 +588,7 @@ class Process
|
|
592 |
* This method relies on the Unix exit code status standardization
|
593 |
* and might not be relevant for other operating systems.
|
594 |
*
|
595 |
-
* @return null
|
596 |
*
|
597 |
* @see http://tldp.org/LDP/abs/html/exitcodes.html
|
598 |
* @see http://en.wikipedia.org/wiki/Unix_signal
|
@@ -713,7 +709,7 @@ class Process
|
|
713 |
*/
|
714 |
public function isStarted()
|
715 |
{
|
716 |
-
return $this->status
|
717 |
}
|
718 |
|
719 |
/**
|
@@ -725,7 +721,7 @@ class Process
|
|
725 |
{
|
726 |
$this->updateStatus(false);
|
727 |
|
728 |
-
return $this->status
|
729 |
}
|
730 |
|
731 |
/**
|
@@ -907,7 +903,7 @@ class Process
|
|
907 |
*/
|
908 |
public function setTty($tty)
|
909 |
{
|
910 |
-
if ('\\' === DIRECTORY_SEPARATOR && $tty) {
|
911 |
throw new RuntimeException('TTY mode is not supported on Windows platform.');
|
912 |
}
|
913 |
if ($tty) {
|
@@ -1004,7 +1000,7 @@ class Process
|
|
1004 |
/**
|
1005 |
* Sets the environment variables.
|
1006 |
*
|
1007 |
-
*
|
1008 |
* If it is an array, the variable is ignored.
|
1009 |
*
|
1010 |
* That happens in PHP when 'argv' is registered into
|
@@ -1018,7 +1014,7 @@ class Process
|
|
1018 |
{
|
1019 |
// Process can not handle env values that are arrays
|
1020 |
$env = array_filter($env, function ($value) {
|
1021 |
-
return
|
1022 |
});
|
1023 |
|
1024 |
$this->env = array();
|
@@ -1040,7 +1036,7 @@ class Process
|
|
1040 |
*/
|
1041 |
public function getStdin()
|
1042 |
{
|
1043 |
-
@trigger_error('The '.__METHOD__.' method is deprecated since
|
1044 |
|
1045 |
return $this->getInput();
|
1046 |
}
|
@@ -1048,7 +1044,7 @@ class Process
|
|
1048 |
/**
|
1049 |
* Gets the Process input.
|
1050 |
*
|
1051 |
-
* @return null
|
1052 |
*/
|
1053 |
public function getInput()
|
1054 |
{
|
@@ -1070,7 +1066,7 @@ class Process
|
|
1070 |
*/
|
1071 |
public function setStdin($stdin)
|
1072 |
{
|
1073 |
-
@trigger_error('The '.__METHOD__.' method is deprecated since
|
1074 |
|
1075 |
return $this->setInput($stdin);
|
1076 |
}
|
@@ -1187,7 +1183,7 @@ class Process
|
|
1187 |
*/
|
1188 |
public function checkTimeout()
|
1189 |
{
|
1190 |
-
if ($this->status
|
1191 |
return;
|
1192 |
}
|
1193 |
|
@@ -1217,7 +1213,7 @@ class Process
|
|
1217 |
return $result;
|
1218 |
}
|
1219 |
|
1220 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
1221 |
return $result = false;
|
1222 |
}
|
1223 |
|
@@ -1231,7 +1227,7 @@ class Process
|
|
1231 |
*/
|
1232 |
private function getDescriptors()
|
1233 |
{
|
1234 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
1235 |
$this->processPipes = WindowsPipes::create($this, $this->input);
|
1236 |
} else {
|
1237 |
$this->processPipes = UnixPipes::create($this, $this->input);
|
@@ -1262,7 +1258,7 @@ class Process
|
|
1262 |
}
|
1263 |
|
1264 |
if (null !== $callback) {
|
1265 |
-
call_user_func($callback, $type, $data);
|
1266 |
}
|
1267 |
};
|
1268 |
|
@@ -1283,7 +1279,7 @@ class Process
|
|
1283 |
$this->processInformation = proc_get_status($this->process);
|
1284 |
$running = $this->processInformation['running'];
|
1285 |
|
1286 |
-
$this->readPipes($running && $blocking, '\\' !== DIRECTORY_SEPARATOR || !$running);
|
1287 |
|
1288 |
if ($this->fallbackStatus && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
|
1289 |
$this->processInformation = $this->fallbackStatus + $this->processInformation;
|
@@ -1305,7 +1301,7 @@ class Process
|
|
1305 |
return self::$sigchild;
|
1306 |
}
|
1307 |
|
1308 |
-
if (
|
1309 |
return self::$sigchild = false;
|
1310 |
}
|
1311 |
|
@@ -1318,7 +1314,7 @@ class Process
|
|
1318 |
/**
|
1319 |
* Reads pipes for the freshest output.
|
1320 |
*
|
1321 |
-
* @param $caller The name of the method that needs fresh outputs
|
1322 |
*
|
1323 |
* @throws LogicException in case output has been disabled or process is not started
|
1324 |
*/
|
@@ -1368,7 +1364,7 @@ class Process
|
|
1368 |
$callback = $this->callback;
|
1369 |
foreach ($result as $type => $data) {
|
1370 |
if (3 !== $type) {
|
1371 |
-
$callback(
|
1372 |
} elseif (!isset($this->fallbackStatus['signaled'])) {
|
1373 |
$this->fallbackStatus['exitcode'] = (int) $data;
|
1374 |
}
|
@@ -1383,7 +1379,7 @@ class Process
|
|
1383 |
private function close()
|
1384 |
{
|
1385 |
$this->processPipes->close();
|
1386 |
-
if (is_resource($this->process)) {
|
1387 |
proc_close($this->process);
|
1388 |
}
|
1389 |
$this->exitcode = $this->processInformation['exitcode'];
|
@@ -1417,8 +1413,8 @@ class Process
|
|
1417 |
$this->exitcode = null;
|
1418 |
$this->fallbackStatus = array();
|
1419 |
$this->processInformation = null;
|
1420 |
-
$this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), '
|
1421 |
-
$this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), '
|
1422 |
$this->process = null;
|
1423 |
$this->latestSignal = null;
|
1424 |
$this->status = self::STATUS_READY;
|
@@ -1448,7 +1444,7 @@ class Process
|
|
1448 |
return false;
|
1449 |
}
|
1450 |
|
1451 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
1452 |
exec(sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode);
|
1453 |
if ($exitCode && $this->isRunning()) {
|
1454 |
if ($throwException) {
|
@@ -1460,7 +1456,7 @@ class Process
|
|
1460 |
} else {
|
1461 |
if (!$this->enhanceSigchildCompatibility || !$this->isSigchildEnabled()) {
|
1462 |
$ok = @proc_terminate($this->process, $signal);
|
1463 |
-
} elseif (function_exists('posix_kill')) {
|
1464 |
$ok = @posix_kill($pid, $signal);
|
1465 |
} elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), array(2 => array('pipe', 'w')), $pipes)) {
|
1466 |
$ok = false === fgets($pipes[2]);
|
@@ -1487,7 +1483,7 @@ class Process
|
|
1487 |
*
|
1488 |
* @param string $functionName The function name that was called
|
1489 |
*
|
1490 |
-
* @throws LogicException
|
1491 |
*/
|
1492 |
private function requireProcessIsStarted($functionName)
|
1493 |
{
|
@@ -1501,7 +1497,7 @@ class Process
|
|
1501 |
*
|
1502 |
* @param string $functionName The function name that was called
|
1503 |
*
|
1504 |
-
* @throws LogicException
|
1505 |
*/
|
1506 |
private function requireProcessIsTerminated($functionName)
|
1507 |
{
|
80 |
* Exit codes translation table.
|
81 |
*
|
82 |
* User-defined errors must use exit codes in the 64-113 range.
|
|
|
|
|
83 |
*/
|
84 |
public static $exitCodes = array(
|
85 |
0 => 'OK',
|
125 |
);
|
126 |
|
127 |
/**
|
|
|
|
|
128 |
* @param string $commandline The command line to run
|
129 |
* @param string|null $cwd The working directory or null to use the working dir of the current PHP process
|
130 |
* @param array|null $env The environment variables or null to use the same environment as the current PHP process
|
136 |
*/
|
137 |
public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array())
|
138 |
{
|
139 |
+
if (!\function_exists('proc_open')) {
|
140 |
throw new RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');
|
141 |
}
|
142 |
|
147 |
// on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected
|
148 |
// @see : https://bugs.php.net/bug.php?id=51800
|
149 |
// @see : https://bugs.php.net/bug.php?id=50524
|
150 |
+
if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) {
|
151 |
$this->cwd = getcwd();
|
152 |
}
|
153 |
if (null !== $env) {
|
156 |
|
157 |
$this->setInput($input);
|
158 |
$this->setTimeout($timeout);
|
159 |
+
$this->useFileHandles = '\\' === \DIRECTORY_SEPARATOR;
|
160 |
$this->pty = false;
|
161 |
+
$this->enhanceSigchildCompatibility = '\\' !== \DIRECTORY_SEPARATOR && $this->isSigchildEnabled();
|
162 |
$this->options = array_replace(array('suppress_errors' => true, 'binary_pipes' => true), $options);
|
163 |
}
|
164 |
|
259 |
|
260 |
$commandline = $this->commandline;
|
261 |
|
262 |
+
if ('\\' === \DIRECTORY_SEPARATOR && $this->enhanceWindowsCompatibility) {
|
263 |
$commandline = 'cmd /V:ON /E:ON /D /C "('.$commandline.')';
|
264 |
foreach ($this->processPipes->getFiles() as $offset => $filename) {
|
265 |
$commandline .= ' '.$offset.'>'.ProcessUtils::escapeArgument($filename);
|
284 |
|
285 |
$this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $this->env, $this->options);
|
286 |
|
287 |
+
if (!\is_resource($this->process)) {
|
288 |
throw new RuntimeException('Unable to launch a new process.');
|
289 |
}
|
290 |
$this->status = self::STATUS_STARTED;
|
354 |
|
355 |
do {
|
356 |
$this->checkTimeout();
|
357 |
+
$running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
|
358 |
+
$this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running);
|
359 |
} while ($running);
|
360 |
|
361 |
while ($this->isRunning()) {
|
567 |
/**
|
568 |
* Returns the exit code returned by the process.
|
569 |
*
|
570 |
+
* @return int|null The exit status code, null if the Process is not terminated
|
571 |
*
|
572 |
* @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled
|
573 |
*/
|
588 |
* This method relies on the Unix exit code status standardization
|
589 |
* and might not be relevant for other operating systems.
|
590 |
*
|
591 |
+
* @return string|null A string representation for the exit status code, null if the Process is not terminated
|
592 |
*
|
593 |
* @see http://tldp.org/LDP/abs/html/exitcodes.html
|
594 |
* @see http://en.wikipedia.org/wiki/Unix_signal
|
709 |
*/
|
710 |
public function isStarted()
|
711 |
{
|
712 |
+
return self::STATUS_READY != $this->status;
|
713 |
}
|
714 |
|
715 |
/**
|
721 |
{
|
722 |
$this->updateStatus(false);
|
723 |
|
724 |
+
return self::STATUS_TERMINATED == $this->status;
|
725 |
}
|
726 |
|
727 |
/**
|
903 |
*/
|
904 |
public function setTty($tty)
|
905 |
{
|
906 |
+
if ('\\' === \DIRECTORY_SEPARATOR && $tty) {
|
907 |
throw new RuntimeException('TTY mode is not supported on Windows platform.');
|
908 |
}
|
909 |
if ($tty) {
|
1000 |
/**
|
1001 |
* Sets the environment variables.
|
1002 |
*
|
1003 |
+
* Each environment variable value should be a string.
|
1004 |
* If it is an array, the variable is ignored.
|
1005 |
*
|
1006 |
* That happens in PHP when 'argv' is registered into
|
1014 |
{
|
1015 |
// Process can not handle env values that are arrays
|
1016 |
$env = array_filter($env, function ($value) {
|
1017 |
+
return !\is_array($value);
|
1018 |
});
|
1019 |
|
1020 |
$this->env = array();
|
1036 |
*/
|
1037 |
public function getStdin()
|
1038 |
{
|
1039 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the getInput() method instead.', E_USER_DEPRECATED);
|
1040 |
|
1041 |
return $this->getInput();
|
1042 |
}
|
1044 |
/**
|
1045 |
* Gets the Process input.
|
1046 |
*
|
1047 |
+
* @return string|null The Process input
|
1048 |
*/
|
1049 |
public function getInput()
|
1050 |
{
|
1066 |
*/
|
1067 |
public function setStdin($stdin)
|
1068 |
{
|
1069 |
+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.5 and will be removed in 3.0. Use the setInput() method instead.', E_USER_DEPRECATED);
|
1070 |
|
1071 |
return $this->setInput($stdin);
|
1072 |
}
|
1183 |
*/
|
1184 |
public function checkTimeout()
|
1185 |
{
|
1186 |
+
if (self::STATUS_STARTED !== $this->status) {
|
1187 |
return;
|
1188 |
}
|
1189 |
|
1213 |
return $result;
|
1214 |
}
|
1215 |
|
1216 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
1217 |
return $result = false;
|
1218 |
}
|
1219 |
|
1227 |
*/
|
1228 |
private function getDescriptors()
|
1229 |
{
|
1230 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
1231 |
$this->processPipes = WindowsPipes::create($this, $this->input);
|
1232 |
} else {
|
1233 |
$this->processPipes = UnixPipes::create($this, $this->input);
|
1258 |
}
|
1259 |
|
1260 |
if (null !== $callback) {
|
1261 |
+
\call_user_func($callback, $type, $data);
|
1262 |
}
|
1263 |
};
|
1264 |
|
1279 |
$this->processInformation = proc_get_status($this->process);
|
1280 |
$running = $this->processInformation['running'];
|
1281 |
|
1282 |
+
$this->readPipes($running && $blocking, '\\' !== \DIRECTORY_SEPARATOR || !$running);
|
1283 |
|
1284 |
if ($this->fallbackStatus && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
|
1285 |
$this->processInformation = $this->fallbackStatus + $this->processInformation;
|
1301 |
return self::$sigchild;
|
1302 |
}
|
1303 |
|
1304 |
+
if (!\function_exists('phpinfo') || \defined('HHVM_VERSION')) {
|
1305 |
return self::$sigchild = false;
|
1306 |
}
|
1307 |
|
1314 |
/**
|
1315 |
* Reads pipes for the freshest output.
|
1316 |
*
|
1317 |
+
* @param string $caller The name of the method that needs fresh outputs
|
1318 |
*
|
1319 |
* @throws LogicException in case output has been disabled or process is not started
|
1320 |
*/
|
1364 |
$callback = $this->callback;
|
1365 |
foreach ($result as $type => $data) {
|
1366 |
if (3 !== $type) {
|
1367 |
+
$callback(self::STDOUT === $type ? self::OUT : self::ERR, $data);
|
1368 |
} elseif (!isset($this->fallbackStatus['signaled'])) {
|
1369 |
$this->fallbackStatus['exitcode'] = (int) $data;
|
1370 |
}
|
1379 |
private function close()
|
1380 |
{
|
1381 |
$this->processPipes->close();
|
1382 |
+
if (\is_resource($this->process)) {
|
1383 |
proc_close($this->process);
|
1384 |
}
|
1385 |
$this->exitcode = $this->processInformation['exitcode'];
|
1413 |
$this->exitcode = null;
|
1414 |
$this->fallbackStatus = array();
|
1415 |
$this->processInformation = null;
|
1416 |
+
$this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b');
|
1417 |
+
$this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+b');
|
1418 |
$this->process = null;
|
1419 |
$this->latestSignal = null;
|
1420 |
$this->status = self::STATUS_READY;
|
1444 |
return false;
|
1445 |
}
|
1446 |
|
1447 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
1448 |
exec(sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode);
|
1449 |
if ($exitCode && $this->isRunning()) {
|
1450 |
if ($throwException) {
|
1456 |
} else {
|
1457 |
if (!$this->enhanceSigchildCompatibility || !$this->isSigchildEnabled()) {
|
1458 |
$ok = @proc_terminate($this->process, $signal);
|
1459 |
+
} elseif (\function_exists('posix_kill')) {
|
1460 |
$ok = @posix_kill($pid, $signal);
|
1461 |
} elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), array(2 => array('pipe', 'w')), $pipes)) {
|
1462 |
$ok = false === fgets($pipes[2]);
|
1483 |
*
|
1484 |
* @param string $functionName The function name that was called
|
1485 |
*
|
1486 |
+
* @throws LogicException if the process has not run
|
1487 |
*/
|
1488 |
private function requireProcessIsStarted($functionName)
|
1489 |
{
|
1497 |
*
|
1498 |
* @param string $functionName The function name that was called
|
1499 |
*
|
1500 |
+
* @throws LogicException if the process is not yet terminated
|
1501 |
*/
|
1502 |
private function requireProcessIsTerminated($functionName)
|
1503 |
{
|
vendor/symfony/process/ProcessBuilder.php
CHANGED
@@ -15,8 +15,6 @@ use Symfony\Component\Process\Exception\InvalidArgumentException;
|
|
15 |
use Symfony\Component\Process\Exception\LogicException;
|
16 |
|
17 |
/**
|
18 |
-
* Process builder.
|
19 |
-
*
|
20 |
* @author Kris Wallsmith <kris@symfony.com>
|
21 |
*/
|
22 |
class ProcessBuilder
|
@@ -32,8 +30,6 @@ class ProcessBuilder
|
|
32 |
private $outputDisabled = false;
|
33 |
|
34 |
/**
|
35 |
-
* Constructor.
|
36 |
-
*
|
37 |
* @param string[] $arguments An array of arguments
|
38 |
*/
|
39 |
public function __construct(array $arguments = array())
|
@@ -78,7 +74,7 @@ class ProcessBuilder
|
|
78 |
*/
|
79 |
public function setPrefix($prefix)
|
80 |
{
|
81 |
-
$this->prefix = is_array($prefix) ? $prefix : array($prefix);
|
82 |
|
83 |
return $this;
|
84 |
}
|
@@ -103,7 +99,7 @@ class ProcessBuilder
|
|
103 |
/**
|
104 |
* Sets the working directory.
|
105 |
*
|
106 |
-
* @param null
|
107 |
*
|
108 |
* @return $this
|
109 |
*/
|
@@ -135,7 +131,7 @@ class ProcessBuilder
|
|
135 |
* defined environment variable.
|
136 |
*
|
137 |
* @param string $name The variable name
|
138 |
-
* @param null
|
139 |
*
|
140 |
* @return $this
|
141 |
*/
|
@@ -260,7 +256,7 @@ class ProcessBuilder
|
|
260 |
*/
|
261 |
public function getProcess()
|
262 |
{
|
263 |
-
if (0 === count($this->prefix) && 0 === count($this->arguments)) {
|
264 |
throw new LogicException('You must add() command arguments before calling getProcess().');
|
265 |
}
|
266 |
|
15 |
use Symfony\Component\Process\Exception\LogicException;
|
16 |
|
17 |
/**
|
|
|
|
|
18 |
* @author Kris Wallsmith <kris@symfony.com>
|
19 |
*/
|
20 |
class ProcessBuilder
|
30 |
private $outputDisabled = false;
|
31 |
|
32 |
/**
|
|
|
|
|
33 |
* @param string[] $arguments An array of arguments
|
34 |
*/
|
35 |
public function __construct(array $arguments = array())
|
74 |
*/
|
75 |
public function setPrefix($prefix)
|
76 |
{
|
77 |
+
$this->prefix = \is_array($prefix) ? $prefix : array($prefix);
|
78 |
|
79 |
return $this;
|
80 |
}
|
99 |
/**
|
100 |
* Sets the working directory.
|
101 |
*
|
102 |
+
* @param string|null $cwd The working directory
|
103 |
*
|
104 |
* @return $this
|
105 |
*/
|
131 |
* defined environment variable.
|
132 |
*
|
133 |
* @param string $name The variable name
|
134 |
+
* @param string|null $value The variable value
|
135 |
*
|
136 |
* @return $this
|
137 |
*/
|
256 |
*/
|
257 |
public function getProcess()
|
258 |
{
|
259 |
+
if (0 === \count($this->prefix) && 0 === \count($this->arguments)) {
|
260 |
throw new LogicException('You must add() command arguments before calling getProcess().');
|
261 |
}
|
262 |
|
vendor/symfony/process/ProcessUtils.php
CHANGED
@@ -42,7 +42,7 @@ class ProcessUtils
|
|
42 |
//Fix for PHP bug #49446 escapeshellarg doesn't work on Windows
|
43 |
//@see https://bugs.php.net/bug.php?id=43784
|
44 |
//@see https://bugs.php.net/bug.php?id=49446
|
45 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
46 |
if ('' === $argument) {
|
47 |
return escapeshellarg($argument);
|
48 |
}
|
@@ -89,18 +89,18 @@ class ProcessUtils
|
|
89 |
public static function validateInput($caller, $input)
|
90 |
{
|
91 |
if (null !== $input) {
|
92 |
-
if (is_resource($input)) {
|
93 |
return $input;
|
94 |
}
|
95 |
-
if (is_string($input)) {
|
96 |
return $input;
|
97 |
}
|
98 |
if (is_scalar($input)) {
|
99 |
return (string) $input;
|
100 |
}
|
101 |
// deprecated as of Symfony 2.5, to be removed in 3.0
|
102 |
-
if (is_object($input) && method_exists($input, '__toString')) {
|
103 |
-
@trigger_error('Passing an object as an input is deprecated since
|
104 |
|
105 |
return (string) $input;
|
106 |
}
|
@@ -113,6 +113,6 @@ class ProcessUtils
|
|
113 |
|
114 |
private static function isSurroundedBy($arg, $char)
|
115 |
{
|
116 |
-
return 2 < strlen($arg) && $char === $arg[0] && $char === $arg[strlen($arg) - 1];
|
117 |
}
|
118 |
}
|
42 |
//Fix for PHP bug #49446 escapeshellarg doesn't work on Windows
|
43 |
//@see https://bugs.php.net/bug.php?id=43784
|
44 |
//@see https://bugs.php.net/bug.php?id=49446
|
45 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
46 |
if ('' === $argument) {
|
47 |
return escapeshellarg($argument);
|
48 |
}
|
89 |
public static function validateInput($caller, $input)
|
90 |
{
|
91 |
if (null !== $input) {
|
92 |
+
if (\is_resource($input)) {
|
93 |
return $input;
|
94 |
}
|
95 |
+
if (\is_string($input)) {
|
96 |
return $input;
|
97 |
}
|
98 |
if (is_scalar($input)) {
|
99 |
return (string) $input;
|
100 |
}
|
101 |
// deprecated as of Symfony 2.5, to be removed in 3.0
|
102 |
+
if (\is_object($input) && method_exists($input, '__toString')) {
|
103 |
+
@trigger_error('Passing an object as an input is deprecated since Symfony 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
|
104 |
|
105 |
return (string) $input;
|
106 |
}
|
113 |
|
114 |
private static function isSurroundedBy($arg, $char)
|
115 |
{
|
116 |
+
return 2 < \strlen($arg) && $char === $arg[0] && $char === $arg[\strlen($arg) - 1];
|
117 |
}
|
118 |
}
|
vendor/symfony/process/Tests/ExecutableFinderTest.php
CHANGED
@@ -44,7 +44,7 @@ class ExecutableFinderTest extends TestCase
|
|
44 |
$this->markTestSkipped('Cannot test when open_basedir is set');
|
45 |
}
|
46 |
|
47 |
-
$this->setPath(dirname(PHP_BINARY));
|
48 |
|
49 |
$finder = new ExecutableFinder();
|
50 |
$result = $finder->find($this->getPhpBinaryName());
|
@@ -79,7 +79,7 @@ class ExecutableFinderTest extends TestCase
|
|
79 |
|
80 |
$this->setPath('');
|
81 |
|
82 |
-
$extraDirs = array(dirname(PHP_BINARY));
|
83 |
|
84 |
$finder = new ExecutableFinder();
|
85 |
$result = $finder->find($this->getPhpBinaryName(), null, $extraDirs);
|
@@ -92,7 +92,7 @@ class ExecutableFinderTest extends TestCase
|
|
92 |
*/
|
93 |
public function testFindWithOpenBaseDir()
|
94 |
{
|
95 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
96 |
$this->markTestSkipped('Cannot run test on windows');
|
97 |
}
|
98 |
|
@@ -100,7 +100,7 @@ class ExecutableFinderTest extends TestCase
|
|
100 |
$this->markTestSkipped('Cannot test when open_basedir is set');
|
101 |
}
|
102 |
|
103 |
-
$this->iniSet('open_basedir', dirname(PHP_BINARY).(
|
104 |
|
105 |
$finder = new ExecutableFinder();
|
106 |
$result = $finder->find($this->getPhpBinaryName());
|
@@ -116,12 +116,12 @@ class ExecutableFinderTest extends TestCase
|
|
116 |
if (ini_get('open_basedir')) {
|
117 |
$this->markTestSkipped('Cannot test when open_basedir is set');
|
118 |
}
|
119 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
120 |
$this->markTestSkipped('Cannot run test on windows');
|
121 |
}
|
122 |
|
123 |
$this->setPath('');
|
124 |
-
$this->iniSet('open_basedir', PHP_BINARY.(
|
125 |
|
126 |
$finder = new ExecutableFinder();
|
127 |
$result = $finder->find($this->getPhpBinaryName(), false);
|
@@ -129,9 +129,39 @@ class ExecutableFinderTest extends TestCase
|
|
129 |
$this->assertSamePath(PHP_BINARY, $result);
|
130 |
}
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
private function assertSamePath($expected, $tested)
|
133 |
{
|
134 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
135 |
$this->assertEquals(strtolower($expected), strtolower($tested));
|
136 |
} else {
|
137 |
$this->assertEquals($expected, $tested);
|
@@ -140,6 +170,6 @@ class ExecutableFinderTest extends TestCase
|
|
140 |
|
141 |
private function getPhpBinaryName()
|
142 |
{
|
143 |
-
return basename(PHP_BINARY, '\\' === DIRECTORY_SEPARATOR ? '.exe' : '');
|
144 |
}
|
145 |
}
|
44 |
$this->markTestSkipped('Cannot test when open_basedir is set');
|
45 |
}
|
46 |
|
47 |
+
$this->setPath(\dirname(PHP_BINARY));
|
48 |
|
49 |
$finder = new ExecutableFinder();
|
50 |
$result = $finder->find($this->getPhpBinaryName());
|
79 |
|
80 |
$this->setPath('');
|
81 |
|
82 |
+
$extraDirs = array(\dirname(PHP_BINARY));
|
83 |
|
84 |
$finder = new ExecutableFinder();
|
85 |
$result = $finder->find($this->getPhpBinaryName(), null, $extraDirs);
|
92 |
*/
|
93 |
public function testFindWithOpenBaseDir()
|
94 |
{
|
95 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
96 |
$this->markTestSkipped('Cannot run test on windows');
|
97 |
}
|
98 |
|
100 |
$this->markTestSkipped('Cannot test when open_basedir is set');
|
101 |
}
|
102 |
|
103 |
+
$this->iniSet('open_basedir', \dirname(PHP_BINARY).(!\defined('HHVM_VERSION') || HHVM_VERSION_ID >= 30800 ? PATH_SEPARATOR.'/' : ''));
|
104 |
|
105 |
$finder = new ExecutableFinder();
|
106 |
$result = $finder->find($this->getPhpBinaryName());
|
116 |
if (ini_get('open_basedir')) {
|
117 |
$this->markTestSkipped('Cannot test when open_basedir is set');
|
118 |
}
|
119 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
120 |
$this->markTestSkipped('Cannot run test on windows');
|
121 |
}
|
122 |
|
123 |
$this->setPath('');
|
124 |
+
$this->iniSet('open_basedir', PHP_BINARY.(!\defined('HHVM_VERSION') || HHVM_VERSION_ID >= 30800 ? PATH_SEPARATOR.'/' : ''));
|
125 |
|
126 |
$finder = new ExecutableFinder();
|
127 |
$result = $finder->find($this->getPhpBinaryName(), false);
|
129 |
$this->assertSamePath(PHP_BINARY, $result);
|
130 |
}
|
131 |
|
132 |
+
/**
|
133 |
+
* @requires PHP 5.4
|
134 |
+
*/
|
135 |
+
public function testFindBatchExecutableOnWindows()
|
136 |
+
{
|
137 |
+
if (ini_get('open_basedir')) {
|
138 |
+
$this->markTestSkipped('Cannot test when open_basedir is set');
|
139 |
+
}
|
140 |
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
141 |
+
$this->markTestSkipped('Can be only tested on windows');
|
142 |
+
}
|
143 |
+
|
144 |
+
$target = tempnam(sys_get_temp_dir(), 'example-windows-executable');
|
145 |
+
|
146 |
+
touch($target);
|
147 |
+
touch($target.'.BAT');
|
148 |
+
|
149 |
+
$this->assertFalse(is_executable($target));
|
150 |
+
|
151 |
+
$this->setPath(sys_get_temp_dir());
|
152 |
+
|
153 |
+
$finder = new ExecutableFinder();
|
154 |
+
$result = $finder->find(basename($target), false);
|
155 |
+
|
156 |
+
unlink($target);
|
157 |
+
unlink($target.'.BAT');
|
158 |
+
|
159 |
+
$this->assertSamePath($target.'.BAT', $result);
|
160 |
+
}
|
161 |
+
|
162 |
private function assertSamePath($expected, $tested)
|
163 |
{
|
164 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
165 |
$this->assertEquals(strtolower($expected), strtolower($tested));
|
166 |
} else {
|
167 |
$this->assertEquals($expected, $tested);
|
170 |
|
171 |
private function getPhpBinaryName()
|
172 |
{
|
173 |
+
return basename(PHP_BINARY, '\\' === \DIRECTORY_SEPARATOR ? '.exe' : '');
|
174 |
}
|
175 |
}
|
vendor/symfony/process/Tests/PhpExecutableFinderTest.php
CHANGED
@@ -24,7 +24,7 @@ class PhpExecutableFinderTest extends TestCase
|
|
24 |
*/
|
25 |
public function testFindWithPhpPath()
|
26 |
{
|
27 |
-
if (defined('PHP_BINARY')) {
|
28 |
$this->markTestSkipped('The PHP binary is easily available as of PHP 5.4');
|
29 |
}
|
30 |
|
@@ -50,14 +50,14 @@ class PhpExecutableFinderTest extends TestCase
|
|
50 |
*/
|
51 |
public function testFind()
|
52 |
{
|
53 |
-
if (defined('HHVM_VERSION')) {
|
54 |
$this->markTestSkipped('Should not be executed in HHVM context.');
|
55 |
}
|
56 |
|
57 |
$f = new PhpExecutableFinder();
|
58 |
|
59 |
$current = PHP_BINARY;
|
60 |
-
$args = 'phpdbg' === PHP_SAPI ? ' -qrr' : '';
|
61 |
|
62 |
$this->assertEquals($current.$args, $f->find(), '::find() returns the executable PHP');
|
63 |
$this->assertEquals($current, $f->find(false), '::find() returns the executable PHP');
|
@@ -68,7 +68,7 @@ class PhpExecutableFinderTest extends TestCase
|
|
68 |
*/
|
69 |
public function testFindWithHHVM()
|
70 |
{
|
71 |
-
if (
|
72 |
$this->markTestSkipped('Should be executed in HHVM context.');
|
73 |
}
|
74 |
|
@@ -87,9 +87,9 @@ class PhpExecutableFinderTest extends TestCase
|
|
87 |
{
|
88 |
$f = new PhpExecutableFinder();
|
89 |
|
90 |
-
if (defined('HHVM_VERSION')) {
|
91 |
$this->assertEquals($f->findArguments(), array('--php'), '::findArguments() returns HHVM arguments');
|
92 |
-
} elseif ('phpdbg' === PHP_SAPI) {
|
93 |
$this->assertEquals($f->findArguments(), array('-qrr'), '::findArguments() returns phpdbg arguments');
|
94 |
} else {
|
95 |
$this->assertEquals($f->findArguments(), array(), '::findArguments() returns no arguments');
|
@@ -101,7 +101,7 @@ class PhpExecutableFinderTest extends TestCase
|
|
101 |
*/
|
102 |
public function testFindWithSuffix()
|
103 |
{
|
104 |
-
if (defined('PHP_BINARY')) {
|
105 |
$this->markTestSkipped('The PHP binary is easily available as of PHP 5.4');
|
106 |
}
|
107 |
|
@@ -112,9 +112,9 @@ class PhpExecutableFinderTest extends TestCase
|
|
112 |
$current = $f->find();
|
113 |
|
114 |
//TODO maybe php executable is custom or even Windows
|
115 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
116 |
$this->assertTrue(is_executable($current));
|
117 |
-
$this->
|
118 |
}
|
119 |
}
|
120 |
}
|
24 |
*/
|
25 |
public function testFindWithPhpPath()
|
26 |
{
|
27 |
+
if (\defined('PHP_BINARY')) {
|
28 |
$this->markTestSkipped('The PHP binary is easily available as of PHP 5.4');
|
29 |
}
|
30 |
|
50 |
*/
|
51 |
public function testFind()
|
52 |
{
|
53 |
+
if (\defined('HHVM_VERSION')) {
|
54 |
$this->markTestSkipped('Should not be executed in HHVM context.');
|
55 |
}
|
56 |
|
57 |
$f = new PhpExecutableFinder();
|
58 |
|
59 |
$current = PHP_BINARY;
|
60 |
+
$args = 'phpdbg' === \PHP_SAPI ? ' -qrr' : '';
|
61 |
|
62 |
$this->assertEquals($current.$args, $f->find(), '::find() returns the executable PHP');
|
63 |
$this->assertEquals($current, $f->find(false), '::find() returns the executable PHP');
|
68 |
*/
|
69 |
public function testFindWithHHVM()
|
70 |
{
|
71 |
+
if (!\defined('HHVM_VERSION')) {
|
72 |
$this->markTestSkipped('Should be executed in HHVM context.');
|
73 |
}
|
74 |
|
87 |
{
|
88 |
$f = new PhpExecutableFinder();
|
89 |
|
90 |
+
if (\defined('HHVM_VERSION')) {
|
91 |
$this->assertEquals($f->findArguments(), array('--php'), '::findArguments() returns HHVM arguments');
|
92 |
+
} elseif ('phpdbg' === \PHP_SAPI) {
|
93 |
$this->assertEquals($f->findArguments(), array('-qrr'), '::findArguments() returns phpdbg arguments');
|
94 |
} else {
|
95 |
$this->assertEquals($f->findArguments(), array(), '::findArguments() returns no arguments');
|
101 |
*/
|
102 |
public function testFindWithSuffix()
|
103 |
{
|
104 |
+
if (\defined('PHP_BINARY')) {
|
105 |
$this->markTestSkipped('The PHP binary is easily available as of PHP 5.4');
|
106 |
}
|
107 |
|
112 |
$current = $f->find();
|
113 |
|
114 |
//TODO maybe php executable is custom or even Windows
|
115 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
116 |
$this->assertTrue(is_executable($current));
|
117 |
+
$this->assertRegExp('/\\\\php\.(exe|bat|cmd|com)$/i', $current, '::find() returns the executable PHP with suffixes');
|
118 |
}
|
119 |
}
|
120 |
}
|
vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php
CHANGED
@@ -35,22 +35,22 @@ while ($read || $write) {
|
|
35 |
}
|
36 |
|
37 |
if (in_array(STDOUT, $w) && strlen($out) > 0) {
|
38 |
-
$written = fwrite(STDOUT, (
|
39 |
if (false === $written) {
|
40 |
die(ERR_WRITE_FAILED);
|
41 |
}
|
42 |
-
$out = (
|
43 |
}
|
44 |
if (null === $read && '' === $out) {
|
45 |
$write = array_diff($write, array(STDOUT));
|
46 |
}
|
47 |
|
48 |
if (in_array(STDERR, $w) && strlen($err) > 0) {
|
49 |
-
$written = fwrite(STDERR, (
|
50 |
if (false === $written) {
|
51 |
die(ERR_WRITE_FAILED);
|
52 |
}
|
53 |
-
$err = (
|
54 |
}
|
55 |
if (null === $read && '' === $err) {
|
56 |
$write = array_diff($write, array(STDERR));
|
35 |
}
|
36 |
|
37 |
if (in_array(STDOUT, $w) && strlen($out) > 0) {
|
38 |
+
$written = fwrite(STDOUT, (string) $out, 32768);
|
39 |
if (false === $written) {
|
40 |
die(ERR_WRITE_FAILED);
|
41 |
}
|
42 |
+
$out = (string) substr($out, $written);
|
43 |
}
|
44 |
if (null === $read && '' === $out) {
|
45 |
$write = array_diff($write, array(STDOUT));
|
46 |
}
|
47 |
|
48 |
if (in_array(STDERR, $w) && strlen($err) > 0) {
|
49 |
+
$written = fwrite(STDERR, (string) $err, 32768);
|
50 |
if (false === $written) {
|
51 |
die(ERR_WRITE_FAILED);
|
52 |
}
|
53 |
+
$err = (string) substr($err, $written);
|
54 |
}
|
55 |
if (null === $read && '' === $err) {
|
56 |
$write = array_diff($write, array(STDERR));
|
vendor/symfony/process/Tests/ProcessBuilderTest.php
CHANGED
@@ -103,14 +103,14 @@ class ProcessBuilderTest extends TestCase
|
|
103 |
$pb->setPrefix('/usr/bin/php');
|
104 |
|
105 |
$proc = $pb->setArguments(array('-v'))->getProcess();
|
106 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
107 |
$this->assertEquals('"/usr/bin/php" "-v"', $proc->getCommandLine());
|
108 |
} else {
|
109 |
$this->assertEquals("'/usr/bin/php' '-v'", $proc->getCommandLine());
|
110 |
}
|
111 |
|
112 |
$proc = $pb->setArguments(array('-i'))->getProcess();
|
113 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
114 |
$this->assertEquals('"/usr/bin/php" "-i"', $proc->getCommandLine());
|
115 |
} else {
|
116 |
$this->assertEquals("'/usr/bin/php' '-i'", $proc->getCommandLine());
|
@@ -123,14 +123,14 @@ class ProcessBuilderTest extends TestCase
|
|
123 |
$pb->setPrefix(array('/usr/bin/php', 'composer.phar'));
|
124 |
|
125 |
$proc = $pb->setArguments(array('-v'))->getProcess();
|
126 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
127 |
$this->assertEquals('"/usr/bin/php" "composer.phar" "-v"', $proc->getCommandLine());
|
128 |
} else {
|
129 |
$this->assertEquals("'/usr/bin/php' 'composer.phar' '-v'", $proc->getCommandLine());
|
130 |
}
|
131 |
|
132 |
$proc = $pb->setArguments(array('-i'))->getProcess();
|
133 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
134 |
$this->assertEquals('"/usr/bin/php" "composer.phar" "-i"', $proc->getCommandLine());
|
135 |
} else {
|
136 |
$this->assertEquals("'/usr/bin/php' 'composer.phar' '-i'", $proc->getCommandLine());
|
@@ -142,7 +142,7 @@ class ProcessBuilderTest extends TestCase
|
|
142 |
$pb = new ProcessBuilder(array('%path%', 'foo " bar', '%baz%baz'));
|
143 |
$proc = $pb->getProcess();
|
144 |
|
145 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
146 |
$this->assertSame('^%"path"^% "foo \\" bar" "%baz%baz"', $proc->getCommandLine());
|
147 |
} else {
|
148 |
$this->assertSame("'%path%' 'foo \" bar' '%baz%baz'", $proc->getCommandLine());
|
@@ -155,7 +155,7 @@ class ProcessBuilderTest extends TestCase
|
|
155 |
$pb->setPrefix('%prefix%');
|
156 |
$proc = $pb->getProcess();
|
157 |
|
158 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
159 |
$this->assertSame('^%"prefix"^% "arg"', $proc->getCommandLine());
|
160 |
} else {
|
161 |
$this->assertSame("'%prefix%' 'arg'", $proc->getCommandLine());
|
@@ -176,7 +176,7 @@ class ProcessBuilderTest extends TestCase
|
|
176 |
->setPrefix('/usr/bin/php')
|
177 |
->getProcess();
|
178 |
|
179 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
180 |
$this->assertEquals('"/usr/bin/php"', $process->getCommandLine());
|
181 |
} else {
|
182 |
$this->assertEquals("'/usr/bin/php'", $process->getCommandLine());
|
@@ -188,7 +188,7 @@ class ProcessBuilderTest extends TestCase
|
|
188 |
$process = ProcessBuilder::create(array('/usr/bin/php'))
|
189 |
->getProcess();
|
190 |
|
191 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
192 |
$this->assertEquals('"/usr/bin/php"', $process->getCommandLine());
|
193 |
} else {
|
194 |
$this->assertEquals("'/usr/bin/php'", $process->getCommandLine());
|
103 |
$pb->setPrefix('/usr/bin/php');
|
104 |
|
105 |
$proc = $pb->setArguments(array('-v'))->getProcess();
|
106 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
107 |
$this->assertEquals('"/usr/bin/php" "-v"', $proc->getCommandLine());
|
108 |
} else {
|
109 |
$this->assertEquals("'/usr/bin/php' '-v'", $proc->getCommandLine());
|
110 |
}
|
111 |
|
112 |
$proc = $pb->setArguments(array('-i'))->getProcess();
|
113 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
114 |
$this->assertEquals('"/usr/bin/php" "-i"', $proc->getCommandLine());
|
115 |
} else {
|
116 |
$this->assertEquals("'/usr/bin/php' '-i'", $proc->getCommandLine());
|
123 |
$pb->setPrefix(array('/usr/bin/php', 'composer.phar'));
|
124 |
|
125 |
$proc = $pb->setArguments(array('-v'))->getProcess();
|
126 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
127 |
$this->assertEquals('"/usr/bin/php" "composer.phar" "-v"', $proc->getCommandLine());
|
128 |
} else {
|
129 |
$this->assertEquals("'/usr/bin/php' 'composer.phar' '-v'", $proc->getCommandLine());
|
130 |
}
|
131 |
|
132 |
$proc = $pb->setArguments(array('-i'))->getProcess();
|
133 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
134 |
$this->assertEquals('"/usr/bin/php" "composer.phar" "-i"', $proc->getCommandLine());
|
135 |
} else {
|
136 |
$this->assertEquals("'/usr/bin/php' 'composer.phar' '-i'", $proc->getCommandLine());
|
142 |
$pb = new ProcessBuilder(array('%path%', 'foo " bar', '%baz%baz'));
|
143 |
$proc = $pb->getProcess();
|
144 |
|
145 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
146 |
$this->assertSame('^%"path"^% "foo \\" bar" "%baz%baz"', $proc->getCommandLine());
|
147 |
} else {
|
148 |
$this->assertSame("'%path%' 'foo \" bar' '%baz%baz'", $proc->getCommandLine());
|
155 |
$pb->setPrefix('%prefix%');
|
156 |
$proc = $pb->getProcess();
|
157 |
|
158 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
159 |
$this->assertSame('^%"prefix"^% "arg"', $proc->getCommandLine());
|
160 |
} else {
|
161 |
$this->assertSame("'%prefix%' 'arg'", $proc->getCommandLine());
|
176 |
->setPrefix('/usr/bin/php')
|
177 |
->getProcess();
|
178 |
|
179 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
180 |
$this->assertEquals('"/usr/bin/php"', $process->getCommandLine());
|
181 |
} else {
|
182 |
$this->assertEquals("'/usr/bin/php'", $process->getCommandLine());
|
188 |
$process = ProcessBuilder::create(array('/usr/bin/php'))
|
189 |
->getProcess();
|
190 |
|
191 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
192 |
$this->assertEquals('"/usr/bin/php"', $process->getCommandLine());
|
193 |
} else {
|
194 |
$this->assertEquals("'/usr/bin/php'", $process->getCommandLine());
|
vendor/symfony/process/Tests/ProcessTest.php
CHANGED
@@ -32,8 +32,8 @@ class ProcessTest extends TestCase
|
|
32 |
public static function setUpBeforeClass()
|
33 |
{
|
34 |
$phpBin = new PhpExecutableFinder();
|
35 |
-
self::$phpBin = getenv('SYMFONY_PROCESS_PHP_TEST_BINARY') ?: ('phpdbg' === PHP_SAPI ? 'php' : $phpBin->find());
|
36 |
-
if ('\\' !== DIRECTORY_SEPARATOR) {
|
37 |
// exec is mandatory to deal with sending a signal to the process
|
38 |
// see https://github.com/symfony/symfony/issues/5030 about prepending
|
39 |
// command with exec
|
@@ -55,7 +55,7 @@ class ProcessTest extends TestCase
|
|
55 |
|
56 |
public function testThatProcessDoesNotThrowWarningDuringRun()
|
57 |
{
|
58 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
59 |
$this->markTestSkipped('This test is transient on Windows');
|
60 |
}
|
61 |
@trigger_error('Test Error', E_USER_NOTICE);
|
@@ -145,7 +145,7 @@ class ProcessTest extends TestCase
|
|
145 |
|
146 |
$o = $p->getOutput();
|
147 |
|
148 |
-
$this->assertEquals($expectedOutputSize, strlen($o));
|
149 |
}
|
150 |
|
151 |
public function testCallbacksAreExecutedWithStart()
|
@@ -187,8 +187,8 @@ class ProcessTest extends TestCase
|
|
187 |
$p->setInput($expected);
|
188 |
$p->run();
|
189 |
|
190 |
-
$this->assertEquals($expectedLength, strlen($p->getOutput()));
|
191 |
-
$this->assertEquals($expectedLength, strlen($p->getErrorOutput()));
|
192 |
}
|
193 |
|
194 |
/**
|
@@ -209,8 +209,8 @@ class ProcessTest extends TestCase
|
|
209 |
|
210 |
fclose($stream);
|
211 |
|
212 |
-
$this->assertEquals($expectedLength, strlen($p->getOutput()));
|
213 |
-
$this->assertEquals($expectedLength, strlen($p->getErrorOutput()));
|
214 |
}
|
215 |
|
216 |
public function testLiveStreamAsInput()
|
@@ -308,7 +308,7 @@ class ProcessTest extends TestCase
|
|
308 |
|
309 |
public function chainedCommandsOutputProvider()
|
310 |
{
|
311 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
312 |
return array(
|
313 |
array("2 \r\n2\r\n", '&&', '2'),
|
314 |
);
|
@@ -336,7 +336,7 @@ class ProcessTest extends TestCase
|
|
336 |
|
337 |
$called = false;
|
338 |
$p->run(function ($type, $buffer) use (&$called) {
|
339 |
-
$called =
|
340 |
});
|
341 |
|
342 |
$this->assertTrue($called, 'The callback should be executed with the output');
|
@@ -414,7 +414,7 @@ class ProcessTest extends TestCase
|
|
414 |
|
415 |
public function testZeroAsOutput()
|
416 |
{
|
417 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
418 |
// see http://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line
|
419 |
$p = $this->getProcess('echo | set /p dummyName=0');
|
420 |
} else {
|
@@ -427,7 +427,7 @@ class ProcessTest extends TestCase
|
|
427 |
|
428 |
public function testExitCodeCommandFailed()
|
429 |
{
|
430 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
431 |
$this->markTestSkipped('Windows does not support POSIX exit code');
|
432 |
}
|
433 |
$this->skipIfNotEnhancedSigchild();
|
@@ -441,7 +441,7 @@ class ProcessTest extends TestCase
|
|
441 |
|
442 |
public function testTTYCommand()
|
443 |
{
|
444 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
445 |
$this->markTestSkipped('Windows does not have /dev/tty support');
|
446 |
}
|
447 |
|
@@ -456,7 +456,7 @@ class ProcessTest extends TestCase
|
|
456 |
|
457 |
public function testTTYCommandExitCode()
|
458 |
{
|
459 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
460 |
$this->markTestSkipped('Windows does have /dev/tty support');
|
461 |
}
|
462 |
$this->skipIfNotEnhancedSigchild();
|
@@ -474,7 +474,7 @@ class ProcessTest extends TestCase
|
|
474 |
*/
|
475 |
public function testTTYInWindowsEnvironment()
|
476 |
{
|
477 |
-
if ('\\' !== DIRECTORY_SEPARATOR) {
|
478 |
$this->markTestSkipped('This test is for Windows platform only');
|
479 |
}
|
480 |
|
@@ -561,7 +561,7 @@ class ProcessTest extends TestCase
|
|
561 |
{
|
562 |
$process = $this->getProcess('echo foo');
|
563 |
$process->run();
|
564 |
-
$this->
|
565 |
}
|
566 |
|
567 |
public function testGetExitCodeIsNullOnStart()
|
@@ -660,7 +660,7 @@ class ProcessTest extends TestCase
|
|
660 |
|
661 |
public function testProcessIsNotSignaled()
|
662 |
{
|
663 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
664 |
$this->markTestSkipped('Windows does not support POSIX signals');
|
665 |
}
|
666 |
$this->skipIfNotEnhancedSigchild();
|
@@ -672,7 +672,7 @@ class ProcessTest extends TestCase
|
|
672 |
|
673 |
public function testProcessWithoutTermSignal()
|
674 |
{
|
675 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
676 |
$this->markTestSkipped('Windows does not support POSIX signals');
|
677 |
}
|
678 |
$this->skipIfNotEnhancedSigchild();
|
@@ -684,7 +684,7 @@ class ProcessTest extends TestCase
|
|
684 |
|
685 |
public function testProcessIsSignaledIfStopped()
|
686 |
{
|
687 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
688 |
$this->markTestSkipped('Windows does not support POSIX signals');
|
689 |
}
|
690 |
$this->skipIfNotEnhancedSigchild();
|
@@ -702,7 +702,7 @@ class ProcessTest extends TestCase
|
|
702 |
*/
|
703 |
public function testProcessThrowsExceptionWhenExternallySignaled()
|
704 |
{
|
705 |
-
if (
|
706 |
$this->markTestSkipped('Function posix_kill is required.');
|
707 |
}
|
708 |
$this->skipIfNotEnhancedSigchild(false);
|
@@ -985,7 +985,7 @@ class ProcessTest extends TestCase
|
|
985 |
*/
|
986 |
public function testWrongSignal($signal)
|
987 |
{
|
988 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
989 |
$this->markTestSkipped('POSIX signals do not work on Windows');
|
990 |
}
|
991 |
|
@@ -1178,7 +1178,7 @@ class ProcessTest extends TestCase
|
|
1178 |
'include \''.__DIR__.'/PipeStdinInStdoutStdErrStreamSelect.php\';',
|
1179 |
);
|
1180 |
|
1181 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
1182 |
// Avoid XL buffers on Windows because of https://bugs.php.net/bug.php?id=65650
|
1183 |
$sizes = array(1, 2, 4, 8);
|
1184 |
} else {
|
@@ -1224,9 +1224,9 @@ class ProcessTest extends TestCase
|
|
1224 |
|
1225 |
/**
|
1226 |
* @param string $commandline
|
1227 |
-
* @param null
|
1228 |
-
* @param null
|
1229 |
-
* @param null
|
1230 |
* @param int $timeout
|
1231 |
* @param array $options
|
1232 |
*
|
32 |
public static function setUpBeforeClass()
|
33 |
{
|
34 |
$phpBin = new PhpExecutableFinder();
|
35 |
+
self::$phpBin = getenv('SYMFONY_PROCESS_PHP_TEST_BINARY') ?: ('phpdbg' === \PHP_SAPI ? 'php' : $phpBin->find());
|
36 |
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
37 |
// exec is mandatory to deal with sending a signal to the process
|
38 |
// see https://github.com/symfony/symfony/issues/5030 about prepending
|
39 |
// command with exec
|
55 |
|
56 |
public function testThatProcessDoesNotThrowWarningDuringRun()
|
57 |
{
|
58 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
59 |
$this->markTestSkipped('This test is transient on Windows');
|
60 |
}
|
61 |
@trigger_error('Test Error', E_USER_NOTICE);
|
145 |
|
146 |
$o = $p->getOutput();
|
147 |
|
148 |
+
$this->assertEquals($expectedOutputSize, \strlen($o));
|
149 |
}
|
150 |
|
151 |
public function testCallbacksAreExecutedWithStart()
|
187 |
$p->setInput($expected);
|
188 |
$p->run();
|
189 |
|
190 |
+
$this->assertEquals($expectedLength, \strlen($p->getOutput()));
|
191 |
+
$this->assertEquals($expectedLength, \strlen($p->getErrorOutput()));
|
192 |
}
|
193 |
|
194 |
/**
|
209 |
|
210 |
fclose($stream);
|
211 |
|
212 |
+
$this->assertEquals($expectedLength, \strlen($p->getOutput()));
|
213 |
+
$this->assertEquals($expectedLength, \strlen($p->getErrorOutput()));
|
214 |
}
|
215 |
|
216 |
public function testLiveStreamAsInput()
|
308 |
|
309 |
public function chainedCommandsOutputProvider()
|
310 |
{
|
311 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
312 |
return array(
|
313 |
array("2 \r\n2\r\n", '&&', '2'),
|
314 |
);
|
336 |
|
337 |
$called = false;
|
338 |
$p->run(function ($type, $buffer) use (&$called) {
|
339 |
+
$called = 'foo' === $buffer;
|
340 |
});
|
341 |
|
342 |
$this->assertTrue($called, 'The callback should be executed with the output');
|
414 |
|
415 |
public function testZeroAsOutput()
|
416 |
{
|
417 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
418 |
// see http://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line
|
419 |
$p = $this->getProcess('echo | set /p dummyName=0');
|
420 |
} else {
|
427 |
|
428 |
public function testExitCodeCommandFailed()
|
429 |
{
|
430 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
431 |
$this->markTestSkipped('Windows does not support POSIX exit code');
|
432 |
}
|
433 |
$this->skipIfNotEnhancedSigchild();
|
441 |
|
442 |
public function testTTYCommand()
|
443 |
{
|
444 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
445 |
$this->markTestSkipped('Windows does not have /dev/tty support');
|
446 |
}
|
447 |
|
456 |
|
457 |
public function testTTYCommandExitCode()
|
458 |
{
|
459 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
460 |
$this->markTestSkipped('Windows does have /dev/tty support');
|
461 |
}
|
462 |
$this->skipIfNotEnhancedSigchild();
|
474 |
*/
|
475 |
public function testTTYInWindowsEnvironment()
|
476 |
{
|
477 |
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
478 |
$this->markTestSkipped('This test is for Windows platform only');
|
479 |
}
|
480 |
|
561 |
{
|
562 |
$process = $this->getProcess('echo foo');
|
563 |
$process->run();
|
564 |
+
$this->assertGreaterThan(0, \strlen($process->getOutput()));
|
565 |
}
|
566 |
|
567 |
public function testGetExitCodeIsNullOnStart()
|
660 |
|
661 |
public function testProcessIsNotSignaled()
|
662 |
{
|
663 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
664 |
$this->markTestSkipped('Windows does not support POSIX signals');
|
665 |
}
|
666 |
$this->skipIfNotEnhancedSigchild();
|
672 |
|
673 |
public function testProcessWithoutTermSignal()
|
674 |
{
|
675 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
676 |
$this->markTestSkipped('Windows does not support POSIX signals');
|
677 |
}
|
678 |
$this->skipIfNotEnhancedSigchild();
|
684 |
|
685 |
public function testProcessIsSignaledIfStopped()
|
686 |
{
|
687 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
688 |
$this->markTestSkipped('Windows does not support POSIX signals');
|
689 |
}
|
690 |
$this->skipIfNotEnhancedSigchild();
|
702 |
*/
|
703 |
public function testProcessThrowsExceptionWhenExternallySignaled()
|
704 |
{
|
705 |
+
if (!\function_exists('posix_kill')) {
|
706 |
$this->markTestSkipped('Function posix_kill is required.');
|
707 |
}
|
708 |
$this->skipIfNotEnhancedSigchild(false);
|
985 |
*/
|
986 |
public function testWrongSignal($signal)
|
987 |
{
|
988 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
989 |
$this->markTestSkipped('POSIX signals do not work on Windows');
|
990 |
}
|
991 |
|
1178 |
'include \''.__DIR__.'/PipeStdinInStdoutStdErrStreamSelect.php\';',
|
1179 |
);
|
1180 |
|
1181 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
1182 |
// Avoid XL buffers on Windows because of https://bugs.php.net/bug.php?id=65650
|
1183 |
$sizes = array(1, 2, 4, 8);
|
1184 |
} else {
|
1224 |
|
1225 |
/**
|
1226 |
* @param string $commandline
|
1227 |
+
* @param string|null $cwd
|
1228 |
+
* @param array|null $env
|
1229 |
+
* @param string|null $input
|
1230 |
* @param int $timeout
|
1231 |
* @param array $options
|
1232 |
*
|
vendor/symfony/process/Tests/ProcessUtilsTest.php
CHANGED
@@ -26,7 +26,7 @@ class ProcessUtilsTest extends TestCase
|
|
26 |
|
27 |
public function dataArguments()
|
28 |
{
|
29 |
-
if ('\\' === DIRECTORY_SEPARATOR) {
|
30 |
return array(
|
31 |
array('"\"php\" \"-v\""', '"php" "-v"'),
|
32 |
array('"foo bar"', 'foo bar'),
|
26 |
|
27 |
public function dataArguments()
|
28 |
{
|
29 |
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
30 |
return array(
|
31 |
array('"\"php\" \"-v\""', '"php" "-v"'),
|
32 |
array('"foo bar"', 'foo bar'),
|
vendor/symfony/process/phpunit.xml.dist
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
3 |
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4 |
-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/
|
5 |
backupGlobals="false"
|
6 |
colors="true"
|
7 |
bootstrap="vendor/autoload.php"
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
3 |
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4 |
+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
|
5 |
backupGlobals="false"
|
6 |
colors="true"
|
7 |
bootstrap="vendor/autoload.php"
|
whitelist-html/README.md
DELETED
@@ -1,175 +0,0 @@
|
|
1 |
-
# Whitelist HTML
|
2 |
-
|
3 |
-
Introduces an `esc_*()`-like function for when you need to allow *some* HTML.
|
4 |
-
|
5 |
-
## Rationale
|
6 |
-
### Background
|
7 |
-
|
8 |
-
Best practices when working with any sort of data is to escape your output, and
|
9 |
-
do it as late as possible. Values can't usually know about where they're going
|
10 |
-
to be used, so you need to escape based on whatever context you're
|
11 |
-
outputting into. These are things like `esc_attr()` for HTML attribute values,
|
12 |
-
`esc_html()` for text in HTML, and so on.
|
13 |
-
|
14 |
-
Even if values could know about their output context, it's still possible for
|
15 |
-
users to craft malicious output if you're not escaping properly. For this
|
16 |
-
reason, you need to do sanitization on input (to ensure your value is correct),
|
17 |
-
as well as escaping on output (to ensure the value is output into the context
|
18 |
-
correctly).
|
19 |
-
|
20 |
-
Right now across every WordPress site, there's a glaring hole in escaping, and
|
21 |
-
hence in security.
|
22 |
-
|
23 |
-
When translating strings in WordPress, the most common functions to use are
|
24 |
-
`__()` (translate and return) or `_e()` (translate and output). Where possible,
|
25 |
-
these need to be escaped too, to ensure that translations don't accidentally
|
26 |
-
break your output. For this reason, `esc_html_e()`, `esc_attr_e()`, etc are
|
27 |
-
offered as convenience functions.
|
28 |
-
|
29 |
-
However, this falls down when you need to have HTML in the translation.
|
30 |
-
Translation best practices say to include as much information as possible for
|
31 |
-
translators when you translate a string. This means including HTML tags in the
|
32 |
-
string so translators can understand how the sentence is formed.
|
33 |
-
|
34 |
-
It's possible to do "clever" hacks to get around this with placeholders,
|
35 |
-
for example:
|
36 |
-
|
37 |
-
```php
|
38 |
-
$text = sprintf(
|
39 |
-
esc_html__( 'This is some text %1$swith a link%2$s'),
|
40 |
-
'<a href="http://example.com/">',
|
41 |
-
'</a>'
|
42 |
-
);
|
43 |
-
```
|
44 |
-
|
45 |
-
Note though that this is much harder for translators to understand, since they
|
46 |
-
can't intuitively tell what's going on without checking the code. Even with
|
47 |
-
translator comments, it's still harder to understand. There's also no guarantee
|
48 |
-
that this is secure. You could swap the placeholders, or leave out pieces. Best
|
49 |
-
practice states that we should instead have the following:
|
50 |
-
|
51 |
-
```php
|
52 |
-
$text = sprintf(
|
53 |
-
esc_html__( 'This is some text <a href="%1$s">with a link</a>'),
|
54 |
-
'http://example.com/'
|
55 |
-
);
|
56 |
-
```
|
57 |
-
|
58 |
-
Right now, the policy is essentially to treat translated strings with HTML as
|
59 |
-
trusted. Not only does this push the burden off to translation validators in
|
60 |
-
GlotPress, but it means you're no longer in control of your output. This is an
|
61 |
-
attack vector waiting to be exploited.
|
62 |
-
|
63 |
-
|
64 |
-
### How do we solve this?
|
65 |
-
|
66 |
-
WordPress contains functions specifically designed to help with this problem.
|
67 |
-
After all, people can submit comments or posts with HTML in them, but WP can
|
68 |
-
handle this fine. WordPress handles this through a library called kses, which
|
69 |
-
sanitizes HTML down to a small, whitelisted subset of HTML. Posts can have more
|
70 |
-
HTML tags than comments can, since they're usually semi-trusted users.
|
71 |
-
|
72 |
-
kses is great, but is not typically used outside of large HTML blocks like post
|
73 |
-
or comment content. The reason for this is often stated as performance. It's
|
74 |
-
well-known that kses is pretty slow, since it has to essentially disassemble the
|
75 |
-
HTML, then reconstruct it with the allowed tags.
|
76 |
-
|
77 |
-
However, Zack Tollman wrote a [fantastic post][tollmanz-kses] that calls into
|
78 |
-
question this accepted knowledge of kses performance. Zack's findings show that
|
79 |
-
while kses is worse with performance on longer pieces of content (like post
|
80 |
-
content), it's actually closer to being on-par with other escaping for short
|
81 |
-
strings. This is even more evident when reducing the whitelist of elements down
|
82 |
-
from the default to just the elements you need.
|
83 |
-
|
84 |
-
[tollmanz-kses]: https://www.tollmanz.com/wp-kses-performance/
|
85 |
-
|
86 |
-
### `whitelist_html`
|
87 |
-
|
88 |
-
This library provides a nice, easy, performant way to perform sanitization on
|
89 |
-
translated strings. Rather than requiring you to work with the internals of
|
90 |
-
kses, it's much closer to functions like `esc_html`.
|
91 |
-
|
92 |
-
Security is only useful if it's also usable. For the most part, `whitelist_html`
|
93 |
-
can be used in exactly the same way developers are used to using other escaping
|
94 |
-
functions.
|
95 |
-
|
96 |
-
A quick example to demonstrate how easy it is:
|
97 |
-
```html
|
98 |
-
<!-- Previously -->
|
99 |
-
<p><?php _e( 'This is a terrific use of <code>WP_Error</code>.' ) ?></p>
|
100 |
-
|
101 |
-
<!-- Secure version -->
|
102 |
-
<p><?php print_whitelist_html( __( 'This is a terrific use of <code>WP_Error</code>.' ), 'code' ) ?></p>
|
103 |
-
```
|
104 |
-
|
105 |
-
Even if a malicious translator changed this to include a link to a spam site (or
|
106 |
-
worse), this would be caught and stripped by `whitelist_html`.
|
107 |
-
|
108 |
-
Taking our original example from above, we can modify it to only allow `a` tags:
|
109 |
-
|
110 |
-
```php
|
111 |
-
$text = whitelist_html(
|
112 |
-
sprintf(
|
113 |
-
__( 'This is some text <a href="%1$s">with a link</a>'),
|
114 |
-
'http://example.com/'
|
115 |
-
),
|
116 |
-
'a'
|
117 |
-
);
|
118 |
-
```
|
119 |
-
|
120 |
-
It's that easy. You can do this with multiple elements as well, using a
|
121 |
-
comma-separated string or list of elements:
|
122 |
-
|
123 |
-
```php
|
124 |
-
$text = whitelist_html(
|
125 |
-
sprintf(
|
126 |
-
__( 'This is <code>some</code> text <a href="%1$s">with a link</a>'),
|
127 |
-
'http://example.com/'
|
128 |
-
),
|
129 |
-
'a, code' // or array( 'a', 'code' )
|
130 |
-
);
|
131 |
-
```
|
132 |
-
|
133 |
-
If you need custom attributes, you can use kses-style attribute specifiers.
|
134 |
-
These can be mixed too:
|
135 |
-
|
136 |
-
```php
|
137 |
-
$text = whitelist_html(
|
138 |
-
sprintf(
|
139 |
-
__( 'This is <span class="x">some</span> text <a href="%1$s">with a link</a>'),
|
140 |
-
'http://example.com/'
|
141 |
-
),
|
142 |
-
array(
|
143 |
-
'a',
|
144 |
-
'span' => array(
|
145 |
-
'class' => true,
|
146 |
-
),
|
147 |
-
)
|
148 |
-
);
|
149 |
-
```
|
150 |
-
|
151 |
-
|
152 |
-
### Performance Test
|
153 |
-
|
154 |
-
In a quick test, the string
|
155 |
-
`'hello with a <a href="wak://example.com">malicious extra link!<///q><o>b'` was
|
156 |
-
run through both `whitelist_html` (with only `a`) and `esc_html` with 10,000
|
157 |
-
iterations. While the two functions don't perform the same task, they're both
|
158 |
-
escaping functions, so it's useful to compare performance to understand whether
|
159 |
-
this approach can be used in production code.
|
160 |
-
|
161 |
-
In an unscientific trial, this gave figures of 0.96s for `whitelist_html` and
|
162 |
-
1.07s for `esc_html` for 10,000 trials each. This indicates that
|
163 |
-
`whitelist_html` is at least on the order of other escaping functions.
|
164 |
-
|
165 |
-
|
166 |
-
## Using this Library
|
167 |
-
|
168 |
-
Two steps to using this library:
|
169 |
-
|
170 |
-
1. Add this library in as a git submodule.
|
171 |
-
2. Load `whitelist-html.php` before you need to use it. We recommend in
|
172 |
-
`mu-plugins`, but you can also load it in via `wp-config.php` if you want it
|
173 |
-
earlier.
|
174 |
-
|
175 |
-
Done. Start using the function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
whitelist-html/whitelist-html.php
DELETED
@@ -1,102 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Escapes text for HTML output, allowing certain tags
|
5 |
-
*
|
6 |
-
* Takes an arbitrary string and ensures it's safe for output into HTML. Unlike
|
7 |
-
* `esc_html`, this allows a certain subset of tags, allowing it to be used for
|
8 |
-
* strings which need to have some HTML in them (such as translated text).
|
9 |
-
*
|
10 |
-
* Allowed tags can be passed in one of two formats. The verbose form is the
|
11 |
-
* traditional kses form of
|
12 |
-
* `[ 'element' => array( 'attr' => true, 'otherattr' => true ) ]` which
|
13 |
-
* specifies tags and their attributes.
|
14 |
-
*
|
15 |
-
* The concise form, useful for inline usage on output, is in the form of
|
16 |
-
* `[ 'element', 'otherelement' ]` - This concise form takes the attribute list
|
17 |
-
* from WP core's attribute whitelist for a good-enough list for most usages.
|
18 |
-
* This can also be passed as a comma separated string.
|
19 |
-
*
|
20 |
-
* (You can also mix these forms, so something like
|
21 |
-
* `[ 'a', 'code', 'x-panel' => array( 'src' => true ) ] )` is perfectly valid.)
|
22 |
-
*
|
23 |
-
* For example:
|
24 |
-
*
|
25 |
-
* whitelist_html( __( 'Hello <a href="http://example.com">World!</a>' ), 'a' );
|
26 |
-
*
|
27 |
-
* This example would strip any tag except `a`, but would allow the default
|
28 |
-
* attributes on it (`href` and `title`).
|
29 |
-
*
|
30 |
-
* The default attributes and tags are based on {@see wp_kses_allowed_html} with
|
31 |
-
* the blank (default) "context". These are the tags in {@see $allowedtags}. To
|
32 |
-
* get all allowed post tags, pass `'post'` as the `$context` parameter, or pass
|
33 |
-
* the tags you need in the `$allowedtags` array. If a specified tag is not in
|
34 |
-
* the list, no attributes will be allowed.
|
35 |
-
*
|
36 |
-
* @link https://www.tollmanz.com/wp-kses-performance/
|
37 |
-
*
|
38 |
-
* @param string $text Content to escape
|
39 |
-
* @param array $allowedtags Allowed tags, see description.
|
40 |
-
* @param string $context kses context to use, {@see wp_kses_allowed_html}.
|
41 |
-
* @return string Escaped string for output into HTML context.
|
42 |
-
*/
|
43 |
-
function whitelist_html( $text, $allowedtags = array(), $context = '' ) {
|
44 |
-
$actually_allowed = array();
|
45 |
-
$default_list = wp_kses_allowed_html( $context );
|
46 |
-
|
47 |
-
// Split comma-separated string
|
48 |
-
if ( is_string( $allowedtags ) ) {
|
49 |
-
$allowedtags = array_map( 'trim', explode( ',', $allowedtags ) );
|
50 |
-
}
|
51 |
-
|
52 |
-
foreach ( $allowedtags as $key => $tag ) {
|
53 |
-
if ( is_array( $tag ) && is_string( $key ) ) {
|
54 |
-
// kses-formatted of `'element' => [ 'attr' => true ]
|
55 |
-
// `$tag` is actually the attrs, and `$key` is the tag name
|
56 |
-
$actually_allowed[ $key ] = $tag;
|
57 |
-
continue;
|
58 |
-
}
|
59 |
-
|
60 |
-
if ( ! is_string( $tag ) ) {
|
61 |
-
// Not concise form, what even is this?
|
62 |
-
_doing_it_wrong( 'whitelist_html', '$allowedtags must consist of strings or kses-style arrays' );
|
63 |
-
continue;
|
64 |
-
}
|
65 |
-
|
66 |
-
// Grab default attributes for the tag
|
67 |
-
$attrs = array();
|
68 |
-
if ( isset( $default_list[ $tag ] ) ) {
|
69 |
-
$attrs = $default_list[ $tag ];
|
70 |
-
}
|
71 |
-
|
72 |
-
// Add to allowed list
|
73 |
-
$actually_allowed[ $tag ] = $attrs;
|
74 |
-
}
|
75 |
-
|
76 |
-
// Do the sanitization dance
|
77 |
-
$sanitized = wp_kses( $text, $actually_allowed );
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Filter a string to be output into HTML, allowing some tags
|
81 |
-
*
|
82 |
-
* @param string $sanitized The text after it has been escaped.
|
83 |
-
* @param string $text The text before it has been escaped.
|
84 |
-
* @param string $allowedtags Tags requested to whitelist.
|
85 |
-
* @param string
|
86 |
-
*/
|
87 |
-
return apply_filters( 'whitelist_html', $sanitized, $text, $allowedtags, $context );
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Escapes text for HTML output, allowing certain tags, then outputs.
|
92 |
-
*
|
93 |
-
* @see whitelist_html
|
94 |
-
*
|
95 |
-
* @param string $text Content to escape
|
96 |
-
* @param array $allowedtags Allowed tags, {@see whitelist_html}.
|
97 |
-
* @param string $context kses context to use, {@see wp_kses_allowed_html}.
|
98 |
-
* @return string Escaped string for output into HTML context.
|
99 |
-
*/
|
100 |
-
function print_whitelist_html( $text, $allowedtags = array(), $context = '' ) {
|
101 |
-
echo whitelist_html( $text, $allowedtags, $context );
|
102 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|